ad21857f96f8cd9d62189c05a741866199ebe4a4
[chessclock] / qml / main.qml
1 /**************************************************************************
2
3    Chess Clock
4
5    This file is part of Chess Clock software.
6
7    (This file) Copyright (c) Heli Hyvättinen 2011
8
9    Chess Clock is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13
14    Chess Clock is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19
20 **************************************************************************/
21
22
23 import QtQuick 1.1
24 import com.meego 1.0
25
26 PageStackWindow {
27     id: appWindow
28
29     Component.onCompleted: theme.inverted = true
30
31     initialPage: mainPage
32
33     MainPage{id: mainPage}
34
35     AboutPage{id: aboutPage}
36
37     ClocksPage{id: clocksPage}
38
39     ToolBarLayout {
40         id: commonTools
41         visible: true
42         ToolIcon { platformIconId: "toolbar-view-menu";
43              anchors.right: parent===undefined ? undefined : parent.right
44              onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
45         }
46     }
47
48     Menu {
49         id: myMenu
50         visualParent: pageStack
51         MenuLayout {
52             MenuItem
53             {
54                 text: "Visit web page"
55                 onClicked: Qt.openUrlExternally("http://chessclock.garage.maemo.org/")
56             }
57             MenuItem
58             {
59                 text: "About"
60                 onClicked: pageStack.push(aboutPage)
61             }
62         }
63     }
64 }