Commit 064bd9ff authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Finish cleanup delegate handling for actuators

parent 68e10c37
......@@ -133,6 +133,8 @@ Project {
"components/Circle.qml",
"components/ClickableTextLabel.qml",
"components/DelegateAnalogActuator.qml",
"components/DelegateAnalogActuatorMini.qml",
"components/DelegateAnalogActuatorWide.qml",
"components/DelegateAnalogSensor.qml",
"components/DelegateAnalogSensorMini.qml",
"components/DelegateAnalogSensorWide.qml",
......@@ -144,6 +146,7 @@ Project {
"components/DelegateControlDin.qml",
"components/DelegateControlDout.qml",
"components/DelegateDigitalActuator.qml",
"components/DelegateDigitalActuatorMini.qml",
"components/DelegateDigitalSensor.qml",
"components/DelegateDigitalSensorMini.qml",
"components/DelegateEnumHelp.qml",
......
import QtQuick 2.1;
import QtQmlTricks.UiElements 2.0;
import QtCAN.CanTestBench 2.0;
TextLabel {
text: (actuator ? format (actuator.valSpeed, actuator.decimals, actuator.unit) : "");
anchors.verticalCenter: parent.verticalCenter;
property AnalogActuator actuator : null;
}
import QtQuick 2.1;
import QtQmlTricks.UiElements 2.0;
import QtCAN.CanTestBench 2.0;
SliderBar {
barSize: Style.spacingNormal;
handleSize: (barSize * 1.5);
minValue: (actuator ? actuator.minRaw : 0);
maxValue: (actuator ? actuator.maxRaw : 1);
editable: ((actuator.sourceLink
&& actuator.sourceLink.detached)
|| !actuator.sourceLink);
ExtraAnchors.horizontalFill: parent;
onEdited: { actuator.valRaw = value; }
Binding on value { value: (actuator ? actuator.valRaw : 0); }
property AnalogActuator actuator : null;
}
import QtQuick 2.1;
import QtQmlTricks.UiElements 2.0;
import QtCAN.CanTestBench 2.0;
Row {
spacing: Style.spacingSmall;
TextLabel {
text: (actuator ? (actuator.value ? actuator.trueLabel : actuator.falseLabel) : "");
anchors.verticalCenter: parent.verticalCenter;
}
Circle {
size: (Style.spacingNormal * 2.0);
color: (actuator
? (actuator.value
? Style.colorSelection
: Style.colorEditable)
: Style.colorNone);
border {
width: Style.lineSize;
color: Style.colorBorder;
}
anchors.verticalCenter: parent.verticalCenter;
}
property DigitalActuator actuator : null;
}
This diff is collapsed.
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