Commit graph

14 commits

Author SHA1 Message Date
Jocke
5cb31d6adb Mobile: set units system in "No cloud mode"
When starting the app  in "No cloud mode" we need to make sure that the units
and unit_system match.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-19 14:41:11 -07:00
jan Iversen
c9122283cc mobile-widgets: replace qmlprefs::theme with qPrefDisplay::theme
Shortcut and use qPrefDisplay::theme() direct

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12 20:18:32 -07:00
jan Iversen
51bc41b517 mobile-widgets: remove setTimeThreshold from system
Use qPrefLocationService::set_time_threshold and remove from
qmlprefs.cpp and qmlmanager.cpp

Remark: mobile UI shows time in minutes, while it is stored (and calculated)
in seconds. Therefore a /60 when reading and *60 when setting.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12 20:18:32 -07:00
jan Iversen
baa828e900 mobile-widgets: move distanceThreshold handling to qPref
Remove distanceThreshold from qmlprefs and use qPref instead
update qml

no user experience change

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12 20:17:39 -07:00
jan Iversen
c454f6954f mobile-widgets: make show_developer persistent
Remove developer from qmlprefs and use qPref instead
Update qml

show_developer is saved on disk, and thus remembered between starts.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12 20:16:46 -07:00
jan Iversen
2385f48c6a core/settings ... : remove qPref* includes in qPref.h
reduce number of includes by removing qPref* includes in qPref.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
684e334fb6 core: declare cloud_status in qPrefCloudStorage
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-11 17:25:00 -07:00
jan Iversen
da6e8a4cd5 mobile-widgets: remove QSettings
update qmlprefs and qmlmanager to use qPref

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
94fd758607 mobile-widgets: remove SettingsObjectWrapper and update qPref calls
remove use of SettingsObjectWrapper::
remove include of SettingsObjectWrapper.h
use qPrefFoo:: for setters and getters
replace prefs.foo with qPrefXYZ::foo() where feasible
(this expands to the same code, but gives us more control
over the variable).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15 16:11:39 -07:00
jan Iversen
8d66633fe7 core: make qPref::cloud_status the only version of the enum
add enum to qPref and remove elsewhere
update source core to reference qPref.

the enum cannot be in pref.h because it is to be used in qml and Q_ENUM
need the enum to be defined as part of the class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10 10:30:50 -07:00
jan Iversen
19803ab3c3 mobile-widgets: solve cloudstatus register problem
Use Q_ENUM instad of Q_ENUMS (which is depreciated) since it does the
meta registration for all Qt platforms.

Q_ENUM require the enum to be defined in the class and cannot refer to
a global class, therefore copied enum to class.

This commit is made to get the release to work, with minimal changes,
this class will be moved to qPref and the double definition solved

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-05 12:31:56 -07:00
jan Iversen
2f95141330 core: remove double definition of enum cloud_storage_status
Remove cloud_storage_status from qmlprefs.h.
usage to qPref::

enum cloud_storage_status is not used from C, but only from C++, and
having the same structure defined multiple times is a maintenance
challenge.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04 05:32:30 +08:00
jan Iversen
b8eb348f54 mobile: move settings from qmlmanager to qmlprefs
add settings variables/functions to qmlprefs
remove settings variables/functions from qmlmanager
change manager. to prefs. in qml files for setting variables/functions

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00
jan Iversen
d0e9f62624 mobile: add qmlprefs class
add class to cmake and pro
register class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00