Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Starting from clean slate
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche committed Dec 22, 2017
1 parent 106348d commit acf367a
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 2,280 deletions.
1 change: 0 additions & 1 deletion harbour-berail.pro
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ DISTFILES += \
qml/pages/StationListPage.qml \
qml/pages/js/util.js \
qml/pages/DatePickerPage.qml \
qml/pages/TripPage.qml \
qml/pages/components/TripItem.qml \
qml/pages/js/trip.js \
qml/pages/TripDetailPage.qml \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import QtQuick 2.2
import Sailfish.Silica 1.0

Label {
property string labelText
anchors { left: parent.left; right: parent.right; leftMargin: Theme.horizontalPageMargin; rightMargin: Theme.horizontalPageMargin }
font.pixelSize: Theme.fontSizeMedium
wrapMode: Text.WordWrap
text: labelText

Behavior on opacity {
FadeAnimation{}
FadeAnimation {}
}
}
59 changes: 10 additions & 49 deletions qml/harbour-berail.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

import QtQuick 2.2
import Sailfish.Silica 1.0
//import io.thp.pyotherside 1.3
import org.nemomobile.configuration 1.0
import Nemo.Configuration 1.0
import Harbour.BeRail.API 1.0
import Harbour.BeRail.Models 1.0
import "pages"
import "./pages/js/util.js" as Util
import "components"

ApplicationWindow
{
Expand All @@ -30,9 +31,6 @@ ApplicationWindow
allowedOrientations: Orientation.All
_defaultPageOrientations: Orientation.All

readonly property string name: "BeRail"
readonly property string version: "1.1"

// Colors
readonly property string blue: "#3f51b5"
readonly property string red: "#f44336"
Expand All @@ -44,58 +42,21 @@ ApplicationWindow
readonly property string white: "#fffde7"
readonly property string transparent: "transparent"

property bool pythonReady

// App settings
ConfigurationGroup {
id: settings
path: "/apps/harbour-berail/settings"

property bool rememberLiveboardStation: true
property bool favouriteStations
property int arriveFromGivenTime
property string lastLiveboardStation
property bool favouriteStationsEnabled
property string favouriteDepartStation
property string favouriteArriveStation
property string savedLiveboardStation
}

/*Python {
id: python
property bool _networkWasLost
Component.onCompleted: {
addImportPath(Qt.resolvedUrl("./backend")); //Add the import path for our QML/Python bridge 'app.py'
addImportPath(Qt.resolvedUrl("./backend/berail")); //Add import path for our backend module 'sailfinder'
importModule("platform", function() { //Add the right import path depending on the architecture of the processor
if (evaluate("platform.machine()") == "armv7l") {
console.info("[INFO] ARM processor detected")
addImportPath(Qt.resolvedUrl("./backend/lib/armv7l/"));
} else {
console.info("[INFO] x86 processor detected")
addImportPath(Qt.resolvedUrl("./backend/lib/i486/"));
}
importModule("app", function() {}); // Import "app" after we imported our platform specific modules
Util.updatePythonLocal() // When done, pythonReady will be TRUE
});
//Notify user of the current network state
setHandler("network", function (status) {
if(!status)
{
toaster.previewBody = qsTr("Network down") + "!"
toaster.publish()
_networkWasLost = true
}
else if (_networkWasLost) {
toaster.previewBody = qsTr("Network recovered") + "!"
toaster.publish()
_networkWasLost = false
}
});
}
onError: console.error("[ERROR] %1".arg(traceback));
onReceived: console.info("[INFO] Message: " + JSON.stringify(data));
}*/
// iRail API
API {
id: api
}
}

67 changes: 55 additions & 12 deletions qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import QtQuick 2.2
import Sailfish.Silica 1.0
import "./components"
import "../components"

