X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmdictionary%2Fqml%2FStarDictDialog.qml;fp=src%2Fmdictionary%2Fqml%2FStarDictDialog.qml;h=b2e75dbe55974317b78f7692d44446f1b6b551df;hb=9ac109931229cc19bc3584b34c15364aa85fd61f;hp=b283f6100b18b5c573f4484719f9262d87326540;hpb=9a5bedfd71b6c1a09fe77aea909d3d78a771a6e8;p=mdictionary diff --git a/src/mdictionary/qml/StarDictDialog.qml b/src/mdictionary/qml/StarDictDialog.qml index b283f61..b2e75db 100644 --- a/src/mdictionary/qml/StarDictDialog.qml +++ b/src/mdictionary/qml/StarDictDialog.qml @@ -1,6 +1,12 @@ import Qt 4.7 Rectangle{ + id:rectangle1 + width: 220 + height: newPlugin ? textPath.height+50 : textInfo.height+50 + focus: true; + + property int focusIndex:-1; property bool newPlugin:false; function setInfo(string){ @@ -16,21 +22,37 @@ Rectangle{ newPlugin=bool; } + function setFocus(){ + if(focusIndex==0){ + browseButton.focus=true; + if(!browseButton.opacity) + focusIndex++; + } + if(focusIndex==1){ + saveButton.focus = true + if(!saveButton.enabled) + focusIndex++; + } + if(focusIndex>1){ + focusIndex=-1; + focus=true; + } + } + signal saveButtonClicked(); signal browseButtonClicked(); signal heightChange(int intiger); - id:rectangle1 - width: 220 - height: newPlugin ? textPath.height+50 : textInfo.height+50 + Keys.onTabPressed: { + focusIndex++; + setFocus(); + } onHeightChanged:{ heightChange((newPlugin ? textPath.height+50 : textInfo.height+50)); //console.log( "debug" + (newPlugin ? textPath.paintedHeight+55 : textInfo.paintedHeight+55)); } - - SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } color : myPalette.window;