* Know bugs fixed
authorCuong Le <metacuong@gmail.com>
Sun, 18 Sep 2011 16:15:28 +0000 (23:15 +0700)
committerCuong Le <metacuong@gmail.com>
Sun, 18 Sep 2011 16:15:28 +0000 (23:15 +0700)
12 files changed:
lichvietwidget.pro
lichvietwidget.pro.user
main.cpp
qml/lichvietwidget/Button.qml [new file with mode: 0644]
qml/lichvietwidget/main.qml
qml/lichvietwidget/settings.qml [new file with mode: 0644]
qmlapplicationviewer/qmlapplicationviewer.cpp
qmlapplicationviewer/qmlapplicationviewer.h
qmlapplicationviewer/qmlapplicationviewer.pri
qtc_packaging/debian_fremantle/changelog
settingsdlg.cpp
settingsdlg.h

index f8a8a9b..25a2738 100644 (file)
@@ -38,7 +38,9 @@ OTHER_FILES += \
     qtc_packaging/debian_fremantle/copyright \
     qtc_packaging/debian_fremantle/control \
     qtc_packaging/debian_fremantle/compat \
     qtc_packaging/debian_fremantle/copyright \
     qtc_packaging/debian_fremantle/control \
     qtc_packaging/debian_fremantle/compat \
-    qtc_packaging/debian_fremantle/changelog
+    qtc_packaging/debian_fremantle/changelog \
+    qml/lichvietwidget/settings.qml \
+    qml/lichvietwidget/Button.qml
 
 TEMPLATE = app
 
 
 TEMPLATE = app
 
index 0b980ba..c3b1cbf 100644 (file)
@@ -2,7 +2,7 @@
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
-  <value type="int">1</value>
+  <value type="int">0</value>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
     <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.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">4.7.3 Desktop Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop 4.7.3 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-desktop</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-desktop</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">7</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="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.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.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">4.7.0 Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Maemo 5 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="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">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>
-   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
-    <value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">Qt4ProjectManager.ToolChain.Maemo:/opt/QtSDK_Maemo/Maemo/4.6.2/targets/fremantle-pr13/bin/gcc.arm-linux-generic-elf-32bit.</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">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">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.QtVersionId" type="int">6</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="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.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">
      <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
    <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
      <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
       <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy to Maemo5 device</value>
       <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
       <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoDeployStep</value>
       <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy to Maemo5 device</value>
       <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
       <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoDeployStep</value>
-      <value key="Qt4ProjectManager.MaemoRunConfiguration.DeployToSysroot" type="bool">false</value>
+      <value key="Qt4ProjectManager.MaemoRunConfiguration.DeployToSysroot" type="bool">true</value>
       <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">0</value>
       <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles" type="QVariantList"/>
       <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts" type="QVariantList"/>
       <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">0</value>
       <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles" type="QVariantList"/>
       <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts" type="QVariantList"/>
  </data>
  <data>
   <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
  </data>
  <data>
   <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
-  <value type="QString">{11b71d82-22ac-4198-bd51-c62ab18f4700}</value>
+  <value type="QString">{d543d526-18d9-438e-925f-0abd8634c84c}</value>
  </data>
  <data>
   <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
  </data>
  <data>
   <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
index c9219f9..8356266 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
     viewer.setMainQmlFile(QLatin1String("/opt/lichvietwidget/qml/lichvietwidget/main.qml"));
 
     QMaemo5HomescreenAdaptor *adaptor = new QMaemo5HomescreenAdaptor(&viewer);
     viewer.setMainQmlFile(QLatin1String("/opt/lichvietwidget/qml/lichvietwidget/main.qml"));
 
     QMaemo5HomescreenAdaptor *adaptor = new QMaemo5HomescreenAdaptor(&viewer);
-    adaptor->setSettingsAvailable(false);
+    adaptor->setSettingsAvailable(true);
 
     SettingsDlg settingsdlg;
 
 
     SettingsDlg settingsdlg;
 
