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
93 iconSource: 'image://theme/icon-m-common-search'
95 onClicked: lineSelector.open()
99 placeholderText: 'Station'
105 right: stationPickerButton.left
108 rightMargin: 10*stationPickerButton.opacity
117 id: stationPickerButton
121 bottom: gstation.bottom
126 Behavior on opacity { PropertyAnimation { } }
128 opacity: gline.text != '' // XXX: Check if the line is valid
130 width: lineSearchButton.width * opacity
131 //iconSource: 'image://theme/icon-m-common-location-picker'
132 iconSource: 'image://theme/icon-m-toolbar-list'
136 stationSheet.loadData(gline.text)
147 bottom: parent.bottom
153 gline: stationSheet.currentLine
154 gstation: stationSheet.currentStation
155 gdirection: stationSheet.currentDirection
157 sourceUrl: stationSheet.currentUrl