Index: sources/gui/qml/components/RectSelectCreateTreatment.qml =================================================================== diff -u -rc71deaab48699cffdf9db816dfac2778d79c2238 -r2d09ae36f6b791e0415a87b6f14f582d4b434d7d --- sources/gui/qml/components/RectSelectCreateTreatment.qml (.../RectSelectCreateTreatment.qml) (revision c71deaab48699cffdf9db816dfac2778d79c2238) +++ sources/gui/qml/components/RectSelectCreateTreatment.qml (.../RectSelectCreateTreatment.qml) (revision 2d09ae36f6b791e0415a87b6f14f582d4b434d7d) @@ -27,18 +27,28 @@ id: _root anchors.horizontalCenter: parent.horizontalCenter color: "transparent" - property int numRows: 2 - property int numCols: 2 - property int buttonHeight: 78 - property int buttonWidth: 313 - property var buttonNames: ["Button 1", "Button 2", "Button 3"] - property alias name: _text.text - property int selectedIndex: unselectedIndex - property int unselectedIndex: 9999 + property int numRows : 2 + property int numCols : 2 + property int buttonHeight : 78 + property int buttonWidth : 313 + property var buttonNames : ["Button 1", "Button 2", "Button 3"] + property alias name : _text.text + property int selectedIndex : unselectedIndex + property int unselectedIndex : 9999 height: numRows * buttonHeight width: numCols * buttonWidth signal buttonClicked() + + function setValid(valid) { + if (valid) { + _text.color = Colors.textMain + } else { + _text.color = Colors.createTrInvalidParam + } + + } + Text { id: _text text: "Title" @@ -71,6 +81,7 @@ width: _root.buttonWidth radius: 0 onClicked: { + _text.color = Colors.textMain if (selectedIndex === index) { _repeater.itemAt(index).setSelected(false) selectedIndex = unselectedIndex