2 import com.nokia.meego 1.0
4 import "UIConstants.js" as UIConstants
5 import "ExtrasConstants.js" as ExtrasConstants
10 property bool canRefresh: realtimeResult.sourceUrl != ''
13 realtimeResult.refresh()
18 titleText: 'Select line'
23 Component.onCompleted: {
24 var lines = itip.get_lines()
26 for (var idx in lines) {
27 lineSelectorModel.append({'name': lines[idx]})
32 // XXX It would be nice if we could make a delegate with
33 // icons (i.e. U1, U2, ... in the right colors), but we
34 // would have to "copy" the default delegate style
37 console.log('accepted: ' + selectedIndex)
38 gline.text = lineSelectorModel.get(selectedIndex).name
43 placeholderText: 'Line'
52 right: lineSearchButton.left
56 // TODO: Check if text matches an item in lineSelectorModel and
57 // set selectedIndex in lineSelector to the right item
60 if (lineSelector.selectedIndex == -1) {
64 // Disable selection in line selector if user changes the text
65 if (lineSelectorModel.get(lineSelector.selectedIndex).name != text) {
66 lineSelector.selectedIndex = -1
75 drag.maximumY: parent.height
95 iconSource: 'image://theme/icon-m-common-search'
97 onClicked: lineSelector.open()
101 placeholderText: 'Station'
107 right: stationPickerButton.left
110 rightMargin: 10*stationPickerButton.opacity
119 id: stationPickerButton
123 bottom: gstation.bottom
128 Behavior on opacity { PropertyAnimation { } }
130 opacity: gline.text != '' // XXX: Check if the line is valid
132 width: lineSearchButton.width * opacity
133 //iconSource: 'image://theme/icon-m-common-location-picker'
134 iconSource: 'image://theme/icon-m-toolbar-list'
138 stationSheet.loadData(gline.text)
149 bottom: parent.bottom
155 gline: stationSheet.currentLine
156 gstation: stationSheet.currentStation
157 gdirection: stationSheet.currentDirection
159 sourceUrl: stationSheet.currentUrl