And action can't not just trigger a slot, it can also send a signal.
With this there is no reference to the MainWindow left in the profile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Ummm. What? That one was awesome. This seems easier :-)
MainWindow::instance()->graphics() is a way to retrieve a pointer to the
profile widget...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't quite know why these were parented to the MainWindow - I bet
there's a very clever reason that I'm missing...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of directly calling into the MainWindow, redirect this via a
signal so Subsurface mobile can hook it up as needed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I'm not sure we can ever run into this issue anymore since we stop
calculating TTS / NDL past 2 hours, but I guess on a fairly slow CPU this
still could take too long.
But instead of calling into MainWindow let's just change the setting right
here and add a signal to show the notification - that way we can use the
appropriate way to make such notifications on the mobile app.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows for finding headers when not in /usr/include (like
parallel-installable distribution-packaged grantlee5)
Signed-off-by: Rex Dieter <rdieter@fedoraproject.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The signal connections from the old preferences got lost when
we moved to the new ones because Designer is broken and can't
handle signals / connactions from copy/pasted content.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This was set twice, the first time before we checked that we have a new
enough Qt version installed.
Also fixed a typo.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a new dialog/page which is shown right before
the final "uninstall" click.
The dialog may contains two checkboxes - for registry
entries and for the user path. These checkboxes will not be
created if the user has not run the application yet,
as no registry keys will be available.
Selecting the user directory checkbox shows a warning message box,
that the user should make sure no important files are present there.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is needed only on Windows, so that the uninstaller knows
which directory to delete.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding modified code to support deletion of selected images as
well as deleting of all images (with warning messagebox)
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Altering DivePicture model to allow deleting images
from the QListView without immediate updating of the
list. Updating is determined by an additioanl parameter
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just add a context menu for now - the following commits will make this
useful.
Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
According to the specification each proper sample should have depth, so
we can just ignore the empty waypoints.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
'default_filename' is obtained from system_default_filename()
but system_default_filename() returns a static pointer
the HEAP memory of which is handled in main().
Remove the free() for 'default_filename' free_prefs()
to prevent a double free().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The introduction of -std=c++11 breaks usage of M_PI in Mingw,
but technically M_PI is not standard C or C++.
Defining M_PI in units.h solves the issue.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Grabbing all gas mixes was added for Xdeep default cylinders, and it is
not required for other data sources that have tankdata info in the UDDF
file.
See #958
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We didn't respond at all to that button. Also, the language settings
didn't propagate without this explicit call.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When I removed the old preferences dialog, I forgot to load them
again. The code is in the wrong place: it should be on every and
each preferences dialog (or on the main preferences)
Beware if you used this wip code before, I may have destroyed
your preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Change the Reset to Defaults button to Apply in the preferences dialog.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The new preferences dialog still needs a bit of fine tuning
but should already work.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we are planning a dive using VPM-B with +x conservatism, we want to
print "VPM-B +x" at the top of the profile, instead of "GF xx/yy".
Accordingly, the variable gradientFactor in profilewidget2.cpp is renamed
decoModelParameters to reflect what it represents.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Doing VPM-B calculations for dives outside of the planner has not been
possible because real dive data does not record either:
- reference pressure for the Boyle's law compensation (i.e.
first_stop_pressure), or
- deco_time for the vpmb_next_gradient function used to do the CVA
calculations
However, we can infer these values to be:
- first_stop_pressure is the deepest ceiling in the dive
- deco_time is dive time from the deepest ceiling until the
ceiling clears (or would have cleared if the diver finished
their deco obligations)
With these assumptions, the CVA converges rapidly.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
We import a few logs that are archived in a zip file. E.g. divelogs.de
import is a zip file named with .dld extension. In case the zip file is
empty, we should return an error message that states that fact, not
parse error. This will also end the input file parsing cleaning up
the error message on the console.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The list widget takes too much space and isn't really any better. The
dropdown plus fliter is actually rather neat.
Also added back the connections so the dropdown and filter get disabled
when system default is selected (just as it was in the old preferences
dialog).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Currently we need to copy manually the plugin dynamic library
to the /plugins folder.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>