5 height: infoLabel.height + fromLabel.height + toLabel.height + saveButton.height + 50
7 color : myPalette.window;
9 property int focusIndex:-1;
11 property bool newPlugin:false;
13 function setInfo(string){
14 infoLabel.text = string;
16 function setStartValues(startFrom, startTo, startFromIndex, startToIndex){
17 comboFrom.setStartValue(startFrom, startFromIndex)
18 comboTo.setStartValue(startTo, startToIndex)
20 function revertLang(){
21 var tmpidx = comboFrom.index
22 comboFrom.index = comboTo.index
23 comboTo.index = tmpidx
25 var tmpval = comboFrom.value
26 comboFrom.value = comboTo.value
27 comboTo.value = tmpval
30 function setNew(bool){
36 comboFrom.focus = true;
42 revertButton.focus = true
43 if(!revertButton.enabled)
47 saveButton.focus = true
48 if(!saveButton.enabled)
62 signal saveButtonClicked(string langFrom, string langTo);
66 colorGroup:SystemPalette.Active
71 anchors.bottomMargin: 6
72 anchors.rightMargin: 0
73 anchors.left: fromLabel.right
74 anchors.right: revertButton.left
75 anchors.bottom: saveButton.top
76 anchors.top: parent.top
83 height: paintedHeight+5;
84 anchors.right: parent.right
85 anchors.left: parent.left
86 anchors.top: parent.top
88 transformOrigin: Item.Left
96 height: paintedHeight+5;
97 anchors.top: infoLabel.bottom
98 anchors.left: parent.left
100 transformOrigin: Item.Left
108 height: paintedHeight+5;
109 anchors.top: fromLabel.bottom
110 anchors.left: parent.left
112 transformOrigin: Item.Left
119 anchors.right: revertButton.left
120 anchors.rightMargin: 5
121 anchors.left: fromLabel.right
122 anchors.leftMargin: 10
123 anchors.verticalCenter: fromLabel.verticalCenter
125 parentField: comboField
127 basicHeight: fromLabel.height
139 anchors.right: revertButton.left
140 anchors.rightMargin: 5
141 anchors.left: fromLabel.right
142 anchors.leftMargin: 10
143 anchors.verticalCenter: toLabel.verticalCenter
145 parentField: comboField;
147 basicHeight: fromLabel.height
160 height: fromLabel.height
161 anchors.top: fromLabel.bottom
162 anchors.topMargin: -8
163 anchors.right: parent.right
164 pathToIcon: "qrc:/button/revert.png"
165 onClicked: { rectangle1.revertLang() }
171 anchors.bottom: parent.bottom
172 anchors.right: parent.right
173 anchors.left: parent.left
175 rectangle1.saveButtonClicked(comboFrom.value, comboTo.value);
184 comboTo.expanded=false;
185 comboFrom.expanded=false;
194 when: newPlugin==true
195 PropertyChanges { target: saveButton; textInButton: qsTr("Add") }
199 when: newPlugin==false
200 PropertyChanges { target: saveButton; textInButton: qsTr("Save settings") }