SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
color : myPalette.window;
+ focus: true;
+ property int focusIndex:-1;
+
signal historySizeValueChanged(int intiger);
signal searchResulValueChanged(int intiger);
function setCheckedDictionaries(bool){
dictionariesCheckBox.selected=bool;
}
+ function setFocus(){
+ if(focusIndex==0){
+ searchSpinbox.setFocus();
+ if(!searchSpinbox.enabled)
+ focusIndex++;
+ }
+ if(focusIndex==1){
+ historySpinbox.setFocus();
+ if(!historySpinbox.enabled)
+ focusIndex++;
+ }
+ if(focusIndex==2){
+ bookmarkCheckBox.focus = true
+ if(!bookmarkCheckBox.enabled)
+ focusIndex++;
+ }
+ if(focusIndex==3){
+ dictionariesCheckBox.focus = true
+ if(!dictionariesCheckBox.enabled)
+ focusIndex++;
+ }
+ if(focusIndex==4){
+ saveButton.focus = true
+ if(!saveButton.enabled)
+ focusIndex++;
+ }
+ if(focusIndex>4){
+ focusIndex=-1;
+ focus=true;
+ }
+ }
+
+ Keys.onTabPressed: {
+ focusIndex++;
+ setFocus();
+ }
Text {
id: textSearch
anchors.left: textSearch.right
anchors.leftMargin: 20
onValueChange: rectangle1.searchResulValueChanged(intiger);
+ onFocusChanged: if(focus) focusIndex=0;
}
MySpinBox {
anchors.top: searchSpinbox.bottom
anchors.topMargin: 10
onValueChange: rectangle1.historySizeValueChanged(intiger);
+ onFocusChanged: if(focus) focusIndex=1;
}
Checkbox {
anchors.top: textSearchIn.bottom
anchors.topMargin: 0
onChanged: rectangle1.bookmarksCheckBoxChanged(selected);
+ onFocusChanged: if(focus) focusIndex=2;
}
Checkbox {
anchors.top: bookmarkCheckBox.bottom
anchors.topMargin: 3
onChanged: rectangle1.dictionariesCheckBoxChanged(selected);
+ onFocusChanged: if(focus) focusIndex=3;
}
Button {
anchors.right: parent.right
anchors.rightMargin: 5
textInButton: qsTr("Save")
- //onClicked: rectangle1.saveButtonClicked();
+ onClicked: rectangle1.saveButtonClicked();
+ onFocusChanged: if(focus) focusIndex=4;
}
}