2010-01-07 12:14:35 +01:00
|
|
|
import Qt 4.6
|
|
|
|
|
import Bauhaus 1.0
|
|
|
|
|
|
|
|
|
|
GroupBox {
|
2010-02-04 14:45:20 +01:00
|
|
|
caption: "Effect"
|
2010-02-05 15:42:31 +10:00
|
|
|
id: extended;
|
2010-02-04 14:45:20 +01:00
|
|
|
maximumHeight: 260;
|
|
|
|
|
|
|
|
|
|
layout: VerticalLayout{
|
|
|
|
|
|
|
|
|
|
property var effect: backendValues.effect
|
|
|
|
|
property var complexNode: effect.complexNode
|
|
|
|
|
|
|
|
|
|
QWidget {
|
|
|
|
|
maximumHeight: 40;
|
|
|
|
|
layout: HorizontalLayout {
|
|
|
|
|
Label {
|
|
|
|
|
text: "Effect ";
|
|
|
|
|
}
|
|
|
|
|
QComboBox {
|
|
|
|
|
enabled: isBaseState;
|
|
|
|
|
property var type: backendValues.effect.complexNode.type
|
|
|
|
|
property var dirty;
|
|
|
|
|
id: effectComboBox;
|
|
|
|
|
items : { [
|
2010-02-04 16:03:45 +01:00
|
|
|
"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;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
|
|
|
|
QWidget {
|
2010-01-27 11:48:46 +01:00
|
|
|
fixedWidth: 100
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
}
|
2010-02-04 16:03:45 +01:00
|
|
|
}// 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;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
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;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
QWidget {
|
|
|
|
|
visible: effectComboBox.currentText == "Colorize";
|
|
|
|
|
layout: QVBoxLayout {
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
property var colorProp: properties == null ? null : properties.color
|
2010-02-04 14:45:20 +01:00
|
|
|
|
|
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
ColorLabel {
|
|
|
|
|
text: " Color"
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
ColorGroupBox {
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
finished: finishedNotify
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
backendColor: properties.color
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
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;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
2010-02-04 16:03:45 +01:00
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
QWidget {
|
|
|
|
|
visible: effectComboBox.currentText == "DropShadow";
|
|
|
|
|
layout: QVBoxLayout {
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
topMargin: 12;
|
|
|
|
|
IntEditor {
|
|
|
|
|
id: blurRadiusShadow;
|
|
|
|
|
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.blurRadius : null;
|
|
|
|
|
caption: "Blur Radius:"
|
|
|
|
|
baseStateFlag: isBaseState;
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
step: 1;
|
|
|
|
|
minimumValue: 0;
|
|
|
|
|
maximumValue: 20;
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
ColorLabel {
|
|
|
|
|
text: " Color"
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
ColorGroupBox {
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
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;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
IntEditor {
|
|
|
|
|
id: yOffset;
|
|
|
|
|
backendValue: backendValues.effect.complexNode.exists ? backendValues.effect.complexNode.properties.yOffset : null;
|
|
|
|
|
caption: "y Offset: "
|
|
|
|
|
baseStateFlag: isBaseState;
|
2010-02-04 14:45:20 +01:00
|
|
|
|
2010-02-04 16:03:45 +01:00
|
|
|
step: 1;
|
|
|
|
|
minimumValue: 0;
|
|
|
|
|
maximumValue: 20;
|
|
|
|
|
}
|
2010-02-04 14:45:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-01-07 12:14:35 +01:00
|
|
|
}
|
2010-02-04 16:03:45 +01:00
|
|
|
} //QVBoxLayout
|
|
|
|
|
} //GroupBox
|