X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=mardrone%2FConfigDialog.qml;h=f306388d7b749f3a5027268beaff66341e198277;hb=442f271d6cbf27a3996ffef2e1c3e9844c323af8;hp=81c94fef8cfa557713adbb6e980d6fe3fd1a588b;hpb=71fc016fdd729349858914d16eec0ba6b7f0458b;p=mardrone diff --git a/mardrone/ConfigDialog.qml b/mardrone/ConfigDialog.qml index 81c94fe..f306388 100644 --- a/mardrone/ConfigDialog.qml +++ b/mardrone/ConfigDialog.qml @@ -17,28 +17,28 @@ Page { Component.onCompleted: { console.debug("Appending items to choices",uiList.count()) 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,'modelData':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) activeUIDialog.selectedIndex=j; + if(uiList.get(j).file==drone.confActiveUI) { activeUIDialog.selectedIndex=j; uiDialogButton.text=uiList.get(j).name } } } ListModel { id: choices - ListElement { - name:"none"; - file:"none.qml" - } + /* ListElement {name:"xyzzy" ;file:"plugh.qml"} + ListElement {name:"xyzzy2" ;file:"plugh.qml"}*/ } SelectionDialog { id: activeUIDialog; + height:400 model:choices onSelectedIndexChanged: { - console.debug("onSelectedIndexChanged " + model.get(selectedIndex).name + ", " + model.get(selectedIndex).file); - drone.confActiveUI=choices.get(selectedIndex).file - } + console.debug("onSelectedIndexChanged " + model.get(selectedIndex).name + ", " + model.get(selectedIndex).file); + drone.confActiveUI=choices.get(selectedIndex).file; + uiDialogButton.text=uiList.get(selectedIndex).name + } } Flickable { @@ -60,7 +60,8 @@ Page { } Button { - text:drone.confActiveUI + id:uiDialogButton + text:"" anchors.right:parent.right onClicked: { // activeUIDialog.setSelectedIndex(text); @@ -117,7 +118,7 @@ Page { id: useJoySw checked:drone.confUseJoyStick anchors.right:parent.right - enabled:js.haveJoyStick + // enabled:js.haveJoyStick onCheckedChanged:{drone.confUseJoyStick=checked;} } @@ -164,7 +165,7 @@ Page { Text { text: "Show engine gauges" - color:textColor + color:textColor font.pixelSize :textSize } @@ -236,10 +237,6 @@ Page { property int textSize:30 id:calibrateDialog tools:commonTools - Component.onCompleted: { - if (calibrateDialog.status != Component.Ready) - console.log("Error loading component:", calibrateDialog.errorString()); - } JoyStickCalibrator { id:jc