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
89 iconSource: 'image://theme/icon-m-common-search'
91 onClicked: lineSelector.open()
95 placeholderText: 'Station'
101 right: stationPickerButton.left
104 rightMargin: 10*stationPickerButton.opacity
113 id: stationPickerButton
117 bottom: gstation.bottom
122 Behavior on opacity { PropertyAnimation { } }
124 opacity: gline.text != '' // XXX: Check if the line is valid
126 width: lineSearchButton.width * opacity
127 //iconSource: 'image://theme/icon-m-common-location-picker'
128 iconSource: 'image://theme/icon-m-toolbar-list'
132 stationSheet.loadData(gline.text)
143 bottom: parent.bottom
149 gline: stationSheet.currentLine
150 gstation: stationSheet.currentStation
151 gdirection: stationSheet.currentDirection
153 sourceUrl: stationSheet.currentUrl