Added a WebView to the qml files
[quandoparte] / application / resources / harmattan / qml / StationListPage.qml
index a5c8be1..8270bb2 100644 (file)
@@ -4,15 +4,36 @@ import "/usr/lib/qt4/imports/com/nokia/meego/UIConstants.js" as UiConstants
 
 Page {
     id: stationListPage
-    tools: toolBar
     anchors.margins: UiConstants.DEFAULT_MARGIN
+    tools: ToolBarLayout {
+        id: toolBar
+        ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
+        ToolIcon { iconId: "icon-m-toolbar-settings"; onClicked: settingsSheet.open(); }
+        ToolIcon { iconId: "icon-m-toolbar-view-menu"; }
+    }
+
+    function loadStation()
+    {
+        var component = Qt.createComponent("StationPage.qml");
+        if (component.status == Component.Ready) {
+            pageStack.push(component)
+            component.html = "<p>Hello World</p>"
+        }
+        else
+            console.log("Cannot load component: " + component.errorString());
+    }
+
     Column {
+        width: parent.width
+        height: parent.height
         TextField {
+            width: parent.width
             placeholderText: "Search..."
         }
         ListView {
             id: stationListView
-            anchors.fill: parent
+            width: parent.width
+            height: parent.height
             model: ListModel {
                 ListElement {
                     name: "Genova Sestri Ponente"
@@ -59,6 +80,7 @@ Page {
                         Label {
                             id: mainText
                             text: model.name
+                            font.bold: true
                             //font.family: UiConstants.FONT_FAMILY
                             //font.pixelSize: UiConstants.FONT_DEFAULT
                         }
@@ -68,7 +90,7 @@ Page {
                     id: mouseArea
                     anchors.fill: background
                     onClicked: {
-                        stationListPage.openFile(page)
+                        stationListPage.loadStation(name)
                     }
                 }
             }
@@ -122,12 +144,5 @@ Page {
             }
         }
     }
-
-    ToolBarLayout {
-        id: toolBar
-        ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
-        ToolIcon { iconId: "icon-m-toolbar-settings"; onClicked: settingsSheet.open(); }
-        ToolIcon { iconId: "icon-m-toolbar-view-menu"; }
-    }
 }