This is a cosmetic update to remove some warning messages
while building a fresh subsurface. These warnings were due to
duplicate label names in the .UI files.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Use updated CMakeLists to activate TestPlannerShared
but only for mobile builds !!
This is due to the fact that commands are currently
not available for mobile builds.
Using the mobile library version of qt-mobile secured
diveplannermodel.cpp is compiled without referencces to
commands.
Signed-off-by: Jan Iversen <jan@casacondor.com>
In order to make tests for plannerShared, some qt-models must
be linked, and due to the fact that commands are currently not
available for mobile (which also makes the tests) and #ifdef must
be added.
The test version of diveplannermodel will be specially compiled in
(SUBSURFACE_TESTING set) in the tests directory.
Signed-off-by: Jan Iversen <jan@casacondor.com>
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>
change Readme.testing --> README_TESTING.md
and thereby not contain a mixture of upper/lower case letters.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Existing file names should not be changed without a reason.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add rule about cpp/h names
[Dirk Hohndel: small edits to the rule]
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
CodingStyle.md should not be the first file, not the adhere to the
styles.
Rename CodingStyle.md --> CODINGSTYLE.md to follow the standard
of other documents.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add "Dive planner" menu entry in GlobalDrawer/Developer
with 4 subitems one for each diveplanner pages.
Developer is chosen in order to allow interested access to
pages, without raising expectations for the normal user.
That allow a step-by-step implementation
Signed-off-by: Jan Iversen <jan@casacondor.com>
Diveplanner consist of 3 pages:
- Edit, creation of the plan
- View, view the plan
- Manager, list/delete/select stored diveplans
With the current navigation system (pageStack)
View needs to be split in multiple pages.
Signed-off-by: Jan Iversen <jan@casacondor.com>
standard font-size as well as color are set
in the template (but can be overwritten in
the object)
Using TemplateComboBox allows central change of how
labels are presented in the UI.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
standard font-size as well as color are set
in the template (but can be overwritten in
the object)
Using TemplateCheckBox allows central change of how
labels are presented in the UI.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
standard font-size as well as color are set
in the template (but can be overwritten in
the object)
Using TemplateRadioButton allows central change of how
labels are presented in the UI.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
standard font-size are set in the template (but can
be overwritten in the object)
Using TemplateSpinBox allows central change of how
spinBoxes are presented in the UI.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
standard font-size as well as color are set
in the template (but can be overwritten in
the object)
Using TemplateLabel allows central change of how
labels are presented in the UI.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
TempleSection is a clickable rectangle that contains
information.
It is used to
- group information
- hide/unhide details
And are an important building block in decluttering small
screen, while showing all information on bigger screens
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add
display_runtime
display_duration
display_transitions
verbatim_plan
display_variations
Get is direct from qPrefDivePlanner and set is plannerModel
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use plannerShared setter to update the variables in qPref.
This will also signal the cylindermodel to calculate a new bestmix.
variables:
bottompo2
decopo2
bestmixend
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use plannerShared setter to update o2narcotic. This will also signal
the cylindermodel to calculate a new bestmix.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add include of cylinderModel
Add o2narcotic
the set function is special because it first
informs the plannerModel that there is a new value
and then ask cylindermodel to calculate a new bestmix
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
variables
bottomsac
decosac
problemsolvingtime
sacfactor
are not set in diveplanner.cpp, but instead
signals a slot in plannerModel.
change signals to slots in plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
the variables are set through set functions in DivePlannerPointsModel,
but read via getters from qPrefDivePlanner.
Variables:
bottomsac
decosac
problemsolvingtime
sacfactor
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
variables
min_switch_duration
are not set in diveplanner.cpp, but instead
signals a slot in plannerModel.
and are read from plannerShared which includes a conversion
change signals to slots in plannerShared
change read from prefs. to plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
the variables are set through set functions in DivePlannerPointsModel,
but read via getters from qPrefDivePlanner and converted
Variables:
min_switch_duration
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
change local doo2breaks to plannerShared and update connect.
change signals to slots in plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These are simple pass-through functions (normally optimized away
by the compiler), and serve to make a consistent backend interface
which have a simpler use especially in QML.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
variables
drop_stone_mode,
last_stop,
switch_at_req_stop
are not set in diveplanner.cpp, but instead
signals a slot in plannerModel.
change signals to slots in plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
the variables are set through set functions in DivePlannerPointsModel,
but read via getters from qPrefDivePlanner.
Variables:
drop_stone_mode
last_stop
switch_at_req_stop
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
change local setBailout to plannerShared and update connect.
change signals to slots in plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
planner_deco_mode is not set in diveplanner.cpp, but instead
signals a slot in plannerModel.
reserve_gas is not set in diveplanner.cpp, but instead
signals a slot in plannerModel.
change signals to slots in plannerShared
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These are simple pass-through functions (normally optimized away
by the compiler), and serve to make a consistent backend interface
which have a simpler use especially in QML.
Variables:
dobailout
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
the variables are set through set functions in DivePlannerPointsModel,
but read via getters from qPrefDivePlanner.
Variables:
planner_deco_mode
reserveGas
safetyStop
gflow
gfhigh
vpmb_conservatism
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
add diveplannermodel to GENERIC instead of DESKTOP
as a consequence other models are need, move those
from DESKTOP to GENERIC
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
commands (undo) are not available for mobile, but diveplannermodel
is needed
add #ifndef MOBILE around Commands::
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit a4d299e01e ("mobile-widgets/qml: use showPin/oldStatus consistently")
one instance of rootItem.showPin wasn't replaced with prefs.showPin and as a
result we had a very strange password entry line in the middle of the PIN entry
screen.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
StartPage does not belong in divelist.
Remove startPage from diveList and anchor in main.
Make needed functional changes.
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>