import Qt 4.7 Rectangle { id: rectangle1 width: 230 height:170 SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } color : myPalette.window; signal historySizeValueChanged(int intiger); signal searchResulValueChanged(int intiger); signal dictionariesCheckBoxChanged(bool Boolean); signal bookmarksCheckBoxChanged(bool Boolean); signal saveButtonClicked(); function setMinHistory(intiger){ historySpinbox.minValue=intiger; } function setMaxHistory(intiger){ historySpinbox.maxValue=intiger; } function setValueHistory(intiger){ historySpinbox.value=intiger; } function setMaxSearchResult(intiger){ searchSpinbox.maxValue=intiger; } function setMinSearchResult(intiger){ searchSpinbox.minValue=intiger; } function setValueSearchResult(intiger){ searchSpinbox.value=intiger; } function setCheckedBookmarks(bool){ bookmarkCheckBox.selected=bool; } function setCheckedDictionaries(bool){ dictionariesCheckBox.selected=bool; } Text { id: textSearch width: 120 height: paintedHeight+5; text: qsTr("Search result size") anchors.verticalCenterOffset: 2 anchors.left: parent.left anchors.verticalCenter: searchSpinbox.verticalCenter font.pixelSize: 12 } Text { id: textHistory width: 120 height: paintedHeight+5; text: qsTr("History size") anchors.verticalCenterOffset: 2 anchors.left: parent.left anchors.verticalCenter: historySpinbox.verticalCenter font.pixelSize: 12 } Text { id: textSearchIn width: 120 height: paintedHeight+5; text: qsTr("Search in:") anchors.top: textHistory.bottom anchors.topMargin: 15 anchors.left: parent.left font.pixelSize: 12 } Text { id: textBookmark width: 120 height: 20 text: qsTr("Bookmarks") anchors.verticalCenterOffset: 2 anchors.left: bookmarkCheckBox.right anchors.leftMargin: 10 anchors.verticalCenter: bookmarkCheckBox.verticalCenter font.pixelSize: 12 } Text { id: textDictionaries width: 120 height: 20 text: qsTr("Dictionaries") anchors.verticalCenterOffset: 2 anchors.left: dictionariesCheckBox.right anchors.leftMargin: 10 anchors.verticalCenter: dictionariesCheckBox.verticalCenter font.pixelSize: 12 } MySpinBox { id: searchSpinbox width: 40 height: 20; anchors.top: parent.top anchors.topMargin: 10 anchors.left: textSearch.right anchors.leftMargin: 20 onValueChange: rectangle1.searchResulValueChanged(intiger); } MySpinBox { id: historySpinbox width: 40 height: 20; anchors.horizontalCenter: searchSpinbox.horizontalCenter anchors.top: searchSpinbox.bottom anchors.topMargin: 10 onValueChange: rectangle1.historySizeValueChanged(intiger); } Checkbox { id: bookmarkCheckBox width: 20 height: 20 anchors.left: parent.left anchors.leftMargin: 20 anchors.top: textSearchIn.bottom anchors.topMargin: 0 onChanged: rectangle1.bookmarksCheckBoxChanged(selected); } Checkbox { id: dictionariesCheckBox width: 20 height: 20 anchors.horizontalCenter: bookmarkCheckBox.horizontalCenter anchors.top: bookmarkCheckBox.bottom anchors.topMargin: 3 onChanged: rectangle1.dictionariesCheckBoxChanged(selected); } Button { id: saveButton width: 66 height:26 anchors.bottom: parent.bottom anchors.bottomMargin: 5 anchors.right: parent.right anchors.rightMargin: 5 textInButton: qsTr("Save") onClicked: rectangle1.saveButtonClicked(); } }