29a77d243fe45dc6d73808c4e0c99553f57c86ac
[pywienerlinien] / gotovienna / gotovienna_qml / qml / gotovienna_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     TextField {
10         placeholderText: 'origin'
11
12         id: origin
13         text: "Test"
14         anchors {
15             top: parent.top
16             left: parent.left
17             topMargin: 20
18             leftMargin: 10
19             rightMargin: 10
20         }
21         width: parent.width - 20
22         //width: parent.width - anchors.leftMargin - anchors.rightMargin
23
24          MouseArea {
25              anchors.fill: parent
26              drag.target: origin
27              drag.axis: Drag.YAxis
28              drag.minimumY: 0
29              drag.maximumY: parent.height
30          }
31     }
32
33     TextField {
34         placeholderText: 'destination'
35         id: destination
36         anchors {
37             top: origin.bottom
38             left: parent.left
39             right: parent.right
40             topMargin: 10
41             leftMargin: 10
42             rightMargin: 10
43         }
44     }
45
46     Button {
47         id: btnSearch
48         text: 'Search'
49         anchors {
50             top: destination.bottom
51             topMargin: 10
52             horizontalCenter: parent.horizontalCenter
53         }
54         onClicked: {
55             console.debug("Origin: " + origin.text)
56             console.debug("Destination: " + destination.text)
57             pageStack.push(Qt.resolvedUrl("test.qml"))
58         }
59     }
60 }
61