import Qt 4.7 Rectangle{ id:rectangle1 width: 220 height: textPlugin.height + textFrom.height + textTo.height + textDescription.height + textInfo.height +90 property bool newPlugin:false; SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } color : myPalette.window; function setPlugin(string){ textPlugin.text = qsTr("Plugin") + ": " + string; } function setFrom(string){ textFrom.text = qsTr("From") + ": " + string; } function setTo(string){ textTo.text = qsTr("To") + ": " + string; } function setDescription(string){ textDescription.text = qsTr("Description") + ": " + string; } function setInfo(string){ textInfo.text = string; } function setButtonText(string){ saveButton.textInButton=string; } function setCheckedOptimalize(bool){ optimalizeCheckbox.selected=bool; } function setCheckedStrip(bool){ stripCheckbox.selected=bool; } function setNew(bool){ newPlugin=bool; } function setPath(string){ textPath.text=string; } signal saveButtonClicked(); signal downloadButtonClicked(); signal browseButtonClicked(); signal optimalizeCheckboxChanged(bool Boolean); signal stripCheckboxChanged(bool Boolean); Text { id: textPlugin width: rectangle1.width height: paintedHeight+5; text: "Plugin: " wrapMode: Text.Wrap; transformOrigin: Item.Left anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } Text { id: textFrom width:rectangle1.width height: paintedHeight+5; text: "From: " wrapMode: Text.Wrap; anchors.top: textPlugin.bottom anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } Text { id: textTo width: rectangle1.width height: paintedHeight+5; text: "To: " wrapMode: Text.Wrap; anchors.top: textFrom.bottom transformOrigin: Item.Left anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } Text { id: textDescription width: rectangle1.width height: paintedHeight+5; text: "Description: " wrapMode: Text.Wrap; anchors.top: textTo.bottom transformOrigin: Item.Left anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } Text { id: textInfo width: rectangle1.width height: paintedHeight+5; text: ": " wrapMode: Text.Wrap; anchors.top: textDescription.bottom transformOrigin: Item.Left anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } Checkbox { id: optimalizeCheckbox width: 20 height: 20 anchors.left: parent.left anchors.leftMargin: 5 anchors.top: textInfo.bottom onChanged: rectangle1.optimalizeCheckboxChanged(selected); } Checkbox { id: stripCheckbox width: 20 height: 20 anchors.top: optimalizeCheckbox.bottom anchors.topMargin: 5 anchors.horizontalCenter: optimalizeCheckbox.horizontalCenter onChanged: rectangle1.stripCheckboxChanged(selected); } Text { id: textOptimalize width: 80 height: 20 text: qsTr("Optimize") anchors.left: optimalizeCheckbox.right anchors.leftMargin: 5 anchors.verticalCenterOffset: 3 anchors.verticalCenter: optimalizeCheckbox.verticalCenter font.pixelSize: 12 } Text { id: textStrip width: 80 height: 20 text: qsTr("Strip accents") anchors.verticalCenterOffset: 3 anchors.verticalCenter: stripCheckbox.verticalCenter anchors.horizontalCenter: textOptimalize.horizontalCenter font.pixelSize: 12 } Button { id: saveButton height: 30 textInButton: qsTr("Save") anchors.top: stripCheckbox.bottom anchors.topMargin: 10 anchors.right: parent.right anchors.left: parent.left onClicked: rectangle1.saveButtonClicked(); } Text { id: textPath height: paintedHeight+5; text: qsTr("Dictionary file: not selected") wrapMode: Text.Wrap; anchors.top: parent.top anchors.topMargin: 10 anchors.right: browseButton.left anchors.rightMargin: 0 anchors.left: parent.left anchors.leftMargin: 0 font.pixelSize: 12 opacity: 0 } Button { id: browseButton width: 80; height: 25; textInButton: qsTr("Browse"); anchors.top: parent.top anchors.topMargin: 10 anchors.right: parent.right anchors.rightMargin: 10 opacity: 0 onClicked: rectangle1.browseButtonClicked(); } Button { id: downloadButton width: 80; height: 25; textInButton: qsTr("Download"); anchors.right: parent.right anchors.rightMargin: 10 anchors.top: browseButton.bottom anchors.topMargin: 10 opacity: 0 onClicked: rectangle1.downloadButtonClicked(); } states: [ State { name: "Stan1" when: newPlugin==true PropertyChanges { target: textPlugin; opacity: 0} PropertyChanges { target: textFrom; opacity: 0} PropertyChanges { target: textTo; opacity: 0} PropertyChanges { target: textDescription; opacity: 0} PropertyChanges { target: textInfo; opacity: 0} PropertyChanges { target: textPath; opacity: 1} PropertyChanges { target: browseButton; opacity: 1 } PropertyChanges { target: downloadButton; opacity: 1} } ] }