X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=blobdiff_plain;f=mardrone%2FConfigDialogDesktop.qml;h=3a4dbaf0d5e0b1d09d5da2a7e7d65dddfe36b3ef;hp=3c84204a816cd12cef94a3da0ea1fdd06a064c73;hb=67f360fe743dc4363022000a59fd289c8f6a3a9b;hpb=ea742954eecfd78819b8a2c71bcb0d771b1193b7 diff --git a/mardrone/ConfigDialogDesktop.qml b/mardrone/ConfigDialogDesktop.qml index 3c84204..3a4dbaf 100644 --- a/mardrone/ConfigDialogDesktop.qml +++ b/mardrone/ConfigDialogDesktop.qml @@ -11,39 +11,57 @@ Rectangle { anchors.fill: parent TabFrame { + anchors.fill:parent Tab { title: "Display" - id: displayTab - anchors.fill: parent + id: displayTab + anchors.fill: parent // anchors.leftMargin:50;anchors.rightMargin:50 Grid { columns:2 id: dialogcontent + anchors.fill:parent + anchors.topMargin: 50 anchors.leftMargin:50;anchors.rightMargin:50 spacing: 20 -/* Text { + Text { font.pixelSize :textSize text:"UI Style" } + + Component.onCompleted: { + for(var j = 0; j < uiList.count();++j ) { + var data = {'name':uiList.get(j).name,'file':uiList.get(j).file }; + // var data = {'name':uiList.get(j).name }; + console.debug("appending ",uiList.get(j).name,uiList.get(j).file); + choices.append(data); + if(uiList.get(j).file==drone.confActiveUI) activeUICombo.selectedIndex=j; + } + } + + ListModel { + id: choices + ListElement { text: "MeeGo/Harmattan";file:"ardrone_harmattan.qml" } + ListElement { text: "Symbian";file:"ardrone_symbian.qml" } + ListElement { text: "Desktop";file:"ardrone_desktop.qml" } + } ComboBox { id: activeUICombo; - model: ListModel { - id: choices - ListElement { text: "MeeGo/Harmattan";file:"ardrone_harmattan.qml" } - ListElement { text: "Desktop";file:"ardrone_desktop.qml" } - } + width:200 + model:uiList onSelectedIndexChanged: { - console.debug("onSelectedIndexChanged " + selectedText + ", " + choices.get(selectedIndex).file); - drone.confActiveUI=choices.get(selectedIndex).file + console.debug("onSelectedIndexChanged " + selectedText + ", " + model.get(selectedIndex).file); + drone.confActiveUI=model.get(selectedIndex).file } - selectedText:drone.confActiveUI - KeyNavigation.tab: t1 - KeyNavigation.backtab: button2 + + + // KeyNavigation.tab: t1 + //KeyNavigation.backtab: button2 } -*/ + Text { width:200 text: "Drone IP" @@ -116,6 +134,8 @@ Rectangle { title: "Control" Grid { columns:2 + anchors.fill:parent + anchors.topMargin: 50 anchors.leftMargin:50;anchors.rightMargin:50 spacing: 20 Text { @@ -144,13 +164,13 @@ Rectangle { } Text { - visible:drone.confUseJoyStick + visible:drone.confUseJoyStick & js.haveJoyStick font.pixelSize :textSize text:"\"" + js.joyStickName + "\"" } Button { - visible:drone.confUseJoyStick + visible:drone.confUseJoyStick & js.haveJoyStick text:"Calibrate" anchors.right:parent.right onClicked:{ joyStickCalibrator.visible = true;