Switch
{
- id: switchComponent
+ id: equalTimesSwitch
+ onCheckedChanged:
+ {
+ if (checked)
+ {
+ blackInitialTime.text = whiteInitialTime.text
+ blackAdditionalTime.text = whiteAdditionalTime.text
+ blackTurnsPerAddition.text = whiteTurnsPerAddition.text
+
+ }
+ }
}
}
Image
id: whiteInitialTime
readOnly: true
+ onTextChanged: {if (equalTimesSwitch.checked) blackInitialTime.text = text}
+
MouseArea
{
anchors.fill: parent
TextField
{
id: blackInitialTime
+ enabled: !equalTimesSwitch.checked
+
readOnly: true
+
+
MouseArea
{
anchors.fill: parent
visible: newGameDialog.askAddition
readOnly: true
+ onTextChanged: {if (equalTimesSwitch.checked) blackAdditionalTime.text = text}
+
MouseArea
{
anchors.fill: parent
{
id: blackAdditionalTime
visible: newGameDialog.askAddition
+ enabled: !equalTimesSwitch.checked
readOnly: true
MouseArea
{
id: whiteTurnsPerAddition
visible: newGameDialog.askAddition
+
inputMask: "D00"
text: "1"
+
+ onTextChanged: {if (equalTimesSwitch.checked) blackTurnsPerAddition.text = text}
}
TextField
{
id: blackTurnsPerAddition
visible: newGameDialog.askAddition
+ enabled: !equalTimesSwitch.checked
inputMask: "D00"
text: "1"
}