The way I was doing the old location management was very dull: everything
was tangled on the mainwindow. Now I think I've found the correct way to
create this, and thus, this code can die.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't work yet because we don't get the taxonomy from the geo
referencing services yet - but it's ready to be populated.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hopefully we now have the UI semantics figured out.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the option to only switch at required stop to the planner UI. This is not actually used yet.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The longer I stared at the existing code the less it made sense.
So instead I rewrote it in a way that seems logical to me. And added a
boatload of debugging output (which needs to be removed, of course).
I tested this against more than a hundred dives and it seemed to always
pick the right fix.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simple preferences infrastructure with default prefs, prefs and hooks for
the Qt Settings system and our preferences ui.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just the interface changes for configuration options for geo coding.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show the user a warning if he opens an old version of the divelog
file, the warning tries to explain some things that are different
on the new version.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This might be what the user wanted, but also might not
be it. So wait for the user to request it manually.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correctly handles resizing of interface items by
creating the layout on the parent instead of selecting the
items and applying the layout around them.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This was creating a lot of empty spaces on the preferences
dialog and making Dirk unhappy.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The code didn't trigger the update routine after PIN verification, only if
just email/password were shown. A simple oversight. This is fixed now and
so the visibility of cloud open and cloud save options should refelect
whether verified credentials are in the preferences or not.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Most of these will likely have no big impact, but it's better not to just
ignore them as they could lead to crashes.
Uemis downloader: if lseek fails, return 0
Uemis downloader: consistently check for failure to open req.txt
Zip file handling: dup could fail
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Globe: initialize doubleClick member
ShiftTimesDialog: initialize when (not sure this could be a problem)
SetpointDialog: dc could be uninitialized or could be 0 and dereferenced
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Free memory returned from parse_mkvi_value()
Free memory returned from printGPSCoords()
Free memory allocated in added_list and removed_list
Free memory allocated when adding suffix to dive site name
Free memory allocated in cache_deco_state()
Free memory allocated in build_filename()
Free memory allocated in get_utf8()
Free memory allocated in alloc_dive()
Free memory allocated as cache but never used
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We already had code to deal with this in the Save As case, but similar
handling is needed in the Open case.
This commit also makes the regular expression handling a bit stricter and
identical between the two cases.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Designer is such a pain to work with. Once I ended up editing the .ui file
by hand for the hard stuff and then just use designer to get it
consistently formated. Such a disappointment.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add infrastructure and helper functions to track minimum datafile version.
To make this information useful we need to keep the XML and git data
format versions in track moving forward.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As the print_options struct is needed by both TemplateLayout and Printer
class, it can be passed to their constructor.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add another printing option to the print dialog.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add the option for a minimum gas switch duration to the planner UI. This is not actually used yet.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This got broken in a recent transition to more abstract models.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This was a poorly implemented hack when we executed the reverse geo lookup
in the main thread and opening a V2 file could take a very long time. We
need to do the "Welcome" message quite differently.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't perfect, but at least tells the user if we weren't able to
connect and are working just off the local cache.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In order to be able to initiate an HTML export from the core library we
need to separate the actual logic from the UI.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems quite convoluted to me but I can't seem to make a more straight
forward implementation work. The idea is that core code should never
directly call into the UI.
So instead the core code (this is C code) calls a helper function. That
helper function calls a member function of a class which in return emits a
signal. The UI code connects to that signal and acts accordingly when it
is received.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This creates the basis to allow other backends to be used with the cloud
storage infrastructure.
So far this should all just transparently continue to work. A user would
have to manually add the cloud_base_url entry to the CloudStorage section
in their config file in order to use a different backend server.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This just deals with the mechanics. There is no UI to enter / change this
URL (and that's intentional), neither is it used, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The implementation in commit 182fe790c9 ("Add ability to undo
renumbering of dives") looks perfectly reasonable, but it depends on an
implementation detail: it assumes that the keys of the QMap are returned
in the same order in which they were placed there. Which apparently isn't
the case for some version of Qt.
With this commit we simply remember both the old and the new number for
each dive and therefore the order in which they are processed doesn't
matter.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we don't have verified cloud credentials disable the menu options and
disallow the use of cloud storage as default data file.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>