aboutsummaryrefslogtreecommitdiffstats
path: root/core/settings
AgeCommit message (Collapse)Author
2019-04-12use the default constructor for empty QString and QByteArray constantsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12use QStringLiteral for constantsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-04Cleanup: don't instantiate a QPref objectGravatar Berthold Stoeger
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>
2019-04-04Cleanup: make qPref::registerQML() staticGravatar Berthold Stoeger
This member function does not access any other member of the object. Make it static. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-04Cleanup: remove qPref::canonical_version() and qPref::mobile_version()Gravatar Berthold Stoeger
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>
2019-03-29Add UI element for final surface segment in plannerGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-02-05Add button to toggle deco info in info boxGravatar Robert C. Helling
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>
2019-02-01facebook: remove the featute from the code baseGravatar Lubomir I. Ivanov
Remove from: - unit tests - desktop widgets - preferences - core intergration - cmakefiles - build scripts - icons - docs Also remove the plugins and social network integration. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2019-01-13Planner: Add checkbox to force OC bailoutGravatar Robert C. Helling
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>
2018-10-27qPref: reduce recompiles with every commitGravatar Dirk Hohndel
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>
2018-10-23Mobile/filtering: add two preferences for filteringGravatar Dirk Hohndel
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-19Preferences: wire-up the deco parametersGravatar Jan Mulder
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>
2018-10-15Bluetooth cleanup: remove pointless download_modeGravatar Dirk Hohndel
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>
2018-10-09Prefs: add bool preference cloud_auto_sync [1/3]Gravatar Jan Mulder
With removal of the git_local_only from the preferences (see ae653703a5d3f), 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>
2018-09-25cleanup: do not compare doubles like thisGravatar Jan Mulder
Cleanup another possibly dangerous compare of doubles. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25qPref: don't compare doubles for equalityGravatar Dirk Hohndel
This is a much safer way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25qPref: add mobile_scale preferenceGravatar Dirk Hohndel
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>
2018-09-23qPref: add ability to remember recently used dive computersGravatar Dirk Hohndel
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>
2018-09-19Mobile: always update the preferences when set_unit_system is calledGravatar Jocke
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>
2018-09-11core/settings: correct UserSurvey -> userSurvey in qPrefDisplayGravatar jan Iversen
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>
2018-09-11core/settings: optimize base_url functions.Gravatar jan Iversen
Remove unused variable and create of QString. Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core/settings: use instance() in qPref macrosGravatar jan Iversen
use instance() instead of <class>::instance() Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core/settings: change bestmixend to int, to allow qml to workGravatar jan Iversen
depth_t is a good struct in C, but bad in QML. Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core/settings: correct wrong emit in qPrefFacebookGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core/settings ... : remove qPref* includes in qPref.hGravatar jan Iversen
reduce number of includes by removing qPref* includes in qPref.h Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core: declare cloud_status in qPrefCloudStorageGravatar jan Iversen
qml declaration of cloud_status (defined in pref.h) does not belong in qPref.h but in qPrefCloudStorage Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core,tests: change qml register functionGravatar jan Iversen
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>
2018-09-11core: add auto registration to qPref*Gravatar jan Iversen
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>
2018-09-11core/settings: add missing empty line.Gravatar jan Iversen
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-11core/setting: change *_changed to *Changed for the sake of QML.Gravatar jan Iversen
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-11Cleanup[5/6]: remove unused preferencesGravatar Jan Mulder
Remove all the code to handle the preferences itself. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-10prefs: cloud_new_password is not a preferenceGravatar Dirk Hohndel
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>
2018-09-10prefs: git_local_only is not a preferenceGravatar Dirk Hohndel
It's the current state of the app, so it should be a global variable, not a preference. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-07core/settings: only sync values that are actually changedGravatar jan Iversen
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>
2018-09-07qPref: use helper function to ensure key/name groupingGravatar Dirk Hohndel
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-07Preferences: more missing /Gravatar Jan Mulder
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>
2018-09-06core/settings: add missing / in default_filenameGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-06Revert "core/tests: add loadFromCloud var to qPrefCloudStorage"Gravatar jan Iversen
This reverts commit b7a1bb670ce11b22e52361f4152b4853b97e13f5. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-06qPref: only save settings that aren't the defaultGravatar Dirk Hohndel
This brings us back to the previous behavior. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-30core/settings: add missing load_* call in qPrefDisplayGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-30core/settings: add READMEGravatar jan Iversen
Add simple explanation of how the program flow is. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-28core: fix typo in preference nameGravatar Dirk Hohndel
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>
2018-08-25core/tests: add class var to qPrefGeneralGravatar jan Iversen
Add static class variables to qPrefGeneral (and remove QSettings from desktop-widgets) Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core/tests: add loadFromCloud var to qPrefCloudStorageGravatar jan Iversen
Add special property loadFromCloud + mail to qPrefCloudStorage this variable is used by qmlmanager.cpp Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core: remove QSettings from qPrefDivePlannerGravatar jan Iversen
remove not needed include from qPrefDivePlanner Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core/tests: merge Animations and add vars. to qPrefDisplayGravatar jan Iversen
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>
2018-08-25core/tests: add uuidString to qPrefUpdateManagerGravatar jan Iversen
add static class variable uuidString to qPrefUpdateManager correct test cases Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core: qPrivate add handle macros for class variablesGravatar jan Iversen
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>
2018-08-25core: make methods in qPrefPrivate staticGravatar jan Iversen
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-25core: qPrefPrivate.h correct spaces before \ in macrosGravatar jan Iversen
the ending \ in macros have been expanded to many spaces, correct back to 1 space Signed-off-by: Jan Iversen <jani@apache.org>