Integrated other separate panel into singe flippable panel
[situare] / src / qmlui / RoutingView.qml
1 import Qt 4.7
2
3 //Item {
4 //    id: panel
5 //    height: parent.height
6 //    Rectangle {
7 //        anchors.fill: parent
8 //        color: "black"
9 //        opacity: 0.3
10 //    }
11 //    clip: true
12
13     Item {
14         id: contentsArea
15 //        state: deviceRotation.orientation
16 //        anchors.centerIn: parent
17         x: 0
18         y: 0
19         height: panel.height
20         width: panel.width
21 //        anchors.fill: parent
22
23         Image {
24             id: routeTo
25             fillMode: Image.PreserveAspectFit
26             width: parent.width
27             source: "qrc:/res/images/route_to_cursor.png"
28             anchors.horizontalCenter: parent.horizontalCenter
29             anchors.top: parent.top
30             MouseArea {
31                 anchors.fill: parent
32                 onClicked: {
33                     console.log("clicked: Route to cursor")
34                     engine.routeFromTo(map.gpsLocationLatitude, map.gpsLocationLongitude, map.centerLatitude, map.centerLongitude);
35                 }
36             }
37         }
38
39         ListView {
40             anchors { left: parent.left; right: parent.right; top: routeTo.bottom; bottom: parent.bottom }
41
42             anchors.margins: 5
43             spacing: 5
44
45             model: routingModel
46             delegate: RoutingDelegate {}
47             focus: true
48             clip: true
49         }
50
51 //        states: [
52 //            State {
53 //                name: "potrait"
54 //                PropertyChanges {
55 //                    target: contentsArea
56 //                    rotation: -90
57 //                    height: panel.width
58 //                    width: panel.height
59 //                }
60 //            }
61 //        ]
62
63 //        transitions: [
64 //            Transition {
65 //                from: ""
66 //                to: "potrait"
67 //                NumberAnimation { properties: "rotation,heigth,width"; duration: 200 }
68 //                reversible: true
69 //            }
70 //        ]
71 //    }
72
73 //    states: [
74 //        State {
75 //            name: "opened"
76 //            PropertyChanges {
77 //                target: panel
78 //                x: width
79 //            }
80 //        }
81 //    ]
82
83 //    transitions: [
84 //        Transition {
85 //            from: ""
86 //            to: "opened"
87 //            NumberAnimation { properties: "x"; duration: 200 }
88 //            reversible: true
89 //        }
90 //    ]
91 }