# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp \
- lunarcalendar.cpp
+ lunarcalendar.cpp \
+ controller.cpp
# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
lichviet.qrc
HEADERS += \
- lunarcalendar.h
+ lunarcalendar.h \
+ controller.h
OTHER_FILES += \
debian/changelog \
qml/LichViet/TitleBar.qml \
qml/LichViet/Switch.qml \
qml/LichViet/OptionsScreen.qml \
- qml/LichViet/NoFeatureDialog.qml \
qml/LichViet/MultiTitleBar.qml \
qml/LichViet/MenuScreen.qml \
qml/LichViet/main.qml \
qml/LichViet/AmDateTimeDialog.qml \
qml/LichViet/xemngaytotxau.js \
qml/LichViet/CacNgayLeTrongNam.js \
- qml/LichViet/ChangeTheme.qml
+ qml/LichViet/ChangeTheme.qml \
+ qml/LichViet/MenuButton.qml \
+ qml/LichViet/ScrollBar.qml \
+ qml/LichViet/FileBrowser.qml
#############################################################################
# Makefile for building: LichViet
-# Generated by qmake (2.01a) (Qt 4.7.3) on: Fri Aug 26 14:38:18 2011
+# Generated by qmake (2.01a) (Qt 4.7.3) on: Sun Aug 28 12:42:23 2011
# Project: LichViet.pro
# Template: app
# Command: /opt/QtSDK/Desktop/Qt/473/gcc/bin/qmake -spec /opt/QtSDK/Desktop/Qt/473/gcc/mkspecs/linux-g++-64 -o Makefile LichViet.pro
SOURCES = main.cpp \
lunarcalendar.cpp \
+ controller.cpp \
qmlapplicationviewer/qmlapplicationviewer.cpp moc_qmlapplicationviewer.cpp \
moc_lunarcalendar.cpp \
+ moc_controller.cpp \
qrc_lichviet.cpp
OBJECTS = main.o \
lunarcalendar.o \
+ controller.o \
qmlapplicationviewer.o \
moc_qmlapplicationviewer.o \
moc_lunarcalendar.o \
+ moc_controller.o \
qrc_lichviet.o
DIST = /opt/QtSDK/Desktop/Qt/473/gcc/mkspecs/common/g++.conf \
/opt/QtSDK/Desktop/Qt/473/gcc/mkspecs/common/unix.conf \
dist:
@$(CHK_DIR_EXISTS) .tmp/LichViet1.0.2 || $(MKDIR) .tmp/LichViet1.0.2
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents qmlapplicationviewer/qmlapplicationviewer.h lunarcalendar.h .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents lichviet.qrc .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents main.cpp lunarcalendar.cpp qmlapplicationviewer/qmlapplicationviewer.cpp .tmp/LichViet1.0.2/ && (cd `dirname .tmp/LichViet1.0.2` && $(TAR) LichViet1.0.2.tar LichViet1.0.2 && $(COMPRESS) LichViet1.0.2.tar) && $(MOVE) `dirname .tmp/LichViet1.0.2`/LichViet1.0.2.tar.gz . && $(DEL_FILE) -r .tmp/LichViet1.0.2
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents qmlapplicationviewer/qmlapplicationviewer.h lunarcalendar.h controller.h .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents lichviet.qrc .tmp/LichViet1.0.2/ && $(COPY_FILE) --parents main.cpp lunarcalendar.cpp controller.cpp qmlapplicationviewer/qmlapplicationviewer.cpp .tmp/LichViet1.0.2/ && (cd `dirname .tmp/LichViet1.0.2` && $(TAR) LichViet1.0.2.tar LichViet1.0.2 && $(COMPRESS) LichViet1.0.2.tar) && $(MOVE) `dirname .tmp/LichViet1.0.2`/LichViet1.0.2.tar.gz . && $(DEL_FILE) -r .tmp/LichViet1.0.2
clean:compiler_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-compiler_moc_header_make_all: moc_qmlapplicationviewer.cpp moc_lunarcalendar.cpp
+compiler_moc_header_make_all: moc_qmlapplicationviewer.cpp moc_lunarcalendar.cpp moc_controller.cpp
compiler_moc_header_clean:
- -$(DEL_FILE) moc_qmlapplicationviewer.cpp moc_lunarcalendar.cpp
+ -$(DEL_FILE) moc_qmlapplicationviewer.cpp moc_lunarcalendar.cpp moc_controller.cpp
moc_qmlapplicationviewer.cpp: qmlapplicationviewer/qmlapplicationviewer.h
/opt/QtSDK/Desktop/Qt/473/gcc/bin/moc $(DEFINES) $(INCPATH) qmlapplicationviewer/qmlapplicationviewer.h -o moc_qmlapplicationviewer.cpp
moc_lunarcalendar.cpp: lunarcalendar.h
/opt/QtSDK/Desktop/Qt/473/gcc/bin/moc $(DEFINES) $(INCPATH) lunarcalendar.h -o moc_lunarcalendar.cpp
+moc_controller.cpp: controller.h
+ /opt/QtSDK/Desktop/Qt/473/gcc/bin/moc $(DEFINES) $(INCPATH) controller.h -o moc_controller.cpp
+
compiler_dbus_interface_source_make_all:
compiler_dbus_interface_source_clean:
compiler_dbus_adaptor_source_make_all:
qml/LichViet/OptionsScreen.qml \
qml/LichViet/Settings.js \
qml/LichViet/amlich-hnd.js \
- qml/LichViet/NoFeatureDialog.qml \
qml/LichViet/FullMonth.qml \
qml/LichViet/ToolBarSingle.qml \
qml/LichViet/CacNgayLeTrongNam.js \
qml/LichViet/Switch.qml \
qml/LichViet/amlich-aa98.js \
qml/LichViet/XemNgayTotXauHoangDao.qml \
+ qml/LichViet/MenuButton.qml \
qml/LichViet/Themes.js \
qml/LichViet/AmDateTimeDialog.qml \
qml/LichViet/ToolBar.qml \
qml/LichViet/MultiTitleBar.qml \
+ qml/LichViet/FileBrowser.qml \
qml/LichViet/main.qml \
qml/LichViet/MenuScreen.qml \
qml/LichViet/Button.qml \
qml/LichViet/xemngaytotxau.js \
qml/LichViet/TitleBar.qml \
+ qml/LichViet/ScrollBar.qml \
qml/LichViet/ChangeTheme.qml \
qml/DatePicker/component/Reel.qml \
qml/DatePicker/component/Button.qml \
####### Compile
-main.o: main.cpp lunarcalendar.h
+main.o: main.cpp lunarcalendar.h \
+ controller.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
lunarcalendar.o: lunarcalendar.cpp lunarcalendar.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o lunarcalendar.o lunarcalendar.cpp
+controller.o: controller.cpp controller.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o controller.o controller.cpp
+
qmlapplicationviewer.o: qmlapplicationviewer/qmlapplicationviewer.cpp qmlapplicationviewer/qmlapplicationviewer.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qmlapplicationviewer.o qmlapplicationviewer/qmlapplicationviewer.cpp
moc_lunarcalendar.o: moc_lunarcalendar.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lunarcalendar.o moc_lunarcalendar.cpp
+moc_controller.o: moc_controller.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_controller.o moc_controller.cpp
+
qrc_lichviet.o: qrc_lichviet.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_lichviet.o qrc_lichviet.cpp
--- /dev/null
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
+
+#include "controller.h"
+
+#include <QDir>
+
+Controller::Controller(QObject *parent) :
+ QObject(parent)
+{
+}
+
+
+bool Controller::pathExists(const QString &path) {
+ QDir dir(path);
+ return dir.exists();
+}
+
+
--- /dev/null
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
+
+#ifndef CONTROLLER_H
+#define CONTROLLER_H
+
+#include <QObject>
+
+class Controller : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Controller(QObject *parent = 0);
+
+signals:
+
+public slots:
+ bool pathExists(const QString &path);
+};
+
+#endif // CONTROLLER_H
<file>qml/LichViet/XemNgayTotXauHoangDao.qml</file>
<file>qml/LichViet/DateTimeDialog.qml</file>
<file>qml/LichViet/AmDateTimeDialog.qml</file>s
- <file>qml/LichViet/NoFeatureDialog.qml</file>
<file>qml/LichViet/ChangeTheme.qml</file>
+ <file>qml/LichViet/MenuButton.qml</file>
+ <file>qml/LichViet/ScrollBar.qml</file>
+ <file>qml/LichViet/FileBrowser.qml</file>
<file>qml/DatePicker/component/Button.qml</file>
<file>qml/DatePicker/component/DateReel.qml</file>
<file>qml/DatePicker/component/Reel.qml</file>
#include <QtDeclarative/QDeclarativeContext>
#include "qmlapplicationviewer.h"
+
#include "lunarcalendar.h"
+#include "controller.h"
#ifdef Q_WS_MAEMO_5
#include <QtOpenGL/QGLWidget>
app.setApplicationVersion(APP_VERSION);
LunarCalendar lc;
+ Controller ctrller;
viewer.rootContext()->setContextProperty("ROOT", &viewer);
viewer.rootContext()->setContextProperty("LC", &lc);
+ viewer.rootContext()->setContextProperty("Controller", &ctrller);
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setSource(QUrl("qrc:/qml/LichViet/main.qml"));
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-
import QtQuick 1.0
Item{
}
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
}
]
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 100; easing.type: Easing.InOutBack } }
- ]
-
function reset(){
var acs = AmLich.getYearInfo(screen.curYear)
var a=AmLich.getLunarDate(screen.curDay,screen.curMonth,screen.curYear)
if (aaa){
for (var i=0;i<=12;i++){
var l=acs[i].month
- if (t==l && a.leap==0){
+ if (t==l && a.leap===0){
if (a.month>i){
finalmonth = finalmonth+1;
break;
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
import QtQuick 1.0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
import "Themes.js" as Themes
Item{
+ id:change_theme
Rectangle {
id: rectangle1
anchors.fill: parent; anchors.bottomMargin: 0
visible: true
opacity:0.9
- color:"black"
+ color:"white"
+
+ Component {
+ id: listDelegate
+ Rectangle {
+ height:65
+ MenuButton {
+ y: 3; width: parent.parent.width; height: 60
+ onClicked: {
+ listModel.select(index)
+ }
+ text: name
+ tip: title
+ selected:is_selected
+ }
+ }
+ }
+
+ ListModel {
+ id: listModel
+
+ Component.onCompleted: {
+ Themes.init(Controller, listModel);
+ }
+
+ ListElement {
+ idm:1;name: "DEFAULT";title:"Theme mặc định, không thể xóa";can_be_deleted:false;is_selected:true
+ }
+
+ function select(idx){
+ for(var i=0;i<listModel.count;i++)
+ setProperty(i, "is_selected",false)
+ setProperty(idx, "is_selected", true)
+ }
+ }
+
+ ListView {
+ id: listView
+ anchors.fill: parent;anchors.topMargin: 35;anchors.leftMargin: 5;anchors.rightMargin: 5;anchors.bottomMargin: 12
+ model: listModel
+ delegate: listDelegate
+ focus: true
+ }
+
}
ToolBar { id: toolBar; height: 50;
screen.state="mainscreen"
}
onButton2Clicked: {
+ listModel.select(0)
screen.state="mainscreen"
}
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-
import QtQuick 1.0
import "../DatePicker/component" as Comp
dateReel.year_reset()
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
}
--- /dev/null
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
+
+import QtQuick 1.0
+
+Item{
+
+Rectangle {
+ id: rectangle1
+ anchors.fill: parent; anchors.bottomMargin: 0
+ visible: true
+ opacity:0.9
+ color:"white"
+}
+
+ToolBar { id: toolBar; height: 50;
+ y: screen.height-78
+ width: parent.width;
+ button1Label: "Đồng Ý"
+ button2Label: "Hủy Bỏ"
+ onButton1Clicked:
+ {
+ screen.state="menuscreen"
+ }
+ onButton2Clicked: {
+ screen.state="menuscreen"
+ }
+}
+
+}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Rectangle{
id: fullmonthREC
anchors.fill: parent; anchors.bottomMargin: 0
- visible: true
opacity:0.9
Component {
}
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
-
states: [
State {
name: "xemtheothang"
--- /dev/null
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
+import QtQuick 1.0
+
+Item {
+ id:menubutton
+ property string text
+ property string tip
+ property bool selected
+
+ signal clicked
+
+ Rectangle{
+ id:menurectangle
+ color: selected ? "#000000":"#a7bfe8"
+ anchors.fill:parent
+ radius: 8
+ border.color: "#ca8282"
+
+ Text {
+ id: text1
+ x: 20
+ y: 8
+ text:menubutton.text
+ font.bold: true
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 22
+ color:"#404040"
+ }
+
+ Text {
+ id: text2
+ x: 20
+ y: 33
+ text:menubutton.tip
+ font.bold: true
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 16
+ color:"grey"
+ }
+ }
+
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: menurectangle
+ onClicked: { menubutton.clicked(); }
+ }
+
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges { target: menurectangle; color:"white" }
+ }
+ ]
+}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
import QtQuick 1.0
Item{
+
+ id:menuscreen
+
Rectangle {
id: rectangle1
- anchors.fill: parent; anchors.bottomMargin: 0
+ anchors.fill: parent; anchors.bottomMargin: 16
visible: true
opacity:0.9
id: listDelegate
Rectangle {
height:65
- Button {
- id: button1
+ MenuButton {
y: 3; width: parent.parent.width; height: 60
onClicked: {
getText(idm)
}
-
- focus:true
text: name
+ tip: title
}
}
}
id: listModel
ListElement {
- idm:1;name: "Hôm Nay";
+ idm:1;name: "Hôm Nay";title:"Chuyển nhanh đến ngày hôm nay"
+ }
+ ListElement {
+ idm:2; name: "Tới Ngày Âm Lịch";title:"Chọn ngày tháng năm Âm Lịch để chuyển tới"
}
ListElement {
- idm:2; name: "Tới Ngày Âm";
+ idm:3;name: "Tới Ngày Dương Lịch";title:"Chọn ngày tháng năm Dương lịch để chuyến tới"
}
ListElement {
- idm:3;name: "Tới Ngày Dương";
+ idm:4; name: "Xem Ngày Tốt/Xấu, Hoàng Đạo ...";title:"Giờ hòang đạo, sao tốt, sao xấu, nhị thập bát tú, ..."
}
ListElement {
- idm:4; name: "Xem Ngày Tốt/Xấu, Hoàng Đạo ...";
+ idm:5; name: "Xem Theo Tháng";title:"Xem ngày Dương Lịch/Âm Lịch dưới dạng tháng"
}
ListElement {
- idm:5; name: "Xem Theo Tháng";
+ idm:7; name: "Đổi Theme";title:"Thay đổi theme, hình nền, ..."
}
- /*ListElement {
- idm:7; name: "Đổi Theme";
- }*/
ListElement {
- idm:6; name: "Giới Thiệu";
+ idm:8; name: "Đổi Hình Nền";title:"/opt/bar/load.jpg"
+ }
+ ListElement {
+ idm:6; name: "Giới Thiệu";title:"..."
}
}
ListView {
id: listView
- anchors.fill: parent;anchors.topMargin: 35;anchors.leftMargin: 5;anchors.rightMargin: 5;
+ anchors.fill: parent;anchors.topMargin: 35;anchors.leftMargin: 5;anchors.rightMargin: 5;anchors.bottomMargin: 12
model: listModel
delegate: listDelegate
focus: true
}
- ToolBarSingle { id: toolBar; height: 50;
+ ToolBarSingle {
+ id: toolBar; height: 50;
y: screen.height-78
width: parent.width;
button1Label: "Quay Về"
case 5: screen.state="xemtheothang";break;
case 6: screen.state="aboutdialog";break;
case 7: screen.state="changetheme";break;
- default:
- screen.state="nofeaturedialog";break;
+ case 8: screen.state="filebrowser";break;
}
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
+ FileBrowser{
+ id: fileBrowser
+ state:"filebrowser"
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width; height: parent.height-60;
+ x: -(screen.width * 1.5)
+ }
+
+
}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
+++ /dev/null
-/*
-Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-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 <http://www.gnu.org/licenses/>
-*/
-
-import QtQuick 1.0
-
-Item{
- id: item1
-
- Rectangle {
- id: rectangle1
- x: 0
- y: -16
- anchors.centerIn: parent
- width:344
- height: 234
- radius: 4
- gradient: Gradient {
- GradientStop {
- position: 0
- color: "#ffffff"
- }
-
- GradientStop {
- position: 0.97
- color: "#ffffff"
- }
-
- GradientStop {
- position: 0.04
- color: "#aca4c6"
- }
- }
- border.color: "#f3e3e8"
- visible: true
- opacity:0.9
-
- Button {
- id: button2
- x: 102
- anchors.right: parent.right; anchors.rightMargin: 102; y: 185; width: 140; height: 40
- text: "OK"
- onClicked: {screen.state="mainscreen"}
- }
-
- Button {
- id: button3
- x: 298
- y: 6
- width: 39
- height: 40
- text: "X"
- anchors.rightMargin: 56
- onClicked: {screen.state="mainscreen"}
- }
-
- Text {
- id: text1
- x: 132
- y: 100
- width: 80
- height: 20
- color: "#12347e"
- text: "Chức năng này hiện chưa có !"
- font.strikeout: false
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 22
-
- }
- }
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
-}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Rectangle {
id: rectangle1
- anchors.fill: parent; anchors.bottomMargin: 0
+ anchors.fill: parent; anchors.bottomMargin: 16
visible: true
opacity:0.9
}
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
}
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Item {
+ id: scrollBar
+
+ // The properties that define the scrollbar's state.
+ // position and pageSize are in the range 0.0 - 1.0. They are relative to the
+ // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
+ // of the height of the view.
+ // orientation can be either Qt.Vertical or Qt.Horizontal
+ property real position
+ property real pageSize
+ property variant orientation : Qt.Vertical
+
+ // A light, semi-transparent background
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
+ color: "white"
+ opacity: 0.3
+ }
+
+ // Size the bar to the required size, depending upon the orientation.
+ Rectangle {
+ x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
+ color: "black"
+ opacity: 0.7
+ }
+}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
\r
This program is free software: you can redistribute it and/or modify\r
it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation, either version 3 of the License, or\r
+the Free Software Foundation, either version 2 of the License, or\r
(at your option) any later version.\r
\r
This program is distributed in the hope that it will be useful,\r
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
function default_theme(){
return "file:"+root_dir+"themes/default/default.qml";
}
+
+function init(Controller, Model){
+ if(Controller.pathExists(root_dir)){
+ Model.append({idm:2,name: "BLACK",title:"",can_be_deleted:false,is_selected:false})
+ }
+}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
+/*
+Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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 <http://www.gnu.org/licenses/>
+*/
+
import QtQuick 1.0
Rectangle{
Image {
id: topbar_container_image
- source: "./img/topbar.jpg"
+ source: theme_manager.theme.titlebar.sci
width:parent.width
height:50
}
visible: true
opacity:0.9
+
Component {
id: listDelegate
}
}
-
}
+
ListModel {
id: listModel
main_item.huong_xuat_hanh = NTX.huong_xuat_hanh(screen.lunarDayCanChi);
}
- transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
- ]
}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
+the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
Item {
id: screen
- width: 480
- height: 800
+ width: 800
+ height: 480
property int curDay: LC.curDay()
property int curMonth: LC.curMonth()
width: 80
height: 20
color: "#29d999"
- text: "Tháng "+screen.curMonth+" Năm "+screen.curYear
+ textFormat: Text.RichText
+ text: "Tháng <b>"+screen.curMonth+"</b> Năm <b>"+screen.curYear+"</b>"
anchors.horizontalCenter: parent.horizontalCenter
- font.bold: true
+ font.bold: false
font.family: "Tahoma"
smooth: true
horizontalAlignment: Text.AlignHCenter
property int index: 0
onIndexChanged: txtDATEpv.currentIndex = reelx.index
color: "transparent"
+
Component {
id: delegate
Column {
}
}
else
- return theme_manager.theme.markdate.otherday;
+ return "transparent";//theme_manager.theme.markdate.otherday;
}
}
}
}
function init(){
- while(maindatemodel.count>0){
- try{maindatemodel.remove(maindatemodel.count-1)}catch(e){}
- }
-
for(var i=1;i<=LC.calDays(screen.curMonth,screen.curYear);i++)
append({name:i})
}
//-------------------------------------------------
- Component.onCompleted: {
- maindatemodel.init()
- }
Text {
id: txtTHU
x: -(screen.width * 1.5)
}
- NoFeatureDialog{
- id: nofeatureDialog
- state:"nofeaturedialog"
+ About{
+ id: aboutDialog
+ state:"aboutdialog"
anchors.verticalCenter: parent.verticalCenter
width: parent.width; height: parent.height-60;
x: -(screen.width * 1.5)
}
-
- About{
- id: aboutDialog
- state:"aboutdialog"
+ FileBrowser{
+ id: fileBrowser
+ state:"filebrowser"
anchors.verticalCenter: parent.verticalCenter
width: parent.width; height: parent.height-60;
x: -(screen.width * 1.5)
PropertyChanges { target: mouseareaMM;enabled:false }
},
+ State{
+ name:"filebrowser"
+ PropertyChanges { target: fileBrowser; x: 0; focus:true; visible:true;}
+ PropertyChanges { target: toolBar; y: screen.height }
+ PropertyChanges { target: toolBar }
+ },
State {
name: "optionsscreen";
PropertyChanges { target: optionsScreen; x: 0; focus:true}
PropertyChanges { target: changeTheme; x: 0; focus:true}
PropertyChanges { target: toolBar; y: screen.height }
PropertyChanges { target: toolBar }
- PropertyChanges { target: mouseareaMM;enabled:false }
+ PropertyChanges { target: reelx;enabled:false }
+ PropertyChanges { target: mouseareaMM;enabled:false }
},
State {
name: "xemngaytotxauhoangdao";
- PropertyChanges { target: xntxhdScreen; x: 0; focus:true}
+ PropertyChanges { target: xntxhdScreen; x: 0; focus:true;visible:true;}
PropertyChanges { target: toolBar; y: screen.height }
PropertyChanges { target: toolBar }
PropertyChanges { target: mouseareaMM;enabled:false }
}
},
State {
- name: "nofeaturedialog";
- PropertyChanges { target: nofeatureDialog; x: 0; focus:true}
- PropertyChanges { target: toolBar; y: screen.height }
- PropertyChanges { target: toolBar }
- PropertyChanges { target: mouseareaMM;enabled:false }
- PropertyChanges { target: reelx;enabled:false }
- },
- State {
name: "aboutdialog";
- PropertyChanges { target: aboutDialog; x: 0; focus:true}
+ PropertyChanges { target: aboutDialog; x: 0; focus:true; visible:true;}
PropertyChanges { target: toolBar; y: screen.height }
PropertyChanges { target: toolBar }
PropertyChanges { target: mouseareaMM;enabled:false }
},
State {
name: "xemtheothang";
- PropertyChanges { target: fullmonthDialog; x: 0; focus:true}
+ PropertyChanges { target: fullmonthDialog; x: 0; focus:true; visible:true;}
PropertyChanges { target: toolBar; y: screen.height }
PropertyChanges { target: toolBar }
StateChangeScript {
]
transitions: [
- Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }
+ //normally i used InOutBack
+ Transition { NumberAnimation { properties: "x,y,opacity"; duration: 300; easing.type: Easing.InOutBack } }
]
}
Component.onCompleted: {
-
+ amdatetimeDialog.reset()
+ maindatemodel.init()
}
+
}
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusInterface>
+#include <QDir>
+#include <QFileDialog>
+
#if defined(QMLJSDEBUGGER)
#include <qt_private/qdeclarativedebughelper_p.h>
#endif
Q_INVOKABLE void initScreenOrientation(int);
Q_INVOKABLE void minimize();
+signals:
+
+public slots:
+
private:
class QmlApplicationViewerPrivate *m_d;
};