Commit 7baecce0 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

Qml Designer.PropertyEditor: fixing crash bug

 See: BAUHAUS-288
 Fixes some indentation
parent c979e3d1
......@@ -26,15 +26,15 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
function evaluate() {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
DoubleSpinBox.setStyleSheet("color: white;");
DoubleSpinBox.setStyleSheet("color: white;");
else
DoubleSpinBox.setStyleSheet("color: gray;");
} else {
if (backendValue != null && backendValue.isInSubState)
DoubleSpinBox.setStyleSheet("color: gray;");
} else {
if (backendValue != null && backendValue.isInSubState)
DoubleSpinBox.setStyleSheet("color: #7799FF;");
else
else
DoubleSpinBox.setStyleSheet("color: gray;");
}
}
}
}
......@@ -50,19 +50,26 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
decimals: 2;
keyboardTracking: false;
enabled: (backendValue == null || backendValue.complexNode == null) ? false : !backendValue.isBound && !backendValue.complexNode.exists
value: DoubleSpinBox.backendValue == null ? .0 : DoubleSpinBox.backendValue.value;
onValueChanged: {
if (DoubleSpinBox.backendValue != null)
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)
DoubleSpinBox.backendValue.value = value;
}
onFocusChanged: {
//extendedSwitches.active = focus;
//extendedSwitches.backendValue = backendValue;
}
onMouseOverChanged: {
//extendedButton.active = mouseOver;
}
}
onFocusChanged: {
//extendedSwitches.active = focus;
//extendedSwitches.backendValue = backendValue;
}
onMouseOverChanged: {
//extendedButton.active = mouseOver;
}
}
}
......@@ -80,10 +87,10 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
opacity: Behavior {
NumberAnimation {
easing: "easeInSine"
duration: 200
}
easing: "easeInSine"
duration: 200
}
}
onPressed: {
......@@ -103,7 +110,7 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
}
}
}
}
}
onMouseOverChanged: {
if (mouseOver) {
......
......@@ -28,10 +28,10 @@ QWidget { //This is a special SpinBox that does color coding for states
else
SpinBox.setStyleSheet("color: gray;");
} else {
if (backendValue != null && backendValue.isInSubState)
SpinBox.setStyleSheet("color: #7799FF;");
else
SpinBox.setStyleSheet("color: gray;");
if (backendValue != null && backendValue.isInSubState)
SpinBox.setStyleSheet("color: #7799FF;");
else
SpinBox.setStyleSheet("color: gray;");
}
}
}
......@@ -49,9 +49,17 @@ QWidget { //This is a special SpinBox that does color coding for states
keyboardTracking: false;
id: box;
enabled: backendValue === undefined || backendValue.isBound === undefined || backendValue.isBound === null ? false : !backendValue.isBound
value: backendValue == undefined || backendValue.value == undefined || backendValue.value === null ? 0 : backendValue.value;
property bool readingFromBackend: false;
property int valueFromBackend: SpinBox.backendValue == null ? .0 : SpinBox.backendValue.value;
onValueFromBackendChanged: {
readingFromBackend = true;
value = valueFromBackend
readingFromBackend = false;
}
onValueChanged: {
if (backendValue != undefined && backendValue != null)
if (SpinBox.backendValue != null && readingFromBackend == false)
backendValue.value = value;
}
onFocusChanged: {
......@@ -61,7 +69,7 @@ QWidget { //This is a special SpinBox that does color coding for states
}
}
QToolButton {
QToolButton {
visible: false;
width: 10;
height: 10;
......
Supports Markdown
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