summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudit Bartha <[email protected]>2017-08-21 15:33:08 +0300
committerJudit Bartha <[email protected]>2017-08-21 15:33:08 +0300
commit954612a7bc8cadd7f8b943b96dd545641366d0d2 (patch)
tree91d7f8adf87d9676fac3f917d1f1658dd7d93ff1
parentb864f035df316b67a239e56e27dae654362254a3 (diff)
Added Layer Options to side panel for Public Transportation and Outdoor Activities options
-rw-r--r--src/apps/marble-maps/MainScreen.qml14
-rw-r--r--src/apps/marble-maps/MarbleMaps.qrc1
-rw-r--r--src/apps/marble-maps/Options.qml80
3 files changed, 95 insertions, 0 deletions
diff --git a/src/apps/marble-maps/MainScreen.qml b/src/apps/marble-maps/MainScreen.qml
index 3205f98..64935b5 100644
--- a/src/apps/marble-maps/MainScreen.qml
+++ b/src/apps/marble-maps/MainScreen.qml
@@ -125,11 +125,21 @@ Kirigami.ApplicationWindow {
source = ""
app.pageStack.push("qrc:///AboutDialog.qml")
}
+ },
+ Kirigami.Action {
+ text: "Layer Options"
+ iconName: "qrc:///settings.png"
+ onTriggered: {
+ app.state = "options"
+ sidePanel.close()
+ app.pageStack.push("qrc:///Options.qml")
+ }
}
]
}
pageStack.initialPage: page
+ pageStack.interactive: false
Kirigami.Page {
id: page
@@ -547,6 +557,10 @@ Kirigami.ApplicationWindow {
State {
name: "developer"
PropertyChanges { target: dialogLoader; source: "DeveloperDialog.qml" }
+ },
+ State {
+ name: "options"
+ PropertyChanges { target: dialogLoader; source: "" }
}
]
}
diff --git a/src/apps/marble-maps/MarbleMaps.qrc b/src/apps/marble-maps/MarbleMaps.qrc
index 9e35f32..deb0edd 100644
--- a/src/apps/marble-maps/MarbleMaps.qrc
+++ b/src/apps/marble-maps/MarbleMaps.qrc
@@ -30,6 +30,7 @@
<file>SidePanel.qml</file>
<file>PublicTransport.qml</file>
<file>OutdoorActivities.qml</file>
+ <file>Options.qml</file>
<file>drawer.svg</file>
<file alias="search.png">../../../data/android/drawable-xxxhdpi/search.png</file>
<file alias="menu.png">../../../data/android/drawable-xxxhdpi/ic_menu_black_48dp.png</file>
diff --git a/src/apps/marble-maps/Options.qml b/src/apps/marble-maps/Options.qml
new file mode 100644
index 0000000..4585ee4
--- /dev/null
+++ b/src/apps/marble-maps/Options.qml
@@ -0,0 +1,80 @@
+//
+// This file is part of the Marble Virtual Globe.
+//
+// This program is free software licensed under the GNU LGPL. You can
+// find a copy of this license in LICENSE.txt in the top directory of
+// the source code.
+//
+// Copyright 2016 Dennis Nienhüser <[email protected]>
+//
+
+import QtQuick 2.8
+import QtQuick.Controls 2.2
+import QtQuick.Layouts 1.3
+
+import org.kde.kirigami 2.0 as Kirigami
+
+import org.kde.marble 0.20
+
+Kirigami.ScrollablePage {
+ id: optionsPage
+ padding: 0
+ topPadding: 0
+ leftPadding: 0
+ rightPadding: 0
+ bottomPadding: 0
+
+ signal backTriggered()
+
+ Column {
+ anchors {
+ fill: parent
+ margins: Kirigami.Units.gridUnit
+ }
+
+ Label {
+ text: qsTr("<h3>Layer Options</h3>")
+ }
+
+ Label {
+ text: qsTr("<h4>Public Transport Layers</h4>")
+ }
+
+ Item{
+ implicitHeight: publicTransportLoader.height + Kirigami.Units.gridUnit * 4
+ width: parent.width
+
+ Loader {
+ anchors.fill: parent
+ id: publicTransportLoader
+ source: "PublicTransport.qml"
+
+ onLoaded: {
+ item.implicitWidth = parent.width
+ item.marbleMaps = marbleMaps
+ }
+ }
+ }
+
+ Label {
+ topPadding: Kirigami.Units.gridUnit
+ text: qsTr("<h4>Outdoor Activities Layers</h4>")
+ }
+
+ Item{
+ implicitHeight: outdoorActivitiesLoader.height + Kirigami.Units.gridUnit * 6
+ width: parent.width
+
+ Loader {
+ anchors.fill: parent
+ id: outdoorActivitiesLoader
+ source: "OutdoorActivities.qml"
+
+ onLoaded: {
+ item.implicitWidth = parent.width
+ item.marbleMaps = marbleMaps
+ }
+ }
+ }
+ }
+}