Acceleration sensor control and basic vision framework
[mardrone] / mardrone / ConfigDialog.qml
1 import Qt 4.7
2 import com.meego 1.0
3 Page {
4         id:dialog
5         Flickable {
6           id: dialogscrolarea
7           anchors.top: parent.top
8           anchors.bottom: parent.bottom
9           width: parent.width
10           anchors.leftMargin:50;anchors.rightMargin:50
11
12       /*    anchors.horizontalCenter:parent.horizontalCenter */
13
14           contentHeight: dialogcontent.height
15           contentWidth: parent.width
16
17           Grid {
18               columns:2
19               id: dialogcontent
20         //      width: parent.width
21         anchors.left:parent.left;anchors.right:parent.right
22           anchors.leftMargin:50;anchors.rightMargin:50
23
24            spacing: 40
25            Text {
26               width:400
27               text: "Drone IP"
28
29            }
30            LineEdit {
31                   id: droneip
32                   width:300
33                   text: drone.confDroneIp
34                   onTextChanged:{drone.confDroneIp=text;}
35            }
36
37            Text {
38               text: "Video 640x480 / Full Screen"
39            }
40            Switch {
41               id: fullScreen
42         //      enabled:drone.confFullScreen
43               checked:drone.confFullScreen
44               anchors.right:parent.right
45         //      onEnabledChanged:{drone.confFullScreen=enabled;}
46               onCheckedChanged:{drone.confFullScreen=checked;}
47            }
48            Text {
49               text: "Acceleration Sensor for controll"
50            }
51            Switch {
52               id: useAccelSw
53           //    enabled:drone.confUseAccel
54               checked:drone.confUseAccel
55               anchors.right:parent.right
56 //              onEnabledChanged:{drone.confUseAccel=enabled;}
57               onCheckedChanged:{drone.confUseAccel=checked;}
58            }
59            Text {
60               text: "Show debug"
61            }
62            Switch {
63               id: showDebug
64           //    enabled:drone.confShowDebug
65               checked:drone.confShowDebug
66               anchors.right:parent.right
67 //              onEnabledChanged:{drone.confShowDebug=enabled;}
68               onCheckedChanged:{drone.confShowDebug=checked;}
69            }
70
71            Text {
72               text: "Show engine gauges"
73
74            }
75            Switch {
76               id: showGauges
77 //              enabled:drone.confShowGauges
78               checked:drone.confShowGauges
79               anchors.right:parent.right
80 //              onEnabledChanged:{drone.confShowGauges=enabled;}
81               onCheckedChanged:{drone.confShowGauges=checked;}
82            }
83
84            Text {
85               text: "Show horizon"
86
87            }
88            Switch {
89               id: showHorizon
90               checked:drone.confShowHorizon
91               anchors.right:parent.right
92               onCheckedChanged:{drone.onfconfShowHorizon=enabled;}
93            }
94
95            Text {
96               text: "Forward/backward gain"
97            }
98
99            Slider {
100               id: forwardGain
101               anchors.right:parent.right
102               maximumValue:1.0
103       //        stepSize:0.01
104               steps:0.01
105               value:drone.confForwardGain
106               onValueChanged:{drone.confForwardGain=value;}
107            }
108            /*
109            Text {
110               text: "Backward gain"
111            }
112
113            Slider {
114               id: backwardGain
115               anchors.right:parent.right
116               maximumValue:1.0
117         //      stepSize:0.01
118               steps:0.01
119               value:drone.confBackwardGain
120               onValueChanged:{drone.confBackwardGain=value;}
121            }
122
123            Text {
124               text: "Left gain"
125            }
126
127            Slider {
128               id: leftGain
129               anchors.right:parent.right
130               maximumValue:1.0
131          //     stepSize:0.01
132               steps:0.01
133               value:drone.confLeftGain
134               onValueChanged:{drone.confLeftGain=value;}
135            }
136 */
137            Text {
138               text: "Right/Left gain"
139            }
140
141            Slider {
142               id: rightGain
143               anchors.right:parent.right
144               maximumValue:1.0
145          //     stepSize:0.01
146               steps:0.01
147               value:drone.confRightGain
148               onValueChanged:{drone.confRightGain=value;}
149            }
150            Text {
151               text: "accel ctrl treshold"
152            }
153
154            Slider {
155               id: ctrlTreshold
156               anchors.right:parent.right
157          //    maximumValue:25.0
158          //     stepSize:0.01
159          //     steps:1
160               value:drone.confCtrlTrsh
161               onValueChanged:{drone.confCtrlTrsh=value;}
162            }
163           }
164        }
165      }