Commit graph

14479 commits

Author SHA1 Message Date
jan Iversen
91ec0fe8d4 tests: move General test from testpreferences
Remove General test in testpreferences
add the same General tests to testqPrefGeneral

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
4ba458318c tests: add qPrefGeneral testcases
add test cases to secure struct preferences and qPrefGeneral work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
691025fa24 core: activate qPrefGeneral
remove General from SettingsObjectWrapper and reference qPrefGeneral

update files using SettingsObjectWrapper/General to use qPrefGeneral

this activated qPrefGeneral and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
4a7864444b core: create qPrefGeneral from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
d5b087f01f core: change default_file_behavior from short to enum
change to enum as it really is

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
98ab006211 tests: add PartialPressureGas qml test cases
Add tst_qPrefPartialPressureGas qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
b70e002728 tests: move PartialPressureGas test from testpreferences
Remove PartialPressureGas test in testpreferences
add the same PartialPressureGas tests to testqPrefPartialPressureGas

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
1e8e9f345a tests: add qPrefPartialPressureGas testcases
add test cases to secure struct preferences and qPrefPartialPressureGas work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
9d005888fb core: activate qPrefPartialPressureGas
remove PartialPressureGas from SettingsObjectWrapper and reference qPrefPartialPressureGas

update files using SettingsObjectWrapper/PartialPressureGas to use qPrefPartialPressureGas

this activated qPrefPartialPressureGas and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
881395318c core: create qPrefPartialPressureGas from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
c912ac053e tests: add Geocoding qml test cases
Add tst_qPrefGeocoding qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
80583e63b5 tests: move Geocoding test from testpreferences
Remove Geocoding test in testpreferences
add the same Geocoding tests to testqPrefGeocoding

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
859f08a358 tests: add qPrefGeocoding testcases
add test cases to secure struct preferences and qPrefGeocoding work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
af22015452 core: activate qPrefGeocoding
remove Geocoding from SettingsObjectWrapper and reference qPrefFacebook

update files using SettingsObjectWrapper/Geocoding to use qPrefFacebook

this activated qPrefGeocoding and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
3cd698361c core: create qPrefGeocoding from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
d72546e799 tests: add Language qml test cases
Add tst_qPrefLanguage qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
526c1324fc tests: move Language test from testpreferences
Remove Language test in testpreferences
add the same Language tests to testqPrefLanguage

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
dfa3f5e0e7 tests: add qPrefLanguage testcases
add test cases to secure struct preferences and qPrefLanguage work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
72d87364c0 core: activate qPrefLanguage
remove Language from SettingsObjectWrapper and reference qPrefLanguage

update files using SettingsObjectWrapper/Language to use qPrefLanguage

this activated qPrefLanguage and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
63fa532b15 core: create qPrefLanguage from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
Monty Taylor
8603a7d826 Reverse html trip list rendering order
In the HTML export, the list of trips emitted into lib.js is in
chronological order, the dives are shown reverse chronological order.
This leads to a weird experience of the earliest trip being on top and
the dives within it having the most recent dive on top.

Invert the processing order in the javascript layer so that the last
trip is rendered first.

Signed-off-by: Monty Taylor <mordred@inaugust.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-13 08:52:15 -07:00
Dirk Hohndel
ce4e0d3276 Use hex USB VID/PID
Except of course that the Android intent does give us these values in
decimal.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-12 15:37:21 -07:00
jan Iversen
612f1b478f tests: add LocationService qml test cases
Add tst_qPrefLocationService qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
c97bb239b2 tests: move LocationService test from testpreferences
Remove LocationService test in testpreferences
add the same LocationService tests to testqPrefLocationService

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
3174c71563 tests: add qPrefLocationService testcases
add test cases to secure struct preferences and qPrefLocationService work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
75ce813a27 core: activate qPrefLocationService
remove LocationService from SettingsObjectWrapper and reference qPrefLocationService

update files using SettingsObjectWrapper/LocationService to use qPrefLocationService

