2015-07-10 07:48:28 +00:00
|
|
|
import QtQuick 2.3
|
|
|
|
import QtQuick.Controls 1.2
|
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
import QtQuick.Layouts 1.1
|
2015-11-29 16:27:20 +00:00
|
|
|
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
2015-07-10 07:48:28 +00:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
|
|
|
|
2015-07-12 17:56:48 +00:00
|
|
|
Item {
|
2015-12-03 22:06:52 +00:00
|
|
|
id: preferencesWindow
|
2015-07-10 07:48:28 +00:00
|
|
|
|
|
|
|
signal accept
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
2015-11-07 02:01:16 +00:00
|
|
|
anchors.fill: parent
|
2015-11-29 16:27:20 +00:00
|
|
|
anchors.margins: MobileComponents.Units.gridUnit
|
2015-07-12 17:55:45 +00:00
|
|
|
|
2015-11-30 00:57:29 +00:00
|
|
|
MobileComponents.Heading {
|
2015-12-03 22:06:52 +00:00
|
|
|
text: "Preferences"
|
2015-11-30 00:57:29 +00:00
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
|
2015-07-12 17:55:45 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
2015-07-10 07:48:28 +00:00
|
|
|
|
2015-11-30 00:57:29 +00:00
|
|
|
MobileComponents.Heading {
|
2015-11-14 01:14:22 +00:00
|
|
|
text: "Subsurface GPS data webservice"
|
2015-12-07 17:38:47 +00:00
|
|
|
level: 3
|
2015-11-30 00:57:29 +00:00
|
|
|
Layout.topMargin: MobileComponents.Units.largeSpacing
|
|
|
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing / 2
|
2015-11-14 01:14:22 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
|
|
|
|
2015-12-04 01:57:25 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-14 17:10:06 +00:00
|
|
|
text: "Distance threshold (meters)"
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: distanceThreshold
|
|
|
|
text: manager.distanceThreshold
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
2015-12-04 01:57:25 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-14 17:10:06 +00:00
|
|
|
text: "Time threshold (minutes)"
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: timeThreshold
|
|
|
|
text: manager.timeThreshold
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:27:20 +00:00
|
|
|
Item { width: MobileComponents.Units.gridUnit; height: width }
|
2015-07-10 07:48:28 +00:00
|
|
|
Item {
|
2015-07-13 00:38:01 +00:00
|
|
|
height: saveButton.height
|
|
|
|
width: saveButton.width
|
2015-07-10 07:48:28 +00:00
|
|
|
Button {
|
|
|
|
id: saveButton
|
|
|
|
text: "Save"
|
|
|
|
anchors.centerIn: parent
|
|
|
|
onClicked: {
|
2015-11-14 17:10:06 +00:00
|
|
|
manager.distanceThreshold = distanceThreshold.text
|
|
|
|
manager.timeThreshold = timeThreshold.text
|
2015-07-10 07:48:28 +00:00
|
|
|
manager.savePreferences()
|
2015-07-12 17:56:48 +00:00
|
|
|
stackView.pop()
|
2015-07-10 07:48:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-12 17:55:45 +00:00
|
|
|
|
|
|
|
Item {
|
2015-11-07 02:01:16 +00:00
|
|
|
Layout.fillHeight: true
|
2015-07-12 17:55:45 +00:00
|
|
|
}
|
2015-07-10 07:48:28 +00:00
|
|
|
}
|
|
|
|
}
|