Commit 3ebb81f4 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.propertyEditor: ids have to be lower case

parent 92f8cc49
......@@ -2,6 +2,7 @@ import Qt 4.6
import Bauhaus 1.0
QWidget { //This is a special doubleSpinBox that does color coding for states
id: doubleSpinBox;
property var backendValue;
......
......@@ -23,173 +23,171 @@ GroupBox {
property var dirty;
id: effectComboBox;
items : { [
"None",
"Blur",
"Opacity",
"Colorize",
"DropShadow"
] }
onCurrentTextChanged: {
if (dirty) //avoid recursion;
return;
if (backendValues.effect.complexNode.exists)
backendValues.effect.complexNode.remove();
if (currentText == "None") {
;
} else if (backendValues.effect.complexNode != null) {
backendValues.effect.complexNode.add("Qt/" + currentText);
}
}
onTypeChanged: {
dirty = true;
if (backendValues.effect.complexNode.exists)
currentText = backendValues.effect.complexNode.type;
else
currentText = "None";
dirty = false;
}
"None",
"Blur",
"Opacity",
"Colorize",
"DropShadow"
] }
onCurrentTextChanged: {
if (dirty) //avoid recursion;
return;
if (currentText == "")
if (backendValues.effect.complexNode.exists)
backendValues.effect.complexNode.remove();
if (currentText == "None") {
;
} else if (backendValues.effect.complexNode != null) {
backendValues.effect.complexNode.add("Qt/" + currentText);
}
}
onTypeChanged: {
dirty = true;
if (backendValues.effect.complexNode.exists)
currentText = backendValues.effect.complexNode.type;
else
currentText = "None";
dirty = false;
}
}
QWidget {
fixedWidth: 100
}
}
}// QWidget
property var properties: complexNode == null ? null : complexNode.properties
QWidget {
minimumHeight: 20;
layout: QVBoxLayout {
QWidget {
visible: effectComboBox.currentText == "Blur";
layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: blurRadius;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : null;
caption: "Blur Radius:"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
}// QWidget
property var properties: complexNode == null ? null : complexNode.properties
QWidget {
minimumHeight: 20;
layout: QVBoxLayout {
QWidget {
visible: effectComboBox.currentText == "Blur";
layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: blurRadius;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : null;
caption: "Blur Radius:"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
}
}
}
}
QWidget {
visible: effectComboBox.currentText == "Opacity";
layout: QVBoxLayout {
DoubleSpinBox {
id: opcacityEffectSpinBox;
objectName: "opcacityEffectSpinBox";
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.opacity : null;
minimum: 0;
maximum: 1;
singleStep: 0.1;
baseStateFlag: isBaseState;
QWidget {
visible: effectComboBox.currentText == "Opacity";
layout: QVBoxLayout {
DoubleSpinBox {
id: OpcacityEffectSpinBox;
objectName: "OpcacityEffectSpinBox";
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.opacity : null;
minimum: 0;
maximum: 1;
singleStep: 0.1;
baseStateFlag: isBaseState;
}
}
}
}
QWidget {
visible: effectComboBox.currentText == "Colorize";
layout: QVBoxLayout {
QWidget {
visible: effectComboBox.currentText == "Colorize";
layout: QVBoxLayout {
property var colorProp: properties == null ? null : properties.color
property var colorProp: properties == null ? null : properties.color
ColorLabel {
text: " Color"
}
ColorGroupBox {
ColorLabel {
text: " Color"
}
finished: finishedNotify
ColorGroupBox {
backendColor: properties.color
}
finished: finishedNotify
}
}
backendColor: properties.color
}
QWidget {
visible: effectComboBox.currentText == "Pixelize";
layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: pixelSize;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.pixelSize : null;
caption: "Pixel Size:"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
}
}
}
QWidget {
visible: effectComboBox.currentText == "DropShadow";
layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: blurRadiusShadow;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : null;
caption: "Blur Radius:"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
QWidget {
visible: effectComboBox.currentText == "Pixelize";
layout: QVBoxLayout {
topMargin: 12;
IntEditor {
id: pixelSize;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.pixelSize : null;
caption: "Pixel Size:"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
}
}
}
QWidget {
visible: effectComboBox.currentText == "DropShadow";
layout: QVBoxLayout {
ColorLabel {
text: " Color"
}
topMargin: 12;
IntEditor {
id: blurRadiusShadow;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : null;
caption: "Blur Radius:"
baseStateFlag: isBaseState;
ColorGroupBox {
step: 1;
minimumValue: 0;
maximumValue: 20;
}
finished: finishedNotify
backendColor: properties.color
}
ColorLabel {
text: " Color"
}
IntEditor {
id: xOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.xOffset : null;
caption: "x Offset: "
baseStateFlag: isBaseState;
ColorGroupBox {
step: 1;
minimumValue: 0;
maximumValue: 20;
}
finished: finishedNotify
backendColor: properties.color
}
IntEditor {
id: xOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.xOffset : null;
caption: "x Offset: "
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
}
IntEditor {
id: yOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.yOffset : null;
caption: "y Offset: "
baseStateFlag: isBaseState;
IntEditor {
id: yOffset;
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.yOffset : null;
caption: "y Offset: "
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 20;
step: 1;
minimumValue: 0;
maximumValue: 20;
}
}
}
}
}
}
} //QVBoxLayout
} //GroupBox
} //QVBoxLayout
} //GroupBox
......@@ -6,106 +6,104 @@ GroupBox {
caption: "Flickable";
layout: QVBoxLayout {
topMargin: 15;
topMargin: 15;
bottomMargin: 6;
leftMargin: 0;
rightMargin: 0;
QWidget {
id: contentWidget;
maximumHeight: 220;
layout: QHBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 10;
rightMargin: 10;
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
QLabel {
minimumHeight: 20;
QWidget {
id: contentWidget;
maximumHeight: 220;
layout: QHBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 10;
rightMargin: 10;
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
QLabel {
minimumHeight: 20;
text: "Horizontal Velocity:"
font.bold: true;
}
}
QLabel {
minimumHeight: 20;
QLabel {
minimumHeight: 20;
text: "Vertical Velocity:"
font.bold: true;
}
}
QLabel {
minimumHeight: 20;
QLabel {
minimumHeight: 20;
text: "Maximum Flick Velocity:"
font.bold: true;
}
}
QLabel {
minimumHeight: 20;
QLabel {
minimumHeight: 20;
text: "Over Shoot:"
font.bold: true;
}
}
}
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
DoubleSpinBox {
id: horizontalVelocitySpinBox;
objectName: "horizontalVelocitySpinBox";
backendValue: backendValues.horizontalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: verticalVelocitySpinBox;
objectName: "verticalVelocitySpinBox";
backendValue: backendValues.verticalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: maximumVelocitySpinBox;
objectName: "maximumVelocitySpinBox";
backendValue: backendValues.maximumFlickVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
CheckBox {
id: overshootCheckBox;
text: "overshoot";
backendValue: backendValues.overShoot;
baseStateFlag: isBaseState;
checkable: true;
}
}
}
}
}
}
}
}
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
DoubleSpinBox {
id: horizontalVelocitySpinBox;
objectName: "horizontalVelocitySpinBox";
backendValue: backendValues.horizontalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: verticalVelocitySpinBox;
objectName: "verticalVelocitySpinBox";
backendValue: backendValues.verticalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: maximumVelocitySpinBox;
objectName: "maximumVelocitySpinBox";
backendValue: backendValues.maximumFlickVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
CheckBox {
id: overshootCheckBox;
text: "overshoot";
backendValue: backendValues.overShoot;
baseStateFlag: isBaseState;
checkable: true;
}
}
}
}
}
}
}
......@@ -4,6 +4,7 @@ import Bauhaus 1.0
GroupBox {
id: fontGroupBox
caption: "Font";
property var showStyle: false
layout: VerticalLayout {
......@@ -11,15 +12,8 @@ GroupBox {
layout: HorizontalLayout {
Label {
text: "Font"
}
QWidget {
id: parentWidget
minimumWidth: 180
minimumHeight: 26
QFontComboBox {
width: parentWidget.width
height: parentWidget.height
}
}
QFontComboBox {
}
}
}
......@@ -35,7 +29,7 @@ GroupBox {
QWidget {
layout: HorizontalLayout {
Label {
text: "Style"
text: "Font Style"
}
CheckBox {
......@@ -53,5 +47,26 @@ GroupBox {
}
}
QWidget {
visible: showStyle
layout: HorizontalLayout {
Label {
text: "Style"
}
ComboBox {
items : { ["Normal", "Outline", "Raised", "Sunken"] }
currentText: backendValues.style.value;
onItemsChanged: {
currentText = backendValues.style.value;
}
onCurrentTextChanged: {
if (count == 4)
backendValues.style.value = currentText;
}
}
}
}
}
}
......@@ -2,11 +2,12 @@ import Qt 4.6
import Bauhaus 1.0
GroupBox {
finished: finishedNotify;
id: geometry;
caption: "geometry";
finished: finishedNotify
id: geometry
layout: VerticalLayout {
caption: "geometry"
layout: VerticalLayout {
QWidget { // 1
layout: HorizontalLayout {
......