2 import com.nokia.meego 1.0
3 import "UIConstants.js" as UIConstants
4 import "ExtrasConstants.js" as ExtrasConstants
9 property bool canRefresh: realtimeResult.sourceUrl != ''
12 realtimeResult.refresh()
17 titleText: 'Select line'
22 Component.onCompleted: {
23 var lines = itip.get_lines()
25 for (var idx in lines) {
26 lineSelectorModel.append({'name': lines[idx]})
31 // XXX It would be nice if we could make a delegate with
32 // icons (i.e. U1, U2, ... in the right colors), but we
33 // would have to "copy" the default delegate style
36 console.log('accepted: ' + selectedIndex)
37 gline.text = lineSelectorModel.get(selectedIndex).name
42 placeholderText: 'Line'
51 right: lineSearchButton.left
55 // TODO: Check if text matches an item in lineSelectorModel and
56 // set selectedIndex in lineSelector to the right item
59 if (lineSelector.selectedIndex == -1) {
63 // Disable selection in line selector if user changes the text
64 if (lineSelectorModel.get(lineSelector.selectedIndex).name != text) {
65 lineSelector.selectedIndex = -1
74 drag.maximumY: parent.height
94 iconSource: 'image://theme/icon-m-common-search'
96 onClicked: lineSelector.open()
100 placeholderText: 'Station'
106 right: stationPickerButton.left
109 rightMargin: 10*stationPickerButton.opacity
118 id: stationPickerButton
122 bottom: gstation.bottom
127 Behavior on opacity { PropertyAnimation { } }
129 opacity: gline.text != '' // XXX: Check if the line is valid
131 width: lineSearchButton.width * opacity
132 //iconSource: 'image://theme/icon-m-common-location-picker'
133 iconSource: 'image://theme/icon-m-toolbar-list'
137 stationSheet.loadData(gline.text)
148 bottom: parent.bottom
154 gline: stationSheet.currentLine
155 gstation: stationSheet.currentStation
156 gdirection: stationSheet.currentDirection
158 sourceUrl: stationSheet.currentUrl