2017-04-27 18:30:36 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2015-07-10 07:48:28 +00:00
|
|
|
import QtQuick 2.3
|
2017-03-31 14:15:14 +00:00
|
|
|
import QtQuick.Controls 2.0
|
2015-07-10 07:48:28 +00:00
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
import QtQuick.Layouts 1.1
|
2017-03-31 14:15:14 +00:00
|
|
|
import org.kde.kirigami 2.0 as Kirigami
|
2015-07-10 07:48:28 +00:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
|
|
|
|
2017-07-10 01:47:18 +00:00
|
|
|
Kirigami.ScrollablePage {
|
2017-07-20 17:39:55 +00:00
|
|
|
objectName: "Settings"
|
2017-07-20 07:55:58 +00:00
|
|
|
id: settingsPage
|
2017-07-20 17:39:55 +00:00
|
|
|
title: qsTr("Settings")
|
2017-07-10 01:47:18 +00:00
|
|
|
anchors.margins: Kirigami.Units.gridUnit / 2
|
2017-07-20 07:55:58 +00:00
|
|
|
property real gridWidth: settingsPage.width - 2 * Kirigami.Units.gridUnit
|
|
|
|
property real col1Width: gridWidth * 0.25
|
|
|
|
property real col2Width: gridWidth * 0.25
|
|
|
|
property real col3Width: gridWidth * 0.25
|
|
|
|
property real col4Width: gridWidth * 0.25
|
2017-07-10 01:47:18 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
width: parent.width - Kirigami.Units.gridUnit
|
2017-07-20 17:39:55 +00:00
|
|
|
CloudCredentials {
|
|
|
|
id: cloudCredentials
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.margins: Kirigami.Units.gridUnit
|
|
|
|
Layout.topMargin: 0
|
|
|
|
property int headingLevel: 4
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
GridLayout {
|
2017-07-20 17:39:55 +00:00
|
|
|
id: themeSettings
|
2017-07-20 07:55:58 +00:00
|
|
|
columns: 4
|
2017-07-20 17:39:55 +00:00
|
|
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
2015-07-10 07:48:28 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Theme")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.columnSpan: 4
|
2017-06-23 20:06:17 +00:00
|
|
|
}
|
2017-07-22 09:54:21 +00:00
|
|
|
Kirigami.Label {
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Blue")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width * 0.8
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.columnSpan: 2
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: gridwidth * 0.6
|
|
|
|
// Layout.alignment: Qt.AlignLeft
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: blueRect
|
|
|
|
color: subsurfaceTheme.blueBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularBlue.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularBlue
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.blueTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.bluePrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightBlue.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightBlue
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.bluePrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
RadioButton {
|
2017-07-20 07:55:58 +00:00
|
|
|
id: bluebutton
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width * 0.5
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-20 07:55:58 +00:00
|
|
|
checked: subsurfaceTheme.currentTheme === "Blue"
|
2017-07-10 03:53:16 +00:00
|
|
|
onClicked: {
|
2017-07-20 07:55:58 +00:00
|
|
|
blueTheme()
|
2017-07-20 19:53:42 +00:00
|
|
|
manager.theme = subsurfaceTheme.currentTheme
|
|
|
|
manager.savePreferences()
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 20
|
|
|
|
implicitHeight: 20
|
2017-07-20 07:55:58 +00:00
|
|
|
x: bluebutton.leftPadding
|
2017-07-10 03:53:16 +00:00
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 4
|
2017-07-20 07:55:58 +00:00
|
|
|
border.color: bluebutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
2017-07-10 03:53:16 +00:00
|
|
|
color: subsurfaceTheme.backgroundColor
|
2017-07-08 17:17:10 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
width: 12
|
|
|
|
height: 12
|
|
|
|
x: 4
|
|
|
|
y: 4
|
|
|
|
radius: 3
|
2017-07-20 07:55:58 +00:00
|
|
|
color: bluebutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
|
|
|
visible: bluebutton.checked
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2017-07-08 17:17:10 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-20 07:55:58 +00:00
|
|
|
|
2017-07-22 09:54:21 +00:00
|
|
|
Kirigami.Label {
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Pink")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width * 0.5
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
Layout.preferredWidth: settingsPage.col2Width + settingsPage.col3Width
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: pinkRect
|
|
|
|
color: subsurfaceTheme.pinkBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularPink.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularPink
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.pinkTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.pinkPrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightPink.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightPink
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.pinkPrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-22 09:54:21 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
RadioButton {
|
2017-07-20 07:55:58 +00:00
|
|
|
id: pinkbutton
|
|
|
|
checked: subsurfaceTheme.currentTheme === "Pink"
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width * 0.5
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-10 03:53:16 +00:00
|
|
|
onClicked: {
|
2017-07-20 07:55:58 +00:00
|
|
|
pinkTheme()
|
2017-07-20 19:53:42 +00:00
|
|
|
manager.theme = subsurfaceTheme.currentTheme
|
|
|
|
manager.savePreferences()
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 20
|
|
|
|
implicitHeight: 20
|
2017-07-20 07:55:58 +00:00
|
|
|
x: pinkbutton.leftPadding
|
2017-07-10 03:53:16 +00:00
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 4
|
2017-07-20 07:55:58 +00:00
|
|
|
border.color: pinkbutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
2017-07-10 03:53:16 +00:00
|
|
|
color: subsurfaceTheme.backgroundColor
|
2017-07-08 17:17:10 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
width: 12
|
|
|
|
height: 12
|
|
|
|
x: 4
|
|
|
|
y: 4
|
|
|
|
radius: 3
|
2017-07-20 07:55:58 +00:00
|
|
|
color: pinkbutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
|
|
|
visible: pinkbutton.checked
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2017-07-08 17:17:10 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-20 07:55:58 +00:00
|
|
|
|
2017-07-22 09:54:21 +00:00
|
|
|
Kirigami.Label {
|
2017-07-20 07:55:58 +00:00
|
|
|
text: qsTr("Dark")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
rightPadding: Kirigami.Units.gridUnit
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width * 0.5
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Row {
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
Layout.preferredWidth: settingsPage.col2Width + settingsPage.col3Width
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
id: blackRect
|
|
|
|
color: subsurfaceTheme.darkBackgroundColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleRegularDark.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleRegularDark
|
|
|
|
text: qsTr("regular text")
|
|
|
|
color: subsurfaceTheme.darkTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkPrimaryColor
|
|
|
|
border.color: "black"
|
2017-07-22 09:54:21 +00:00
|
|
|
width: sampleHighlightDark.width + Kirigami.Units.gridUnit
|
2017-07-10 03:53:16 +00:00
|
|
|
height: Kirigami.Units.gridUnit * 2
|
|
|
|
Text {
|
|
|
|
id: sampleHighlightDark
|
|
|
|
text: qsTr("Highlight")
|
|
|
|
color: subsurfaceTheme.darkPrimaryTextColor
|
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-20 07:55:58 +00:00
|
|
|
RadioButton {
|
|
|
|
id: darkbutton
|
|
|
|
checked: subsurfaceTheme.currentTheme === "Dark"
|
2017-07-22 09:54:21 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width * 0.5
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-20 07:55:58 +00:00
|
|
|
onClicked: {
|
|
|
|
darkTheme()
|
2017-07-20 19:53:42 +00:00
|
|
|
manager.theme = subsurfaceTheme.currentTheme
|
|
|
|
manager.savePreferences()
|
2017-07-20 07:55:58 +00:00
|
|
|
}
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 20
|
|
|
|
implicitHeight: 20
|
|
|
|
x: darkbutton.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 4
|
|
|
|
border.color: darkbutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
|
|
|
color: subsurfaceTheme.backgroundColor
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 12
|
|
|
|
height: 12
|
|
|
|
x: 4
|
|
|
|
y: 4
|
|
|
|
radius: 3
|
|
|
|
color: darkbutton.down ? subsurfaceTheme.primaryColor : subsurfaceTheme.darkerPrimaryColor
|
|
|
|
visible: darkbutton.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-06-24 01:08:47 +00:00
|
|
|
}
|
2017-07-20 17:39:55 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
GridLayout {
|
|
|
|
id: gpsPrefs
|
|
|
|
columns: 2
|
|
|
|
width: parent.width
|
2017-06-23 20:06:17 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Subsurface GPS data webservice")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
2015-11-14 01:14:22 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Label {
|
|
|
|
text: qsTr("Distance threshold (meters)")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-20 19:19:26 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width + settingsPage.col2Width + settingsPage.col3Width
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
TextField {
|
|
|
|
id: distanceThreshold
|
|
|
|
text: manager.distanceThreshold
|
2017-07-20 19:19:26 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width
|
2017-07-20 19:53:42 +00:00
|
|
|
onEditingFinished: {
|
|
|
|
manager.distanceThreshold = distanceThreshold.text
|
|
|
|
manager.savePreferences()
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
Kirigami.Label {
|
|
|
|
text: qsTr("Time threshold (minutes)")
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-20 19:19:26 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width + settingsPage.col2Width + settingsPage.col3Width
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-07-10 03:53:16 +00:00
|
|
|
TextField {
|
|
|
|
id: timeThreshold
|
|
|
|
text: manager.timeThreshold
|
2017-07-20 19:19:26 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width
|
2017-07-20 19:53:42 +00:00
|
|
|
onEditingFinished: {
|
|
|
|
manager.timeThreshold = timeThreshold.text
|
|
|
|
manager.savePreferences()
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
}
|
2015-11-14 17:10:06 +00:00
|
|
|
|
2017-07-20 18:47:17 +00:00
|
|
|
Kirigami.Label {
|
|
|
|
text: qsTr("Run location service")
|
2017-07-20 19:19:26 +00:00
|
|
|
Layout.alignment: Qt.AlignRight
|
2017-07-20 18:47:17 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col1Width + settingsPage.col2Width + settingsPage.col3Width
|
|
|
|
}
|
|
|
|
Switch {
|
|
|
|
id: locationButton
|
|
|
|
Layout.preferredWidth: settingsPage.col4Width
|
2017-07-19 18:57:12 +00:00
|
|
|
visible: manager.locationServiceAvailable
|
|
|
|
checked: manager.locationServiceEnabled
|
|
|
|
onClicked: {
|
|
|
|
manager.locationServiceEnabled = checked
|
|
|
|
}
|
|
|
|
indicator: Rectangle {
|
2017-07-20 18:47:17 +00:00
|
|
|
implicitWidth: Kirigami.Units.largeSpacing * 3
|
|
|
|
implicitHeight: Kirigami.Units.largeSpacing
|
|
|
|
x: locationButton.leftPadding
|
2017-07-19 18:57:12 +00:00
|
|
|
y: parent.height / 2 - height / 2
|
2017-07-20 18:47:17 +00:00
|
|
|
radius: Kirigami.Units.largeSpacing * 0.5
|
|
|
|
color: locationButton.checked ?
|
|
|
|
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
2017-07-19 18:57:12 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2017-07-20 18:47:17 +00:00
|
|
|
x: locationButton.checked ? parent.width - width : 0
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
width: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
height: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
radius: height / 2
|
|
|
|
color: locationButton.down || locationButton.checked ?
|
|
|
|
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
2017-07-19 18:57:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-20 19:19:26 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
GridLayout {
|
|
|
|
id: libdclogprefs
|
2017-07-20 07:55:58 +00:00
|
|
|
columns: 4
|
2017-07-10 03:53:16 +00:00
|
|
|
width: parent.width
|
|
|
|
Kirigami.Heading {
|
2017-07-20 17:39:55 +00:00
|
|
|
text: qsTr("Dive computer")
|
2017-07-10 03:53:16 +00:00
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.columnSpan: 4
|
2017-07-10 01:08:36 +00:00
|
|
|
}
|
|
|
|
|
2017-07-20 07:55:58 +00:00
|
|
|
Kirigami.Label {
|
|
|
|
text: qsTr("Save detailed log")
|
|
|
|
Layout.preferredWidth: settingsPage.col1Width + settingsPage.col2Width + settingsPage.col3Width
|
|
|
|
}
|
2017-07-20 17:39:55 +00:00
|
|
|
Switch {
|
2017-07-10 03:53:16 +00:00
|
|
|
id: libdclogButton
|
|
|
|
checked: manager.libdcLog
|
2017-07-20 07:55:58 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width
|
2017-07-10 03:53:16 +00:00
|
|
|
onClicked: {
|
|
|
|
manager.libdcLog = checked
|
|
|
|
}
|
2017-07-20 08:43:17 +00:00
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: Kirigami.Units.largeSpacing * 3
|
|
|
|
implicitHeight: Kirigami.Units.largeSpacing
|
|
|
|
x: libdclogButton.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: Kirigami.Units.largeSpacing * 0.5
|
|
|
|
color: libdclogButton.checked ?
|
|
|
|
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
x: libdclogButton.checked ? parent.width - width : 0
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
width: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
height: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
radius: height / 2
|
|
|
|
color: libdclogButton.down || libdclogButton.checked ?
|
|
|
|
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
}
|
|
|
|
}
|
2017-07-10 01:08:36 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-20 19:19:26 +00:00
|
|
|
Rectangle {
|
|
|
|
color: subsurfaceTheme.darkerPrimaryColor
|
|
|
|
height: 1
|
|
|
|
opacity: 0.5
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2017-07-19 14:35:46 +00:00
|
|
|
GridLayout {
|
|
|
|
id: developer
|
2017-07-20 18:47:17 +00:00
|
|
|
columns: 4
|
2017-07-19 14:35:46 +00:00
|
|
|
width: parent.width - Kirigami.Units.gridUnit
|
|
|
|
Kirigami.Heading {
|
|
|
|
text: qsTr("Developer")
|
|
|
|
color: subsurfaceTheme.textColor
|
|
|
|
level: 4
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
2017-07-20 18:47:17 +00:00
|
|
|
Layout.columnSpan: 4
|
2017-07-19 14:35:46 +00:00
|
|
|
}
|
|
|
|
|
2017-07-20 18:47:17 +00:00
|
|
|
Kirigami.Label {
|
|
|
|
text: qsTr("Display Developer menu")
|
|
|
|
Layout.preferredWidth: settingsPage.col1Width + settingsPage.col2Width + settingsPage.col3Width
|
|
|
|
}
|
|
|
|
Switch {
|
2017-07-19 14:35:46 +00:00
|
|
|
id: developerButton
|
|
|
|
checked: manager.developer
|
2017-07-20 18:47:17 +00:00
|
|
|
Layout.preferredWidth: settingsPage.col4Width
|
2017-07-19 14:35:46 +00:00
|
|
|
onClicked: {
|
|
|
|
manager.developer = checked
|
|
|
|
}
|
|
|
|
indicator: Rectangle {
|
2017-07-20 18:47:17 +00:00
|
|
|
implicitWidth: Kirigami.Units.largeSpacing * 3
|
|
|
|
implicitHeight: Kirigami.Units.largeSpacing
|
2017-07-19 14:35:46 +00:00
|
|
|
x: developerButton.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
2017-07-20 18:47:17 +00:00
|
|
|
radius: Kirigami.Units.largeSpacing * 0.5
|
|
|
|
color: developerButton.checked ?
|
|
|
|
subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
2017-07-19 14:35:46 +00:00
|
|
|
|
|
|
|
Rectangle {
|
2017-07-20 18:47:17 +00:00
|
|
|
x: developerButton.checked ? parent.width - width : 0
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
width: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
height: Kirigami.Units.largeSpacing * 1.5
|
|
|
|
radius: height / 2
|
|
|
|
color: developerButton.down || developerButton.checked ?
|
|
|
|
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
|
|
|
|
border.color: subsurfaceTheme.darkerPrimaryColor
|
2017-07-19 14:35:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-10 03:53:16 +00:00
|
|
|
Item {
|
|
|
|
height: Kirigami.Units.gridUnit * 6
|
2017-07-10 01:08:36 +00:00
|
|
|
}
|
2017-07-10 01:47:18 +00:00
|
|
|
}
|
2015-07-10 07:48:28 +00:00
|
|
|
}
|