Update WWW
[ubi] / qml / ubi / StartPage.qml
1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "UIConstants.js" as Const
3 import "u1.js" as U1
4 import "components"
5
6 Page {
7     id: root
8     title: "Ubi"
9
10     //Component.onCompleted: init()
11
12     /*function init() {
13         if(Utils.isAuthorized()) {
14             //title = "Hi, "+Utils.name();
15         } else {
16             console.log("not authorized!");
17             pageStack.initialPage = "LoginPage.qml";
18         }
19     }*/
20
21     menu: [
22         [qsTr("About Ubi"),false]
23     ]
24
25     function menuFun(id) {
26         if(id==qsTr("About Ubi")) {
27             dialog.open();
28         }
29     }
30
31     Column {
32         spacing: 10
33         anchors.centerIn: parent
34
35         /*Image {
36             source: "images/cloud.png"
37             width: 150; height: 98
38         }
39
40         Spacer{}
41         Spacer{}
42         */
43
44         Spacer{}
45         Spacer{}
46
47         ButtonNew {
48             height: 100; width: 250
49             label: qsTr("Files")
50             //iconSource: "images/files.png"
51             anchors.horizontalCenter: parent.horizontalCenter
52             onButtonClicked: {
53                 pageStack.push("FilesPage.qml");
54                 pageStack.currentPage.init();
55             }
56         }
57
58         /*Button {
59             label: "Contacts"
60             disabled: true
61         }
62         Button {
63             label: "Notes"
64             disabled: true
65         }*/
66
67         ButtonNew {
68             height: 100; width: 250
69             label: qsTr("Account")
70             //iconSource: "images/account.png"
71             anchors.horizontalCenter: parent.horizontalCenter
72             onButtonClicked: {
73                 pageStack.push("AccountPage.qml");
74             }
75         }
76         ButtonNew {
77             height: 100; width: 250
78             label: qsTr("Settings")
79             //iconSource: "images/settings.png"
80             anchors.horizontalCenter: parent.horizontalCenter
81             onButtonClicked: pageStack.push("SettingsPage.qml");
82         }
83         /*Button {
84             label: "Test"
85             //onButtonClicked: tip.show("Ala ma kota!")
86             //onButtonClicked: dialog.open()
87             //onButtonClicked: U1.getAccount()
88         }*/
89
90         //Spacer{}
91
92     }
93
94     DialogInfo {
95         id: dialog
96         z: 200
97         fontSize: 28
98         iconSource: "images/ubi50.png"
99         textHeader: qsTr("<b>Ubi</b>")
100
101         text: qsTr("<p>An unofficial Ubuntu One app for Maemo 5 "
102               +"and other Qt-enabled platforms.</p>"
103               +"<p><small>http://ubi.garage.maemo.org</small></p>"
104               +"<p><small>© 2012 Michal Kosciesza</small></p>")
105
106         onOpened: mask.state = "dialog"
107         onCanceled: mask.state = "idle"
108     }
109 }