Another tiny step in making dive.h smaller: move function
declarations to deco.h if these functions are defined in deco.c
and don't directly concern dives.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
QPref has only static functions. There seems to be no point in
instantiating a singleton of this object. Remove the instance()
method and remove the Q_OBJECT macro.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
These two member functions were never used, but cause frequent
recompilation of the qPref.cpp file. Remove them for now until
their usefulness becomes evident.
These were the only functions tested in test_qPref.qml. Therefore
remove this test-file.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The info box can get longish. Offer the user to turn
off display of deco information (surface GF and
individual ceilings).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This adds a checkbox for rebreather modes of the planner
that force the ascent to be in OC mode. Before, one had
to add a one minute last segment with the mode change but
this is not practical when manually searching for the
maximal bottom time given gas reserves.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Including ssrf-version.h in an include file that a lot of files depend on
caused a ton of unnecessary recompiles with every commit. This should reduce
that problem.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With this we can make it configurable if the search should include the notes field
and if the search should be case sensitive or not.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The deco parameters need special treatment to wire them up to the
underlying deco model code. And with the new preferences setup this
is a lot of boilerplate.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This was used to track whether we had selected the native BT mode in the
download dialog. But the information is redundant as we can tell from the
device name whether this is a BT/BLE download or not.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With removal of the git_local_only from the preferences (see
ae653703a5), the users choice, in the mobile app, was not
stored any more in between sessions. This resulted in issue
1725.
So, in order to store that user preference, we need a new
preference. This is added here, but its not yet hooked up
in the app yet. This deals only with the preference handling.
And adapted tests are included.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
We use that in the mobile app to scale the whole app, as all sizes there
are relative to the default font.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This does feel clumsy and complicated. This is a lot of special case
handling and a lot of boilerplate for something that really should be
quite simple.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Unit_system is read from git storage but units are set from locale when the
app starts. To prevent a miss-match between unit and unit_system we have to
always update the preferences variable when set_unit_system is called so that
the user doesn't end up with imperial units when the preferences say metric.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QML is quite special, the variables needs to start with lower case in C++
and are used starting with upper case in QML
Signed-off-by: Jan Iversen <jani@apache.org>
In order to address the C++ object directy in qml, a different
registration is needed.
qmlRegisterType, registers the C++ class, allowing qml code to inherit
from it and make qml objects. This is needed for graphical elemnets
like profile and map
setContentProperty, registers the C++ object, thus allowing signals to be
catched.
Signed-off-by: Jan Iversen <jani@apache.org>
Instead of having all register calls in subsurface-helper.cpp let
qPref.cpp handle all qPref registration, since they also need to be
different
update subsurface-helper and testqml accordingly.
Signed-off-by: Jan Iversen <jani@apache.org>
QML demands signals to be of the form
<name>Changed
Changing all of qPref
REMARK: this commit is not compileable, since it only change qPref and not
the rest of the system
Signed-off-by: Jan Iversen <jani@apache.org>
It's a mamber of the cloud storage authentication class, used to hold the
proposed new password until the backend has accepted it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a variable reflecting the current_state to all DISK_* macros, in order to
check if the original variable in struct preferences is changed.
Only save to disk if actually changed
[Dirk Hohndel: merged Jan's commit and renamed the variable and adjusted the
commit message... but fundamentally the commit is still what Jan
wrote, so he should get the credit]
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We had a couple of instances of names being incorrectly merged with their
group, this should handle that better. It's a bit of a big hammer to use, but
it seems to work (and it makes it easy to then git grep for cases that don't
use the new helper function.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
subsurface_webservice_uid ends up in the wrong group due missing
/. Notice that this does not fix the issues I mentioned in #1648.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
In commit 1bc361b2ea ("core/tests: add uuidString to qPrefUpdateManager") a
typo was introduced for the preference name.
Reported-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add class variable tooltip_position to qPrefDisplay
Add class variable lastDir to qPrefDisplay
qPrefDisplay is updated to use new qPrefPrivate functions
Adjust test cases incl. qml tests
qPrefAnimations only has 1 variable, that really is a display variable
Merge the variable into qPrefDisplay, to simplify setup (and avoid loading
extra page in qml).
correct theme to save in correct place, and make it a static
class variable
Signed-off-by: Jan Iversen <jani@apache.org>
Some variables are not in structure prefs, but are static class
variables, these will not be synced on exit, because they can only
be changed through the setter, but loaded on startup.
Signed-off-by: Jan Iversen <jani@apache.org>
Small cleanup, using static methods is simpler and faster
Added propSetValue and propValue instead of exposing setting
variable.
Signed-off-by: Jan Iversen <jani@apache.org>