Uses com.nokia.meego instead of com.meego
[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.nokia.meego 1.0
25
26 PageStackWindow {
27     id: appWindow
28
29
30     property bool applicationActive: Qt.application.active
31
32
33     Component.onCompleted: theme.inverted = true
34
35     initialPage: mainPage
36
37     MainPage{id: mainPage}
38
39     AboutPage{id: aboutPage}
40
41     ClocksPage{id: clocksPage}
42
43     NewGameDialogPage{id: newGameDialogPage}
44
45     ToolBarLayout {
46         id: commonTools
47         visible: true
48         ToolIcon { platformIconId: "toolbar-view-menu";
49              anchors.right: parent===undefined ? undefined : parent.right
50              onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
51         }
52     }
53
54     Menu {
55         id: myMenu
56         visualParent: pageStack
57         MenuLayout {
58             MenuItem
59             {
60                 text: "Visit web page"
61                 onClicked: Qt.openUrlExternally("http://chessclock.garage.maemo.org/")
62             }
63             MenuItem
64             {
65                 text: "About"
66                 onClicked: pageStack.push(aboutPage)
67             }
68         }
69     }
70 }