Commit graph

19 commits

Author SHA1 Message Date
willemferguson
6212bb6721 Preferences UI: final cleanup
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>
2019-12-25 02:57:42 +09:00
willemferguson
b6c3cdb20c Preferences UI: add dive log tab
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>
2019-12-25 02:57:42 +09:00
willemferguson
2ac279d129 Pereferences UI: add media tab
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>
2019-12-25 02:57:42 +09:00
willemferguson
3e853e37a5 Preferences UI: create new equipment tab
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>
2019-12-25 02:57:42 +09:00
jan Iversen
653a2baf11 core/settings: make qPref* constructors private
Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-05 11:48:26 -08:00
willemferguson
7dc8a9850d Desktop: handle environmental states in Information tab
Create a preference setting on the General Settings page. The setting is saved
with the other preferences.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-03 20:37:57 -08:00
Rolf Eike Beer
2e59196e6b use the default constructor for empty QString and QByteArray constants
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00
Dirk Hohndel
eedb1ce0ea Mobile/filtering: add two preferences for filtering
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>
2018-10-23 22:45:30 +01:00
jan Iversen
a037578015 core/settings: change bestmixend to int, to allow qml to work
depth_t is a good struct in C, but bad in QML.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
7940e45c4c core/settings: add missing empty line.
Standard is to have 1 empty line between functions

correct missing static in qPrefGeocoding.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
c72add5721 core/setting: change *_changed to *Changed for the sake of QML.
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>
2018-09-11 17:22:58 -07:00
Dirk Hohndel
2ecbea3d24 qPref: use helper function to ensure key/name grouping
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>
2018-09-07 14:37:18 -07:00
jan Iversen
c03c2b5fd7 core/settings: add missing / in default_filename
Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-06 17:14:54 -07:00
Dirk Hohndel
e71b049498 qPref: only save settings that aren't the default
This brings us back to the previous behavior.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-06 16:13:44 -07:00
jan Iversen
5f4a040dd2 core/tests: add class var to qPrefGeneral
Add static class variables to qPrefGeneral
(and remove QSettings from desktop-widgets)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
69f21d9aed core: make methods in qPrefPrivate static
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>
2018-08-25 11:49:47 -07:00
jan Iversen
f2c302284b core: qPref limit header includes
replace qPref.h with qPrefFoo.h to limit header includes

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15 16:11:39 -07:00
jan Iversen
0825f644e0 core: make qPref.* use static
Prepare qPref.* to run load/sync
Make variables and methods static to give easy access
Make getter inline to give faster access

Signed-off-by: Jan Iversen <jani@apache.org>:wq
2018-08-15 16:11:39 -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