Commit a66c122d authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: fix specifics for controls

User the new Qt Quick 2 format.

Change-Id: I178ffe84c49df51bcf96983c3a0c89e240f5bf58
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent d33f7fd2
......@@ -27,144 +27,144 @@
**
****************************************************************************/
import Bauhaus 1.0
import HelperWidgets 1.0
QWidget {
layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
GroupBox {
finished: finishedNotify;
caption: qsTr("Button")
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text shown on the button")
}
LineEdit {
backendValue: backendValues.text
baseStateFlag: isBaseState;
translation: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Checked")
toolTip: qsTr("The state of the button")
}
CheckBox {
text: backendValues.checked.value
backendValue: backendValues.checked
baseStateFlag: isBaseState
checkable: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Checkable")
toolTip: qsTr("Determines whether the button is checkable or not.")
}
CheckBox {
text: backendValues.checkable.value
backendValue: backendValues.checkable
baseStateFlag: isBaseState
checkable: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Enabled")
toolTip: qsTr("Determines whether the button is enabled or not.")
}
CheckBox {
text: backendValues.enabled.value
backendValue: backendValues.enabled
baseStateFlag: isBaseState
checkable: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Default button")
toolTip: qsTr("Sets the button as the default button in a dialog.")
}
CheckBox {
text: backendValues.defaultbutton.value
backendValue: backendValues.defaultbutton
baseStateFlag: isBaseState
checkable: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Tool tip")
toolTip: qsTr("The tool tip shown for the button.")
}
LineEdit {
backendValue: backendValues.toolTip
baseStateFlag: isBaseState;
translation: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the check box gets focus if pressed."
}
CheckBox {
text: backendValues.activeFocusOnPress.value
backendValue: backendValues.activeFocusOnPress
baseStateFlag: isBaseState
checkable: true
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Icon source")
toolTip: qsTr("The URL of an icon resource.")
}
FileWidget {
enabled: isBaseState || backendValues.id.value != "";
fileName: backendValues.iconSource.value;
onFileNameChanged: {
backendValues.iconSource.value = fileName;
}
itemNode: anchorBackend.itemNode
filter: "*.png *.gif *.jpg *.bmp *.jpeg"
showComboBox: true
}
}
import QtQuick 2.1
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
Column {
anchors.left: parent.left
anchors.right: parent.right
Section {
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Button")
SectionLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text shown on the button")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.text
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Checked")
toolTip: qsTr("The state of the button")
}
SecondColumnLayout {
CheckBox {
backendValue: backendValues.checked
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Checkable")
toolTip: qsTr("Determines whether the button is checkable or not.")
}
SecondColumnLayout {
CheckBox {
backendValue: backendValues.checkable
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Enabled")
toolTip: qsTr("Determines whether the button is enabled or not.")
}
SecondColumnLayout {
CheckBox {
backendValue: backendValues.enabled
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Default button")
toolTip: qsTr("Sets the button as the default button in a dialog.")
}
SecondColumnLayout {
CheckBox {
backendValue: backendValues.defaultbutton
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Tool tip")
toolTip: qsTr("The tool tip shown for the button.")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.toolTip
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the check box gets focus if pressed."
}
SecondColumnLayout {
CheckBox {
backendValue: backendValues.activeFocusOnPress
implicitWidth: 180
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Icon source")
toolTip: qsTr("The URL of an icon resource.")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.iconSource
implicitWidth: 180
}
ExpandingSpacer {
}
}
}
}
}
......@@ -27,54 +27,67 @@
**
****************************************************************************/
import HelperWidgets 1.0
import Bauhaus 1.0
GroupBox {
caption: "Check Box"
layout: VerticalLayout {
import QtQuick 2.1
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text label for the check box")
}
Column {
anchors.left: parent.left
anchors.right: parent.right
Section {
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Check Box")
SectionLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text shown on the check button")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.text
baseStateFlag: isBaseState
translation: true
implicitWidth: 180
}
}
}
ExpandingSpacer {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Checked")
toolTip: qsTr("Determines whether the check box is checkable or not.")
}
}
Label {
text: qsTr("Checked")
toolTip: qsTr("The state of the check button")
}
SecondColumnLayout {
CheckBox {
text: backendValues.checked.value
backendValue: backendValues.checked
baseStateFlag: isBaseState
checkable: true
implicitWidth: 180
}
}
}
ExpandingSpacer {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the check box gets focus if pressed."
}
}
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the check box gets focus if pressed."
}
SecondColumnLayout {
CheckBox {
text: backendValues.activeFocusOnPress.value
backendValue: backendValues.activeFocusOnPress
baseStateFlag: isBaseState
checkable: true
implicitWidth: 180
}
ExpandingSpacer {
}
}
}
}
}
......@@ -27,40 +27,51 @@
**
****************************************************************************/
import QtQuick 2.1
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
import HelperWidgets 1.0
import Bauhaus 1.0
Column {
anchors.left: parent.left
anchors.right: parent.right
GroupBox {
caption: "Combo Box"
layout: VerticalLayout {
Section {
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Combo Box")
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Tool tip")
toolTip: qsTr("The tool tip shown for the combobox.")
}
SectionLayout {
Label {
text: qsTr("Tool tip")
toolTip: qsTr("The tool tip shown for the combobox.")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.tooltip
baseStateFlag: isBaseState
implicitWidth: 180
}
}
}
ExpandingSpacer {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the combobox gets focus if pressed."
}
}
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the combobox gets focus if pressed."
}
SecondColumnLayout {
CheckBox {
text: backendValues.activeFocusOnPress.value
backendValue: backendValues.activeFocusOnPress
baseStateFlag: isBaseState
checkable: true
implicitWidth: 180
}
ExpandingSpacer {
}
}
}
}
}
......@@ -27,55 +27,68 @@
**
****************************************************************************/
import HelperWidgets 1.0
import Bauhaus 1.0
GroupBox {
caption: "Radio Button"
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text label for the radio button")
}
import QtQuick 2.1
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
Column {
anchors.left: parent.left
anchors.right: parent.right
Section {
anchors.left: parent.left
anchors.right: parent.right
caption: qsTr("Radio Button")
SectionLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text label for the radio button")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.text
baseStateFlag: isBaseState
translation: true
implicitWidth: 180
}
}
}
ExpandingSpacer {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Checked")
toolTip: qsTr("Determines whether the radio button is checkable or not.")
}
}
Label {
text: qsTr("Checked")
toolTip: qsTr("Determines whether the radio button is checkable or not.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.checked.value
backendValue: backendValues.checked
baseStateFlag: isBaseState
checkable: true
implicitWidth: 180
}
}
}
ExpandingSpacer {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the check box gets focus if pressed."
}
}
Label {
text: qsTr("Focus on press")
toolTip: "Determines whether the radio button gets focus if pressed."
}
SecondColumnLayout {
CheckBox {
text: backendValues.activeFocusOnPress.value
backendValue: backendValues.activeFocusOnPress
baseStateFlag: isBaseState
checkable: true
implicitWidth: 180
}
ExpandingSpacer {
}
}
}
}
}
......@@ -27,164 +27,177 @@
**
****************************************************************************/
import HelperWidgets 1.0
import Bauhaus 1.0
QWidget {
layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
GroupBox {
caption: "Text Area"
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Text")
toolTip: qsTr("The text of the text area")
}
LineEdit {
backendValue: backendValues.text
baseStateFlag: isBaseState
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: qsTr("Read only")
toolTip: qsTr("Determines whether the text area is read only.")
}
CheckBox {
text: backendValues.readOnly.value
backendValue: backendValues.readOnly
baseStateFlag: isBaseState
checkable: true
}
}
}
ColorGroupBox {
caption: qsTr("Color")
toolTip: qsTr("The color of the text")
finished: finishedNotify
backendColor: backendValues.color
}