this activated qPrefLocationService and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
2b11fd4cc8 core: create qPrefLocationService from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct prefs
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
c42a6e4027 tests: add TechnicalDetails qml test cases
Add tst_qPrefTechnicalDetails qml file to test C++ qml connection
(needs to enhanced later, due to enum)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
bfafb51649 tests: move TechnicalDetails test from testpreferences
Remove TechnicalDetails test in testpreferences
add the same TechnicalDetails tests to testqPrefTechnicalDetails

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
863c04f3f7 tests: add qPrefTechincalDetails testcases
add test cases to secure struct preferences and qPrefTechnicalDetails work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
cb2dc7515b core: activate qPrefTechnicalDetails
remove TechnicalDetails from SettingsObjectWrapper and reference qPrefTechnicalDetails

update files using SettingsObjectWrapper/TechnicalDetails to use qPrefTechnicalDetails

this activated qPrefTechnicalDetails and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
b98ba9ba94 core: create qPrefTechnicalDetails from SettingsObjectWrapper
Update set/get functions to follow common name scheme:
- get function have same name as in struct diveComputer
- set function have set_<name>
- signal function have <name>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way
SettingsObjectWrapper handles it) secures the same storage name
is used. Having the set/get/load/sync functions grouped together
makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
3c69c8299b core: SettingsObjectWrapper remove buehlmann property
remove buehlmann(), setBuehlmann(bool)

buehlmann() is really planner_deco_mode == BUEHLMANN, so no need for a function
setBuehlmann is dangerous, because buehlmann is saved on disk, but not in prefs.* and thus can lead to inconsistency between bool buehlmann and planner_deco_moce.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
26be37fe58 desktop_widget: preferences_graph, replace setBuehlmann
setBuehlmann is really planner_deco_mode = BUEHLMANN, change to
ensure consistency.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
e2374e2f81 core: qPrefDivePlanner, cleanup SettingsObjectWrapper
Remove individual store to disk for divePlanner in SettingsObjectWrapper

The save was double effect, qPrefDivePlanner::instance()->sync(), which
was preciding already do this.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
Dirk Hohndel
47110d5052 Add Android changes to CHANGELOG
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11 11:30:38 -07:00
Dirk Hohndel
b901f9f151 Android: recognize OSTC 2N when plugged in
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11 11:28:32 -07:00
Joakim Bygdell
9c65e35fa4 Update CHANGELOG.md
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
0fb086a4a5 Mobile: fix saving new dive
With the new setup we need to know which state we are coming from
when we are saving cylinder related info. When we are adding
a new dive we explicitly should save cylinder data to the first cylinder.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
bd8eec5c8e Mobile: fix adding new dive
All the changes to multi cylinder editing broke the option to add a new dive.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
a026d8d889 QlmManager: fix cylinderInit
Cylinder init should return all cylinders not only the ones present in the logbook.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
ae70a751c7 Mobile: save pressures
Save start and end pressures for used cylinders.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
c33a952582 Mobile: return pressures for all used cylinders
Return all pressure values for all used cylinders as a list.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
891e8acaa8 Mobile: save gasmixes
Same as for cylinder info, we need to make sure that the gasmixes gets saved to the correct cylinder.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
9c9450748b Mobile: display all used gases on the edit page
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
f9e81c7326 Mobile: return all used gasmixes as a list
Planning ahead for full edit capabilities of dives that uses multiple cylinders.  

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
94428b9a18 Mobile: save edited cylinders
Save the edited cylinder in the correct slot.
Since the cylinder number and the used cylinder number need not be
the same we first need to test if the cylinder are used.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
6b93e5fe27 Mobile: Display used cylinders on edit page
This displays the used cylinders in a dive so that they can be edited.
Currently limited to 5 as a POC.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
914b061d8a Mobile: display all used cylinders
Display all used cylinders as a comma separated list.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00
Jocke
80df7dd441 Mobile: return all used cylinders as a list
Planning ahead for full edit capabilities of dives that uses multiple cylinders.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11 11:19:07 -07:00