diff options
author | jan Iversen <jani@apache.org> | 2018-06-13 18:06:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-15 14:12:14 -0700 |
commit | b8eb348f546291c49e2d606649b3c85d23e43782 (patch) | |
tree | 8ca54d1f5aa363496de4b83e1b6200b92304a8a3 /mobile-widgets/qml/Settings.qml | |
parent | 62ca5e90e13d65235d3cd53feffd0cb62cfbac43 (diff) | |
download | subsurface-b8eb348f546291c49e2d606649b3c85d23e43782.tar.gz |
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>
Diffstat (limited to 'mobile-widgets/qml/Settings.qml')
-rw-r--r-- | mobile-widgets/qml/Settings.qml | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 40ee2ea08..3c567f156 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -42,7 +42,8 @@ Kirigami.ScrollablePage { Layout.preferredHeight: Kirigami.Units.gridUnit * 2 } Controls.Label { - text: manager.credentialStatus === QMLManager.CS_NOCLOUD ? qsTr("Not applicable") : manager.cloudUserName + text: prefs.credentialStatus === QMLPrefs.CS_NOCLOUD ? qsTr("Not applicable") : + prefs.cloudUserName Layout.alignment: Qt.AlignRight Layout.preferredWidth: gridWidth * 0.60 Layout.preferredHeight: Kirigami.Units.gridUnit * 2 @@ -63,7 +64,7 @@ Kirigami.ScrollablePage { Layout.preferredHeight: Kirigami.Units.gridUnit * 2 } Controls.Label { - text: describe[manager.credentialStatus] + text: describe[prefs.credentialStatus] Layout.alignment: Qt.AlignRight Layout.preferredWidth: gridWidth * 0.60 Layout.preferredHeight: Kirigami.Units.gridUnit * 2 @@ -136,8 +137,8 @@ Kirigami.ScrollablePage { enabled: subsurfaceTheme.currentTheme !== "Blue" onClicked: { blueTheme() - manager.theme = subsurfaceTheme.currentTheme - manager.savePreferences() + prefs.theme = subsurfaceTheme.currentTheme + prefs.savePreferences() } } @@ -189,8 +190,8 @@ Kirigami.ScrollablePage { enabled: subsurfaceTheme.currentTheme !== "Pink" onClicked: { pinkTheme() - manager.theme = subsurfaceTheme.currentTheme - manager.savePreferences() + prefs.theme = subsurfaceTheme.currentTheme + prefs.savePreferences() } } @@ -241,8 +242,8 @@ Kirigami.ScrollablePage { enabled: subsurfaceTheme.currentTheme !== "Dark" onClicked: { darkTheme() - manager.theme = subsurfaceTheme.currentTheme - manager.savePreferences() + prefs.theme = subsurfaceTheme.currentTheme + prefs.savePreferences() } } } @@ -275,11 +276,11 @@ Kirigami.ScrollablePage { Controls.TextField { id: distanceThreshold - text: manager.distanceThreshold + text: prefs.distanceThreshold Layout.preferredWidth: gridWidth * 0.25 onEditingFinished: { - manager.distanceThreshold = distanceThreshold.text - manager.savePreferences() + prefs.distanceThreshold = distanceThreshold.text + prefs.savePreferences() } } @@ -291,11 +292,11 @@ Kirigami.ScrollablePage { Controls.TextField { id: timeThreshold - text: manager.timeThreshold + text: prefs.timeThreshold Layout.preferredWidth: gridWidth * 0.25 onEditingFinished: { - manager.timeThreshold = timeThreshold.text - manager.savePreferences() + prefs.timeThreshold = timeThreshold.text + prefs.savePreferences() } } @@ -325,10 +326,10 @@ Kirigami.ScrollablePage { } SsrfSwitch { id: developerButton - checked: manager.developer + checked: prefs.developer Layout.preferredWidth: gridWidth * 0.25 onClicked: { - manager.developer = checked + prefs.developer = checked } } } |