0.2 version add desktop components multitouch, joystick, multicast
[mardrone] / mardrone / ConfigDialogDesktop.qml
1 import QtQuick 1.0
2 import QtDesktop 0.1
3 Rectangle {
4
5         property int textSize:12
6         id:dialog
7
8         anchors.fill: parent
9         Flickable {
10           id: dialogscrolarea
11           anchors.fill: parent
12        //   anchors.leftMargin:50;anchors.rightMargin:50
13           contentHeight: dialogcontent.height
14           contentWidth: parent.width
15
16           Grid {
17               columns:2
18               id: dialogcontent
19               anchors.leftMargin:50;anchors.rightMargin:50
20               spacing: 20
21
22          Text {
23                   font.pixelSize  :textSize
24                   text:"UI Style"
25
26           }
27           ComboBox {
28               id: activeUICombo;
29               model:  ListModel {
30                 id: choices
31                 ListElement { text: "MeeGo/Harmattan";file:"ardrone_harmattan.qml" }
32                 ListElement { text: "Desktop";file:"ardrone_desktop.qml" }
33                 }
34               onSelectedIndexChanged: {
35                   console.debug(selectedText + ", " + choices.get(selectedIndex).file);
36                   drone.confActiveUI=choices.get(selectedIndex).file
37               }
38
39               KeyNavigation.tab: t1
40               KeyNavigation.backtab: button2
41            }
42
43           Text {
44               width:200
45               text: "Drone IP"
46               color:textColor
47               font.pixelSize  :textSize
48            }
49
50            TextField {
51                   id: droneip
52                   width: 200
53                   height: 40
54                   anchors.right: parent.right
55                   text: drone.confDroneIp
56                   onTextChanged:{drone.confDroneIp=text;}
57            }
58
59 //          }
60
61            Text {
62               text: "Video 640x480 / Full Screen"
63               color:textColor
64               font.pixelSize  :textSize
65            }
66            CheckBox {
67               id: fullScreen
68               checked:drone.confFullScreen
69               anchors.right:parent.right
70               onCheckedChanged:{drone.confFullScreen=checked;}
71            }
72            Text {
73               text: "Acceleration Sensor for controll"
74               color:textColor
75               font.pixelSize  :textSize
76            }
77            CheckBox {
78               id: useAccelSw
79               checked:drone.confUseAccel
80               anchors.right:parent.right
81               onCheckedChanged:{drone.confUseAccel=checked;}
82            }
83            Text {
84               text: "Joystick for controll"
85               color:textColor
86               font.pixelSize  :textSize
87            }
88            CheckBox {
89               id: useJoySw
90               checked:drone.confUseJoyStick
91               anchors.right:parent.right
92               enabled:drone.confHaveJoyStick
93               onCheckedChanged:{drone.confUseJoyStick=checked;}
94            }
95            Text {
96               color:textColor
97               text: "Show debug"
98               font.pixelSize  :textSize
99            }
100            CheckBox {
101               id: showDebug
102               checked:drone.confShowDebug
103               anchors.right:parent.right
104               onCheckedChanged:{drone.confShowDebug=checked;}
105            }
106
107            Text {
108               text: "Show engine gauges"
109               color:textColor
110               font.pixelSize  :textSize
111
112            }
113            CheckBox {
114               id: showGauges
115               checked:drone.confShowGauges
116               anchors.right:parent.right
117               onCheckedChanged:{drone.confShowGauges=checked;}
118            }
119
120            Text {
121               text: "Show horizon"
122               color:textColor
123               font.pixelSize  :textSize
124
125            }
126            CheckBox {
127               id: showHorizon
128               checked:drone.confShowHorizon
129               anchors.right:parent.right
130               onCheckedChanged:{drone.confShowHorizon=checked;}
131            }
132
133            Text {
134               text: "Forward/backward gain"
135               color:textColor
136               font.pixelSize  :textSize
137            }
138
139            Slider {
140               id: forwardGain
141               anchors.right:parent.right
142               maximumValue:1.0
143               stepSize:0.01
144               value:drone.confForwardGain
145               onValueChanged:{drone.confForwardGain=value;}
146            }
147            Text {
148               text: "Right/Left gain"
149               color:textColor
150               font.pixelSize  :textSize
151            }
152
153            Slider {
154               id: rightGain
155               anchors.right:parent.right
156               maximumValue:1.0
157               stepSize:0.01
158               value:drone.confRightGain
159               onValueChanged:{drone.confRightGain=value;}
160            }
161            Text {
162               text: "accel ctrl treshold"
163               color:textColor
164               font.pixelSize  :textSize
165            }
166
167            Slider {
168               id: ctrlTreshold
169               anchors.right:parent.right
170               maximumValue:25.0
171               value:drone.confCtrlTrsh
172               onValueChanged:{drone.confCtrlTrsh=value;}
173            }
174           }
175        }
176      }