4 import com.nokia.extras 1.0
18 // anchors.centerIn: parent
19 // text: qsTr("Hello world!")
27 // anchors.fill: parent
28 // anchors.left: menuList.right
30 source: ":/rc/pic/logo.png"
41 logoFile: ":/rc/pic/oldclock.png"
48 name: "Addition before"
50 logoFile: ":/rc/pic/addbefore.png"
55 name: "Addition after"
57 logoFile: ":/rc/pic/addafter.png"
64 logoFile: ":/rc/pic/pausebefore.png"
71 logoFile: ":/rc/pic/pauseafter.png"
78 logoFile:":/rc/pic/hourglass.png"
88 anchors.left: bigLogo.right
89 anchors.right: parent.right
90 anchors.top: parent.top
91 anchors.bottom: parent.bottom
105 onClicked: {newGameDialog.name = name; newGameDialog.askAddition = askAddition; newGameDialog.open()}
113 anchors.topMargin: 12
119 onClicked: {newGameDialog.name = name; newGameDialog.askAddition = askAddition; newGameDialog.open()}
135 property bool askAddition
143 text: newGameDialog.name
156 // anchors.top: parent.top
157 // anchors.horizontalCenter: parent.horizontalCenter
161 // width: rowRow.width - rowRow.spacing - switchComponent.width - whiteSmall.width - blackSmall.width
162 // height: switchComponent.height
163 verticalAlignment: Text.AlignVCenter
177 source: ":/rc/pic/white_small.png"
183 source: ":/rc/pic/black_small.png"
192 // anchors.top: rowRow.bottom
193 // anchors.horizontalCenter: parent.horizontalCenter
206 onClicked: {timePicker.timeType = "initial"; timePicker.player = "white"; timePicker.open()}
220 onClicked: {timePicker.timeType = "initial"; timePicker.player = "black"; timePicker.open()}
228 id: additionalTimeText
229 text: "Additional time"
232 visible: newGameDialog.askAddition
233 // anchors.top: initialTimeText.bottom
234 // anchors.horizontalCenter: parent.horizontalCenter
241 id: whiteAdditionalTime
247 onClicked: {timePicker.timeType = "additional"; timePicker.player = "white"; timePicker.open()} }
252 id: blackAdditionalTime
258 onClicked: {timePicker.timeType = "additional"; timePicker.player = "black"; timePicker.open()}
266 text: "Turns per addition"
269 visible: newGameDialog.askAddition
270 // anchors.top: additionalTimeText.bottom
271 // anchors.horizontalCenter: parent.horizontalCenter
275 id: whiteTurnsPerAddition
282 id: blackTurnsPerAddition
300 onClicked: newGameDialog.accept()
308 property string timeType
309 property string player
310 property string result
313 titleText: "Choose " + timeType + " time for " + player
314 rejectButtonText: "Cancel"
315 acceptButtonText: "Ok"
316 hourMode: DateTime.TwentyFourHours
319 result = hour + " h " + minute + " min " + second + " s"
320 if (timeType == "initial")
321 if (player == "white")
322 whiteInitialTime.text = result
324 blackInitialTime.text = result
326 else if (player == "white")
327 whiteAdditionalTime.text = result
329 blackAdditionalTime.text = result