summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-07-21Default to first tab on exportGravatar Miika Turkia
The divelog export dialog was changed to default to the HTML export when changing the layout to resemble other dialogs (commit 42acaa40). However, the default tab should be the first one with most of the export formats and options. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Use correct colors on selectionGravatar Tomaz Canabrava
I was wondering why the colors where wrong on mac, it took me a while to find the correct spot to fix. It seems that the Brush is not used to paint the fonts, but the Pen is. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Try to fix paint issues on windowsGravatar Tomaz Canabrava
Davide complained about a flickr on windows, I think it has to do with the QPainter now knowing the right size of it's paint rect. this should fix it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Code uneeded because the drawControw does this by itselfGravatar Tomaz Canabrava
Removing dead code. the call above this does that already. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Add tooltip for geolocation lookupGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Only enable Bluetooth support if building against Qt5.4 or newerGravatar Dirk Hohndel
Also remove the quick hack from commit 947fda14c5d1 ("Bluetooth support: quick build fix for Qt5.2"). I should have thought this through before pushing that commit, but oh well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Bluetooth support: quick build fix for Qt5.2Gravatar Dirk Hohndel
The InvalidBluetoothAdapterError error code wasn't introduced until Qt5.3, so let's not test for it on older versions of Qt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-07-20Update the message shown on pairing erorrsGravatar Claudiu Olteanu
Advice the user to use his operating system for the pairing step if the remote device requires a custom PIN code. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Fix typos on Bluetooth selection widgetGravatar Claudiu Olteanu
Fix "lable" typos from Bluetooth selection widget. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Hide the local BT combobox if there is only one deviceGravatar Claudiu Olteanu
If there is only one local Bluetooth adapter, then hide the selection combobox and the label. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Don't close the BT selection Widget if the local BT adapter is invalidGravatar Claudiu Olteanu
Don't close the Bluetooth selection widget if the default local Bluetooth adapter is invalid. Maybe there is a problem with the default Bluetooth device and the user has another one (a BT dongle) which can be used. If the selected device is invalid then update the UI information, disable the available buttons and announce the user about the problem. Also move the device changed logging message before we call the update information method. In this way the logging message with the problem will not be overwritten. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Log errors which occur during Bluetooth device discoveryGravatar Claudiu Olteanu
Register to the signal emmited when an error occurs during Bluetooth device discovery and log a description of the error which can be used to identify problem's cause. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Reinitialize the BT discovery agent when a new adapter is selectedGravatar Claudiu Olteanu
Reinitialize the Bluetooth device discovery agent when the user selects a new local Bluetooth adapter using the address of the selected device. Before this patch the agent was always using the local default Bluetooth adapter. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Add combobox for Bluetooth local device selectionGravatar Claudiu Olteanu
Add a combobox which can be used to list/select the available local Bluetooth devices. In this way, if a user has more than one local Bluetooth devices (integrated, dongles, etc.) he can choose which one he wants to use. Before this patch, only the default local Bluetooth device could be used. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Don't block the save button for Bluetooth device selectionGravatar Claudiu Olteanu
After commit 619e97ee4fcd ("Stop the SDP agent if the Clear/Save button was pressed") we don't need to block the save button anymore for scanning completion because the SDP agent will be stopped manually if the Save button was pressed. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20Printing: add default case to switchGravatar Gehad elrobey
Add default case to fix switch warning. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: change 'Discard' to 'Cancel' buttonGravatar Gehad elrobey
Cancel button is more relevant to the dialog message. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add custom color paletteGravatar Gehad elrobey
We can use custom color palette to edit current color palette. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: save custom color palette to QSettingsGravatar Gehad elrobey
- save custom colors to QSettings. - load custom colors from QSettings. - set almond color palette as default palette. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: implement edit buttons in color tabGravatar Gehad elrobey
Add button group and attached edit buttons to it. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: show colors in edit tabGravatar Gehad elrobey
- Add default color struct - Init the color struct with default colors - Show color text in labels - Preview colors Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add colors tab to edit windowGravatar Gehad elrobey
Select custom colors for print templates, by default there are five colors that can be used dynamically in prints. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: update preview on field changesGravatar Gehad elrobey
- Trigger re-rendering on the QPixmap if fields changed. - Change template selection to custom if template text changed. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: update preview on apply settingsGravatar Gehad elrobey
On update call Printer to render on the QPixmap. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add apply button to TemplateEdit classGravatar Gehad elrobey
Add apply button to the dialog, Update the preview after applying the new settings. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: save only if data is changed in template_optionsGravatar Gehad elrobey
Check if data is changed before saving the new settings. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add preview to TemplateEdit dialogGravatar Gehad elrobey
Show QPixmap in QLabel, Use Printer class to render the Preview on the QPixmap. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: check for different printing modesGravatar Gehad elrobey
Add PRINT/PREVIEW print modes, check for printing modes before casting. We must pass a QPaintDevice with type QPixmap for previewing and with type QPrinter for actual printing. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: show confirmation message before overwriting the templateGravatar Gehad elrobey
Before overwriting the new template show confirmation message. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-19Use itemClicked signal instead of itemActivated for BT device selectionGravatar Claudiu Olteanu
On Android platforms the system is configured to raise the itemActivated signal when the user double clicks an item. Since the items are small it is pretty hard to double click them. Therefore use the itemClicked signal instead of the itemActivated signal. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-19Stop the SDP agent if the Clear/Save button was pressedGravatar Claudiu Olteanu
If the Cancel button was pressed then we should stop the SDP agent. The same thing happens when the Save button was pressed. We don't need to add new BT remote devices to the list if the widget was closed or if the list with the discovered BT devices was cleared. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18Don't hide location completion when user types spaceGravatar Dirk Hohndel
Odd that I never noticed this until several people pointed it out to me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18Add nr of dives at the site to completion stringGravatar Dirk Hohndel
I'm not convinced that this is useful enough to keep, but let's give it a try and see what people think. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18Location completion: remove space between '~' and distanceGravatar Dirk Hohndel
Just a minor visual improvement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17Make sure we don't pass the wrong infoGravatar Tomaz Canabrava
We were returning false here which meant that we were overriding the information with the wrong value later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17Remove buggy codeGravatar Tomaz Canabrava
This code is already implemented as a signal-connection on the maintab.cpp / globe.cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Fix mouse interaction with the Location ListGravatar Tomaz Canabrava
paint methods should be used only to paint, not to trigger other widget behaviours ( we could got ourselves into a bad recursion bug from that ). Also, enabled mouse tracking to correctly track the mouse movement inside the widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Show only 1 possibility if string is uniqueGravatar Tomaz Canabrava
We should only show one possibility if the dive_site name string is unique - we don't have that dive_site yet - so we pass to the Completer filter a Dummy string that will surelly not be a dive site - konami code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Location edit: correctly position globe if create dive options are activeGravatar Dirk Hohndel
This way when the user looks through the list of completion options the globe behaves in a consistent way, i.e., if the current dive site has a GPS fix and the user activates one of the two options to create a dive site with that GPS information, the globe show the right area (and the globe zooms out if the current dive site doesn't have a GPS fix). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Change API signature to act on dive_site, not uuidGravatar Dirk Hohndel
This way in the future we can pass in a pointer to a dive site that isn't linked in our dive site list yet (i.e., while we are editing). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Dive site edit: add second "create" line without completionGravatar Dirk Hohndel
We now have TWO special entries. One with just what the user has typed and one with the first completion of that text. This way both Henrik and Linus can get what they want. I'm not sure I love this, but it's easy to revert if the consensus is that this is too confusing. But it's much easier to discuss this if people can actually play with it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16KMessageWidget: hide messages regardless whether it's visibleGravatar Dirk Hohndel
Even if the message isn't visible hide it, don't just return. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Dive edit: handle dive sites more sanely while editingGravatar Dirk Hohndel
While we edit things, displayed_dive_site is the authoratative source of data that should be displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Don't reset editMode when refreshing the displayGravatar Dirk Hohndel
Just because we want to update the latest information on the Notes tab doesn't mean we are done editing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Just call the member functionGravatar Dirk Hohndel
This code was embarrassingly indirect. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Dive site handling: make sure the data in displayed_dive is updatedGravatar Dirk Hohndel
After an edit when the dive is redisplayed we are not copying the data from current dive back over displayed dive (as the reasonable assumption is that we just edited the displayed dive and copied the information into the current dive)- so make sure that after the dive site handling the displayed dive does in fact have the correct dive site information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15Dive site handling: special case for auto generated divesGravatar Dirk Hohndel
When we download GPS data from the webservice we can end up with dive sites that are simply a place holder for the the GPS fix. If we replace the name of one of those sites we should just delete the site (assuming it isn't used in another dive, which is unlikely but theoretically possible). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15Dive site handling: correctly handle the different scenariosGravatar Dirk Hohndel
- do not create dive sites unless the user has accepted the changes - all modification are tracked in the displayed_dive_site - when the user accepts the changes, the real dive site list (and the selected dives) are updated according to what is in the displayed_dive_site This adds quite verbose debugging messages and disables a section of code that has a special case for data created by the Subsurface web service. This code needs some re-thinking and should eventually go away. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15Better text for dive site completionsGravatar Dirk Hohndel
Also make the explanation text slightly smaller. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>