Disable favorites for harmattan
authorLuciano Montanaro <mikelima@cirulla.net>
Fri, 27 Dec 2013 14:29:43 +0000 (15:29 +0100)
committerLuciano Montanaro <mikelima@cirulla.net>
Fri, 27 Dec 2013 14:29:43 +0000 (15:29 +0100)
The model is still read-only, apparently... Will fix this later

application/resources/harmattan/qml/StationListPage.qml

index ee0d51a..c7a0649 100644 (file)
@@ -174,11 +174,13 @@ Page {
                     }
                 }
                 Image {
+                    id: favoriteIndicator
+                    visible: model.favorite
+                    source: "image://theme/icon-m-common-favorite-mark" + (theme.inverted ? "-inverse" : "")
                     anchors {
-                        left: parent.left
+                        verticalCenter: parent.verticalCenter
                         right: parent.right
                     }
-                    //source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
                 }
                 MouseArea {
                     id: mouseArea
@@ -191,9 +193,18 @@ Page {
                 ContextMenu {
                     id: contextMenu
                     MenuLayout {
+                        /*
+                        MenuItem {
+                            text: model.favorite ? qsTr("Remove from Favorites") : qsTr("Add to Favorites")
+                            onClicked: {
+                                model.favorite ^= true
+                                console.log("Favorite Stations:" + settings.favoriteStations)
+                            }
+                        }
+                        */
                         MenuItem {
                             text: qsTr("Show on the map")
-                            onClicked: Qt.openUrlExternally("geo:" + model.longitude + "," + model.latitude)
+                            onClicked: Qt.openUrlExternally("geo:" + model.latitude + "," + model.longitude)
                         }
                     }
                 }