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){
42 revertButton.focus = true
43 if(!revertButton.enabled)
47 saveButton.focus = true
48 if(!saveButton.enabled)
67 signal saveButtonClicked(string langFrom, string langTo);
71 colorGroup:SystemPalette.Active
76 anchors.bottomMargin: 6
77 anchors.rightMargin: 0
78 anchors.left: fromLabel.right
79 anchors.right: revertButton.left
80 anchors.bottom: saveButton.top
81 anchors.top: parent.top
88 height: paintedHeight+5;
89 anchors.right: parent.right
90 anchors.left: parent.left
91 anchors.top: parent.top
93 transformOrigin: Item.Left
101 height: paintedHeight+5;
102 anchors.top: infoLabel.bottom
103 anchors.left: parent.left
105 transformOrigin: Item.Left
113 height: paintedHeight+5;
114 anchors.top: fromLabel.bottom
115 anchors.left: parent.left
117 transformOrigin: Item.Left
124 anchors.right: revertButton.left
125 anchors.rightMargin: 5
126 anchors.left: fromLabel.right
127 anchors.leftMargin: 10
128 anchors.verticalCenter: fromLabel.verticalCenter
130 parentField: comboField
132 basicHeight: fromLabel.height
144 anchors.right: revertButton.left
145 anchors.rightMargin: 5
146 anchors.left: fromLabel.right
147 anchors.leftMargin: 10
148 anchors.verticalCenter: toLabel.verticalCenter
150 parentField: comboField;
152 basicHeight: fromLabel.height
165 height: fromLabel.height
166 anchors.top: fromLabel.bottom
167 anchors.topMargin: -8
168 anchors.right: parent.right
169 pathToIcon: "qrc:/button/revert.png"
170 onClicked: { rectangle1.revertLang() }
176 anchors.bottom: parent.bottom
177 anchors.right: parent.right
178 anchors.left: parent.left
180 rectangle1.saveButtonClicked(comboFrom.value, comboTo.value);
189 comboTo.expanded=false;
190 comboFrom.expanded=false;
199 when: newPlugin==true
200 PropertyChanges { target: saveButton; textInButton: qsTr("Add") }
204 when: newPlugin==false
205 PropertyChanges { target: saveButton; textInButton: qsTr("Save settings") }