Initial commit for the QML client:
[qtrapids] / src / client / qml / main.qml
1
2 import QtQuick 1.1
3 import com.meego 1.0
4
5 PageStackWindow {
6     id: rootWindow
7     property int pageMargin: 16
8
9     platformStyle: defaultStyle;
10
11     PageStackWindowStyle { id: defaultStyle }
12     PageStackWindowStyle { id: customStyle; background: "image://theme/meegotouch-wallpaper-portrait"}
13
14     // ListPage is what we see when the app starts, it links to the component specific pages
15     initialPage: MainPage { }
16
17     // These tools are shared by most sub-pages by assigning the id to a page's tools property
18     ToolBarLayout {
19         id: commonTools
20         visible: false
21         ToolIcon { iconId: "toolbar-back"; onClicked: { myMenu.close(); pageStack.pop(); } }
22         ToolIcon { iconId: "toolbar-view-menu"; onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close() }
23     }
24
25     Menu {
26         id: myMenu
27         visualParent: pageStack
28         MenuLayout {
29             MenuItem {id: b1; text: "Landscape"; onClicked: screen.allowedOrientations = Screen.Landscape}
30             MenuItem {id: b2; text: "Portrait"; onClicked: screen.allowedOrientations = Screen.Portrait}
31             MenuItem {id: b3; text: "Item 3"; onClicked: myMenu.accept()}
32             MenuItem {id: b4; text: "Item 4"; onClicked: myMenu.accept()}
33         }
34     }
35 }
36