Update WWW
[ubi] / qml / ubi / main.qml
1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "components"
3 import Qt 4.7
4 import "UIConstants.js" as Const
5
6 Rectangle {
7     id: mainWindow
8
9     width: 480
10     height: 800
11
12     color: Const.DEFAULT_BACKGROUND_COLOR
13
14     PageStack {
15         id: pageStack
16         initialPage: Qt.resolvedUrl("StartPage.qml")
17     }
18
19     SystemBar {
20         id: systemBar
21         onClicked: {
22             var mask = pageStack.currentPage.mask;
23             if(mask.state=="idle") {
24                 taskBar.open();
25             }
26         }
27     }
28
29     Notification {
30         id: tip
31         x: (mainWindow.width-width)/2
32         y: 120
33     }
34
35     TaskBar {
36         id: taskBar
37     }
38
39     Connections {
40         target: Utils
41         onFileDownloaded: tip.show(qsTr("File downloaded!"))
42         onFileUploaded: tip.show(qsTr("File uploaded!"))
43         onDownloadError: tip.show(qsTr("Error while downloading!"))
44         onUploadError: tip.show(qsTr("Error while uploading!"))
45         onDownloadAdded: tip.show(qsTr("File added to the queue!"))
46         onUploadAdded: tip.show(qsTr("File added to the queue!"))
47     }
48
49     Rectangle {
50         color: "black"
51         width: 1
52         anchors.left: parent.left
53         anchors.top: parent.top
54         anchors.bottom: parent.bottom
55     }
56
57     InitPage {
58         height: mainWindow.height;
59         width: mainWindow.width;
60     }
61
62 }