diff --git a/qml/lichvietwidget/Button.qml b/qml/lichvietwidget/Button.qml
new file mode 100644 (file)
index 0000000..1c1c2ed
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+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: 18
+            color:"black"
+        }
+    }
+
+    MouseArea {
+        id: mouseRegion
+        anchors.fill: menurectangle
+        onClicked: { menubutton.clicked(); }
+    }
+
+    states: [
+        State {
+            name: "Pressed"
+            when: mouseRegion.pressed == true
+            PropertyChanges { target: menurectangle; color:"white" }
+        }
+    ]
+}
index 437ccea..5653999 100644 (file)
@@ -64,7 +64,7 @@ Item {
             width: 60
             height: 75
             source: "imgs/1.png"
             width: 60
             height: 75
             source: "imgs/1.png"
-            visible:true
+            visible:false
         }
 
         Image {
         }
 
         Image {
@@ -73,7 +73,7 @@ Item {
             y: -2
             width: 60
             height: 75
             y: -2
             width: 60
             height: 75
-            visible: true
+            visible: false
             source: "imgs/0.png"
         }
 
             source: "imgs/0.png"
         }
 
@@ -84,7 +84,7 @@ Item {
             width: 60
             height: 75
             source: "imgs/4.png"
             width: 60
             height: 75
             source: "imgs/4.png"
-            visible: true
+            visible: false
         }
 
         Image {
         }
 
         Image {
@@ -141,7 +141,6 @@ Item {
             id: txt_detail
             x: 174
             y: 68
             id: txt_detail
             x: 174
             y: 68
-            color: "#0c0a4d"
             text: ""
             anchors.horizontalCenterOffset: 0
             font.family: "Nokia Sans"
             text: ""
             anchors.horizontalCenterOffset: 0
             font.family: "Nokia Sans"
diff --git a/qml/lichvietwidget/settings.qml b/qml/lichvietwidget/settings.qml
new file mode 100644 (file)
index 0000000..db6d39b
--- /dev/null
@@ -0,0 +1,54 @@
+import QtQuick 1.0
+
+Rectangle {
+    id: rectangle1
+    width: 550
+    height: 300
+    color:"transparent"
+
+
+    Component {
+            id: listDelegate
+            Rectangle {
+                height:65
+                Button {
+                    y: 3; width: rectangle1.width; height: 60
+                    onClicked: {
+                    }
+                    text: name
+                    tip: title
+                }
+            }
+        }
+
+    ListModel {
+             id: listModel
+
+             ListElement {
+                 idm:1;name: "Màu nền";title:"Transparent, opacity=0.3"
+             }
+             ListElement {
+                 idm:1;name: "Kích thước, mẫu định dạng widget";title:"Mặc định"
+             }
+             ListElement {
+                 idm:1;name: "Tự động chuyển ngày mới";title:"Bật"
+             }
+             ListElement {
+                 idm:1;name: "Thời gian kiểm tra qua ngày mới";title:"1000 ms"
+             }
+             ListElement {
+                 idm:1;name: "Khởi động Lich Viet khi nhấn lên widget";title:"Bật"
+             }
+
+             Component.onCompleted: {
+             }
+     }
+
+    ListView {
+          id: listView
+          anchors.fill: parent;anchors.leftMargin: 0;
+          model: listModel
+          delegate: listDelegate
+          focus: true
+    }
+}
index b3e862c..8e0aa88 100644 (file)
@@ -1,4 +1,4 @@
-// checksum 0x7895 version 0x4000b
+// checksum 0xfe24 version 0x6000e
 /*
   This file was generated by the Qt Quick Application wizard of Qt Creator.
   QmlApplicationViewer is a convenience class containing mobile device specific
 /*
   This file was generated by the Qt Quick Application wizard of Qt Creator.
   QmlApplicationViewer is a convenience class containing mobile device specific
 #include <QtDeclarative/QDeclarativeEngine>
 #include <QtDeclarative/QDeclarativeContext>
 
 #include <QtDeclarative/QDeclarativeEngine>
 #include <QtDeclarative/QDeclarativeContext>
 
-#if defined(QMLJSDEBUGGER)
+#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800
+
 #include <qt_private/qdeclarativedebughelper_p.h>
 #include <qt_private/qdeclarativedebughelper_p.h>
-#endif
 
 
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
+#if !defined(NO_JSDEBUGGER)
 #include <jsdebuggeragent.h>
 #endif
 #include <jsdebuggeragent.h>
 #endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
+#if !defined(NO_QMLOBSERVER)
 #include <qdeclarativeviewobserver.h>
 #endif
 
 #include <qdeclarativeviewobserver.h>
 #endif
 
-#if defined(QMLJSDEBUGGER)
-
 // Enable debugging before any QDeclarativeEngine is created
 struct QmlJsDebuggingEnabler
 {
 // Enable debugging before any QDeclarativeEngine is created
 struct QmlJsDebuggingEnabler
 {
@@ -77,12 +75,15 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
 {
     connect(engine(), SIGNAL(quit()), SLOT(close()));
     setResizeMode(QDeclarativeView::SizeRootObjectToView);
 {
     connect(engine(), SIGNAL(quit()), SLOT(close()));
     setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
+    // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in
+#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800
+#if !defined(NO_JSDEBUGGER)
     new QmlJSDebugger::JSDebuggerAgent(engine());
 #endif
     new QmlJSDebugger::JSDebuggerAgent(engine());
 #endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
+#if !defined(NO_QMLOBSERVER)
     new QmlJSDebugger::QDeclarativeViewObserver(this, this);
 #endif
     new QmlJSDebugger::QDeclarativeViewObserver(this, this);
 #endif
+#endif
 }
 
 QmlApplicationViewer::~QmlApplicationViewer()
 }
 
 QmlApplicationViewer::~QmlApplicationViewer()
@@ -146,7 +147,7 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
 
 void QmlApplicationViewer::showExpanded()
 {
 
 void QmlApplicationViewer::showExpanded()
 {
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
     showFullScreen();
 #elif defined(Q_WS_MAEMO_5)
     showMaximized();
     showFullScreen();
 #elif defined(Q_WS_MAEMO_5)
     showMaximized();
index 19875a3..83b9575 100644 (file)
@@ -1,4 +1,4 @@
-// checksum 0x382f version 0x4000b
+// checksum 0x382f version 0x6000e
 /*
   This file was generated by the Qt Quick Application wizard of Qt Creator.
   QmlApplicationViewer is a convenience class containing mobile device specific
 /*
   This file was generated by the Qt Quick Application wizard of Qt Creator.
   QmlApplicationViewer is a convenience class containing mobile device specific
index b07f873..86d980f 100644 (file)
@@ -1,4 +1,4 @@
-# checksum 0xcaf1 version 0x4000b
+# checksum 0x82af version 0x6000e
 # This file was generated by the Qt Quick Application wizard of Qt Creator.
 # The code below adds the QmlApplicationViewer to the project and handles the
 # activation of QML debugging.
 # This file was generated by the Qt Quick Application wizard of Qt Creator.
 # The code below adds the QmlApplicationViewer to the project and handles the
 # activation of QML debugging.
@@ -70,9 +70,16 @@ symbian {
     }
 } else:unix {
     maemo5 {
     }
 } else:unix {
     maemo5 {
+        desktopfile.files = $${TARGET}.desktop
         desktopfile.path = /usr/share/applications/hildon
         desktopfile.path = /usr/share/applications/hildon
-    } else {
+        icon.files = $${TARGET}64.png
+        icon.path = /usr/share/icons/hicolor/64x64/apps
+    } else:!isEmpty(MEEGO_VERSION_MAJOR) {
+        desktopfile.files = $${TARGET}_harmattan.desktop
         desktopfile.path = /usr/share/applications
         desktopfile.path = /usr/share/applications
+        icon.files = $${TARGET}80.png
+        icon.path = /usr/share/icons/hicolor/80x80/apps
+    } else { # Assumed to be a Desktop Unix
         copyCommand =
         for(deploymentfolder, DEPLOYMENTFOLDERS) {
             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
         copyCommand =
         for(deploymentfolder, DEPLOYMENTFOLDERS) {
             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
@@ -111,16 +118,18 @@ symbian {
         export($$itempath)
         INSTALLS += $$item
     }
         export($$itempath)
         INSTALLS += $$item
     }
-    icon.files = $${TARGET}.png
-    icon.path = /usr/share/icons/hicolor/64x64/apps
-    desktopfile.files = $${TARGET}.desktop
+
+    !isEmpty(desktopfile.path) {
+        export(icon.files)
+        export(icon.path)
+        export(desktopfile.files)
+        export(desktopfile.path)
+        INSTALLS += icon desktopfile
+    }
+
     target.path = $${installPrefix}/bin
     target.path = $${installPrefix}/bin
-    export(icon.files)
-    export(icon.path)
-    export(desktopfile.files)
-    export(desktopfile.path)
     export(target.path)
     export(target.path)
-    INSTALLS += desktopfile icon target
+    INSTALLS += target
 }
 
 export (ICON)
 }
 
 export (ICON)
index ecb1594..a9255dd 100644 (file)
@@ -1,5 +1,5 @@
-lichvietwidget (0.1.0-2) unstable; urgency=low
+lichvietwidget (0.1.0-3) unstable; urgency=low
 
 
-  * Latest UI changes/Add some features.
+  * Know bugs fixed.
 
 
- -- Cuong Le <metacuong@gmail.com>  Thu, 10 Sep 2011 11:16:24 +0700
+ -- Cuong Le <metacuong@gmail.com>  Thu, 10 Sep 2011 11:33:24 +0700
index 20a0189..ec37296 100644 (file)
@@ -28,41 +28,27 @@ SettingsDlg::SettingsDlg(QWidget *parent) :
     connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
     connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
 
     connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
     connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
 
-    tabWidget = new QTabWidget;
-    tabWidget ->addTab(new ThemeTab(), QString::fromUtf8("Mẫu widget"));
-    tabWidget ->addTab(new GeneralTab(), QString::fromUtf8("Giới thiệu"));
+    vboxlayout = new QVBoxLayout;
+    vboxlayout1 = new QVBoxLayout;
 
     mainLayout = new QGridLayout(this);
 
 
     mainLayout = new QGridLayout(this);
 
-    mainLayout->addWidget(tabWidget,0,0,1,1);
-    mainLayout->addWidget(buttonBox,0,1,1,1);
+    vboxlayout1->addWidget(buttonBox);
 
 
+    view = new QDeclarativeView(this);
+    view->setSource(QUrl("/opt/lichvietwidget/qml/lichvietwidget/settings.qml"));
+
+    vboxlayout->addWidget(view);
+
+    mainLayout->addLayout(vboxlayout,0 ,0,1,1);
+    mainLayout->addLayout(vboxlayout1,0,1,1,1);
 \
     this->setLayout(mainLayout);
 
 }
 
 void SettingsDlg::showSettingsDialog(){
 \
     this->setLayout(mainLayout);
 
 }
 
 void SettingsDlg::showSettingsDialog(){
+    this->setMinimumHeight(325);
     this->show();
 }
 
     this->show();
 }
 
-GeneralTab::GeneralTab(QWidget *parent)
-     : QWidget(parent)
-{
-    mainLayout = new QVBoxLayout;
-    setLayout(mainLayout);
-}
-
-ThemeTab::ThemeTab(QWidget *parent)
-     : QWidget(parent)
-{
-    themes = new QListWidget(this);
-    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);
-}
-
index b30767e..8691a4b 100644 (file)
@@ -24,8 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QGridLayout>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QGridLayout>
-#include <QListWidget>
-#include <QListWidgetItem>
+#include <QPushButton>
+#include <QDeclarativeView>
 
 class SettingsDlg : public QDialog
 {
 
 class SettingsDlg : public QDialog
 {
@@ -34,9 +34,12 @@ public:
     explicit SettingsDlg(QWidget *parent = 0);
 
 private:
     explicit SettingsDlg(QWidget *parent = 0);
 
 private:
-    QTabWidget *tabWidget;
     QDialogButtonBox *buttonBox;
     QGridLayout *mainLayout;
     QDialogButtonBox *buttonBox;
     QGridLayout *mainLayout;
+    QVBoxLayout *vboxlayout;
+    QVBoxLayout *vboxlayout1;
+
+    QDeclarativeView *view;
 
 signals:
 
 
 signals:
 
@@ -45,29 +48,4 @@ public slots:
 
 };
 
 
 };
 
-class GeneralTab : public QWidget
-{
-    Q_OBJECT
-
-private:
-    QVBoxLayout *mainLayout;
-
-public:
-    GeneralTab(QWidget *parent = 0);
-};
-
-class ThemeTab : public QWidget
-{
-    Q_OBJECT
-
-private:
-    QVBoxLayout *mainLayout;
-    QListWidget *themes;
-
-
-public:
-    ThemeTab(QWidget *parent = 0);
-};
-
-
 #endif // SETTINGSDLG_H
 #endif // SETTINGSDLG_H