aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-08-31Merge the dive sites selected.Gravatar Tomaz Canabrava
Wee. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31UI code to merge dive sitesGravatar Tomaz Canabrava
Get the Qt data structures and convert to something that we can use in our C - core. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Offer the option to merge dive sites.Gravatar Tomaz Canabrava
Almost finishing. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Show the correct data on the Dive Site ListGravatar Tomaz Canabrava
We where showing the UID, wich didn't made sense. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Display dive sites with same gps as the currentGravatar Tomaz Canabrava
So we can merge them later - currently we are showing only the ID, ugly - fixing next. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Widget to show other dive sites at the same coordinatesGravatar Tomaz Canabrava
Add a new widget on the dive site management view to display all other dive sites at the same coordinates. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Remove unneeded includesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Remove about window have for Beta releasesGravatar Dirk Hohndel
Simply tag the beta versions correctly and none of this is needed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-29Fix edit & show of divesites for new and existing dives.Gravatar Sander Kleijwegt
The UI detects when it should refresh the loction after the user finished editting a divesite. Creating and editting divesites is now working even when the current dive is not saved yet. Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28Always show the dive site edit buttonGravatar Sander Kleijwegt
Update the tooltip and enable only when there is a divesite selected Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28Fix mouse clicks on divesite completer.Gravatar Sander Kleijwegt
Use clicked instead of activated signal on the completerList to handle the selection of a divesite. Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28Fix crash when creating a dive site without any dives in logbook.Gravatar Sander Kleijwegt
A divesite uuid is created using the timestamp of the currently selected dive. When there is no current_dive, use the current time to create a uuid. Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27QtBT: avoid crash at exit if no BT device foundGravatar Dirk Hohndel
If localDevice isn't valid we never initialize the discory agent, so let's not dereference it in the destructor unless it is valid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27Clean up CSV import parametersGravatar Miika Turkia
Continuing the crusade against excessive number of parameters for some functions. This should be the last of the import functions to be cleaned up. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-26Explicitly show the menubar after mainwindow initialisation.Gravatar Sander Kleijwegt
At least on Ubuntu with xfce instead of Unity this appears to be necessary to get a menu bar for the application. Fixes #833 Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Remove a couple of debug messagesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Keep the dive list disabled if editing a diveGravatar Tomaz Canabrava
When, in a dive edit mode user entered a dive site and went to dive site edit mode then finished the ds edit, the app would lose the disabled property of the dive list, making it possible to select a new dive when we where editing another one, complete mess. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Create a new dive site and edit it automaticallyGravatar Tomaz Canabrava
If the user clicks on the first or second option of the drop down list, subsurface will move him to the dive site edit panel automatically, since it's a new dive site and there's no information about it yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Move dive site list to its correct positionGravatar Tomaz Canabrava
When we are in display dive mode, and then edit the location text edit, going to edit dive mode, the location text edit will be moved a bit below of it's original position but the Dive Site List would be already opened, and stuck on it's original position, covering the dive list. This patch fixes that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Remove edit dive site from the menubarGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Get taxonomy from edit dive site widgetGravatar Tomaz Canabrava
Moved the get taxonomy button from the maintab to the edit dive site widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Turn the get taxonomy button into a manage dive site buttonGravatar Tomaz Canabrava
The get taxonomy button will be inside the manage dive site interface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Disable profile when in dive site edit modeGravatar Tomaz Canabrava
I didn't have time to create / finish the photos widget, so I'm adding back the profile view while in dive site edit mode, but disabling it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Merge branch 'gitMerge'Gravatar Dirk Hohndel
2015-08-25Add spinner while opening or saving cloud storageGravatar Dirk Hohndel
Right now this is quite ugly. And at least in my VM the transparency doesn't seem to work correctly. But at least we now have some visual indication that we are doing something while opening or saving cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Seabear import: remove excessive amount of parametersGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Remove excessive amount of parametersGravatar Miika Turkia
This removes the excessive amount of parameters on manual CSV import. We just use appropriate string array than can be directly fed to XSLT parsing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Make created dive site uuid deterministicGravatar Dirk Hohndel
Having random uuids seemed like a good idea, but there are several situations where they really cause problems. One is merging dive file imports from V2 logfiles. Another is testing such imports. Instead of making the uuid random we now hash the name and add the timestamp of the first dive associated with this dive site to the hash (first in this context is "first encountered" with no guarantee that it is the chronologically first). This way V2 imports create deterministic uuids but uuid conflicts are still extremely unlikely, even if the user has multiple dive sites with the same name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-23Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-08-23Recmode: Disable gas switch optionsGravatar Joakim Bygdell
Gas switch is not part of recreational mode, so disable the switch options. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-23Indent "Conservatism level"Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-22Printing: disable template editing for statistics templatesGravatar Gehad elrobey
Editing statistics templates is not supported now, as there is no custom template for statistics printing, so disable the template edit area. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: enable UI elements that now can be usedGravatar Gehad elrobey
The new statistics code, enable the editing of colors, font, and other template options. This patch enables the UI elements for these features. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: use the same code for both statistics and divelist printGravatar Gehad elrobey
- use the same generic code for both types of templates - check for the printing type before generating the template - remove unused printStatistics() method Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: add statistics templates to the dialogGravatar Gehad elrobey
Show the existing templates based on the print type selected by the user. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Printing: fix typo in template nameGravatar Gehad elrobey
Template names was capitalized, so change the file name to "Custom.html" instead of "custom.html" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-22Continue to separate logic code from UI codeGravatar Dirk Hohndel
We don't want to call into the MainWindow from C code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Display error messages in plannerGravatar Robert C. Helling
After a replot, check if there is an error message to display. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-21Save Properties for each State of the mainWindowGravatar Tomaz Canabrava
Each state can have the same widgets but with different properties - currently I'm using "enabled" : true and false for the DiveSiteEdit, it looks like a big amount of code for such a small thing but it was the cleaner way that I tougth of doing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for device discovery agent initialization (Windows)Gravatar Claudiu Olteanu
Register the metatypes needed for Windows platforms and initialize our custom device discovery agent. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Get a pretty print message when a device discovery error occuredGravatar Claudiu Olteanu
Try to get a pretty print message when a device discovery error is raised and it is unknown. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for BTH device item selection on Windows platformsGravatar Claudiu Olteanu
When a Bluetooth device is selected from the discovered list display information about its address and enable the save button. On Windows we don't need to check if the devices are paired because the pairing process is done automatically on the connection step. If the devices are not paired Windows will ask for user's permission to continue the process. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Use the address of the BTH device if its name is emptyGravatar Claudiu Olteanu
There are moments when the name of the device is not collected properly and it is unavailable. Instead of showing an empty string then print the address of the device. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for add remote Bluetooth device handlerGravatar Claudiu Olteanu
On Windows we cannot determine the pairing status of the device. Therefore we print only information about its name and about its BTH address. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Wait for BTH device discovery thread to finish on stop callGravatar Claudiu Olteanu
We should wait for the WinBluetoothDeviceDiscoveryAgent completion when the stop method was called. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Initialize WinSock and hide the information about the local deviceGravatar Claudiu Olteanu
On Windows we cannot select a device or show information about the local device. Therefore we disable the UI section related to local device details. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add implementation for our custom BTH device discovery serviceGravatar Claudiu Olteanu
Implement a custom lookup service for remote Bluetooth devices discovery. This will be used on Windows platforms to collect information about the name and the address of a remote Bluetooth device. In the beginning we initialize the queryset with the necessary flags and we start the lookup service. When a device is discovered we collect information about its name and its address and we raise a signal with it using the same signature as the one emitted by QtBluetoothDeviceDiscoveryAgent implementation. Finally we end the lookup service and we reset the internal flags. This code was written with the help of the sample code documenting the relevant APIs provided by Microsoft Corporation at https://code.msdn.microsoft.com/windowsdesktop/Bluetooth-Connection-e3263296 which is under the MS-LPL. No code from the samples was copied and the code in this commit is covered by the GPL and not the MS-LPL. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Add skeleton for Bluetooth custom serial implementation on Windows platformsGravatar Claudiu Olteanu
Add a skeleton which will be used to develop the Bluetooth custom serial implementation for Windows platforms. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Reimplement pairingFinished methodGravatar Claudiu Olteanu
The old implementation didn't use the correct deviceLabel pattern. When the pairing status of a device was changed the name of the device was missing from the new label. With the new implementation when the pairing status is changed we replace the old state with the new one and maintain the device information from the old label. Also we set the same pairing background colors used in the addRemoteDevice callback. In this way the label's state is consistent and the UX is improved. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20Clear the BTH discovered devices list on each searchGravatar Claudiu Olteanu
Clear the Bluetooth discovered devices list on each search. In this way we will show only the devices that are in range and active during the last scannning. Also if we clear the list before each call we don't need to check anymore if the discovered device is already in the list. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>