diff options
Diffstat (limited to 'qt-mobile/qml/main.qml')
-rw-r--r-- | qt-mobile/qml/main.qml | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 53d872743..1888a77e8 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -11,7 +11,6 @@ import org.kde.plasma.mobilecomponents 0.2 as MobileComponents MobileComponents.ApplicationWindow { title: qsTr("Subsurface mobile") property bool fullscreen: true - property alias messageText: message.text FontMetrics { id: fontMetrics @@ -107,12 +106,41 @@ MobileComponents.ApplicationWindow { } } ] + MouseArea { + height: childrenRect.height + width: MobileComponents.Units.gridUnit * 10 + CheckBox { + //text: "Run location service" + id: locationCheckbox + anchors { + left: parent.left + top: parent.top + } + checked: manager.locationServiceEnabled + onCheckedChanged: { + manager.locationServiceEnabled = checked; + } + } + MobileComponents.Label { + x: MobileComponents.Units.gridUnit * 1.5 + anchors { + left: locationCheckbox.right + //leftMargin: units.smallSpacing + verticalCenter: locationCheckbox.verticalCenter + } + text: "Run location service" + } + onClicked: { + print("Click.") + locationCheckbox.checked = !locationCheckbox.checked + } + } } QtObject { id: subsurfaceTheme property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5) - property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.7) + property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.8) property color accentColor: "#2d5b9a" property color accentTextColor: "#ececec" } @@ -208,43 +236,9 @@ MobileComponents.ApplicationWindow { } property Item stackView: pageStack - initialPage: Item { - width: parent.width - height: parent.height - - ColumnLayout { - id: awLayout - anchors.fill: parent - spacing: MobileComponents.Units.gridUnit / 2 - - Rectangle { - id: detailsPage - Layout.fillHeight: true - Layout.fillWidth: true - - DiveList { - anchors.fill: detailsPage - id: diveDetails - color: MobileComponents.Theme.backgroundColor - } - } - - - Rectangle { - id: messageArea - height: childrenRect.height - Layout.fillWidth: true - color: MobileComponents.Theme.backgroundColor - - Text { - id: message - color: MobileComponents.Theme.textColor - wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere - styleColor: MobileComponents.Theme.textColor - font.pointSize: MobileComponents.Units.smallPointSize - } - } - } + initialPage: DiveList { + anchors.fill: detailsPage + id: diveDetails } QMLManager { |