aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-02-25Display slowness warning before opening a V2 fileGravatar Dirk Hohndel
This is somewhat invasive as aborting the XML file read requires us to report things up the recursive parsing chain. What we really need to do here is to ask the user how they want to use the data from reverse geo lookup. But for now we only warn about the fact that this can take a while. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23Move helper functions aroundGravatar Dirk Hohndel
We had a ton of helper functions in qt-gui.cpp which really didn't make much sense. So I moved them all into qthelper.cpp. Also moved the UserAgent helper that didn't belong in the UpdateHandler to begin with - that's a generic helper used in many places... With this we can successfully build using cmake again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22Revert "Update Qt4 patch"Gravatar Dirk Hohndel
This reverts commit 762315e7eef47c1a5357e9c8691676707e3c630e. Oops, this was supposed to update the patch, not update and apply it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19Update Qt4 patchGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17subsurfacewebservices.cpp: add QDebug includeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17simplewidgets.cpp: QLineEdit::setClearButtonEnabled() is from Qt5.2Gravatar Lubomir I. Ivanov
This could cause problems if the user tries to compile with Qt versions between 5.0 and 5.2. Reported-by: Michele Fabi <fabiemme@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-16Fix profile toolbarGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15downloadfromdivecomputer.cpp: fix initializer list order warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15add and use a version.c / version.h pairGravatar Lubomir I. Ivanov
version.c is now object code which is recompiled each time ssrf-version.h changes, while the interface file version.h remains that same at all times and files which include it will not need to be recompiled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Fix Subsurface build with Qt 5.4.1 and laterGravatar Thiago Macieira
The intention had been all along to use the 5.4 QSysInfo API, but due to a silly mistake in the QT_VERSION check, it never got enabled for 5.4.0. On 5.4.1 it does get enabled and, unfortunately, causes compilation errors because the API changed between the time we backported to Subsurface and the final version. This commit backports the final QSysInfo API from Qt 5.4 into Subsurface, which includes the renaming of a few functions. Since the prettyOsName function no longer exists in the Qt API in that form, I've reimplemented it using the API that does exist. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Use unused cylinders in planner if they are displayedGravatar Robert C. Helling
This makes prefs.display_unused_tanks also relevant for the planner. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix Null values in yearly statistics export.Gravatar Gehad elrobey
Null values should be handeled nicely instead of showing NULL or Nan. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix exporting themes in multilingual environmentGravatar Gehad elrobey
Don't compare to static english string, must translate first. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add ssrf as dive log extension on importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add ability to undo shifting of dive timeGravatar Grace Karanja
Adds the ability to undo shifting of dive times. The change is captured at simplewidgets.cpp and an undo command is created. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14When cleaning up the empty screen, also clean up dive sitesGravatar Dirk Hohndel
Otherwise we are using stale pointers in the displayed_dive_site global. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Rename the tab "Dive info" to "Info", and "Dive notes" to "Notes"Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14mainwindow.cpp: don't close a file if a dive site is being editedGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13When updating the dive site name, show this on the maintabGravatar Dirk Hohndel
If we accept a change on the dive site management screen, it needs to be reflected on the Dive notes tab right away. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13When closing a dive, delete all the dive sitesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Don't add empty dive sitesGravatar Dirk Hohndel
It makes no sense to keep them around, it makes no sense to have dives refer to them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Make sure there is a dive site if you try to edit itGravatar Dirk Hohndel
If the user clicks on manage (or double clicks on the globe) and the displayed_dive doesn't actually have a dive site associated with it (e.g. because we are adding a dive or because it was imported or downloaded without dive site information, then we need to make sure that there is an empty dive site that we can make changes to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13When adding / planning a dive, reset the dive site manage screenGravatar Dirk Hohndel
Otherwise old data is still shown if the user clicks manage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Fix crash when adding a diveGravatar Dirk Hohndel
If a dive has no dive_site_uuid we would dereference a NULL pointer and crash. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Fix compile time warningGravatar Dirk Hohndel
No idea why designer sometimes adds these zorder items. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Allow editing of dive sitesGravatar Dirk Hohndel
And hook things up when double clicking the globe. The user experience isn't consistent with what we do on the main tab (i.e., no coloring of fields that are changed), but it seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Adapt GPS coordinate download from our companion app to dive sitesGravatar Dirk Hohndel
This is a bit awkward now. We are downloading what looks like fake dives in the v2 format. So we create a dive site for every single fix. After we merge those new dive sites into the existing dives we need to throw away all the dive sites that weren't used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13maintab change for get_dive_site_uuid_by_nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Get location for Facebook from dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Get location from dive site for printingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Remove coordinates from main tabGravatar Dirk Hohndel
It seems to make sense to only have them on the dive site screen. For the main UI they were redundant (we have the map) and not all that useful. The only time people would want them is if they wanted to manually add GPS coordinates for a dive, but that should now be done via the dive site UI. There are a couple of FIXMEs in the code and a few code blocks that have been commented out as they will be needed in one form or another once this GPS handling is done on the dive site UI, which right now it is NOT. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Make filters work with dive sitesGravatar Dirk Hohndel
This simply tracks the names - if we have multiple dives sites with the same name but different other data (e.g. different GPS), we could easily get this right (well, somewhat easily, it's a UI question), but for that we'd have to filter for dive site uuid instead of for dive location name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Switch components for cut/paste dive to dive site logicGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show dive site name in dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Correctly connect the maintab to dive site managementGravatar Dirk Hohndel
We now have a working uuid - use it. And populate the fields accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Make editing a location work with dive sitesGravatar Dirk Hohndel
Not sure if this is the final implementation, but at least for simple cases it works now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Clear the location if we have no dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Update completion model for dive site namesGravatar Dirk Hohndel
This way the drop down works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show dive coordinates on map based on dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show GPS coordinates based on dive site on MainTabGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show location based on dive site on MainTabGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Remove redundant functionGravatar Dirk Hohndel
We had two functions doing exactly the same thing. Let's drop the one with the highly confusing name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Pass a fake dive site UUID to the callback.Gravatar Tomaz Canabrava
This is the start of the preparations to edit the dive site, passing a uuid so we can retrieve it later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Copy the name and the coords when entering the EditDiveSite stateGravatar Tomaz Canabrava
Name and coords of the current dive are copied to the edit dive site screen. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Accept / Cancel location editGravatar Tomaz Canabrava
Make it possible to cancel or accept the location edit and get back to the mainwindow default state. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Enable the location edit widget on mainwindowGravatar Tomaz Canabrava
Clicking on the 'Manage' button now brings you to the widget to manage it. Nothing has been added on it yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Create a new state for the MainWindow: EditDiveSiteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Create simple class to hold the location management.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11More meaningfull names for the ui elements.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add the ui file for the location informationGravatar Tomaz Canabrava
Just the xml file for the Ui location information. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>