maximumInterval: 130
}
Component.onCompleted: {
+ // FIXME checkingInterval is deprecated use autoUpdate
if (settings.checkingInterval > 0) updateTimer.start()
theme.inverted = settings.darkThemePreferred
theme.colorScheme = 3
</message>
</context>
<context>
+ <name>SettingsPage</name>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="23"/>
+ <source>Check Periodically</source>
+ <translation>Aggiorna periodicamente</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="24"/>
+ <source>Update the situation periodically while the station schedule is shown.</source>
+ <translation>Aggiorna la situazione periodicamente quando viene mostrata la previsione della stazione.</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="29"/>
+ <source>Clear Recent Stations</source>
+ <translation>Pulisci le stazioni recenti</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="30"/>
+ <source>Clearing Preferred Stations</source>
+ <translation>Pulizia delle stazioni recenti</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="33"/>
+ <source>Information</source>
+ <translation>Informazioni</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/SettingsPage.qml" line="37"/>
+ <source>About Quando Parte</source>
+ <translation>Informazioni su Quando Parte</translation>
+ </message>
+</context>
+<context>
<name>StationListModel</name>
<message>
<location filename="../../stationlistmodel.cpp" line="67"/>
</message>
<message>
<location filename="../harmattan/qml/StationListPage.qml" line="55"/>
- <location filename="../sailfish/qml/pages/StationListPage.qml" line="21"/>
<source>About Quando Parte</source>
<translation>Informazioni su Quando Parte</translation>
</message>
<message>
<location filename="../harmattan/qml/StationListPage.qml" line="66"/>
- <location filename="../sailfish/qml/pages/StationListPage.qml" line="25"/>
<source>Stations by Name</source>
<translation>Stazioni per nome</translation>
</message>
<message>
<location filename="../harmattan/qml/StationListPage.qml" line="67"/>
- <location filename="../sailfish/qml/pages/StationListPage.qml" line="29"/>
<source>Stations by Distance</source>
<translation>Stazioni per distanza</translation>
</message>
<message>
<location filename="../harmattan/qml/StationListPage.qml" line="68"/>
- <location filename="../sailfish/qml/pages/StationListPage.qml" line="33"/>
<source>Stations Recently Seen</source>
<translation>Stazioni viste di recente</translation>
</message>
<translation type="obsolete">Mostra l'ultima stazione all'avvio</translation>
</message>
<message>
- <location filename="../sailfish/qml/pages/StationListPage.qml" line="41"/>
+ <location filename="../sailfish/qml/pages/StationListPage.qml" line="21"/>
+ <source>Settings</source>
+ <translation>Impostazioni</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/StationListPage.qml" line="25"/>
+ <source>Show Stations by Distance</source>
+ <translation>Mostra le stazioni per distanza</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/StationListPage.qml" line="30"/>
+ <source>Show Stations by Name</source>
+ <translation>Mostra le stazioni per nome</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/StationListPage.qml" line="35"/>
+ <source>Show Recent Stations</source>
+ <translation>Mostra le stazioni recenti</translation>
+ </message>
+ <message>
+ <location filename="../sailfish/qml/pages/StationListPage.qml" line="44"/>
<source>Search station...</source>
<translation>Cerca stazione...</translation>
</message>
anchors.fill: parent
text: qsTr("Quando Parte")
icon.source: "/usr/share/icons/hicolor/86x86/apps/quandoparte.png"
- visible: stationScheduleView.count === 0
+ visible: stationScheduleView.count === 0
}
SilicaListView {
id: stationScheduleView
expectedPlatfrom: model.expectedPlatform
}
}
+ OpacityRampEffect {
+ id: effect
+ slope: 2
+ offset: 0.5
+ sourceItem: stationScheduleView
+ }
+ CoverActionList {
+ enabled: schedule.name.length !== 0
+ iconBackground: true
+ CoverAction {
+ iconSource: "image://theme/icon-cover-refresh"
+ onTriggered: schedule.fetch(schedule.name, schedule.code)
+ }
+ }
}
ApplicationWindow {
id: window
- initialPage: StationListPage { }
+ initialPage: Qt.resolvedUrl("pages/StationListPage.qml")
cover: Qt.resolvedUrl("cover/CoverPage.qml")
Timer { /* XXX This is an AlignedTimer in Harmattan, which should be better for battery */
id: updateTimer
- interval: 120
+ interval: 120000
+ repeat: true
+ running: Qt.application.active && settings.autoUpdate
}
StationScheduleModel {
id: schedule
}
+ Component.onCompleted: {
+ if (Qt.application.active && settings.autoUpdate) {
+ updateTimer.start()
+ }
+ }
}
--- /dev/null
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import net.cirulla.quandoparte 1.0
+
+Page {
+ RemorsePopup {
+ id: remorse
+ }
+ SilicaFlickable {
+ anchors.fill: parent
+ contentHeight: column.height
+ contentWidth: parent.width
+ VerticalScrollDecorator {}
+ Column {
+ id: column
+ width: parent.width
+ spacing: Theme.paddingLarge
+ PageHeader {
+ title: "Settings"
+ }
+ TextSwitch {
+ id: periodicActivation
+ text: qsTr("Check Periodically")
+ description: qsTr("Update the situation periodically while the station schedule is shown.")
+ onCheckedChanged: settings.autoUpdate = checked
+ }
+ Button {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Clear Recent Stations")
+ onClicked: remorse.execute(qsTr("Clearing Preferred Stations"), function() {settings.recentStations = ""})
+ }
+ SectionHeader {
+ text: qsTr("Information")
+ }
+ Button {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("About Quando Parte")
+ onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
+ }
+ }
+ }
+ Component.onCompleted: {
+ periodicActivation.checked = settings.autoUpdate
+ }
+}
pressDelay: 0
PullDownMenu {
MenuItem {
- text: qsTr("About Quando Parte")
- onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
+ text: qsTr("Settings")
+ onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
}
MenuItem {
- text: qsTr("Stations by Name")
- onClicked: stationListProxyModel.sortingMode = StationListProxyModel.AlphaSorting
+ text: qsTr("Show Stations by Distance")
+ onClicked: stationListProxyModel.sortingMode = StationListProxyModel.DistanceSorting
+ enabled: (stationListProxyModel.sortingMode !== StationListProxyModel.DistanceSorting)
}
MenuItem {
- text: qsTr("Stations by Distance")
- onClicked: stationListProxyModel.sortingMode = StationListProxyModel.DistanceSorting
+ text: qsTr("Show Stations by Name")
+ onClicked: stationListProxyModel.sortingMode = StationListProxyModel.AlphaSorting
+ enabled: (stationListProxyModel.sortingMode !== StationListProxyModel.AlphaSorting)
}
MenuItem {
- text: qsTr("Stations Recently Seen")
+ text: qsTr("Show Recent Stations")
onClicked: stationListProxyModel.sortingMode = StationListProxyModel.RecentUsageSorting
+ enabled: (stationListProxyModel.sortingMode !== StationListProxyModel.RecentUsageSorting)
}
}
PageHeader {
onTextChanged: stationListPage.searchPattern = searchField.text
width: stationListPage.width
EnterKey.onClicked: searchField.focus = false
+ EnterKey.iconSource: "image://theme/icon-m-enter-close"
}
}
SilicaListView {
}
]
- /*
- StationScheduleModel {
- id: schedule
- onNameChanged: view.updateStation()
- onLayoutChanged: if (error) view.state = "error"
- else view.state = "ready"
- }
- */
Connections {
target: schedule
- // onNameChanged: view.updateStation()
onLayoutChanged: if (schedule.error) view.state = "error"
else view.state = "ready"
}
Name: quandoparte
Summary: Quando Parte
-Version: 0.8.0
+Version: 0.9.0
Release: 0
Group: Qt/Qt
License: GPL v2 or above