From da41d5b833f0554b141bd6ffba3dfb06e625c156 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Wed, 21 Apr 2010 15:43:02 +0200 Subject: [PATCH] QmlDesigner.propertyEditor: completing Text/TexEdit and TextInput panes See BAUHAUS-581 This patch adds missing properties and implments the wrap mode combobox --- .../Qt/StandardTextGroupBox.qml | 17 +++++---- .../propertyeditor/Qt/TextEditSpecifics.qml | 1 + .../propertyeditor/Qt/TextInputGroupBox.qml | 36 +++++++++++++++---- .../propertyeditor/Qt/TextInputSpecifics.qml | 7 ++-- 4 files changed, 46 insertions(+), 15 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml index c712c554bf3..2dc4eaceb2e 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml @@ -27,13 +27,18 @@ GroupBox { visible: showIsWrapping layout: HorizontalLayout { Label { - text: "" + text: "Wrap Mode" } - CheckBox { - baseStateFlag: isBaseState; - text: qsTr("Is Wrapping") - checkable: true; - backendValue: backendValues.wrap; + ComboBox { + baseStateFlag: isBaseState + minimumHeight: 22; + items : { ["NoWrap", "WordWrap", "WrapAnywhere", "WrapAtWordBoundaryOrAnywhere"] } + currentText: backendValues.wrapMode.value; + onItemsChanged: { + currentText = backendValues.wrapMode.value; + } + + backendValue: backendValues.wrapMode } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml index c9e9a62fd53..6a0dc35f3bf 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml @@ -13,6 +13,7 @@ QWidget { StandardTextGroupBox { finished: finishedNotify; + showIsWrapping: true } StandardTextColorGroupBox { finished: finishedNotify; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml index 7d0b7577254..9dda196f5ef 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml @@ -5,8 +5,22 @@ GroupBox { id: textInputGroupBox caption: qsTr("Text Input") + property bool isTextInput: false - layout: VerticalLayout { + layout: VerticalLayout { + + QWidget { + visible: isTextInput + layout: HorizontalLayout { + + Label {text: "Input Mask"} + + LineEdit { + backendValue: backendValues.inputMask + baseStateFlag: isBaseState + } + } + } QWidget { layout: HorizontalLayout { @@ -18,13 +32,10 @@ GroupBox { checkable: true; backendValue: backendValues.readOnly; } - - - - } } + QWidget { layout: HorizontalLayout { Label {text: ""} @@ -48,7 +59,20 @@ GroupBox { text: qsTr("Focus On Press") baseStateFlag: isBaseState; checkable: true; - backendValue: backendValues. focusOnPress; + backendValue: backendValues.focusOnPress; + } + } + } + + QWidget { + visible: isTextInput + layout: HorizontalLayout { + Label {text: ""} + CheckBox { + text: qsTr("Auto Scroll") + baseStateFlag: isBaseState; + checkable: true; + backendValue: backendValues.autoScroll; } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml index 4ed4b74f585..3a98fe9a61c 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml @@ -17,8 +17,8 @@ QWidget { StandardTextColorGroupBox { finished: finishedNotify; - showSelectionColor: true; - showSelectedTextColor: true; + showSelectionColor: true; + showSelectedTextColor: true; } FontGroupBox { @@ -27,7 +27,8 @@ QWidget { } TextInputGroupBox { - finished: finishedNotify; + finished: finishedNotify + isTextInput: true } QScrollArea { } -- GitLab