Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
Version 0.4.4 contains fix for issue 11 and add enhacements secified
by issues 21 and 22.
  • Loading branch information
KrisztianOlah committed Nov 6, 2014
2 parents f819200 + a39e284 commit c7c0bc0
Show file tree
Hide file tree
Showing 18 changed files with 291 additions and 161 deletions.
3 changes: 2 additions & 1 deletion harbour-london-sail.pro
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ OTHER_FILES += qml/harbour-london-sail.qml \
qml/pages/MapsPage.qml \
qml/pages/BusMapsPage.qml \
qml/pages/MyMapsPage.qml \
qml/gui/NotificationWidget.qml
qml/gui/NotificationWidget.qml \
qml/gui/TrafficSearchHeader.qml

HEADERS += \
src/logic/servicestatuslogic.h \
Expand Down
Binary file modified images/tubemap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 21 additions & 64 deletions qml/gui/SearchHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,114 +29,71 @@ Item {
id: self
property string title: "Title"
property alias text: searchField.text
property alias searchPlaceholder: searchField.placeholderText
property string placeholderText: "Search"
property bool readOnly: searchField.readOnly

signal filterChanged()
height: header.height + searchField.height + 2*Theme.paddingLarge
signal enterClicked()

height: header.height + searchField.height + 2 * Theme.paddingLarge
anchors {
left: parent.left
right: parent.right
}
state: ""

Label {
id: header
text: title
font.pixelSize: Theme.fontSizeLarge
color: Theme.highlightColor
horizontalAlignment: Text.AlignRight
anchors {
top: parent.top
topMargin: Theme.paddingMedium*2
right: parent.right
rightMargin: Theme.paddingLarge
}
}

SearchField {
id: searchField
width: 480
opacity: 0
readOnly: true
opacity: parent.opacity
anchors {
top: header.bottom
topMargin: Theme.paddingMedium*2
left: parent.left
leftMargin: Theme.paddingLarge
leftMargin: Theme.paddingMedium
right: parent.right
rightMargin: Theme.paddingMedium
}
placeholderText: "Search/Filter"
placeholderText: self.placeholderText
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
EnterKey.onClicked: {
searchField.focus = false
self.enterClicked()
}
onClicked: {
forceActiveFocus()
}

onTextChanged: {
self.filterChanged()
}
}
states: [
State {
name: ""
name: "invisible"
PropertyChanges {
target: searchField
opacity: 0
visible: false
readOnly: true
}
},
State {
name: "searchable"
name: "visible"
PropertyChanges {
target: searchField
opacity: 100
readOnly: false
}
},
State {
name: "Traffic Disruptions"
PropertyChanges {
target: self
title: "Traffic Disruptions"
}
PropertyChanges {
target: searchField
opacity: 100
readOnly: false
}
},
State {
name: "Scheduled"
PropertyChanges {
target: self
title: "Scheduled"
}
PropertyChanges {
target: searchField
opacity: 100
readOnly: false
}
},
State {
name: "Recurring Works"
PropertyChanges {
target: self
title: "Recurring Works"
}
PropertyChanges {
target: searchField
opacity: 100
readOnly: false
}
},
State {
name: "Recently Cleared"
PropertyChanges {
target: self
title: "Recently Cleared"
}
PropertyChanges {
target: searchField
opacity: 100
visible: true
readOnly: false
}
}

]
}

20 changes: 20 additions & 0 deletions qml/gui/StopHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,26 @@ Item {
bottom: stopHeader.bottom
}
}
ProgressBar {
id: progressBar
anchors {
left: self.left
leftMargin: -65
right: self.right
rightMargin: -65
verticalCenter: parent.bottom
}

minimumValue: 0
maximumValue: 100
value: 0
}
Connections {
target: arrivalsData
onDisplayTimerTicked: {
progressBar.value = arrivalsData.getTimerProgress_arrivals()
}
}

