Hotfix for UI
authorCuong Le <cuonglb@ideapad.(none)>
Sat, 10 Sep 2011 16:20:29 +0000 (23:20 +0700)
committerCuong Le <cuonglb@ideapad.(none)>
Sat, 10 Sep 2011 16:20:29 +0000 (23:20 +0700)
lichvietwidget.pro.user
main.cpp
qml/lichvietwidget/main.js
qml/lichvietwidget/main.qml
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_fremantle/control
qtc_packaging/debian_fremantle/rules
settingsdlg.cpp

index 9129176..0b980ba 100644 (file)
     <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
     <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
     <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop Qt 4.7.3 for GCC (Qt SDK) Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">4.7.3 Desktop Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/ba/lichvietwidget-build-desktop</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/lichvietwidget-build-desktop</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
-   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
-    <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
-     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
-      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
-      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
-      <value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
-      <value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
-      <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
-     </valuemap>
-     <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
-      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
-      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
-      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
-      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-     </valuemap>
-     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
-     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
-     <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
-      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
-      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-      <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
-      <value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
-      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-     </valuemap>
-     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
-     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
-    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
-    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop Qt 4.7.3 for GCC (Qt SDK) Debug</value>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/ba/lichvietwidget-build-desktop</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
-   </valuemap>
-   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value>
    <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
      <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
     <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
     <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt for Fremantle PR1.3 Devices (Qt SDK) Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">4.7.0 Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/lichvietwidget-build-maemo</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">Qt4ProjectManager.ToolChain.Maemo:/opt/QtSDK_Maemo/Maemo/4.6.2/targets/fremantle-pr13/bin/gcc.arm-linux-generic-elf-32bit.</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
     <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
     <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt for Fremantle PR1.3 Devices (Qt SDK) Debug</value>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">4.7.0 Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">4.7.0 Release2</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/ba/lichvietwidget-build-maemo</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/cuonglb/Garage/lichvietwidget-build-maemo</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">Qt4ProjectManager.ToolChain.Maemo:/opt/QtSDK_Maemo/Maemo/4.6.2/targets/fremantle-pr13/bin/gcc.arm-linux-generic-elf-32bit.</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
index 6a8418d..c9219f9 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -33,13 +33,8 @@ int main(int argc, char *argv[])
 
     viewer.setMainQmlFile(QLatin1String("/opt/lichvietwidget/qml/lichvietwidget/main.qml"));
 
-    /*
-    viewer.setFixedWidth(390);
-    viewer.setFixedHeight(340);
-    */
-
     QMaemo5HomescreenAdaptor *adaptor = new QMaemo5HomescreenAdaptor(&viewer);
-    adaptor->setSettingsAvailable(true);
+    adaptor->setSettingsAvailable(false);
 
     SettingsDlg settingsdlg;
 
index f380b6f..ee9820e 100644 (file)
@@ -20,7 +20,7 @@ var isday=-1;
 var ismonth=-1;
 var isyear=-1;
 
