menu entry for mapview (experimental)
[pywienerlinien] / qml / main.qml
index 0b34290..5a2a01f 100644 (file)
@@ -27,11 +27,18 @@ PageStackWindow {
         id: positionSource
         updateInterval: 15000
 
-        active: !(position.longitudeValid && position.latitudeValid)
+        active: config.getGpsEnabled() && !(position.longitudeValid && position.latitudeValid)
     }
 
     ToolBarLayout {
         id: commonTools
+
+        ToolIcon {
+            platformIconId: 'icon-m-toolbar-search'
+            anchors.left: parent.left
+            onClicked: mainPage.search()
+        }
+
         ToolIcon {
             platformIconId: "toolbar-view-menu"
             anchors.right: parent.right
@@ -45,32 +52,23 @@ PageStackWindow {
               onClicked: mainPage.refresh()
         }
 
-        Image {
-            id: logo
-            source: 'logo.png'
-
-            anchors {
-                verticalCenter: parent.verticalCenter
-                left: parent.left
-                leftMargin: 10
-            }
-        }
-
         Text {
             id: debugText
             text: ''
 
             anchors {
-                bottomMargin: 10
-                bottom: parent.bottom
                 left: logo.right
                 leftMargin: 10
-                top: logo.top
+                top: parent.top
+                topMargin: 10
             }
             font.pixelSize: 16
         }
     }
 
+    Settings{id: settings}
+    MapView{id: map}
+
     Menu {
         id: menu
 
@@ -79,6 +77,14 @@ PageStackWindow {
                 text: 'Nearby stations'
                 onClicked: mainPage.showNearby()
             }
+            //MenuItem {
+            //    text: 'Map'
+            //    onClicked: pageStack.push(map)
+            //}
+            MenuItem {
+                text: 'Settings'
+                onClicked: pageStack.push(settings)
+            }
             MenuItem {
                 text: 'About gotoVienna'
                 onClicked: aboutBox.show()