+/**************************************************************************
+
+ Chess Clock
+
+ This file is part of Chess Clock software.
+
+ (This file) Copyright (c) Heli Hyvättinen 2011
+
+ Chess Clock is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Chess Clock is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+
import QtQuick 1.1
import com.meego 1.0
import QtQuick 1.0
property string name
property bool askAddition
+ onAccepted: pageStack.push(clocksPage)
+
title:Label
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"
}