fdae14607aa152f9439d530bcada00fc478440aa
[chessclock] / qml / MainPage.qml
1 import QtQuick 1.1
2 import com.meego 1.0
3 import QtQuick 1.0
4
5
6 Page {
7     id: mainPage
8     tools: commonTools
9 //    Label {
10 //        id: label
11 //        anchors.centerIn: parent
12 //        text: qsTr("Hello world!")
13 //        visible: false
14 //    }
15 //    Button{
16 //        anchors.horizontalCenter: parent.horizontalCenter
17 //        anchors.top: label.bottom
18 //        anchors.topMargin: 10
19 //        text: qsTr("Click here!")
20 //        onClicked: newGameDialog.open()
21 //    }
22
23     ListModel
24     {
25         id: menuModel
26
27         ListElement
28         {
29             name: "Normal clock"
30
31
32         }
33
34         ListElement
35         {
36             name: "Addition before"
37         }
38
39         ListElement
40         {
41             name: "Addition after"
42
43
44         }
45
46         ListElement
47         {
48             name: "Delay"
49
50         }
51
52         ListElement
53         {
54             name: "Delay after"
55         }
56
57         ListElement
58         {
59             name:"Hour Glass"
60         }
61
62     }
63
64
65     ListView
66     {
67         id: menuList
68         anchors.fill: parent
69
70          model: menuModel
71
72          delegate: Text
73          {
74              text: name
75              font.pointSize: 40
76              anchors.topMargin: 12
77
78             MouseArea
79             {
80                 anchors.fill: parent
81                 onClicked: newGameDialog.open()
82             }
83         }
84
85     }
86
87 //    Image {
88 //        id: image1
89 //        anchors.centerIn: parent
90 //        x: 0
91 //        y: 0
92 //        width: 100
93 //        height: 100
94 //        source: ":/pic/logo.png"
95 //    }
96
97
98
99     Dialog
100     {
101         id:newGameDialog
102         title:Label   { color:"white" ;text:"Normal Clock"}
103
104         content:
105             Row
106             {
107                 id: rowRow
108                 spacing: 10
109                 anchors.fill: parent
110
111                 Text
112                 {
113                   width: rowRow.width - rowRow.spacing - switchComponent.width
114                   height: switchComponent.height
115                   verticalAlignment: Text.AlignVCenter
116                   text: "Equal times"
117                   color: white
118                 }
119
120                 Switch
121                 {
122                     id: switchComponent
123                 }
124
125             }
126
127         buttons:
128
129             Button
130             {
131                 id: bOk
132                 text: "OK"
133                 y: 300
134
135                 onClicked: newGameDialog.accept()
136             }
137     }
138
139 }
140
141