Merge branch 'development'
[quandoparte] / application / resources / sailfish / qml / main.qml
1 import QtQuick 2.0
2 import Sailfish.Silica 1.0
3 import net.cirulla.quandoparte 1.0
4 import "pages"
5
6 ApplicationWindow {
7     id: window
8     initialPage: Qt.resolvedUrl("pages/StationListPage.qml")
9     cover: Qt.resolvedUrl("cover/CoverPage.qml")
10     Timer { /* XXX This is an AlignedTimer in Harmattan, which should be better for battery */
11         id: updateTimer
12         interval: 120000
13         repeat: true
14         running: Qt.application.active && settings.autoUpdate
15     }
16     StationScheduleModel {
17         id: schedule
18     }
19     Component.onCompleted: {
20         if (Qt.application.active && settings.autoUpdate) {
21             updateTimer.start()
22         }
23     }
24 }