summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-06-10Dive site management: remove the profile viewGravatar Dirk Hohndel
While this isn't what I really want (I wanted pictures of the dive site instead of the profile), at least this makes it clear that we aren't editing a dive but instead are looking at a site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10When done reverse geocoding, hide the notificationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Don't show the V2 warning anymoreGravatar Dirk Hohndel
This now happens in its own thread... But leave the infrastructure so we can ask questions about the geo encoding Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Add helper function to determine the distance between two pointsGravatar Dirk Hohndel
And use this to find a dive site within a certain radius of a GPS fix. This will be used to figure out if dive sites might be the same. This uses a new Qt5 component (Positioning) which was added in Qt5.2. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Don't show all the auto generated dive sites on the globeGravatar Dirk Hohndel
When downloading GPS data from the Subsurface webservice we repopulated the globe before purging all the unused GPS fixes from the list of dive sites which caused massive clutter (until the next time the user changed the displayed dive or did anything else that caused the globe to redraw itself). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Merge branch 'cloudstorage'Gravatar Dirk Hohndel
2015-06-09Cloud storage: implement confirmation of email address via PINGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: deal with visibility of PIN entryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: initial support for confirming the email PINGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Discard all temporary sites after merging with dive listGravatar Dirk Hohndel
After we import all the GPS fixes from the Subsurfae webservice we delete the ones that didn't match any dives. The algorithm skipped every other one by mistake. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Subsurface GPS webservice: make sure dive log is marked as modifiedGravatar Dirk Hohndel
One of the cases was missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Fix building with NO_MARBLE issueGravatar Gehad elrobey
We can't build with -DNO_MARBLE after some previous commit broke globe.cpp - centerOnCurrentDive() is still existing in the code while removed from header in 6b81fb49d09. - Some referenced to MainWindow::instance()->globe() even if we are building with no marble. - include stdint.h Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Cloud storage: first stab at creating an account on the backendGravatar Dirk Hohndel
This triggers when the email address / password is changed in the preferences. It opens an https connection with the backend server (the URL is hardcoded) which should create an account with these credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Select the correct dive in EditAddedDive modeGravatar Tomaz Canabrava
If we added two dives, and then tried to edit the first added one, the current 'added dive' set on main_tab would be the second one, so when we got to the accept() part of the call, it would reselect the last added_dive that we had. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Change the name of the dive site on the globeGravatar Tomaz Canabrava
The name of the dive site on the globe wasn't being updated when we changed the name of it in the dive management dialog. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Reset the current dive site when we reject itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Plot the current dive site in edit modeGravatar Tomaz Canabrava
We were ignoring the displayed_dive_site as we were adding it and the changes weren't accepted yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Do not connect to same signal/slot twiceGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Always fill the fields in LocationInformation edit widget.Gravatar Tomaz Canabrava
If the current_dive was the same as the dive send to the LocationInformation widget, we would do nothing, wich is wrong because we could have filled the information on an add_dive_site action and then cancelled it, so the info will stay there until we change it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Always send the UUID of the coordinates to the globeGravatar Tomaz Canabrava
We were relying in the current_dive to display the globe coordinates correctly - but this is not always the case: you can be inserting a new dive site and it isn't yet inside of the dive until the user presses accept. So always pass the uuid of the dive site that we want to display. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Make Subsurface compile with NO_PRINTING setGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04GlobeGPS: add empty function for NO_MARBLEGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Add progress updating ability to print dialogGravatar Gehad elrobey
The progress bar shows the progress of both the rendering part and the templating part, unfortunately we can't check the progress of Grantlee templating engine so the progess bar doesn't have a constant pace it stops a little around 20%. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: call print from printer classGravatar Gehad elrobey
This is the main function that prints dive lists. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: remove the print_options struct from display.hGravatar Gehad elrobey
Move print_options struct to printoptions.h, its more relevant to be placed here. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Remove more obsolete code from printlayoutGravatar Gehad elrobey
This code can be removed as we don't need QT printing code anymore. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Edit the print options widgetGravatar Gehad elrobey
Remove obsolete code and add new customizable print code to the options dialog. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Remove the obsolete code from PrintDialogGravatar Gehad elrobey
We don't need any further calls to printLayout as it will be replaced by Printer class that handles the new custom printing capability. Also fix one coding style issue. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Make the plus button work.Gravatar Tomaz Canabrava
This fixes a signal being emitted. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Set the MessageBox stretching rules.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Connect the signalsGravatar Tomaz Canabrava
Connect the signals and slots so we can use the stuff I programmed. Sorry for the noise on the patch - most of this is whitespace fixes done by the QtCreator. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Remove broken methodGravatar Tomaz Canabrava
This method was written a long time ago, now we need to use the new versions of it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Fix acceptChanges for add modeGravatar Tomaz Canabrava
We didn't save the uuid of the newly created dive site on the affected dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Fix reject changes for add/editGravatar Tomaz Canabrava
Reject changes was correct only for Edit, but not for Add. When in add mode we need to retrieve the old dive site, and when in edit mode we should do nothing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Do not set the state of the application from here.Gravatar Tomaz Canabrava
The mainwindow should manage the mainwindow. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Fire signals for edit and filteringGravatar Tomaz Canabrava
Edit will always fire, Filtering only if the dive site already exists. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Only filter by divesite if the divesite existsGravatar Tomaz Canabrava
And not when we are adding a new dive site. Also, remove hide button call. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Reset state: have a correct dive site being displayedGravatar Tomaz Canabrava
I'm not sure if this is the right approach, but it seems to work: when we reset the state of the widget, we try to get the current dive site from the current dive, and set it. This way it will work for the globe later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Current dive site has nothing to do with enableEditionGravatar Tomaz Canabrava
It will be set later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Fix the message buttons in dive_site_editGravatar Tomaz Canabrava
Some button management operations where unnecessary. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Different states for edit / add dive siteGravatar Tomaz Canabrava
When we start the dive site edit dialog, either for add or for edit, we don't save the state, so the reject state didn't know what to do with the dive site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Remove unnecessary callsGravatar Tomaz Canabrava
All those calls are unnecessary: The first will be called when the QComboBox in the MainTab changes its index, and the other two calls shouldn't be called: the only thing that should change a dive site inside the LocationManagement is the LocationManagement. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03centerOnCurrentDive needs to be a slotGravatar Tomaz Canabrava
I'll connect this in the future with a few methods that will try to maintain state between dive changes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Clear up editDiveGeoPosition for the new approachGravatar Tomaz Canabrava
We can only enter in editing state by opening the editing dialog, so the mainwindow check is now invalid. and also we shouldn't set the editingmode to false, since we will edit until the user clicks close. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Use for_each_dive_site to populate the dives in the globeGravatar Tomaz Canabrava
When we didn't have a proper dive_site_table, the dive sites where scattered across all dives and so we looped over all dives to find the dive sites and add them to the tree. Now this is a bit cleaner, a bit faster. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Rework the method to pick a dive site via the globeGravatar Tomaz Canabrava
The globe used to allow the user to pick a dive site if the dive didn't have coordinates, but this is now wrong since when in dive site editing mode we can select multiple times new coordinates for it, and it should only be marked as finished when the user actually finishes it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Do not trigger a dive site change when setting a diveGravatar Tomaz Canabrava
When setting a dive, we fire the dive site change a few times after the index of the QComboBox is changed; we don't need that - fire just once. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Don't clear the underline model of the comboboxGravatar Tomaz Canabrava
Clear was the right method to call when we used a line edit, and the line edit didn't had a model to provide data. Calling clear() on a QComboBox will delete all itens inside of it, and what we wanted was to choose an invalid index - and that's -1 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Remove commented out codeGravatar Tomaz Canabrava
This code was commented out when I started to port the locations to new code, and it's harmless to remove it now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Don't rely on current_dive to get the dive site idGravatar Tomaz Canabrava
Since we are modifying the dive site inside of the dive, we can't ask the dive for the new one, and we also can't use the name of the dive site, as there's the possibility that two or more could have the same name, so rely only on the index of it to get the uuid. The index is variable since we will sort the dive_site_table alphabetically, but this doesn't matter since we are using it only temporarely to get the uuid, and this one never changes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>