|
|
@@ -2,10 +2,56 @@ import QtQuick 2.0
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
Page {
|
|
|
+ id: root
|
|
|
+
|
|
|
title: qsTr("Settings")
|
|
|
|
|
|
- Label {
|
|
|
- text: qsTr("You are on Settings Page")
|
|
|
- anchors.centerIn: parent
|
|
|
+ ListModel {
|
|
|
+ id: settingsModel
|
|
|
+
|
|
|
+ ListElement {
|
|
|
+ name: "serviceUrl"
|
|
|
+ title: qsTr("NooLite service URL:")
|
|
|
+ inputHint: Qt.ImhUrlCharactersOnly
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ListView {
|
|
|
+ model: settingsModel
|
|
|
+
|
|
|
+ anchors.fill: parent
|
|
|
+ anchors.margins: 8
|
|
|
+
|
|
|
+ delegate: Item {
|
|
|
+ id: settingsItem
|
|
|
+
|
|
|
+ width: parent.width
|
|
|
+ height: childrenRect.height
|
|
|
+
|
|
|
+ Label {
|
|
|
+ id: titleLabel
|
|
|
+
|
|
|
+ anchors.left: settingsItem.left
|
|
|
+ anchors.verticalCenter: valueField.verticalCenter
|
|
|
+
|
|
|
+ text: model.title
|
|
|
+ }
|
|
|
+
|
|
|
+ TextField {
|
|
|
+ id: valueField
|
|
|
+
|
|
|
+ anchors.right: settingsItem.right
|
|
|
+ anchors.left: titleLabel.right
|
|
|
+ anchors.leftMargin: 8
|
|
|
+
|
|
|
+ inputMethodHints: model.inputHint
|
|
|
+
|
|
|
+ text: settings[model.name]
|
|
|
+
|
|
|
+ onTextChanged: {
|
|
|
+ settings[model.name] = text
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|