Pause button in toolbar
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Fri, 12 Aug 2011 20:00:39 +0000 (23:00 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Fri, 12 Aug 2011 20:01:11 +0000 (23:01 +0300)
Works, but looks bad and is visible even ehen game paused (but does not
unpause)

qml/ClocksPage.qml

index 77684b3..716e5c0 100644 (file)
@@ -29,7 +29,17 @@ import ChessClocks 1.0
 Page
 {
     id: clocksPage
-    tools:  commonTools
+
+
+    tools: ToolBarLayout
+    {
+        ToolButton { iconSource: "toolbar-back"; onClicked: pageStack.pop() }
+        ToolButton
+        {
+            iconSource: ":/rc/pic/pausebutton.png"
+            onClicked: wrappedClocksWidget.pause()
+        }
+    }
 
     property int whiteInitialTime
     property int blackInitialTime
@@ -42,6 +52,7 @@ Page
 
     WrappedClocksWidget
     {
+        id: wrappedClocksWidget
         Component.onCompleted: startGame("",300,30,1,400,40,2)
 
     }