stationListPage.stationView = view
pageStack.push(view)
view.html = "<h1>Loading station " + name + "</h1><p>Lorem ipsum</p>"
- provider.stationSchedule(name)
+ view.name = name
}
else
console.log('Cannot load component: ' + component.errorString());
ToolIcon { iconId: "icon-m-toolbar-settings"; onClicked: settingsSheet.open(); }
ToolIcon { iconId: "icon-m-toolbar-view-menu"; onClicked: menu.open() }
}
-
- DataProvider {
- id: provider
- onStationScheduleReady: {
- if (Private.view !== undefined) {
- Private.view.html = result
- //Private.view.url = url
- }
- }
- }
PageHeader {
id: header
anchors.top: parent.top
import QtWebKit 1.0
import com.nokia.meego 1.0
import net.cirulla.quandoparte 1.0
+import "uiconstants.js" as UiConstants
Page {
- property alias html: view.html
- property alias url: view.url
+ property alias name: schedule.name
+ property alias html: webView.html
+ property alias url: webView.url
anchors.fill: parent
tools: ToolBarLayout {
}
}
}
+ InfoBar {
+ id: info
+ anchors.top: header.bottom
+ text: parent.name
+ }
+ Rectangle {
+ id: shadow
+ width: parent.width
+ anchors.top: view.top
+ height: 5
+ gradient: Gradient {
+ GradientStop {color: "#aa000000"; position: 0.0}
+ GradientStop {color: "#00000000"; position: 1.0}
+ }
+ }
Binding {
target: settings
property: "showArrivalsPreferred"
LabelStyle {
id: labelStyle
}
- WebView {
+ Item {
id: view
anchors {
- top: header.bottom;
+ top: info.bottom;
bottom: parent.bottom;
}
width: parent.width
- settings.defaultFontSize: labelStyle.fontPixelSize
- settings.defaultFixedFontSize: labelStyle.fontPixelSize
- settings.standardFontFamily: labelStyle.fontFamily
+ WebView {
+ id: webView
+ visible: false
+ anchors.fill: parent
+
+ settings.defaultFontSize: labelStyle.fontPixelSize
+ settings.defaultFixedFontSize: labelStyle.fontPixelSize
+ settings.standardFontFamily: labelStyle.fontFamily
+ }
+ }
+
+ StationScheduleModel {
+ id: schedule
+ }
+
+ Component.onCompleted: {
+ schedule.fetch(name)
}
}