-function refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail) {
+function refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail, txt_thu) {
     var date = new Date();
 
     var lunar = getLunarDate(date.getDate(),date.getMonth()+1,date.getFullYear());
@@ -29,6 +29,8 @@ function refresh(day_center_img, day_left_img, day_right_img, month_left_img, mo
     var xmonth = lunar.month;
     var xyear = lunar.year;
 
+    txt_thu.text = getTHU(lunar.jd);
+
     txt_detail.text = "Ngày <b>"+lunarCanChi[0]+"</b>, Tháng <b>"+lunarCanChi[1]+"</b><br>Năm <b>"+lunarCanChi[2]+"</b>";
 
     if (xday != isday){
index 6d7fd41..437ccea 100644 (file)
@@ -21,8 +21,8 @@ import "main.js" as Main
 Item {
     id: lichvietwidget
 
-    width: 344
-    height: 200
+    width: 370
+    height: 140
 
     Rectangle {
         id: lvwidgetrec
@@ -30,39 +30,19 @@ Item {
         radius: 8
         opacity: 0.7
         anchors.fill: parent
-
-        Text {
-            id: txt_title
-            x: 133
-            y: 169
-            color: "#ffffff"
-            text: "Lịch Việt"
-            style: Text.Raised
-            font.bold: true
-            wrapMode: Text.WrapAnywhere
-            verticalAlignment: Text.AlignVCenter
-            horizontalAlignment: Text.AlignHCenter
-            font.pixelSize: 18
-            font.family: "Tahoma"
-        }
     }
 
     Rectangle {
         id: rectangle1
         x: 5
         y: 5
-        width: 336
-        height: 157
+        width: 362
+        height: 156
         anchors.fill: parent
         radius: 8
         gradient: Gradient {
             GradientStop {
                 position: 0
-                color: "#000000"
-            }
-
-            GradientStop {
-                position: 0.03
                 color: "#f0eef7"
             }
         }
@@ -70,110 +50,137 @@ Item {
         smooth: true
         z: 0
         anchors.rightMargin: 5
-        anchors.bottomMargin: 40
+        anchors.bottomMargin: 6
         anchors.leftMargin: 5
         anchors.topMargin: 5
         border.color: "#6382c6"
         border.width: 1
-        opacity: 0.9
+        opacity: 0.7
 
         Image {
             id: day_left_img
-            x: -5
-            y: -1
-            width: 100
-            height: 100
+            x: 132
+            y: -2
+            width: 60
+            height: 75
             source: "imgs/1.png"
-            visible:false
+            visible:true
         }
 
         Image {
             id: day_right_img
-            x: 74
-            y: -1
-            width: 100
-            height: 100
-            visible: false
-            source: "imgs/4.png"
+            x: 179
+            y: -2
+            width: 60
+            height: 75
+            visible: true
+            source: "imgs/0.png"
         }
 
         Image {
             id: day_center_img
-            x: 33
-            y: -1
-            width: 100
-            height: 100
+            x: 157
+            y: -2
+            width: 60
+            height: 75
             source: "imgs/4.png"
-            visible: false
+            visible: true
         }
 
         Image {
             id: month_right_img
-            x: 245
-            y: 5
-            width: 50
-            height: 47
+            x: 294
+            y: 2
+            width: 33
+            height: 35
+            visible: true
         }
 
         Image {
             id: month_left_img
-            x: 206
-            y: 5
-            width: 50
-            height: 47
+            x: 265
+            y: 2
+            width: 34
+            height: 35
+            visible: true
         }
 
         Image {
             id: year_1_img
-            x: 167
-            y: 45
-            width: 50
-            height: 47
+            x: 235
+            y: 32
+            width: 35
+            height: 35
         }
 
         Image {
             id: year_2_img
-            x: 206
-            y: 45
-            width: 50
-            height: 47
+            x: 264
+            y: 32
+            width: 35
+            height: 35
         }
 
         Image {
             id: year_3_img
-            x: 245
-            y: 45
-            width: 50
-            height: 47
+            x: 293
+            y: 32
+            width: 35
+            height: 35
         }
 
         Image {
             id: year_4_img
-            x: 284
-            y: 45
-            width: 50
-            height: 47
+            x: 322
+            y: 32
+            width: 35
+            height: 35
         }
 
         Text {
             id: txt_detail
-            x: 62
-            y: 99
-            width: 205
-            color: "#1a1d20"
+            x: 174
+            y: 68
+            color: "#0c0a4d"
             text: ""
-            verticalAlignment: Text.AlignVCenter
-            wrapMode: Text.NoWrap
-            style: Text.Normal
-            font.family: "Tahoma"
+            anchors.horizontalCenterOffset: 0
+            font.family: "Nokia Sans"
+            verticalAlignment: Text.AlignTop
             horizontalAlignment: Text.AlignHCenter
-            font.pixelSize: 20
+            font.pointSize: 16
+            textFormat: Text.RichText
+            anchors.horizontalCenter: parent.horizontalCenter
+        }
+
+        Rectangle {
+            id: rectangle2
+            x: 4
+            y: 7
+            width: 131
+            height: 56
+            color: "#ffffff"
+            radius: 8
+            border.color: "#000000"
+
+            Text {
+                id: txt_thu
+                x: 5
+                y: 11
+                width: 121
+                text: ""
+                verticalAlignment: Text.AlignTop
+                style: Text.Normal
+                horizontalAlignment: Text.AlignHCenter
+                font.bold: true
+                font.pixelSize: 23
+                font.family: "Nokia Sans"
+            }
         }
     }
 
     Timer {
         interval: 1000; running: true; repeat: true
-        onTriggered: Main.refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail)
+        onTriggered: Main.refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail, txt_thu)
     }
 
 }
index f9f9c2f..ecb1594 100644 (file)
@@ -1,5 +1,5 @@
-lichvietwidget (0.1.0) unstable; urgency=low
+lichvietwidget (0.1.0-2) unstable; urgency=low
 
-  * Initial Release.
+  * Latest UI changes/Add some features.
 
- -- Cuong Le <metacuong@gmail.com>  Thu, 08 Sep 2011 16:04:24 +0700
+ -- Cuong Le <metacuong@gmail.com>  Thu, 10 Sep 2011 11:16:24 +0700
index 39276c4..eab0eb6 100644 (file)
@@ -10,7 +10,6 @@ Package: lichvietwidget
 Architecture: any
 Depends:  ${shlibs:Depends}, ${misc:Depends}, qt4-homescreen-loader
 Description: A Widget of Lich Viet for Maemo 5 Hildon desktop
- A Widget of Lich Viet for Maemo 5 Hildon desktop
 XB-Maemo-Display-Name: Lich Viet Widget
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=2242
 XB-Maemo-Icon-26:
index 997bf97..694ff4d 100755 (executable)
 
 APPNAME := lichvietwidget
 builddir:
-        mkdir -p builddir
+       mkdir -p builddir
 
 builddir/Makefile: builddir
-        cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro
+       cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro
 
 build: build-stamp
 
 build-stamp: builddir/Makefile
-        dh_testdir
+       dh_testdir
 
-        # Add here commands to compile the package.
-        cd builddir && $(MAKE)
-        #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+       # Add here commands to compile the package.
+       cd builddir && $(MAKE)
+       #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
 
-        touch $@
+       touch $@
 
 clean:
-        dh_testdir
-        dh_testroot
-        rm -f build-stamp
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
 
-        # Add here commands to clean up after the build process.
-        rm -rf builddir
+       # Add here commands to clean up after the build process.
+       rm -rf builddir
 
-        dh_clean
+       dh_clean 
 
 install: build
-        dh_testdir
-        dh_testroot
-        dh_clean -k
-        dh_installdirs
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
 
-        # Add here commands to install the package into debian/arora.
-        cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
+       # Add here commands to install the package into debian/arora.
+       cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
 
 
 # Build architecture-independent files here.
@@ -53,20 +53,20 @@ binary-indep: build install
 
 # Build architecture-dependent files here.
 binary-arch: build install
-        dh_testdir
-        dh_testroot
-        dh_installdocs
-        dh_installexamples
-        dh_installman
-        dh_link
-        dh_strip
-        dh_compress
-        dh_fixperms
-        dh_installdeb
-        dh_shlibdeps
-        dh_gencontrol
-        dh_md5sums
-        dh_builddeb
+       dh_testdir
+       dh_testroot
+       dh_installdocs
+       dh_installexamples
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
index d274140..20a0189 100644 (file)
@@ -29,13 +29,14 @@ SettingsDlg::SettingsDlg(QWidget *parent) :
     connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
 
     tabWidget = new QTabWidget;
-    tabWidget ->addTab(new GeneralTab(), QString::fromUtf8("Hiển Thị "));
-    tabWidget ->addTab(new ThemeTab(), QString::fromUtf8("Kiểu Mẫu Widget"));
+    tabWidget ->addTab(new ThemeTab(), QString::fromUtf8("Mẫu widget"));
+    tabWidget ->addTab(new GeneralTab(), QString::fromUtf8("Giới thiệu"));
 
     mainLayout = new QGridLayout(this);
 
     mainLayout->addWidget(tabWidget,0,0,1,1);
     mainLayout->addWidget(buttonBox,0,1,1,1);
+
 \
     this->setLayout(mainLayout);
 
@@ -56,8 +57,10 @@ ThemeTab::ThemeTab(QWidget *parent)
      : QWidget(parent)
 {
     themes = new QListWidget(this);
-    themes->addItem(new QListWidgetItem( QString::fromUtf8("Mặc định (344 x 200) pixel.")));
-    themes->addItem(new QListWidgetItem( QString::fromUtf8("Lớn (430 x 500) pixel.")));
+    themes->addItem(new QListWidgetItem( QString::fromUtf8("Mặc định")));
+    themes->addItem(new QListWidgetItem( QString::fromUtf8("Vừa phải")));
+    themes->addItem(new QListWidgetItem( QString::fromUtf8("Lớn")));
+
     mainLayout = new QVBoxLayout;
     mainLayout->addWidget(themes);
     setLayout(mainLayout);