Commit c24fd59c authored by Kai Koehne's avatar Kai Koehne

QmlDesigner: Remove deprecated Script element

The Script element is nowadays superfluous, and will be removed soon.
parent cd00785e
......@@ -6,18 +6,16 @@ QWidget {
height:220;fixedHeight: height
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() {
anchorBackend.fill();
}
function fill() {
anchorBackend.fill();
}
function breakLayout() {
anchorBackend.resetLayout()
}
function breakLayout() {
anchorBackend.resetLayout()
}
QPushButton {
......
......@@ -6,19 +6,16 @@ QWidget {
id: anchorButtons
fixedHeight: 32
function isBorderAnchored() {
return anchorBackend.leftAnchored || anchorBackend.topAnchored || anchorBackend.rightAnchored || anchorBackend.bottomAnchored;
}
Script {
function isBorderAnchored() {
return anchorBackend.leftAnchored || anchorBackend.topAnchored || anchorBackend.rightAnchored || anchorBackend.bottomAnchored;
}
function fill() {
anchorBackend.fill();
}
function fill() {
anchorBackend.fill();
}
function breakLayout() {
anchorBackend.resetLayout()
}
function breakLayout() {
anchorBackend.resetLayout()
}
QPushButton {
......
......@@ -31,22 +31,20 @@ QWidget { //This is a special checkBox that does color coding for states
evaluate();
}
Script {
function evaluate() {
if (!enabled) {
localLabel.setStyleSheet("color: "+scheme.disabledColor);
function evaluate() {
if (!enabled) {
localLabel.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
localLabel.setStyleSheet("color: "+scheme.changedBaseColor);
else
localLabel.setStyleSheet("color: "+scheme.boldTextColor);
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
localLabel.setStyleSheet("color: "+scheme.changedBaseColor);
else
localLabel.setStyleSheet("color: "+scheme.boldTextColor);
} else {
if (backendValue.isInSubState)
localLabel.setStyleSheet("color: "+scheme.changedStateColor);
else
localLabel.setStyleSheet("color: "+scheme.boldTextColor);
}
if (backendValue.isInSubState)
localLabel.setStyleSheet("color: "+scheme.changedStateColor);
else
localLabel.setStyleSheet("color: "+scheme.boldTextColor);
}
}
}
......
......@@ -52,35 +52,33 @@ QExtGroupBox {
evaluate();
}
Script {
function evaluate() {
if (backendColor === undefined)
return;
if (!enabled) {
valueSpinBox.setStyleSheet("color: "+scheme.disabledColor);
hueSpinBox.setStyleSheet("color: "+scheme.disabledColor);
saturationSpinBox.setStyleSheet("color: "+scheme.disabledColor);
function evaluate() {
if (backendColor === undefined)
return;
if (!enabled) {
valueSpinBox.setStyleSheet("color: "+scheme.disabledColor);
hueSpinBox.setStyleSheet("color: "+scheme.disabledColor);
saturationSpinBox.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendColor.isInModel) {
valueSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
hueSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
saturationSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
} else {
valueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
hueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
saturationSpinBox.setStyleSheet("color: "+scheme.defaultColor);
}
} else {
if (baseStateFlag) {
if (backendColor.isInModel) {
valueSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
hueSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
saturationSpinBox.setStyleSheet("color: "+scheme.changedBaseColor);
} else {
valueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
hueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
saturationSpinBox.setStyleSheet("color: "+scheme.defaultColor);
}
if (backendColor.isInSubState) {
valueSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
hueSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
saturationSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
} else {
if (backendColor.isInSubState) {
valueSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
hueSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
saturationSpinBox.setStyleSheet("color: "+scheme.changedStateColor);
} else {
valueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
hueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
saturationSpinBox.setStyleSheet("color: "+scheme.defaultColor);
}
valueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
hueSpinBox.setStyleSheet("color: "+scheme.defaultColor);
saturationSpinBox.setStyleSheet("color: "+scheme.defaultColor);
}
}
}
......
......@@ -22,26 +22,23 @@ QWidget {
evaluate();
}
Script {
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedBaseColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedBaseColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
} else {
if (backendValue.isInSubState)
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedStateColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
}
if (backendValue.isInSubState)
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedStateColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
box.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
}
}
}
......
......@@ -29,25 +29,23 @@ QWidget { //This is a special doubleSpinBox that does color coding for states
evaluate();
}
Script {
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue.isInModel)
box.setStyleSheet("color: "+scheme.changedBaseColor);
else
else
box.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue.isInSubState)
} else {
if (backendValue.isInSubState)
box.setStyleSheet("color: "+scheme.changedStateColor);
else
else
box.setStyleSheet("color: "+scheme.defaultColor);
}
}
}
}
}
......
......@@ -6,23 +6,20 @@ QToolButton {
property var backendValue
Script {
function setIcon() {
if (backendValue == null)
extendedFunctionButton.iconFromFile = "images/placeholder.png"
else if (backendValue.isBound) {
extendedFunctionButton.iconFromFile = "images/expression.png"
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 {
if (backendValue.complexNode != null && backendValue.complexNode.exists) {
extendedFunctionButton.iconFromFile = "images/behaivour.png"
} else {
extendedFunctionButton.iconFromFile = "images/placeholder.png"
}
extendedFunctionButton.iconFromFile = "images/placeholder.png"
}
}
}
onBackendValueChanged: {
setIcon();
}
......
......@@ -22,23 +22,20 @@ QWidget {
evaluate();
}
Script {
function evaluate() {
if (!enabled) {
fontSelector.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedBaseColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
} else {
if (backendValue != null && backendValue.isInSubState)
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedStateColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
}
function evaluate() {
if (!enabled) {
fontSelector.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedBaseColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
} else {
if (backendValue != null && backendValue.isInSubState)
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.changedStateColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
else
fontSelector.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
}
}
}
......
......@@ -21,23 +21,21 @@ QWidget {
evaluate();
}
Script {
function evaluate() {
if (!enabled) {
lineEditWidget.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
lineEditWidget.setStyleSheet("color: "+scheme.changedBaseColor);
else
lineEditWidget.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue != null && backendValue.isInSubState)
lineEditWidget.setStyleSheet("color: "+scheme.changedStateColor);
else
lineEditWidget.setStyleSheet("color: "+scheme.defaultColor);
}
}
function evaluate() {
if (!enabled) {
lineEditWidget.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
lineEditWidget.setStyleSheet("color: "+scheme.changedBaseColor);
else
lineEditWidget.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue != null && backendValue.isInSubState)
lineEditWidget.setStyleSheet("color: "+scheme.changedStateColor);
else
lineEditWidget.setStyleSheet("color: "+scheme.defaultColor);
}
}
}
......
......@@ -27,25 +27,22 @@ QWidget { //This is a special spinBox that does color coding for states
evaluate();
}
Script {
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (!(baseStateFlag === undefined) && baseStateFlag) {
if (backendValue.isInModel)
box.setStyleSheet("color: "+scheme.changedBaseColor);
else
box.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue.isInSubState)
box.setStyleSheet("color: "+scheme.changedStateColor);
else
box.setStyleSheet("color: "+scheme.defaultColor);
}
function evaluate() {
if (backendValue === undefined)
return;
if (!enabled) {
box.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (!(baseStateFlag === undefined) && baseStateFlag) {
if (backendValue.isInModel)
box.setStyleSheet("color: "+scheme.changedBaseColor);
else
box.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue.isInSubState)
box.setStyleSheet("color: "+scheme.changedStateColor);
else
box.setStyleSheet("color: "+scheme.defaultColor);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment