X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FLichViet%2FDateTimeDialog.qml;fp=qml%2FLichViet%2FDateTimeDialog.qml;h=398e975561e8b46262818efad4d798dd2f779426;hb=67ff5ae94ce65b3b1bb04a1eddcea356fd81a1aa;hp=8b9df0f712090d8573dc9f2bab9e88c21c6edef2;hpb=149fae2a60de58d911839daae8700ba3a6e2069a;p=lichviet diff --git a/qml/LichViet/DateTimeDialog.qml b/qml/LichViet/DateTimeDialog.qml index 8b9df0f..398e975 100644 --- a/qml/LichViet/DateTimeDialog.qml +++ b/qml/LichViet/DateTimeDialog.qml @@ -14,11 +14,27 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see */ -import QtQuick 1.0 +import QtQuick 1.1 import "../DatePicker/component" as Comp +import "Themes.js" as Themes +import "main.js" as Script + Item{ - id: item1 + id: datetimedlg + + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height; + x:(parent.width * 1.5) + + Loader { + id: theme_manager + property alias theme: theme_manager.item + source: Themes.default_theme() + } + + signal toolbar + signal updatedate(int day, int month, int year) Rectangle { id: rectangle1 @@ -38,9 +54,9 @@ Item{ Column { id: datePicker width: 260 - property int mDay: screen.curDay - property int mMonth: screen.curMonth - property int mYear: screen.curYear + property int mDay: Script.curDay + property int mMonth: Script.curMonth + property int mYear: Script.curYear anchors.centerIn: parent Comp.DateReel { @@ -56,11 +72,10 @@ Item{ text: "OK" visible: true onClicked: { - LC.reset(datePicker.mDay,datePicker.mMonth,datePicker.mYear) - screen.calculateLunar(datePicker.mDay,datePicker.mMonth,datePicker.mYear) - screen.state="mainscreen" - screen.refresh() - maindatemodel.reset() + datetimedlg.state="close"; + datetimedlg.toolbar(); + datetimedlg.updatedate(datePicker.mDay, datePicker.mMonth, datePicker.mYear) + } } @@ -72,7 +87,10 @@ Item{ height: 40 text: "X" anchors.rightMargin: 56 - onClicked: {screen.state="mainscreen";screen.refresh();} + onClicked: { + datetimedlg.state="close"; + datetimedlg.toolbar(); + } } } @@ -82,4 +100,19 @@ Item{ dateReel.year_reset() } + states: [ + State { + name: "show" + AnchorChanges { target: datetimedlg; anchors.right: parent.right } + }, + State { + name: "close" + AnchorChanges { target: datetimedlg; anchors.right: parent.left } + } + ] + + transitions: Transition { + AnchorAnimation { easing.type: Easing.OutQuart; duration: 300 } + } + }