Shows the logo image too
[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     Image
24     {
25         id: bigLogo
26 //        anchors.fill: parent
27 //        anchors.left: menuList.right
28
29         source: ":/rc/pic/logo.png"
30     }
31
32     ListModel
33     {
34         id: menuModel
35
36         ListElement
37         {
38             name: "Normal clock"
39
40
41         }
42
43         ListElement
44         {
45             name: "Addition before"
46         }
47
48         ListElement
49         {
50             name: "Addition after"
51
52
53         }
54
55         ListElement
56         {
57             name: "Delay"
58
59         }
60
61         ListElement
62         {
63             name: "Delay after"
64         }
65
66         ListElement
67         {
68             name:"Hour Glass"
69         }
70
71     }
72
73
74     ListView
75     {
76         id: menuList
77
78         anchors.left: bigLogo.right
79         anchors.right: parent.right
80         anchors.top: parent.top
81         anchors.bottom: parent.bottom
82
83
84          model: menuModel
85
86          delegate: Text
87          {
88              text: name
89              font.pointSize: 40
90              anchors.topMargin: 12
91
92             MouseArea
93             {
94                 anchors.fill: parent
95                 onClicked: newGameDialog.open()
96             }
97         }
98
99     }
100
101
102
103
104
105     Dialog
106     {
107         id:newGameDialog
108         title:Label   { color:"white" ;text:"Normal Clock"}
109
110         content:
111             Row
112             {
113                 id: rowRow
114                 spacing: 10
115                 anchors.fill: parent
116
117                 Text
118                 {
119                   width: rowRow.width - rowRow.spacing - switchComponent.width
120                   height: switchComponent.height
121                   verticalAlignment: Text.AlignVCenter
122                   text: "Equal times"
123                   color: white
124                 }
125
126                 Switch
127                 {
128                     id: switchComponent
129                 }
130
131             }
132
133         buttons:
134
135             Button
136             {
137                 id: bOk
138                 text: "OK"
139                 y: 300
140
141                 onClicked: newGameDialog.accept()
142             }
143     }
144
145 }
146
147