X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FLichViet%2FMenuScreen.qml;fp=qml%2FLichViet%2FMenuScreen.qml;h=02f1dccf171f18369756b49fd9605c1a3f135da3;hb=274c1daf9c51c4127195b5e8370722887dace99e;hp=26f6a29035dab9dba5dd49e0de60c2f766e4fdab;hpb=0527c61e3bdd3540dbe553e87e24081fe54f6b15;p=lichviet diff --git a/qml/LichViet/MenuScreen.qml b/qml/LichViet/MenuScreen.qml index 26f6a29..02f1dcc 100644 --- a/qml/LichViet/MenuScreen.qml +++ b/qml/LichViet/MenuScreen.qml @@ -17,13 +17,37 @@ along with this program. If not, see import QtQuick 1.0 +import "Themes.js" as Themes + Item{ id:menuscreen + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height; + x:-(parent.width * 1.5) + + signal close + signal item_click(int pos) + + Loader { + id: theme_manager + property alias theme: theme_manager.item + source: Themes.default_theme() + } + + Connections { + target: menuscreen.parent + + onDialogClose: { + menuscreen.state = "close"; + menuscreen.destroy(600); + } + } + Rectangle { id: rectangle1 - anchors.fill: parent; anchors.bottomMargin: 16 + anchors.fill: parent; anchors.bottomMargin: 0; visible: true opacity:0.9 @@ -73,7 +97,7 @@ Item{ ListView { id: listView - anchors.fill: parent;anchors.topMargin: 35;anchors.leftMargin: 5;anchors.rightMargin: 5;anchors.bottomMargin: 12 + anchors.fill: parent;anchors.topMargin: 45;anchors.leftMargin: 5;anchors.rightMargin: 5;anchors.bottomMargin: 55 model: listModel delegate: listDelegate focus: true @@ -81,38 +105,62 @@ Item{ } + Rectangle { + width : menuscreen.width + height: 45 + color:"white" + opacity: 0.5 + } + + Text { + id: title + + anchors { horizontalCenter: menuscreen.horizontalCenter; top: menuscreen.top; topMargin: 10 } + font.pixelSize: 22 + color: "black" + text: qsTr("Menu") + smooth: true + font.bold: true + } + + ToolBarSingle { - id: toolBar; height: 50; - y: screen.height-78 + id: toolBar; height: 42; + y: parent.height-52 width: parent.width; button1Label: "Quay Về" - onButton1Clicked: - { - screen.state="mainscreen" - } + onButton1Clicked:menuscreen.close() } + function getText(id) { - switch(id){ + /*switch(id){ case 1:screen.reset();break; case 2: screen.state="amdatetimedialog";break; case 3: screen.state="datetimedialog";break; case 4: screen.state="xemngaytotxauhoangdao";break; case 5: screen.state="xemtheothang";break; - case 6: screen.state="aboutdialog";break; + case 6: menuscreen.close();screen.state="aboutdialog";break; case 7: screen.state="changetheme";break; case 8: screen.state="filebrowser";break; - } - + }*/ + menuscreen.close(); + menuscreen.item_click(id); } - FileBrowser{ - id: fileBrowser - state:"filebrowser" - anchors.verticalCenter: parent.verticalCenter - width: parent.width; height: parent.height-60; - x: -(screen.width * 1.5) - } + states: [ + State { + name: "show" + AnchorChanges { target: menuscreen; anchors.right: parent.right } + }, + State { + name: "close" + AnchorChanges { target: menuscreen; anchors.right: parent.left } + } + ] + transitions: Transition { + AnchorAnimation { easing.type: Easing.OutQuart; duration: 300 } + } }