first import
[mardrone] / mardrone / ConfigDialog.qml
diff --git a/mardrone/ConfigDialog.qml b/mardrone/ConfigDialog.qml
new file mode 100644 (file)
index 0000000..a4fed33
--- /dev/null
@@ -0,0 +1,142 @@
+import Qt 4.7
+import com.meego 1.0
+Page {
+        id:dialog
+        Flickable {
+          id: dialogscrolarea
+          anchors.top: parent.top
+          anchors.bottom: parent.bottom
+          width: parent.width
+          anchors.leftMargin:50;anchors.rightMargin:50
+
+      /*    anchors.horizontalCenter:parent.horizontalCenter */
+
+          contentHeight: dialogcontent.height
+          contentWidth: parent.width
+
+          Grid {
+              columns:2
+              id: dialogcontent
+        //      width: parent.width
+        anchors.left:parent.left;anchors.right:parent.right
+          anchors.leftMargin:50;anchors.rightMargin:50
+
+           spacing: 30
+           Text {
+              width:400
+              text: "Drone IP"
+
+           }
+           LineEdit {
+                  id: droneip
+                  width:300
+                  text: drone.confDroneIp
+                  onTextChanged:{drone.confDroneIp=text;}
+           }
+
+           Text {
+              text: "Video 640x480 / Full Screen"
+           }
+           Switch {
+              id: fullScreen
+        //      enabled:drone.confFullScreen
+              checked:drone.confFullScreen
+              anchors.right:parent.right
+        //      onEnabledChanged:{drone.confFullScreen=enabled;}
+              onCheckedChanged:{drone.confFullScreen=checked;}
+           }
+
+           Text {
+              text: "Show debug"
+           }
+           Switch {
+              id: showDebug
+          //    enabled:drone.confShowDebug
+              checked:drone.confShowDebug
+              anchors.right:parent.right
+//              onEnabledChanged:{drone.confShowDebug=enabled;}
+              onCheckedChanged:{drone.confShowDebug=checked;}
+           }
+
+           Text {
+              text: "Show engine gauges"
+
+           }
+           Switch {
+              id: showGauges
+//              enabled:drone.confShowGauges
+              checked:drone.confShowGauges
+              anchors.right:parent.right
+//              onEnabledChanged:{drone.confShowGauges=enabled;}
+              onCheckedChanged:{drone.confShowGauges=checked;}
+           }
+
+           Text {
+              text: "Show horizon"
+
+           }
+           Switch {
+              id: showHorizon
+              checked:drone.confShowHorizon
+              anchors.right:parent.right
+              onCheckedChanged:{drone.onfconfShowHorizon=enabled;}
+           }
+
+           Text {
+              text: "Forward gain"
+           }
+
+           Slider {
+              id: forwardGain
+              anchors.right:parent.right
+              maximumValue:1.0
+      //        stepSize:0.01
+              steps:0.01
+              value:drone.confForwardGain
+              onValueChanged:{drone.confForwardGain=value;}
+           }
+           Text {
+              text: "Backward gain"
+           }
+
+           Slider {
+              id: backwardGain
+              anchors.right:parent.right
+              maximumValue:1.0
+        //      stepSize:0.01
+              steps:0.01
+              value:drone.confBackwardGain
+              onValueChanged:{drone.confBackwardGain=value;}
+           }
+
+           Text {
+              text: "Left gain"
+           }
+
+           Slider {
+              id: leftGain
+              anchors.right:parent.right
+              maximumValue:1.0
+         //     stepSize:0.01
+              steps:0.01
+              value:drone.confLeftGain
+              onValueChanged:{drone.confLeftGain=value;}
+           }
+
+           Text {
+              text: "Right gain"
+           }
+
+           Slider {
+              id: rightGain
+              anchors.right:parent.right
+              maximumValue:1.0
+         //     stepSize:0.01
+              steps:0.01
+              value:drone.confRightGain
+              onValueChanged:{drone.confRightGain=value;}
+           }
+
+          }
+       }
+     }