Skip to content

Commit c7c0bc0

Browse files
committed
Merge branch 'devel'
Version 0.4.4 contains fix for issue 11 and add enhacements secified by issues 21 and 22.
2 parents f819200 + a39e284 commit c7c0bc0

18 files changed

+291
-161
lines changed

harbour-london-sail.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ OTHER_FILES += qml/harbour-london-sail.qml \
8383
qml/pages/MapsPage.qml \
8484
qml/pages/BusMapsPage.qml \
8585
qml/pages/MyMapsPage.qml \
86-
qml/gui/NotificationWidget.qml
86+
qml/gui/NotificationWidget.qml \
87+
qml/gui/TrafficSearchHeader.qml
8788

8889
HEADERS += \
8990
src/logic/servicestatuslogic.h \

images/tubemap.png

363 KB
Loading

qml/gui/SearchHeader.qml

Lines changed: 21 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -29,114 +29,71 @@ Item {
2929
id: self
3030
property string title: "Title"
3131
property alias text: searchField.text
32-
property alias searchPlaceholder: searchField.placeholderText
32+
property string placeholderText: "Search"
33+
property bool readOnly: searchField.readOnly
3334

34-
signal filterChanged()
35-
height: header.height + searchField.height + 2*Theme.paddingLarge
35+
signal enterClicked()
36+
37+
height: header.height + searchField.height + 2 * Theme.paddingLarge
3638
anchors {
3739
left: parent.left
3840
right: parent.right
3941
}
40-
state: ""
42+
4143
Label {
4244
id: header
4345
text: title
4446
font.pixelSize: Theme.fontSizeLarge
4547
color: Theme.highlightColor
48+
horizontalAlignment: Text.AlignRight
4649
anchors {
4750
top: parent.top
4851
topMargin: Theme.paddingMedium*2
4952
right: parent.right
5053
rightMargin: Theme.paddingLarge
5154
}
5255
}
56+
5357
SearchField {
5458
id: searchField
55-
width: 480
56-
opacity: 0
5759
readOnly: true
60+
opacity: parent.opacity
5861
anchors {
5962
top: header.bottom
63+
topMargin: Theme.paddingMedium*2
6064
left: parent.left
61-
leftMargin: Theme.paddingLarge
65+
leftMargin: Theme.paddingMedium
66+
right: parent.right
67+
rightMargin: Theme.paddingMedium
6268
}
63-
placeholderText: "Search/Filter"
69+
placeholderText: self.placeholderText
6470
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
6571
EnterKey.onClicked: {
6672
searchField.focus = false
73+
self.enterClicked()
6774
}
6875
onClicked: {
6976
forceActiveFocus()
7077
}
71-
72-
onTextChanged: {
73-
self.filterChanged()
74-
}
7578
}
7679
states: [
7780
State {
78-
name: ""
81+
name: "invisible"
7982
PropertyChanges {
8083
target: searchField
81-
opacity: 0
84+
visible: false
8285
readOnly: true
8386
}
8487
},
8588
State {
86-
name: "searchable"
89+
name: "visible"
8790
PropertyChanges {
8891
target: searchField
89-
opacity: 100
90-
readOnly: false
91-
}
92-
},
93-
State {
94-
name: "Traffic Disruptions"
95-
PropertyChanges {
96-
target: self
97-
title: "Traffic Disruptions"
98-
}
99-
PropertyChanges {
100-
target: searchField
101-
opacity: 100
102-
readOnly: false
103-
}
104-
},
105-
State {
106-
name: "Scheduled"
107-
PropertyChanges {
108-
target: self
109-
title: "Scheduled"
110-
}
111-
PropertyChanges {
112-
target: searchField
113-
opacity: 100
114-
readOnly: false
115-
}
116-
},
117-
State {
118-
name: "Recurring Works"
119-
PropertyChanges {
120-
target: self
121-
title: "Recurring Works"
122-
}
123-
PropertyChanges {
124-
target: searchField
125-
opacity: 100
126-
readOnly: false
127-
}
128-
},
129-
State {
130-
name: "Recently Cleared"
131-
PropertyChanges {
132-
target: self
133-
title: "Recently Cleared"
134-
}
135-
PropertyChanges {
136-
target: searchField
137-
opacity: 100
92+
visible: true
13893
readOnly: false
13994
}
14095
}
96+
14197
]
14298
}
99+

qml/gui/StopHeader.qml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,26 @@ Item {
165165
bottom: stopHeader.bottom
166166
}
167167
}
168+
ProgressBar {
169+
id: progressBar
170+
anchors {
171+
left: self.left
172+
leftMargin: -65
173+
right: self.right
174+
rightMargin: -65
175+
verticalCenter: parent.bottom
176+
}
177+
178+
minimumValue: 0
179+
maximumValue: 100
180+
value: 0
181+
}
182+
Connections {
183+
target: arrivalsData
184+
onDisplayTimerTicked: {
185+
progressBar.value = arrivalsData.getTimerProgress_arrivals()
186+
}
187+
}
168188

