X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=blobdiff_plain;f=mardrone%2FConfigDialogSymbian.qml;h=e96d848b9adc903f439f3cb6dd3fc29be99f461e;hp=d76f723755aec4bb5528913e6685323cd4b49fbc;hb=8f3f629260d50245d19c50ebfb07c766b8937c30;hpb=2920a0ac78c2b7b75addea843f45f46abb33a8e4 diff --git a/mardrone/ConfigDialogSymbian.qml b/mardrone/ConfigDialogSymbian.qml index d76f723..e96d848 100644 --- a/mardrone/ConfigDialogSymbian.qml +++ b/mardrone/ConfigDialogSymbian.qml @@ -14,6 +14,36 @@ Page { MenuItem { text:"Desktop"; onClicked: { drone.confActiveUI="ardrone_desktop.qml"}} } } + + Component.onCompleted: { + for(var j = 0; j < uiList.length;++j ) { + var data = {'name':uiList[j].name,'modelData':uiList[j].name,'file':uiList[j].file }; + console.debug("appending ",uiList.get(j).name,uiList.get(j).file) + choices.append(data); + if(uIList[j].file==drone.confActiveUI) activeUIDialog.selectedIndex=j; + } + } + + ListModel { + id: choices + ListElement { + name:"none"; + modelData:"none" + file:"none" + } + } + SelectionDialog { + id: activeUIDialog; + model:uiList + + onSelectedIndexChanged: { + console.debug("onSelectedIndexChanged " +selectedIndex); + console.debug("onSelectedIndexChanged " +uiList.get(selectedIndex).name); + console.debug("onSelectedIndexChanged " + model.get(selectedIndex).name + ", " + model.get(selectedIndex).file); + drone.confActiveUI=choices.get(selectedIndex).file + } + + } Flickable { id: dialogscrolarea anchors.fill: parent @@ -33,9 +63,11 @@ Page { } Button { + width:200 text:drone.confActiveUI anchors.right:parent.right - onClicked:uiMenu.open() + onClicked:activeUIDialog.open() + // onClicked:uiMenu.open() } Text { width:350 @@ -68,7 +100,7 @@ Page { } Text { text: "Acceleration Sensor controll" - color:textColor + color:textColor font.pixelSize :textSize } Switch {