25cfbd9bfc1263177e5b4a5de56a9c7ce2852af9
[pywienerlinien] / qml / MainPage.qml
1 import QtQuick 1.1
2 import com.nokia.meego 1.0
3 import "UIConstants.js" as UIConstants
4 import "ExtrasConstants.js" as ExtrasConstants
5
6 Page {
7     tools: commonTools
8
9     Image {
10         id: logo
11         source: 'logo.png'
12
13         anchors {
14             topMargin: 25
15             top: parent.top
16             horizontalCenter: parent.horizontalCenter
17         }
18     }
19
20     TextField {
21         placeholderText: 'Line'
22
23         id: gline
24         anchors {
25             top: logo.bottom
26             left: parent.left
27             topMargin: 20
28             leftMargin: 10
29             rightMargin: 10
30         }
31         width: parent.width - 20
32
33          MouseArea {
34              anchors.fill: parent
35              drag.target: gline
36              drag.axis: Drag.YAxis
37              drag.minimumY: 0
38              drag.maximumY: parent.height
39          }
40     }
41
42     TextField {
43         placeholderText: 'Station'
44         id: gstation
45         anchors {
46             top: gline.bottom
47             left: parent.left
48             right: parent.right
49             topMargin: 10
50             leftMargin: 10
51             rightMargin: 10
52         }
53     }
54
55     ResultRealtime { id: resu }
56
57     Button {
58         id: btnSearch
59         text: 'Search'
60         anchors {
61             top: gstation.bottom
62             topMargin: 10
63             horizontalCenter: parent.horizontalCenter
64         }
65         onClicked: {
66             resu.gline = gline.text
67             resu.gstation = gstation.text
68             pageStack.push(resu)
69             itip.search(gline.text, gstation.text)
70             resu.busy = false
71         }
72     }
73 }
74