Page {
SilicaFlickable {
Expand All @@ -34,23 +34,66 @@ Page {
PageHeader { title: qsTr("About %1 V%2").arg(app.name).arg(app.version) }

SectionHeader { text: qsTr("What's %1 ?").arg(app.name) }
TextLabel { labelText: qsTr("%1 is an opensource application to plan your NMBS/SNCB railway journeys on your Sailfish OS smartphone!").arg(app.name) }
TextLabel {
text: qsTr("%1 is an opensource application to plan your NMBS/SNCB railway journeys on your Sailfish OS smartphone!").arg(app.name)
}

SectionHeader { text: qsTr("Privacy & licensing") }
TextLabel { labelText: qsTr("%1 will never collect any personal information about the user, but this can't be guaranteed from any third-party company used in %1").arg(app.name) }
TextLabel { labelText: qsTr("This application is released under GPLv3. The source code and the license is available in the Github repo of %1").arg(app.name) }
TextLabel {
text: qsTr("%1 will never collect any personal information about the user, but this can't be guaranteed from any third-party company used in %1").arg(app.name)
}
TextLabel {
text: qsTr("This application is released under GPLv3. The source code and the license is available in the Github repo of %1").arg(app.name)
}

SectionHeader { text: qsTr("Developer & source code") }
GlassButton { link: "https://github.com/modulebaan"; iconSource: "qrc:///icons/icon-github.png"; iconText: "Dylan Van Assche"; itemScale: 0.75 }
GlassButton { link: "https://paypal.me/minitreintje"; iconSource: "qrc:///icons/icon-paypal.png"; iconText: qsTr("Donate with %1").arg("PayPal"); itemScale: 0.75 }
GlassButton { link: "https://github.com/iRail/harbour-berail"; iconSource: "qrc:///icons/icon-code.png"; iconText: qsTr("Source code"); itemScale: 0.75 }
TextLabel { labelText: qsTr("%1 can be translated into your language but for that we need your help! You can translate this app on %2").arg(app.name).arg("Transifex:") }
GlassButton { link: "https://www.transifex.com/dylanvanassche/harbour-berail"; iconSource: "qrc:///icons/icon-translate.png"; iconText: qsTr("%1 project").arg("Transifex"); itemScale: 0.75 }
GlassButton {
link: "https://github.com/dylanvanassche"
iconSource: "qrc:///icons/icon-github.png"
iconText: "Dylan Van Assche"
itemScale: 0.75
}
GlassButton {
link: "https://paypal.me/minitreintje"
iconSource: "qrc:///icons/icon-paypal.png"
iconText: qsTr("Donate with %1").arg("PayPal")
itemScale: 0.75
}
GlassButton {
link: "https://github.com/iRail/harbour-berail"
iconSource: "qrc:///icons/icon-code.png"
iconText: qsTr("Source code")
itemScale: 0.75
}
TextLabel {
text: qsTr("%1 can be translated into your language but for that we need your help! You can translate this app on %2").arg(app.name).arg("Transifex:")
}
GlassButton {
link: "https://www.transifex.com/dylanvanassche/harbour-berail"
iconSource: "qrc:///icons/icon-translate.png"
iconText: qsTr("%1 project").arg("Transifex")
itemScale: 0.75
}

SectionHeader { text: qsTr("Powered by") }
GlassButton { link: "http://irail.be/"; iconSource: "qrc:///icons/icon-irail.png"; iconText: "iRail"; itemScale: 0.75 }
GlassButton { link: "http://fontawesome.io/"; iconSource: "qrc:///icons/icon-fontawesome.png"; iconText: "FontAwesome icons"; itemScale: 0.75 }
GlassButton { link: "https://twitter.com/eLtMosen"; iconSource: "qrc:///icons/icon-twitter.png"; iconText: qsTr("Icon by %1").arg("Timo Könnecke"); itemScale: 0.75 }
GlassButton {
link: "https://irail.be/"
iconSource: "qrc:///icons/icon-irail.png"
iconText: "iRail"
itemScale: 0.75
}
GlassButton {
link: "https://fontawesome.io/"
iconSource: "qrc:///icons/icon-fontawesome.png"
iconText: "FontAwesome icons"
itemScale: 0.75
}
GlassButton {
link: "https://twitter.com/eLtMosen"
iconSource: "qrc:///icons/icon-twitter.png"
iconText: qsTr("Icon by %1").arg("Timo Könnecke")
itemScale: 0.75
}
}
}
}
48 changes: 0 additions & 48 deletions qml/pages/DatePickerPage.qml

This file was deleted.

39 changes: 0 additions & 39 deletions qml/pages/DisturbancesPage.qml

This file was deleted.

Loading

0 comments on commit acf367a

Please sign in to comment.