The user may modify the salinity by selecting a water type from the combobox.
The new datum does not replace the existing salinity value but is stored in a
separate variable within the dive structure. If the dc-based salinity is
overwritten, there is an exclamation mark next to the modified salinity value
to indicate that the salinity has been overwritten. The dc-derived salinity can
always be recovered by selecting the "use dc" option in the combobox.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create a checkbox in the Preferences: General screen that enables or disables
editing of the salinity data. This preference is saved with all the other
preferences.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit dbb504 tried to prevent an uninitialized dc pointer
from being dereferenced. But I screwed up the logic always
setting the event pointer to NULL. This fixes this error.
Reported-by: willemferguson@zoology.up.ac.za
Signed-off-by: Robert C. Helling <helling@atdotde.de>
When using the string setters, the original signal should still be emitted.
Change to call original setter in string setter.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When changing between METRICS <-> IMPERIAL, all type signals are emitted.
This may cause double sending of some signals, but all signals will be emitted
at least once.
Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When switching between imperial/metric it is important to change the single
measurements as well (e.g. METER <-> FEET).
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All unit functions have a string version and a normal version, except
unit_system.
Make a non string version of unit_system.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There were several issues with these tests, including checking
the value argument against bool values even if the underlying
preference isn't bool.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use string literals to communicate with QML.
Instead of passing arounds enum/int value, it seems easier to pass string literals to QML and have that code respond to those
Signed-off-by: Jan Iversen <jani@apache.org>
Do not set prefs.locale_lang_locale directly, but do it
indirectly through qPrefLanguage::set_lang_locale(),
to ensure the file plist is consistent with prefs.
the difference (prefs. contra plist) cause surprises
when restarting mobile (and playing with language).
Signed-off-by: Jan Iversen <jani@apache.org>
This commit does some final cleaning up to the code, mostly deleting
white space and comments.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a tab for dive log - related preferences.
A suitable test programs is still required.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a preferences tab for dive download, allowing resetting the
buttons representing download connections in the Download panel.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the preference settings dealing with thumbnails (currently under
General preferences and Profile preferences) and put them in a newly-created
Media preference tab.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the "Show unused cylinders" checkbox (Profile tab) and the
"Set default cylinder" qTextEdit box (General tab) and put them in a
separate and new Equipment tab. This sounds like a simple task but,
as can be seen from the files changed, was actually a complex matter.
Adapt the existing test programs (General and TechDetails) for creating
a test program that tests parts of the Equipment tab.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
WARNING: multi directory commit, needed to secure it builds.
move the core/plannerShared.* to backend-shared.
update CMakeLists.txt to include backend-shared lib in link process.
update ios project to reflect new directory
Signed-off-by: Jan Iversen <jan@casacondor.com>
WARNING: multi directory commit, needed to secure it builds.
move the core/exportfuncs.* to backend-shared.
update backend-shared/CMakeLists.txt to generate backend-shared lib
update CMakeLists.txt to include backend-shared lib in link process.
update ios project to reflect new directory
Signed-off-by: Jan Iversen <jan@casacondor.com>
qPrefDiveplanner contains settings for ascent and descent in a neutral format.
diveplanner desktop uses a macro UNIT_FACTOR to convert between UI values and
qPref values.
In order not to dublicate these calculation (in C++ and QML) a set of shared
functions are made. The functions are identical to the calculations in diveplanner
desktop.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Add a plannerShared class, whose purpose is to contain shared
functions between mobile and desktop
This class is the inner workings of the diveplanner not the UI
Signed-off-by: Jan Iversen <jan@casacondor.com>
LOG_STP is on longer providing the data needed, since a lot of the startup
is indirectly in QML, furthermore using the xcode project and running profiler
gives much more detailed information
Signed-off-by: Jan Iversen <jani@apache.org>
Do reply->readAll() before reply-deleteLater()
With UI deleteLater() seems to happen after the function exist,
but with QML it causes problems.
Signed-off-by: Jan Iversen <jan@casacondor.com>
The uploadStatus signal can be used to inform the user about
the process e.g.
- preparing zip file
- starting actual upload
It is a suplement to uploadProgress, that only informs about
the network part.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Secure that the slots/signals in uploadDiveLogsDE, which are without
UI, can be used in DivelogsDeWebServices (to add the UI part).
Signed-off-by: Jan Iversen <jan@casacondor.com>
The difference between slot names and signal names was to insignificant
e.g. uploadFinish (signal) uploadFinished (slot).
Change slot names to slot_<name> should clear any confusion.
Signed-off-by: Jan Iversen <jan@casacondor.com>
prepareDives needs to be public, in order to be used in
subsurfacewebservices.
"friend" is another option, but that gives subsurfacewebservices
too much freedom.
Signed-off-by: Jan Iversen <jan@casacondor.com>
In order to replace DivelogsDeWebServices::prepare_dives_for_divelogs with
uploadDiveLogsDE::prepareDives, first step is to make the functions identical.
amount_selected is not maintained for mobile, add #ifdef SUBSURFACE_MOBILE
Add comment, to make code more readable
add white line to make code more readable
change to use variable ds (created a couple of lines earlier
Avoid "goto" by adding close code
Remove label and close code (it was only called in 1 place)
Signed-off-by: Jan Iversen <jan@casacondor.com>
use report_error directly, instead of making a QString first,
argument syntax are different (%s vs. %1)
Signed-off-by: Jan Iversen <jan@casacondor.com>
The implementation is based on class DivelogsDeWebServices in
desktop-widgets but without the UI entanglement
Signed-off-by: Jan Iversen <jan@casacondor.com>
Add divelogsde_userid and divelogsde_password to
qPrefCloudStorage to be used in Export.qml
Extending qPrefCloudStorage is more logical than adding QSettings
(and securing the same behaviour) outside qPref.
Signed-off-by: Jan Iversen <jan@casacondor.com>
diveshareexport wants to show the HTML received
in a positive response, so signal cannot be
compatible with diveLogsDE
Signed-off-by: Jan Iversen <jan@casacondor.com>
Add DiveShareExportDialog::do_upload() to
uploadDiveShare::do_upload(), while cleaning it from
UI.
Add signal connections as used in uploadDiveLogsDE
Signed-off-by: Jan Iversen <jan@casacondor.com>
Add diveshare/uid and diveshare/private to qPrefCloudStorage
to be used in Export.qml as well as diveshareexportdialog
Extending qPrefCloudStorage is more logical than adding QSettings
(and securing the same behaviour) outside qPref.
Signed-off-by: Jan Iversen <jan@casacondor.com>
This is the framework that mobileExecutable needs, all
prepared to move functionality from desktop-widgets
(current implementation) into a shared version.
Signed-off-by: Jan Iversen <jan@casacondor.com>
The old code called directly into the DiveListModel. Instead,
send a signal and hook into the signal from the model. This
will allow us to remove the DiveListModel::instance() function.
This, in turn, is a step towards supporting multiple models
at the same time. However, currently the model manually
sets the hidden_by_filter flag in the core and therefore
only one active model is supported at a time.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Currently, selecting a single dive or deselecting all dives was
quite awkward: One had to pass in a single-dive vector and the
dive itself (as current dive). Provide a convenience function
that selects a single dive or deselects all dives if null is
passed in.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Q_PROPERTY contains an internal ";", making clang produce a warning
when ending the line with a ;
Remove ; at the end of Q_PROPERTY lines.
Signed-off-by: Jan Iversen <jani@apache.org>