diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml index c821bb91d01228cecc8e5aac1410bb8a9db8545d..b892025617368ab2522e6f0127f32926d812fb83 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml @@ -6,17 +6,17 @@ QWidget { styleSheetFile: "anchorbox.css" Script { - function isBorderAnchored() { - return anchorBackend.leftAnchored || anchorBackend.topAnchored || anchorBackend.rightAnchored || anchorBackend.bottomAnchored; - } + function isBorderAnchored() { + return anchorBackend.leftAnchored || anchorBackend.topAnchored || anchorBackend.rightAnchored || anchorBackend.bottomAnchored; + } - function fill() { + function fill() { anchorBackend.fill(); - } + } - function breakLayout() { + function breakLayout() { anchorBackend.resetLayout() - } + } } QPushButton { @@ -30,7 +30,7 @@ QWidget { } QPushButton { - text: "break"; + text: "break"; y: 200; height:20;fixedHeight: height; width:200;fixedWidth: width; @@ -51,12 +51,12 @@ QWidget { checkable: true; checked: anchorBackend.leftAnchored; onReleased: { - if (checked) { + if (checked) { anchorBackend.horizontalCentered = false; anchorBackend.leftAnchored = true; - } else { + } else { anchorBackend.leftAnchored = false; - } + } } } @@ -72,12 +72,12 @@ QWidget { checkable: true; checked: anchorBackend.topAnchored; onReleased: { - if (checked) { + if (checked) { anchorBackend.verticalCentered = false; anchorBackend.topAnchored = true; - } else { + } else { anchorBackend.topAnchored = false; - } + } } } @@ -93,12 +93,12 @@ QWidget { checkable: true; checked: anchorBackend.rightAnchored; onReleased: { - if (checked) { + if (checked) { anchorBackend.horizontalCentered = false; anchorBackend.rightAnchored = true; - } else { + } else { anchorBackend.rightAnchored = false; - } + } } } @@ -114,12 +114,12 @@ QWidget { checkable: true; checked: anchorBackend.bottomAnchored; onReleased: { - if (checked) { + if (checked) { anchorBackend.verticalCentered = false; anchorBackend.bottomAnchored = true; - } else { + } else { anchorBackend.bottomAnchored = false; - } + } } } @@ -142,11 +142,11 @@ QWidget { checked: anchorBackend.horizontalCentered; onReleased: { if (checked) { - anchorBackend.rightAnchored = false; - anchorBackend.leftAnchored = false; - anchorBackend.horizontalCentered = true; + anchorBackend.rightAnchored = false; + anchorBackend.leftAnchored = false; + anchorBackend.horizontalCentered = true; } else { - anchorBackend.horizontalCentered = false; + anchorBackend.horizontalCentered = false; } } } @@ -161,11 +161,11 @@ QWidget { checked: anchorBackend.verticalCentered; onReleased: { if (checked) { - anchorBackend.topAnchored = false; - anchorBackend.bottomAnchored = false; - anchorBackend.verticalCentered = true; + anchorBackend.topAnchored = false; + anchorBackend.bottomAnchored = false; + anchorBackend.verticalCentered = true; } else { - anchorBackend.verticalCentered = false; + anchorBackend.verticalCentered = false; } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml index 4d78e86ddda6c5abc79526d482d24b97ca7f1622..ef08a437f8dbaa69baf8510d1e17268356018fe7 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml @@ -9,143 +9,86 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states property alias singleStep: box.singleStep property alias minimum: box.minimum property alias maximum: box.maximum + property alias text: label.text + property var enabled minimumHeight: 22; onBaseStateFlagChanged: { evaluate(); - setIcon(); } onBackendValueChanged: { evaluate(); - setIcon(); } - Script { + Script { function evaluate() { if (baseStateFlag) { if (backendValue != null && backendValue.isInModel) - DoubleSpinBox.setStyleSheet("color: white;"); + box.setStyleSheet("color: white;"); else - DoubleSpinBox.setStyleSheet("color: gray;"); + box.setStyleSheet("color: gray;"); } else { - if (backendValue != null && backendValue.isInSubState) - DoubleSpinBox.setStyleSheet("color: #7799FF;"); - else - DoubleSpinBox.setStyleSheet("color: gray;"); + if (backendValue != null && backendValue.isInSubState) + box.setStyleSheet("color: #7799FF;"); + else + box.setStyleSheet("color: gray;"); } } } - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 2; - spacing: 0; + property bool isInModel: backendValue.isInModel + + onIsInModelChanged: { + evaluate(); + } + + property bool isInSubState: backendValue.isInSubState + + onIsInSubStateChanged: { + evaluate(); + } + + layout: HorizontalLayout { + + QLabel { + visible: text != "" + id: label; + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } QDoubleSpinBox { id: box; - decimals: 2; + decimals: 1; keyboardTracking: false; - enabled: (backendValue == null || backendValue.complexNode == null) ? false : !backendValue.isBound && !backendValue.complexNode.exists + enabled: !backendValue.isBound && DoubleSpinBox.enabled; property bool readingFromBackend: false; property real valueFromBackend: DoubleSpinBox.backendValue == null ? .0 : DoubleSpinBox.backendValue.value; + onValueFromBackendChanged: { readingFromBackend = true; value = valueFromBackend readingFromBackend = false; - } + } - onValueChanged: { - if (DoubleSpinBox.backendValue != null && readingFromBackend == false) + onValueChanged: { + if (DoubleSpinBox.backendValue != null && readingFromBackend == false) DoubleSpinBox.backendValue.value = value; - } - onFocusChanged: { - //extendedSwitches.active = focus; - //extendedSwitches.backendValue = backendValue; - } - - onMouseOverChanged: { - //extendedButton.active = mouseOver; - } - } - } - - QToolButton { - property bool active: false; - id: extendedButton; - iconFromFile: "images/expression.png"; - visible: false; - width: 14; - height: 14; - y: box.y + 2; - x: box.x + 2; - focusPolicy: "Qt::NoFocus"; - opacity: 0; - - opacity: Behavior { - NumberAnimation { - easing: "easeInSine" - duration: 200 } - } - - onPressed: { - } + onMouseOverChanged: { - Script { - function setIcon() { - if (backendValue == null) - extendedButton.iconFromFile = "images/placeholder.png" - else if (backendValue.isBound) { - extendedButton.iconFromFile = "images/expression.png" - } else { - if (backendValue.complexNode != null && backendValue.complexNode.exists) { - extendedButton.iconFromFile = "images/behaivour.png" - } else { - extendedButton.iconFromFile = "images/placeholder.png" - } - } } - } - onMouseOverChanged: { - if (mouseOver) { - iconFromFile = "images/submenu.png"; - opacity = 1; - } else { - setIcon(); - opacity = 0; - } } - onActiveChanged: { - if (active) { - setIcon(); - opacity = 1; - } else { - opacity = 0; - } - } + } - menu: QMenu { - actions: [ - QAction { - text: "Reset"; - }, - QAction { - text: "Set Expression"; - }, - QAction { - text: "Add Behaivour"; - } - ] - } - toolButtonStyle: "Qt::ToolButtonIconOnly"; - popupMode: "QToolButton::InstantPopup"; - arrowType: "Qt::NoArrow"; + ExtendedFunctionButton { + backendValue: DoubleSpinBox.backendValue + y: box.y + 4 + x: box.x + 2 + visible: DoubleSpinBox.enabled } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml new file mode 100644 index 0000000000000000000000000000000000000000..43cf5ba72d1f37e82726ec34ab84170383ab60bd --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml @@ -0,0 +1,87 @@ +import Qt 4.6 +import Bauhaus 1.0 + +QWidget { + id: ExpressionEditor; + x: 6 + y: -400 + width: frame.width - 22 + height: 40 + property bool active: false + property var backendValue; + + + onActiveChanged: { + //text = ""; + if (active) { + textEdit.plainText = backendValue.expression + textEdit.setFocus(); + opacity = 1; + height = 100 + + } else { + opacity = 0; + height = 40; + } + } + + opacity: 0 + onOpacityChanged: { + if (opacity == 0) + lower(); + } + opacity: Behavior { + NumberAnimation { + duration: 100 + } + } + + height: Behavior { + NumberAnimation { + duration: 100 + } + } + + + QTextEdit { + id: textEdit; + styleSheet: "QTextEdit {border-radius: 0px;}" + acceptRichText: false; + documentTitle: "Expression" + + width: expressionEdit.width + height: expressionEdit.height + horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff" + verticalScrollBarPolicy: "Qt::ScrollBarAlwaysOff" + + onFocusChanged: { + if (!focus) + expressionEdit.active = false; + } + + + + } + QPushButton { + y: expressionEdit.height - 22; + x: expressionEdit.width - 61; + styleSheetFile: "applybutton.css"; + width: 29 + height: 19 + onClicked: { + expressionEdit.backendValue.expression = textEdit.plainText; + expressionEdit.active = false; + } + } + + QPushButton { + y: expressionEdit.height - 22; + x: expressionEdit.width - 32; + styleSheetFile: "cancelbutton.css"; + width: 29 + height: 19 + onClicked: { + expressionEdit.active = false; + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml index fc12c8a7ba99a63145c690e69457c420e225035a..86c12d978358608aafacaeb3f4dbb05937c058a7 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml @@ -2,24 +2,22 @@ import Qt 4.6 import Bauhaus 1.0 GroupBox { -caption: "Effects" +caption: "Effect" id: Extended; maximumHeight: 260; -layout: QVBoxLayout { - topMargin: 12; - leftMargin: 10; - rightMargin: 10; +layout: VerticalLayout{ property var effect: backendValues.effect property var complexNode: effect.complexNode QWidget { maximumHeight: 40; - layout: QHBoxLayout { + layout: HorizontalLayout { QLabel { - text: "Effects: "; + text: "Effect "; font.bold: true; + alignment: "Qt::AlignRight | Qt::AlignVCenter" } QComboBox { enabled: isBaseState; @@ -63,6 +61,10 @@ layout: QVBoxLayout { dirty = false; } } + + QWidget { + fixedWidth: 100 + } } }// QWidget diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml new file mode 100644 index 0000000000000000000000000000000000000000..280be6d2a983f55989ddba554f8db2d62be4fa75 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml @@ -0,0 +1,88 @@ +import Qt 4.6 +import Bauhaus 1.0 + +QToolButton { + id: ExtendedFunctionButton + + property var backendValue + + Script { + function setIcon() { + if (backendValue == null) + ExtendedFunctionButton.iconFromFile = "images/placeholder.png" + else if (backendValue.isBound) { + ExtendedFunctionButton.iconFromFile = "images/expression.png" + } else { + if (backendValue.complexNode != null && backendValue.complexNode.exists) { + ExtendedFunctionButton.iconFromFile = "images/behaivour.png" + } else { + ExtendedFunctionButton.iconFromFile = "images/placeholder.png" + } + } + } + } + + + onBackendValueChanged: { + setIcon(); + } + + property bool isBoundBackend: backendValue.isBound; + + onIsBoundBackendChanged: { + setIcon(); + } + + toolButtonStyle: "Qt::ToolButtonIconOnly" + popupMode: "QToolButton::InstantPopup"; + property bool active: false; + + iconFromFile: "images/placeholder.png"; + width: 14; + height: 14; + focusPolicy: "Qt::NoFocus"; + + styleSheet: "*::down-arrow, *::menu-indicator { image: none; width: 0; height: 0; }"; + + + onMouseOverChanged: { + if (mouseOver) { + iconFromFile = "images/submenu.png"; + } else { + setIcon(); + } + } + + onActiveChanged: { + if (active) { + setIcon(); + opacity = 1; + } else { + opacity = 0; + } + } + + + actions: [ + QAction { + text: "Reset"; + onTriggered: { + backendValue.resetValue(); + } + + }, + QAction { + text: "Set Expression"; + onTriggered: { + expressionEdit.globalY = box.globalY; + expressionEdit.backendValue = ExtendedFunctionButton.backendValue + expressionEdit.show(); + expressionEdit.raise(); + expressionEdit.active = true; + } + }, + QAction { + text: "Add Behaivour"; + } + ] +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml index 8283e6ecdb05479f440fd21c038880c8a52ad200..1f26cffa496dad201ebcd39cb646dc85b2982d2a 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml @@ -13,11 +13,12 @@ QScrollArea { minimumHeight: 440; id: ProperyEditorExtended layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; - Type { + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; + spacing: 0; + Modifiers { } Extended { id: extendedBox; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml index d52035b8337c82a6ee57202f77cc05216b03d851..9fa801baa88747ea738efbd9a3accc194cebbebc 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml @@ -7,160 +7,76 @@ GroupBox { maximumHeight: 240; - layout: QHBoxLayout { - topMargin: 14; - bottomMargin: 4; - leftMargin: 4; - rightMargin: 4; + layout: VerticalLayout { - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 60; - leftMargin: 10; - rightMargin: 10; - spacing: 25; + QWidget { // 1 + layout: HorizontalLayout { QLabel { - text: "Position:"; - font.bold: true; + text: "Position" + alignment: "Qt::AlignRight | Qt::AlignVCenter" } - QLabel { - text: "Size:" - font.bold: true + + DoubleSpinBox { + id: XSpinBox; + text: "X" + singleStep: 1; + objectName: "XSpinBox"; + enabled: anchorBackend.hasParent; + backendValue: backendValues.x + minimum: -2000; + maximum: 2000; + baseStateFlag: isBaseState; } - } - } - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - QWidget { - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; + DoubleSpinBox { + id: YSpinBox; + singleStep: 1; + text: "Y" + objectName: "YSpinBox"; + backendValue: backendValues.y + enabled: anchorBackend.hasParent; + minimum: -2000; + maximum: 2000; + baseStateFlag: isBaseState; + } - //--- - QWidget { // 1 - layout: QHBoxLayout { //2 - topMargin: 0; - bottomMargin: 0; - QWidget { //3 - layout: QVBoxLayout { //4 - topMargin: 0; - bottomMargin: 0; - DoubleSpinBox { - id: XSpinBox; - singleStep: 1; - objectName: "XSpinBox"; - enabled: anchorBackend.hasParent; - backendValue: backendValues.x == undefined ? 0 : backendValues.x - minimum: -2000; - maximum: 2000; - baseStateFlag: isBaseState; - } - QLabel { //6 - text: "X"; - alignment: "Qt::AlignHCenter" - font.bold: true; - } // 6 - } //QHBoxLayout //4 - } //QWidget //3 - QWidget { // 7 - layout: QVBoxLayout { //8 - topMargin: 0; - bottomMargin: 0; + } + } //QWidget //1 - DoubleSpinBox { - id: YSpinBox; - singleStep: 1; - objectName: "YSpinBox"; - backendValue: backendValues.y == undefined ? 0 : backendValues.y - enabled: anchorBackend.hasParent; - minimum: -2000; - maximum: 2000; - baseStateFlag: isBaseState; - } - QLabel { //10 - text: "Y"; - alignment: "Qt::AlignHCenter"; - font.bold: true; - } //10 - } //QVBoxLayout //8 - } // QWidget //3 + QWidget { + layout: HorizontalLayout { + + QLabel { + text: "Size" + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } - } //QHBoxLayout //7 - } //QWidget //1 - //--- - } //QHBoxLayout - } //GroupBox - QWidget { - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 10; - //--- - QWidget { - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - DoubleSpinBox { - id: WidthSpinBox; - singleStep: 1; - objectName: "WidthSpinBox"; - backendValue: backendValues.width == undefined ? 0 : backendValues.width - minimum: -2000; - maximum: 2000; - baseStateFlag: isBaseState; - } - QLabel { - text: "Width"; - alignment: "Qt::AlignHCenter"; - font.bold: true; - } - } //QVBoxLayout - } //QWidget - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - DoubleSpinBox { - id: HeightSpinBox; - singleStep: 1; - objectName: "HeightSpinBox"; - backendValue: backendValues.height == undefined ? 0 : backendValues.height - minimum: -2000; - maximum: 2000; - baseStateFlag: isBaseState; - } - QLabel { - id: HeightLabel; - text: "Height"; - alignment: "Qt::AlignHCenter"; - font.bold: true; - } - } //QVBoxLayout - } //QWidget - } //QHBoxLayout - } //QWidget - } // QHBoxLayout - } //Widget + DoubleSpinBox { + id: WidthSpinBox; + text: "W" + singleStep: 1; + objectName: "WidthSpinBox"; + backendValue: backendValues.width + minimum: -2000; + maximum: 2000; + baseStateFlag: isBaseState; + } - IntEditor { - id: borderWidth; - backendValue: backendValues.z == undefined ? 0 : backendValues.z - caption: "z:" + DoubleSpinBox { + id: HeightSpinBox; + text: "H" + singleStep: 1; + objectName: "HeightSpinBox"; + backendValue: backendValues.height + minimum: -2000; + maximum: 2000; baseStateFlag: isBaseState; - step: 1; - minimumValue: 0; - maximumValue: 100; } + } //QVBoxLayout } //QWidget + } //QHBoxLayout } //QGroupBox diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml index d1106cc1cf0db67c03fd608bfd6a246d51eea18c..e53b9ccba3792fa374786ece0f3df1385cf9adb7 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml @@ -16,19 +16,19 @@ QExtGroupBox { oldMaximumHeight = maximumHeight; visible = false; visible = true; - x = 6; + //x = 6; } QToolButton { //QCheckBox { id: CheckBox; - text: ""; + text: GroupBox.caption; focusPolicy: "Qt::NoFocus"; styleSheetFile: "specialCheckBox.css"; - y: 4; - x: 6; - height: 12; - width: 12; + y: 0; + x: 0; + fixedHeight: 17 + fixedWidth: GroupBox.width; arrowType: "Qt::DownArrow"; toolButtonStyle: "Qt::ToolButtonTextBesideIcon"; checkable: true; @@ -38,18 +38,18 @@ QExtGroupBox { if (checked) { //GroupBox.maximumHeight = oldMaximumHeight; collapsed = false; - text = ""; - width = 12; - x = 6; + //text = ""; + //width = 12; + //width = 120; arrowType = "Qt::DownArrow"; + visible = true; } else { //GroupBox.maximumHeight = 20; collapsed = true; - text = GroupBox.caption; + //text = GroupBox.caption; visible = true; - width = 120; - x = 2; + //width = 120; arrowType = "Qt::RightArrow"; } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalLayout.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalLayout.qml new file mode 100644 index 0000000000000000000000000000000000000000..5750151046161cebe33b7d97f1fd64286c4ba43a --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalLayout.qml @@ -0,0 +1,10 @@ +import Qt 4.6 +import Bauhaus 1.0 + +QHBoxLayout { + id: HorizontalLayout + spacing: 20 + topMargin: 0 + bottomMargin: 0 + leftMargin: 0 +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalWhiteLine.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalWhiteLine.qml new file mode 100644 index 0000000000000000000000000000000000000000..b8e1e31b87830fb2b1b7429a932a342ce5b87723 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalWhiteLine.qml @@ -0,0 +1,8 @@ +import Qt 4.6 + + QLineEdit { + text: ""; + readOnly: true; + maximumHeight: 2; + styleSheet: "QLineEdit {border: 2px solid #EEEEEE; min-height: 0px; max-height: 0px;}"; + } \ No newline at end of file diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml index 69a34bb40b286d3a87c3203423f6cec403a0e83c..045812a103bf71aa5063678affe5402a07d3837f 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml @@ -12,39 +12,45 @@ QWidget { property var maximumValue: 99 property var minimumValue: 0 property var step: 1 + property bool slider: true - layout: QHBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 0; - rightMargin: 0; + layout: HorizontalLayout { QLabel { text: caption font.bold: true; + alignment: "Qt::AlignRight | Qt::AlignVCenter" } SpinBox { - backendValue: IntEditor.backendValue; - minimum: minimumValue; - maximum: maximumValue; - baseStateFlag: IntEditor.baseStateFlag; + backendValue: IntEditor.backendValue + minimum: minimumValue + maximum: maximumValue + baseStateFlag: IntEditor.baseStateFlag } - QSlider { - property alias backendValue: IntEditor.backendValue - orientation: "Qt::Horizontal"; - minimum: minimumValue - maximum: maximumValue - singleStep: step - - value: (backendValue == undefined - || backendValue == null - || backendValue.value == undefined - || backendValue.value == null) ? 0 : backendValue.value - onValueChanged: { - if (backendValue != undefined && backendValue != null) - backendValue.value = value; + QWidget { + visible: IntEditor.slider + id: sliderWidget + fixedWidth: 100 + QSlider { + y: sliderWidget.height / 2 - 12 + width: sliderWidget.width + height: 24 + property alias backendValue: IntEditor.backendValue + orientation: "Qt::Horizontal" + minimum: minimumValue + maximum: maximumValue + singleStep: step + + value: (backendValue == undefined + || backendValue == null + || backendValue.value == undefined + || backendValue.value == null) ? 0 : backendValue.value + onValueChanged: { + if (backendValue != undefined && backendValue != null) + backendValue.value = value; + } } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml index 94842b81cb4c5bb381703681ec72688cd64c27b3..baf39769458ad66ce3f948e157f2e85c338eb55c 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml @@ -2,6 +2,12 @@ import Qt 4.6 import Bauhaus 1.0 PropertyFrame { + id: frame; + + ExpressionEditor { + id: expressionEdit + } + layout: QVBoxLayout { topMargin: 0; bottomMargin: 0; @@ -15,6 +21,10 @@ PropertyFrame { ExtendedSwitches { id: extendedSwitches; } + HorizontalWhiteLine { + } + + ScrollArea { styleSheetFile: ":/qmldesigner/scrollbar.css"; @@ -28,24 +38,26 @@ PropertyFrame { content: ProperyEditorStandard; QFrame { - minimumHeight: 1100; + //minimumHeight: 1100 id: ProperyEditorStandard layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; + spacing: 0; Type { } - HorizontalLine { - } + Geometry { } - Modifiers { - } + /*Modifiers { + + }*/ + WidgetLoader { id: specificsOne; @@ -56,49 +68,44 @@ PropertyFrame { QScrollArea { } - } // layout - } //QWidget - } //QScrollArea - - - ScrollArea { - widgetResizable: true; - styleSheetFile: ":/qmldesigner/scrollbar.css"; - finished: finishedNotify; - horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"; - id: specialPane; - visible: false; - visible: false; - content: ProperyEditorSpecial; - QFrame { - minimumHeight: 600; - id: ProperyEditorSpecial - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; - Type { - } - - WidgetLoader { - id: specificsOne2; - source: specificsUrl; - } - - QScrollArea { - } - } - } - } + } // layout + } //QWidget + } //QScrollArea - ExtendedPane { - id: extendedPane; + + ScrollArea { + widgetResizable: true; + styleSheetFile: ":/qmldesigner/scrollbar.css"; + finished: finishedNotify; + horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"; + id: specialPane; + visible: false; + visible: false; + content: ProperyEditorSpecial; + QFrame { + minimumHeight: 600; + id: ProperyEditorSpecial + layout: QVBoxLayout { + topMargin: 2; + bottomMargin: 2; + leftMargin: 2; + rightMargin: 2; + Type { } - LayoutPane { - id: layoutPane; + QScrollArea { } + } + } + } + + ExtendedPane { + id: extendedPane; + } + + LayoutPane { + id: layoutPane; + } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml index d2698c629ae1fa0251742e7897de722bef0b5d47..8d6f9b726fd3914372f6239a2175952c49a3645e 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml @@ -8,17 +8,15 @@ QScrollArea { id: LayoutPane; visible: false; content: ProperyEditorLayout; - QFrame { - enabled: isBaseState; - id: ProperyEditorLayout; - minimumHeight: 460; - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; - Type { - } + QFrame { + enabled: isBaseState; + id: ProperyEditorLayout; + minimumHeight: 460; + layout: QVBoxLayout { + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; Layout { id: layoutBox; } @@ -26,4 +24,4 @@ QScrollArea { } } } -} \ No newline at end of file +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml index 8bef65fbb9502731231839e56b377df32db1e189..efce139a8f5853e11a45a780fa4b1b5739cde96f 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml @@ -1,215 +1,145 @@ import Qt 4.6 GroupBox { - - - finished: finishedNotify; - caption: "Modifiers" - minimumHeight: 30; + caption: "Manipulation" + maximumHeight: 200; minimumHeight: 180; id: Mofifiers; - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 6; - leftMargin: 0; - rightMargin: 0; + layout: VerticalLayout { QWidget { - id: contentWidget; - maximumHeight: 240; - - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 10; - rightMargin: 10; - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 30; - leftMargin: 0; - rightMargin: 0; + layout: HorizontalLayout { + QLabel { + text: "Visibility" + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } - QLabel { - minimumHeight: 50; - text: "Rotation:" - font.bold: true; - } + CheckBox { + id: VisibleCheckBox; + text: "Is visible"; + backendValue: backendValues.visible === undefined ? false : backendValues.visible; + baseStateFlag: isBaseState; + checkable: true; + } + CheckBox { + id: ClipCheckBox; + text: "Clips"; + backendValue: backendValues.clip === undefined ? false : backendValues.clip; + baseStateFlag: isBaseState; + checkable: true; + fixedWidth: 100 + } + } + } + QWidget { + layout: HorizontalLayout { - QLabel { - text: "Scale:" - font.bold: true; - } + QLabel { + text: "Opacity" + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } - QLabel { - text: "Scale:" - text: "" - font.bold: true; - } + DoubleSpinBox { + text: "" + id: OpacitySpinBox; + backendValue: backendValues.opacity === undefined ? null : backendValues.opacity + minimumWidth: 60; + minimum: 0; + maximum: 1; + singleStep: 0.1 + baseStateFlag: isBaseState; + } + SliderWidget { + minimum: 0 + maximum: 100 + singleStep: 5; + value: backendValues.opacity === undefined ? 0 : (backendValues.opacity.value * 100) + onValueChanged: { + if (backendValues.opacity !== undefined) + backendValues.opacity.value = value / 100; + } + } + } + } + QWidget { + layout: HorizontalLayout { - QLabel { - text: "Opacity:" - font.bold: true; - } - QLabel { - text: "Visibility:" - font.bold: true; - } + QLabel { + text: "Origin"; + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } + QComboBox { + minimumWidth: 20 + items : { [ + "TopLeft", "Top", "TopRight", "Left", "Center", "Right", "BottomLeft", "Bottom", + "BottomRight" + ] } + + currentText: backendValues.transformOrigin.value; + onItemsChanged: { + currentText = backendValues.transformOrigin.value; + } + onCurrentTextChanged: { + backendValues.transformOrigin.value = currentText; } } QWidget { - layout: QVBoxLayout { - - topMargin: 02; - bottomMargin: 2; - leftMargin: 5; - rightMargin: 0; - - QWidget { - layout: QHBoxLayout { - topMargin: 3; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - SpinBox { - id: RotationSpinBox; - backendValue: backendValues.rotation; - onBackendValueChanged: { - if (backendValue.value > 180) - RotationDial.value = (backendValue.value - 360); - else - RotationDial.value = backendValue.value; - } - minimum: 0; - maximum: 360; - baseStateFlag: isBaseState; - } - QDial { - id: RotationDial; - wrapping: true; - focusPolicy: "Qt::ClickFocus"; - minimumHeight: 20; - maximumHeight: 50; - minimum: -180; - maximum: 180; - singleStep: 45; - onValueChanged : { - if (value < 0) - RotationSpinBox.backendValue.value = 360 + value; - else - RotationSpinBox.backendValue.value = value; - } - } - } - } - QWidget { - layout: QHBoxLayout { - topMargin: 10; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - DoubleSpinBox { - id: ScaleSpinBox; - objectName: "ScaleSpinBox"; - backendValue: backendValues.scale; - minimumWidth: 60; - minimum: 0.01 - maximum: 10 - singleStep: 0.1 - baseStateFlag: isBaseState; - onBackendValueChanged: { - ScaleSlider.value = backendValue.value * 10; - } - } - QSlider { - id: ScaleSlider; - orientation: "Qt::Horizontal"; - minimum: 1; - maximum: 100; - singleStep: 1; - onValueChanged: { - backendValues.scale.value = value / 10; - } - } - } - } - - QWidget { - layout: QHBoxLayout { - topMargin: 5; - bottomMargin: 5; - leftMargin: 10; - rightMargin: 0; - - QLabel { - text: "Origin: "; - } - QComboBox { - items : { [ - "TopLeft", "Top", "TopRight", "Left", "Center", "Right", "BottomLeft", "Bottom", - "BottomRight" - ] } - - currentText: backendValues.transformOrigin.value; - onItemsChanged: { - currentText = backendValues.transformOrigin.value; - } - onCurrentTextChanged: { - backendValues.transformOrigin.value = currentText; - } - } + fixedWidth: 100 + } - } - } + } + } + QWidget { + layout: HorizontalLayout { - QWidget { - layout: QHBoxLayout { - topMargin: 5; - bottomMargin: 10; - leftMargin: 0; - rightMargin: 0; + QLabel { + text: "Scale" + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } - DoubleSpinBox { - id: OpacitySpinBox; - backendValue: backendValues.opacity === undefined ? null : backendValues.opacity - minimumWidth: 60; - minimum: 0; - maximum: 1; - singleStep: 0.1 - baseStateFlag: isBaseState; - } - QSlider { - orientation: "Qt::Horizontal"; - minimum: 0 - maximum: 100 - singleStep: 5; - value: backendValues.opacity === undefined ? 0 : (backendValues.opacity.value * 100) - onValueChanged: { - if (backendValues.opacity !== undefined) - backendValues.opacity.value = value / 100; - } - } - } - } - CheckBox { - id: VisibleCheckBox; - text: "item visibilty"; - backendValue: backendValues.visible === undefined ? false : backendValues.visible; - baseStateFlag: isBaseState; - checkable: true; - } - CheckBox { - id: ClipCheckBox; - text: "clipping item"; - backendValue: backendValues.clip === undefined ? false : backendValues.clip; - baseStateFlag: isBaseState; - checkable: true; - } + DoubleSpinBox { + text: "" + id: ScaleSpinBox; + objectName: "ScaleSpinBox"; + backendValue: backendValues.scale; + minimumWidth: 60; + minimum: 0.01 + maximum: 10 + singleStep: 0.1 + baseStateFlag: isBaseState; + onBackendValueChanged: { + ScaleSlider.value = backendValue.value * 10; + } + } + SliderWidget { + id: ScaleSlider; + minimum: 1; + maximum: 100; + singleStep: 1; + onValueChanged: { + backendValues.scale.value = value / 10; } } } } + IntEditor { + backendValue: backendValues.rotation + caption: "Rotation" + baseStateFlag: isBaseState; + step: 10; + minimumValue: 0; + maximumValue: 360; + } + + IntEditor { + backendValue: backendValues.z == undefined ? 0 : backendValues.z + caption: "z" + baseStateFlag: isBaseState; + step: 1; + minimumValue: 0; + maximumValue: 100; + } } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml index 84e9082fe4b0181a95128fd5285ad934aee5e3e8..9d02bb47f566bf238d9e5ed1198a5cf85059cb6f 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml @@ -3,7 +3,7 @@ import Qt 4.6 WidgetFrame { id: PropertyFrame; - minimumWidth: 300; + minimumWidth: 350; //maximumWidth: 300; styleSheetFile: "propertyEditor.css"; //visible: isBaseState; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml index a33264ef489824073ab1cd1150e057d6ca76b68c..ac8619c9b02376f857d0d9309fcb276e097b3d23 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml @@ -6,129 +6,64 @@ GroupBox { finished: finishedNotify; caption: "Rect" - minimumHeight: 340; maximumHeight: 340; layout: QVBoxLayout { - topMargin: 12; - bottomMargin: 20; - leftMargin: 20; - rightMargin: 20; + topMargin: 20; + bottomMargin: 4; + leftMargin: 0; + rightMargin: 10; - QWidget { - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 20; - leftMargin: 0; - rightMargin: 0; - - QWidget { - layout: QHBoxLayout { - topMargin: 8; - bottomMargin: 20; - leftMargin: 10; - rightMargin: 10; - QLabel { - text: "Radius:" - font.bold: true; - } - SpinBox { - id: RadiusSpinBox; - backendValue: backendValues.radius === undefined ? null : backendValues.radius - minimum: 0; - maximum: 100; - baseStateFlag: isBaseState; - } - QSlider { - orientation: "Qt::Horizontal"; - minimum: 0; - maximum: 100; - singleStep: 1; - value: backendValues.radius === undefined ? null : backendValues.radius.value - onValueChanged: { - backendValues.radius.value = value; - } - } - } - } - QWidget { - layout: QHBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 10; - rightMargin: 10; - spacing: 20; + IntEditor { + backendValue: backendValues.radius + caption: "Radius" + baseStateFlag: isBaseState; + step: 1; + minimumValue: 0; + maximumValue: 100; + } - ColorWidget { - text: "Color:"; - color: backendValues.color === undefined ? null : backendValues.color.value; - onColorChanged: { - backendValues.color.value = strColor; - } - //modelNode: backendValues.color.modelNode; - complexGradientNode: backendValues.color === undefined ? null : backendValues.color.complexNode + ColorWidget { + text: "Color"; + color: backendValues.color === undefined ? null : backendValues.color.value; + onColorChanged: { + backendValues.color.value = strColor; + } + //modelNode: backendValues.color.modelNode; + complexGradientNode: backendValues.color === undefined ? null : backendValues.color.complexNode - showGradientButton: true; - } - ColorWidget { - text: "Tint color:"; - color: backendValues.tintColor === undefined ? "black" : backendValues.tintColor.value - onColorChanged: { - backendValues.color.value = strColor; - } - } - } - } - HorizontalLine { - } + showGradientButton: true; + } + ColorWidget { + text: "Tint color"; + color: backendValues.tintColor === undefined ? "black" : backendValues.tintColor.value + onColorChanged: { + backendValues.color.value = strColor; } } - QWidget { - minimumHeight: 80; - maximumHeight: 120; - - layout: QHBoxLayout { - topMargin: 2; - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - QWidget { - id: PenGroupBox; - maximumHeight: 80; + IntEditor { + id: borderWidth; + backendValue: backendValues.border_width === undefined ? 0 : backendValues.border_width - layout: QVBoxLayout { - topMargin: 10; - bottomMargin: 10; - leftMargin: 20; - rightMargin: 20; - IntEditor { + caption: "Pen Width" + baseStateFlag: isBaseState; - id: borderWidth; - backendValue: backendValues.border_width === undefined ? 0 : backendValues.border_width - - caption: "Pen Width:" - baseStateFlag: isBaseState; - - step: 1; - minimumValue: 0; - maximumValue: 100; - } - ColorWidget { - id: PenColor; - text: "Pen Color:"; - minimumHeight: 20; - minimumWidth: 20; - color: backendValues.border_color.value; - onColorChanged: { - backendValues.border_color.value = strColor; - } - } - } - } + step: 1; + minimumValue: 0; + maximumValue: 100; + } + ColorWidget { + id: PenColor; + text: "Pen Color"; + minimumHeight: 20; + minimumWidth: 20; + color: backendValues.border_color.value; + onColorChanged: { + backendValues.border_color.value = strColor; } } + } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/SliderWidget.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/SliderWidget.qml new file mode 100644 index 0000000000000000000000000000000000000000..018809d19f08e10f785a32483310a2adca51ee29 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/SliderWidget.qml @@ -0,0 +1,21 @@ +import Qt 4.6 +import Bauhaus 1.0 + +QWidget { + id: SliderWidget + visible: IntEditor.slider + fixedWidth: 100 + + property alias value: slider.value + property alias singleStep: slider.singleStep + property alias minimum: slider.minimum + property alias maximum: slider.maximum + + QSlider { + orientation: "Qt::Horizontal"; + id: slider + y: SliderWidget.height / 2 - 12 + width: SliderWidget.width + height: 24 + } +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml index 0ecf0180411c6c00e9afa5c25256a1467f2c77d1..6c4aaefebb69dae96aff343c3437d3f0a5165c87 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml @@ -20,29 +20,25 @@ QWidget { //This is a special SpinBox that does color coding for states evaluate(); } + Script { function evaluate() { if (baseStateFlag) { if (backendValue != null && backendValue.isInModel) - SpinBox.setStyleSheet("color: white;"); + box.setStyleSheet("color: white;"); else - SpinBox.setStyleSheet("color: gray;"); + box.setStyleSheet("color: gray;"); } else { if (backendValue != null && backendValue.isInSubState) - SpinBox.setStyleSheet("color: #7799FF;"); + box.setStyleSheet("color: #7799FF;"); else - SpinBox.setStyleSheet("color: gray;"); + box.setStyleSheet("color: gray;"); } } } - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 10; - spacing: 0; - + layout: HorizontalLayout { + QSpinBox { property alias backendValue: SpinBox.backendValue @@ -55,7 +51,8 @@ QWidget { //This is a special SpinBox that does color coding for states onValueFromBackendChanged: { readingFromBackend = true; value = valueFromBackend - readingFromBackend = false; + readingFromBackend = false; + evaluate(); } onValueChanged: { @@ -69,12 +66,10 @@ QWidget { //This is a special SpinBox that does color coding for states } } - QToolButton { - visible: false; - width: 10; - height: 10; - y: box.y + box.height - 11; - x: box.width - 1; - focusPolicy: "Qt::NoFocus"; + ExtendedFunctionButton { + backendValue: SpinBox.backendValue + y: box.y + 4 + x: box.x + 2 + visible: SpinBox.enabled } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml index 84db9bbc251f355ef9f7563317c4657250f3b08a..e97a6646cc3b5512da6f631c07fa86954eaa00a8 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml @@ -4,13 +4,13 @@ QFrame { styleSheetFile: "switch.css"; property var specialModeIcon; specialModeIcon: "images/standard.png"; - maximumWidth: 286; - minimumWidth: 286; + maximumWidth: 300; + minimumWidth: 300; layout: QHBoxLayout { - topMargin: 4; + topMargin: 0; bottomMargin: 0; - leftMargin: 4; - rightMargin: 80; + leftMargin: 0; + rightMargin: 40; spacing: 0; QPushButton { @@ -18,7 +18,8 @@ QFrame { checked: true; id: standardMode; toolTip: "general item properties"; - iconFromFile: "images/rect-icon.png"; + //iconFromFile: "images/rect-icon.png"; + text: "Basic" onClicked: { extendedMode.checked = false; layoutMode.checked = false; @@ -35,7 +36,8 @@ QFrame { checked: false; id: specialMode; toolTip: "type specific properties"; - iconFromFile: specialModeIcon; + text: "" + visible: false onClicked: { extendedMode.checked = false; standardMode.checked = false; @@ -51,8 +53,8 @@ QFrame { id: extendedMode; toolTip: "extended properties"; checkable: true; - checked: false; - iconFromFile: "images/extended.png"; + checked: false; + text: "Advanced" onClicked: { standardMode.checked = false; layoutMode.checked = false; @@ -68,8 +70,8 @@ QFrame { id: layoutMode; checkable: true; checked: false; - toolTip: "layout properties"; - iconFromFile: "images/layout.png"; + toolTip: "layout properties"; + text: "Anchor"; onClicked: { extendedMode.checked = false; standardMode.checked = false; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml index 0b0c0cd2edfdcb587fb3314e86a58def6aad62de..a0d39f071ef403b0910acbc0f7861cf652abe525 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml @@ -9,7 +9,7 @@ GroupBox { layout: QVBoxLayout { id: textSpecifics; - topMargin: 12; + topMargin: 18; bottomMargin: 2; leftMargin: 4; rightMargin: 4; @@ -136,7 +136,7 @@ GroupBox { onCurrentTextChanged: { if (count == 3) - backendValues.verticalAlignment.value = currentText; + backendValues.verticalAlignment.value = currentText; } } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml index aa9b72291d10a9a65fd5fc42e45be540642dd8d9..c20362bc843c064ee410c8ca5ba27c54a6b6c949 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml @@ -1,94 +1,70 @@ import Qt 4.6 GroupBox { - id: Type; - finished: finishedNotify; - caption: "Type"; + id: Type; + finished: finishedNotify; + caption: "Type"; - maximumHeight: 100; - minimumWidth: 280; - layout: QHBoxLayout { + maximumHeight: 100; + minimumWidth: 280; + layout: QHBoxLayout { + topMargin: 18; + bottomMargin: 0; + leftMargin: 60; + rightMargin: 10; - topMargin: 2; - bottomMargin: 0; - leftMargin: 10; - rightMargin: 10; - - QWidget { + QWidget { layout: QVBoxLayout { - topMargin: 6; - bottomMargin: 0; - leftMargin: 10; - bottomMargin: 10; - - QLabel { - text: "Type:"; - windowTextColor: isBaseState ? "#000000" : "#FF0000"; - } - - QLabel { - font.bold: true; - text: "Id:"; - } - - QLabel { - text: "state:"; - font.bold: true; - } + topMargin: 6; + bottomMargin: 0; + leftMargin: 10; + bottomMargin: 10; + + QLabel { + text: "Type"; + windowTextColor: isBaseState ? "#000000" : "#FF0000"; + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } + + QLabel { + font.bold: true; + text: "Id"; + alignment: "Qt::AlignRight | Qt::AlignVCenter" + } + } //QVBoxLayout - } //QWidget - QWidget { + } //QWidget + QWidget { layout: QVBoxLayout { - topMargin: 6; - bottomMargin: 0; - leftMargin: 10; - bottomMargin: 10; - - QLineEdit { - styleSheetFile: "typeLabel.css" - text: backendValues.className === undefined ? "" : backendValues.className.value; - readOnly :true; - } - - QLineEdit { - id: IdLineEdit; - objectName: "IdLineEdit"; - readOnly: isBaseState != true; - text: backendValues.id === undefined ? "" : backendValues.id.value; - onEditingFinished: { - backendValues.id.value = text; - } - } //LineEdit - - QLineEdit { - visible: isBaseState != true; - textColor: "#ff0000"; - readOnly :true; - text: stateName; - styleSheetFile: "typeLabel.css" - onTextChanged: { - if (!visible) { - IdLineEdit.textColor = "#000000"; - } else { - IdLineEdit.textColor = "#777777"; - } - } - } //LineEdit - - QLineEdit { - visible: isBaseState; - readOnly :true; - text: ""; - styleSheetFile: "typeLabel.css" - } //LineEdit + topMargin: 6; + bottomMargin: 0; + leftMargin: 10; + bottomMargin: 10; + + QLineEdit { + styleSheetFile: "typeLabel.css" + text: backendValues.className === undefined ? "" : backendValues.className.value; + readOnly :true; + } + + QLineEdit { + id: IdLineEdit; + objectName: "IdLineEdit"; + readOnly: isBaseState != true; + text: backendValues.id === undefined ? "" : backendValues.id.value; + onEditingFinished: { + backendValues.id.value = text; + } + } //LineEdit + } //QVBoxLayout - } //QWidget + } //QWidget - } //QHBoxLayout + } //QHBoxLayout } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/VerticalLayout.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/VerticalLayout.qml new file mode 100644 index 0000000000000000000000000000000000000000..d0e5c0cc64074540547a806bfb63d160272c3829 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/VerticalLayout.qml @@ -0,0 +1,11 @@ +import Qt 4.6 +import Bauhaus 1.0 + +QVBoxLayout { + id: VerticalLayout + topMargin: 20; + bottomMargin: 4; + leftMargin: 0; + rightMargin: 10; + spacing: 4 +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml index cb4d9bccb8100f864692a6ad8624da18addcc7f3..49c19047292e5fe0cb7ecfe940590595f49a0ab8 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml @@ -2,7 +2,7 @@ import Qt 4.6 import Bauhaus 1.0 PropertyFrame { - layout: QVBoxLayout { + layout: QVBoxLayout { topMargin: 0; bottomMargin: 0; leftMargin: 0; @@ -12,34 +12,40 @@ PropertyFrame { Switches { } + HorizontalWhiteLine { + } + ScrollArea { styleSheetFile: ":/qmldesigner/scrollbar.css"; widgetResizable: true; content: QFrame { - maximumHeight: 38; - layout: QVBoxLayout { - topMargin: 6; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; + maximumHeight: 38; + layout: QVBoxLayout { + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; QExtGroupBox { font.bold: true; maximumHeight: 100; minimumWidth: 280; minimumHeight: 32; layout: QHBoxLayout { - topMargin: 6; - bottomMargin: 2; - QLabel { - minimumHeight: 20; - text: "No Item Selected"; - alignment: "AlignHCenter"; - } + topMargin: 6; + bottomMargin: 2; + QLabel { + minimumHeight: 20; + text: "No Item Selected"; + alignment: "AlignHCenter"; + } } } } } } + HorizontalLine { } + + } }