169189
states: [
170190

qml/gui/TrafficSearchHeader.qml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
Copyright (C) 2014 Krisztian Olah
3+
4+
email: fasza2mobile@gmail.com
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
*/
24+
25+
import QtQuick 2.0
26+
import Sailfish.Silica 1.0
27+
28+
Item {
29+
id: self
30+
property string title: "Title"
31+
property alias text: searchHeader.text
32+
property string placeholderText: "Search/Filter"
33+
34+
signal filterChanged()
35+
height: searchHeader.height + 2 * Theme.paddingLarge
36+
anchors {
37+
left: parent.left
38+
right: parent.right
39+
}
40+
41+
SearchHeader {
42+
id: searchHeader
43+
title: self.title
44+
placeholderText: self.placeholderText
45+
state: "invisible"
46+
47+
onTextChanged: filterChanged()
48+
}
49+
50+
state: ""
51+
52+
states: [
53+
State {
54+
name: ""
55+
PropertyChanges {
56+
target: searchHeader
57+
state: "invisible"
58+
}
59+
},
60+
State {
61+
name: "searchable"
62+
PropertyChanges {
63+
target: searchHeader
64+
state: "visible"
65+
}
66+
},
67+
State {
68+
name: "Traffic Disruptions"
69+
PropertyChanges {
70+
target: self
71+
title: "Traffic Disruptions"
72+
}
73+
PropertyChanges {
74+
target: searchHeader
75+
state: "visible"
76+
}
77+
},
78+
State {
79+
name: "Scheduled"
80+
PropertyChanges {
81+
target: self
82+
title: "Scheduled"
83+
}
84+
PropertyChanges {
85+
target: searchHeader
86+
state: "visible"
87+
}
88+
},
89+
State {
90+
name: "Recurring Works"
91+
PropertyChanges {
92+
target: self
93+
title: "Recurring Works"
94+
}
95+
PropertyChanges {
96+
target: searchHeader
97+
state: "visible"
98+
}
99+
},
100+
State {
101+
name: "Recently Cleared"
102+
PropertyChanges {
103+
target: self
104+
title: "Recently Cleared"
105+
}
106+
PropertyChanges {
107+
target: searchHeader
108+
state: "visible"
109+
}
110+
}
111+
]
112+
}

qml/pages/AboutPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Page {
5959
right: parent.right
6060
rightMargin: Theme.paddingLarge
6161
}
62-
text: "Version: 0.4.3"
62+
text: "Version: 0.4.4"
6363
}
6464
Label {
6565
id: descriptionLabel

qml/pages/BusMapsPage.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Page {
6767
loader.item.isLocalFile = mapData.isThereLocalFile(nameData)
6868
label.color = mapData.isThereLocalFile(nameData) ?
6969
Theme.primaryColor : Theme.secondaryColor }
70+
7071
function deleteMap() {
7172
remorseItem.execute( itemDelegate ,"Deleting",
7273
function () { mapData.deleteMap(nameData)} )

qml/pages/BusStopPage.qml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import "../gui"
3535
Page {
3636
id: page
3737
property string stopID: ""//"74612"//"52727"//"52725"
38+
property bool isDownloading: false
3839
allowedOrientations: Orientation.All
3940
onStatusChanged: {
4041
if (status === PageStatus.Active) {
@@ -50,8 +51,10 @@ Page {
5051
}
5152
Connections {
5253
target: arrivalsData
53-
onDownloadSatateChanged: {
54+
onDownloadStateChanged: {
5455
busyIndicator.running = !view.count && (arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop())
56+
pulley.busy = arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop()
57+
refreshMenuItem.enabled = !(arrivalsData.isDownloadingArrivals() || arrivalsData.isDownloadingStop())
5558
}
5659
}
5760

@@ -68,6 +71,18 @@ Page {
6871

6972
property ArrivalsModel arrivalsModel: arrivalsData.getArrivalsModel()
7073

74+
PullDownMenu {
75+
id: pulley
76+
MenuItem {
77+
id: refreshMenuItem
78+
text: "Refresh"
79+
onClicked: {
80+
arrivalsData.stopArrivalsUpdate()
81+
arrivalsData.startArrivalsUpdate()
82+
}
83+
}
84+
}
85+
7186
Connections {
7287
target: view.currentStop
7388
onDataChanged: {

qml/pages/ChangelogPage.qml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ Page {
4747
PageHeader {
4848
title: "Changelog"
4949
}
50+
Label {
51+
anchors {
52+
left: parent.left
53+
leftMargin: Theme.paddingLarge
54+
right: parent.right
55+
rightMargin: Theme.paddingLarge
56+
}
57+
wrapMode: Text.WordWrap
58+
color: Theme.highlightColor
59+
textFormat: Text.RichText
60+
text: "<b>0.4.4 - New Tube Map.</b><br>
61+
*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>
62+
*Added Pulley menu to Bus Stop Page: it is now possible to manually refresh the data,
63+
added a widget to indicate when the timer would refresh automatically.<br>
64+
*Fixed bug: cover no longer shows TERMINATED while bus is still on route."
65+
}
5066
Label {
5167
anchors {
5268
left: parent.left

0 commit comments

Comments
 (0)