2 import com.nokia.meego 1.0
3 import "UIConstants.js" as UIConstants
4 import "ExtrasConstants.js" as ExtrasConstants
16 horizontalCenter: parent.horizontalCenter
22 titleText: 'Select line'
27 Component.onCompleted: {
28 var lines = itip.get_lines()
30 for (var idx in lines) {
31 lineSelectorModel.append({'name': lines[idx]})
36 // XXX It would be nice if we could make a delegate with
37 // icons (i.e. U1, U2, ... in the right colors), but we
38 // would have to "copy" the default delegate style
41 console.log('accepted: ' + selectedIndex)
42 gline.text = lineSelectorModel.get(selectedIndex).name
47 placeholderText: 'Line'
56 right: lineSearchButton.left
60 // TODO: Check if text matches an item in lineSelectorModel and
61 // set selectedIndex in lineSelector to the right item
63 if (lineSelector.selectedIndex == -1) {
67 // Disable selection in line selector if user changes the text
68 if (lineSelectorModel.get(lineSelector.selectedIndex).name != text) {
69 lineSelector.selectedIndex = -1
78 drag.maximumY: parent.height
93 iconSource: 'image://theme/icon-m-common-search'
95 onClicked: lineSelector.open()
99 placeholderText: 'Station'
111 ResultRealtime { id: resu }
119 horizontalCenter: parent.horizontalCenter
122 resu.gline = gline.text
123 resu.gstation = gstation.text
125 itip.search(gline.text, gstation.text)