states: [

Expand Down
112 changes: 112 additions & 0 deletions qml/gui/TrafficSearchHeader.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
Copyright (C) 2014 Krisztian Olah
email: [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

import QtQuick 2.0
import Sailfish.Silica 1.0

Item {
id: self
property string title: "Title"
property alias text: searchHeader.text
property string placeholderText: "Search/Filter"

signal filterChanged()
height: searchHeader.height + 2 * Theme.paddingLarge
anchors {
left: parent.left
right: parent.right
}

SearchHeader {
id: searchHeader
title: self.title
placeholderText: self.placeholderText
state: "invisible"

onTextChanged: filterChanged()
}

state: ""

states: [
State {
name: ""
PropertyChanges {
target: searchHeader
state: "invisible"
}
},
State {
name: "searchable"
PropertyChanges {
target: searchHeader
state: "visible"
}
},
State {
name: "Traffic Disruptions"
PropertyChanges {
target: self
title: "Traffic Disruptions"
}
PropertyChanges {
target: searchHeader
state: "visible"
}
},
State {
name: "Scheduled"
PropertyChanges {
target: self
title: "Scheduled"
}
PropertyChanges {
target: searchHeader
state: "visible"
}
},
State {
name: "Recurring Works"
PropertyChanges {
target: self
title: "Recurring Works"
}
PropertyChanges {
target: searchHeader
state: "visible"
}
},
State {
name: "Recently Cleared"
PropertyChanges {
target: self
title: "Recently Cleared"
}
PropertyChanges {
target: searchHeader
state: "visible"
}
}
]
}
2 changes: 1 addition & 1 deletion qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Page {
right: parent.right
rightMargin: Theme.paddingLarge
}
text: "Version: 0.4.3"
text: "Version: 0.4.4"
}
Label {
id: descriptionLabel
Expand Down
1 change: 1 addition & 0 deletions qml/pages/BusMapsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Page {
loader.item.isLocalFile = mapData.isThereLocalFile(nameData)
label.color = mapData.isThereLocalFile(nameData) ?
Theme.primaryColor : Theme.secondaryColor }

function deleteMap() {
remorseItem.execute( itemDelegate ,"Deleting",
function () { mapData.deleteMap(nameData)} )
Expand Down
17 changes: 16 additions & 1 deletion qml/pages/BusStopPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import "../gui"
Page {
id: page
property string stopID: ""//"74612"//"52727"//"52725"
property bool isDownloading: false
allowedOrientations: Orientation.All
onStatusChanged: {
if (status === PageStatus.Active) {
Expand All @@ -50,8 +51,10 @@ Page {
}
Connections {
target: arrivalsData
onDownloadSatateChanged: {
onDownloadStateChanged: {
busyIndicator.running = !view.count && (arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop())
pulley.busy = arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop()
refreshMenuItem.enabled = !(arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop())
}
}

Expand All @@ -68,6 +71,18 @@ Page {

property ArrivalsModel arrivalsModel: arrivalsData.getArrivalsModel()

PullDownMenu {
id: pulley
MenuItem {
id: refreshMenuItem
text: "Refresh"
onClicked: {
arrivalsData.stopArrivalsUpdate()
arrivalsData.startArrivalsUpdate()
}
}
}

Connections {
target: view.currentStop
onDataChanged: {
Expand Down
16 changes: 16 additions & 0 deletions qml/pages/ChangelogPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ Page {
PageHeader {
title: "Changelog"
}
Label {
anchors {
left: parent.left
leftMargin: Theme.paddingLarge
right: parent.right
rightMargin: Theme.paddingLarge
}
wrapMode: Text.WordWrap
color: Theme.highlightColor
textFormat: Text.RichText
text: "<b>0.4.4 - New Tube Map.</b><br>
*Added new Tube Map: latest tube map as of May 2014. It takes up considerably more space due to higher resolution and better colours.<br>
*Added Pulley menu to Bus Stop Page: it is now possible to manually refresh the data,
added a widget to indicate when the timer would refresh automatically.<br>
*Fixed bug: cover no longer shows TERMINATED while bus is still on route."
}
Label {
anchors {
left: parent.left
Expand Down
Loading

0 comments on commit c7c0bc0

Please sign in to comment.