* first commit from develop
authorCuong Le <cuonglb@ideapad.(none)>
Thu, 8 Sep 2011 17:40:21 +0000 (00:40 +0700)
committerCuong Le <cuonglb@ideapad.(none)>
Thu, 8 Sep 2011 17:40:21 +0000 (00:40 +0700)
36 files changed:
.gitignore [new file with mode: 0644]
Contributors.txt [new file with mode: 0644]
Licence.txt [new file with mode: 0644]
lichvietwidget.desktop [new file with mode: 0644]
lichvietwidget.png [new file with mode: 0644]
lichvietwidget.pro [new file with mode: 0644]
lichvietwidget.pro.user [new file with mode: 0644]
lichvietwidget.svg [new file with mode: 0644]
main.cpp [new file with mode: 0644]
qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.cpp [new file with mode: 0644]
qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.h [new file with mode: 0644]
qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.pri [new file with mode: 0644]
qml/lichvietwidget/imgs/0.png [new file with mode: 0644]
qml/lichvietwidget/imgs/1.png [new file with mode: 0644]
qml/lichvietwidget/imgs/2.png [new file with mode: 0644]
qml/lichvietwidget/imgs/3.png [new file with mode: 0644]
qml/lichvietwidget/imgs/4.png [new file with mode: 0644]
qml/lichvietwidget/imgs/5.png [new file with mode: 0644]
qml/lichvietwidget/imgs/6.png [new file with mode: 0644]
qml/lichvietwidget/imgs/7.png [new file with mode: 0644]
qml/lichvietwidget/imgs/8.png [new file with mode: 0644]
qml/lichvietwidget/imgs/9.png [new file with mode: 0644]
qml/lichvietwidget/imgs/logo.png [new file with mode: 0644]
qml/lichvietwidget/main.js [new file with mode: 0644]
qml/lichvietwidget/main.qml [new file with mode: 0644]
qmlapplicationviewer/qmlapplicationviewer.cpp [new file with mode: 0644]
qmlapplicationviewer/qmlapplicationviewer.h [new file with mode: 0644]
qmlapplicationviewer/qmlapplicationviewer.pri [new file with mode: 0644]
qtc_packaging/debian_fremantle/README [new file with mode: 0644]
qtc_packaging/debian_fremantle/changelog [new file with mode: 0644]
qtc_packaging/debian_fremantle/compat [new file with mode: 0644]
qtc_packaging/debian_fremantle/control [new file with mode: 0644]
qtc_packaging/debian_fremantle/copyright [new file with mode: 0644]
qtc_packaging/debian_fremantle/rules [new file with mode: 0755]
settingsdlg.cpp [new file with mode: 0644]
settingsdlg.h [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..75c107b
--- /dev/null
@@ -0,0 +1 @@
+*.pro.user
diff --git a/Contributors.txt b/Contributors.txt
new file mode 100644 (file)
index 0000000..7d8616d
--- /dev/null
@@ -0,0 +1,7 @@
+Cuong Le <metacuong@gmail.com>
+ - project owner
+ - Qt and QML gui bits
+
+Guy Hoffman <ghoffman@gmail.com>
+ - Many thanks to Guy & R E S P E C T for its good and precious graphics work.
+ - http://web.media.mit.edu/~guy/blog/entry.php?14070701
\ No newline at end of file
diff --git a/Licence.txt b/Licence.txt
new file mode 100644 (file)
index 0000000..4f3d3e8
--- /dev/null
@@ -0,0 +1,278 @@
+        GNU GENERAL PUBLIC LICENSE\r
+           Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+          Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Lesser General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+        GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+          NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
diff --git a/lichvietwidget.desktop b/lichvietwidget.desktop
new file mode 100644 (file)
index 0000000..2eef551
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=LichViet Widget
+Comment=A Widget for Maemo 5 Hildon desktop
+Type=qt
+X-Path=lichvietwidget
+X-Multiple-Instances=false
+X-home-applet-minwidth=390
+X-home-applet-minheight=340
+
diff --git a/lichvietwidget.png b/lichvietwidget.png
new file mode 100644 (file)
index 0000000..707d5c4
Binary files /dev/null and b/lichvietwidget.png differ
diff --git a/lichvietwidget.pro b/lichvietwidget.pro
new file mode 100644 (file)
index 0000000..f8a8a9b
--- /dev/null
@@ -0,0 +1,53 @@
+# Add more folders to ship with the application, here
+folder_01.source = qml/lichvietwidget
+folder_01.target = qml
+DEPLOYMENTFOLDERS = folder_01
+
+# Additional import path used to resolve QML modules in Creator's code model
+QML_IMPORT_PATH =
+
+symbian:TARGET.UID3 = 0xE16CE0E8
+
+# Smart Installer package's UID
+# This UID is from the protected range and therefore the package will
+# fail to install if self-signed. By default qmake uses the unprotected
+# range value if unprotected UID is defined for the application and
+# 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
+# Allow network access on Symbian
+# symbian:TARGET.CAPABILITY += NetworkServices
+
+# If your application uses the Qt Mobility libraries, uncomment the following
+# lines and add the respective components to the MOBILITY variable.
+# CONFIG += mobility
+# MOBILITY +=
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp \
+    settingsdlg.cpp
+
+# Please do not modify the following two lines. Required for deployment.
+include(qmlapplicationviewer/qmlapplicationviewer.pri)
+include(qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.pri)
+qtcAddDeployment()
+
+OTHER_FILES += \
+    qtc_packaging/debian_fremantle/rules \
+    qtc_packaging/debian_fremantle/README \
+    qtc_packaging/debian_fremantle/copyright \
+    qtc_packaging/debian_fremantle/control \
+    qtc_packaging/debian_fremantle/compat \
+    qtc_packaging/debian_fremantle/changelog
+
+TEMPLATE = app
+
+desktop.path = /usr/share/applications/hildon-home
+desktop.files = lichvietwidget.desktop
+
+target.path = /usr/lib/hildon-desktop
+
+INSTALLS += target desktop
+
+HEADERS += \
+    settingsdlg.h
diff --git a/lichvietwidget.pro.user b/lichvietwidget.pro.user
new file mode 100644 (file)
index 0000000..9129176
--- /dev/null
@@ -0,0 +1,388 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value key="EditorConfiguration.AutoIndent" type="bool">true</value>
+   <value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
+   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+   <value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
+   <value key="EditorConfiguration.IndentBraces" type="bool">false</value>
+   <value key="EditorConfiguration.IndentSize" type="int">4</value>
+   <value key="EditorConfiguration.MouseNavigation" type="bool">true</value>
+   <value key="EditorConfiguration.PaddingMode" type="int">1</value>
+   <value key="EditorConfiguration.ScrollWheelZooming" type="bool">true</value>
+   <value key="EditorConfiguration.SmartBackspace" type="bool">false</value>
+   <value key="EditorConfiguration.SpacesForTabs" type="bool">true</value>
+   <value key="EditorConfiguration.TabKeyBehavior" type="int">0</value>
+   <value key="EditorConfiguration.TabSize" type="int">8</value>
+   <value key="EditorConfiguration.UseGlobal" type="bool">true</value>
+   <value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
+   <value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
+   <value key="EditorConfiguration.cleanIndentation" type="bool">true</value>
+   <value key="EditorConfiguration.cleanWhitespace" type="bool">true</value>
+   <value key="EditorConfiguration.inEntireDocument" type="bool">false</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" 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) 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.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>
+   <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.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
+    <value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
+    <valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
+    <value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
+    <valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">lichvietwidget</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QString"></value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">lichvietwidget.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+    <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+    <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+    <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Maemo5</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo5</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" 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">Qt for Fremantle PR1.3 Devices (Qt SDK) 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.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">Qt for Fremantle PR1.3 Devices (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-maemo</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</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.Target.BuildConfigurationCount" type="int">2</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">
+      <value key="Packaging Enabled" type="bool">true</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Packaging for Maemo</value>
+      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
+     </valuemap>
+     <valuemap key="ProjectExplorer.BuildStepList.Step.1" 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="Qt4ProjectManager.MaemoRunConfiguration.DeployToSysroot" type="bool">false</value>
+      <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">0</value>
+      <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles" type="QVariantList"/>
+      <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts" type="QVariantList"/>
+      <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths" type="QVariantList"/>
+      <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes" type="QVariantList"/>
+     </valuemap>
+     <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</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">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
+    <value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
+    <valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
+    <value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
+    <value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
+    <valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">lichvietwidget</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
+    <value key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QString"></value>
+    <value key="Qt4ProjectManager.MaemoRunConfiguration.BaseEnvironmentBase" type="int">1</value>
+    <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.ExportedLocalDirs" type="QVariantList"/>
+    <value key="Qt4ProjectManager.MaemoRunConfiguration.ProFile" type="QString">lichvietwidget.pro</value>
+    <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.RemoteMountPoints" type="QVariantList"/>
+    <value key="Qt4ProjectManager.MaemoRunConfiguration.UseRemoteGdb" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+    <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+    <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
+  <value type="QString">{11b71d82-22ac-4198-bd51-c62ab18f4700}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">9</value>
+ </data>
+</qtcreator>
diff --git a/lichvietwidget.svg b/lichvietwidget.svg
new file mode 100644 (file)
index 0000000..566acfa
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   height="44px"
+   version="1.1"
+   viewBox="0 0 44 44"
+   width="44px"
+   x="0px"
+   y="0px"
+   id="svg2"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="qt.svg">
+  <metadata
+     id="metadata18">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs16">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 22 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="44 : 22 : 1"
+       inkscape:persp3d-origin="22 : 14.666667 : 1"
+       id="perspective2836" />
+  </defs>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1020"
+     id="namedview14"
+     showgrid="false"
+     inkscape:zoom="21.454545"
+     inkscape:cx="49.412871"
+     inkscape:cy="21.894358"
+     inkscape:window-x="-4"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g3" />
+  <g
+     transform="matrix(0.18308778,0,0,0.18308778,6.6100946,3.2385199)"
+     id="g3">
+    <path
+       d="M 43.09,0.3586 C 40.94,0.0036 38.84,-0.0824 36.81,0.0776 31.968136,0.39505671 27.122677,0.73638425 22.28,1.0696 9.62,2.0816 0,12.4996 0,26.8896 l 0,169.7 14.19,13.2 28.87,-209.42 0.03,-0.011 z"
+       style="fill:#006225"
+       id="path5"
+       sodipodi:nodetypes="cccccccc" />
+    <path
+       d="m 174.4,160 c 0,12.5 -7.75,24.07 -17.57,25.77 L 14.23,209.73 V 25.93 C 14.23,9.21 27.57,-2.27 43.12,0.3 l 131.3,21.52 v 138.2 z"
+       style="fill:#80c342"
+       id="path7" />
+    <path
+       d="m 154.9,80.96 -12.96,-0.598 0,0.278 6.945,0.32 6.016,0 z"
+       style="fill:#006225"
+       id="path11" />
+    <path
+       d="m 144.6,135.6 c 0.66,0.328 1.43,0.476 2.351,0.476 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 h -6.015 c -1.821,0.832 -3.532,1.457 -5.176,1.848 z"
+       style="fill:#006225"
+       id="path13" />
+    <path
+       id="path17"
+       style="fill:#ffffff"
+       d="m 91.15,132.4 c 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -4.34,0 -7.68,2.535 -10.01,7.625 -2.52,5.543 -3.793,17.04 -3.793,34.44 0,16.82 1.238,28.75 3.734,35.75 2.356,6.672 5.879,9.976 10.5,9.976 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 m 17.98,3.75 c -4.117,9.707 -10.39,16.06 -18.99,19 0.867,4.449 2.176,7.441 3.922,9.019 1.351,1.211 3.433,1.821 6.222,1.821 0.805,0 1.668,-0.055 2.59,-0.157 v 13.12 l -5.961,0.782 c -1.758,0.23 -3.426,0.343 -5.004,0.343 -5.218,0 -9.445,-1.265 -12.62,-3.824 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 1.629,0 3.309,0.102 5.043,0.305 11.95,1.375 20.62,7.016 26.26,16.79 5.535,9.562 8.254,23.27 8.254,41.26 0,16.48 -2,29.45 -6.043,39.02 z M 130.4,45.91 l 11.52,1.238 0,20.21 12.96,0.914 0,12.68 -12.96,-0.598 0,46.33 c 0,4.032 0.445,6.625 1.34,7.789 0.8,1.067 2.046,1.594 3.71,1.594 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 v 11.65 c -5.136,2.258 -10.18,3.598 -15.12,4.02 -0.718,0.055 -1.41,0.086 -2.078,0.086 -4.48,0 -7.906,-1.301 -10.25,-3.934 -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.535 L 118.046,79.25 V 65.66 l 7.586,0.547 4.773,-20.3 z" />
+    <path
+       d="m 100.3,166 c 0.809,0 1.672,-0.055 2.59,-0.157 H 98.054 C 98.73,165.949 99.507,166 100.3,166 z"
+       style="fill:#006225"
+       id="path19" />
+    <path
+       id="path21"
+       style="fill:#006225"
+       d="m 84.85,63.98 c 2.336,5.997 3.484,16.92 3.484,32.81 0,17.7 -1.16,29.57 -3.512,35.62 -1.894,4.879 -4.527,7.902 -7.863,9.07 0.965,0.368 1.992,0.551 3.078,0.551 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -1.09,0 -2.117,0.16 -3.082,0.481 h -0.004 c 3.601,1.121 6.379,4.215 8.336,9.261 z m -2.344,114.3 c -0.113,-0.05 -0.227,-0.105 -0.336,-0.16 -0.012,-0.004 -0.023,-0.012 -0.035,-0.015 -0.102,-0.051 -0.207,-0.106 -0.309,-0.157 -0.019,-0.011 -0.039,-0.019 -0.058,-0.031 -0.09,-0.051 -0.184,-0.098 -0.278,-0.148 -0.027,-0.016 -0.054,-0.036 -0.086,-0.051 -0.082,-0.043 -0.164,-0.09 -0.242,-0.137 -0.039,-0.023 -0.078,-0.047 -0.113,-0.07 -0.07,-0.039 -0.145,-0.082 -0.215,-0.125 -0.047,-0.031 -0.094,-0.059 -0.14,-0.09 -0.059,-0.039 -0.118,-0.074 -0.176,-0.113 -0.059,-0.039 -0.114,-0.075 -0.168,-0.114 -0.051,-0.031 -0.102,-0.066 -0.149,-0.097 -0.066,-0.047 -0.132,-0.094 -0.195,-0.137 -0.039,-0.027 -0.078,-0.055 -0.113,-0.082 -0.078,-0.055 -0.153,-0.113 -0.231,-0.172 -0.023,-0.016 -0.05,-0.035 -0.078,-0.055 -0.098,-0.078 -0.199,-0.156 -0.297,-0.234 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 h -6.351 c -10.15,0.008 -18.22,3.977 -24,12.04 -6.855,9.563 -10.34,24.64 -10.34,45.07 0,18.95 2.547,33.44 7.551,43.34 4.934,9.75 12.05,15.56 21.19,17.5 1.989,9.641 5.09,16.16 9.297,19.54 3.176,2.559 7.403,3.824 12.62,3.824 0.098,0 0.199,0 0.297,-0.004 h 5.539 c -3.406,-0.05 -6.383,-0.66 -8.906,-1.828 L 82.498,178.28 z M 128.4,145.6 c -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.57 l -6.226,-0.285 v -13.59 h -6.016 v 3.035 c 0.871,3.273 1.555,6.82 2.063,10.64 l 4.164,0.192 v 51.36 c 0,6.723 1.367,11.62 4.09,14.67 2.343,2.633 5.765,3.934 10.25,3.934 h 6.015 c -4.48,0 -7.906,-1.301 -10.25,-3.934 z m 2.043,-99.66 -6.016,0 -4.668,19.88 5.911,0.422 4.773,-20.3 z" />
+  </g>
+</svg>
diff --git a/main.cpp b/main.cpp
new file mode 100644 (file)
index 0000000..a7cb52c
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,34 @@
+#include <QtGui/QApplication>
+
+#include "qmlapplicationviewer.h"
+#include "qmaemo5homescreenadaptor.h"
+
+#include "settingsdlg.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+
+    QmlApplicationViewer viewer;
+
+    viewer.setStyleSheet("background:transparent");
+    viewer.setAttribute(Qt::WA_TranslucentBackground);
+
+    viewer.setMainQmlFile(QLatin1String("/opt/lichvietwidget/qml/lichvietwidget/main.qml"));
+
+    /*
+    viewer.setFixedWidth(390);
+    viewer.setFixedHeight(340);
+    */
+
+    QMaemo5HomescreenAdaptor *adaptor = new QMaemo5HomescreenAdaptor(&viewer);
+    adaptor->setSettingsAvailable(true);
+
+    SettingsDlg settingsdlg;
+
+    QObject::connect(adaptor, SIGNAL(settingsRequested()), &settingsdlg, SLOT(showSettingsDialog()));
+
+    viewer.show();
+
+    app.exec();
+}
diff --git a/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.cpp b/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.cpp
new file mode 100644 (file)
index 0000000..bc0f53d
--- /dev/null
@@ -0,0 +1,336 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights.  These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmaemo5homescreenadaptor.h"
+
+#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qpointer.h>
+
+#include <QtGui/qapplication.h>
+#include <QtGui/qx11info_x11.h>
+#include <QtGui/qwidget.h>
+#include <QtGui/qevent.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+
+static QCoreApplication::EventFilter oldEventFilter;
+static QList<QMaemo5HomescreenAdaptor *> allDesktopItems;
+
+static Atom atomByName(const char *name)
+{
+    Atom atom = XInternAtom(QX11Info::display(), name, False);
+    if (!atom)
+        qWarning("Unable to obtain %s atom. This class requires a running Hildon session.", name);
+
+    return atom;
+}
+
+enum HomescreenAtoms
+{
+    HildonAppletId               = 0,
+    NetWmWindowType              = 1,
+    Utf8String                   = 2,
+    HildonTypeHomeApplet         = 3,
+    HildonAppletSettings         = 4,
+    HildonAppletShowSettings     = 5,
+    HildonAppletOnCurrentDesktop = 6,
+    EnumCount                    = 7
+};
+
+static Atom hsAtoms[EnumCount] = { 0, 0, 0, 0, 0, 0, 0 };
+
+static void initAtoms()
+{
+    hsAtoms[HildonAppletId] = atomByName("_HILDON_APPLET_ID");
+    hsAtoms[NetWmWindowType] = atomByName("_NET_WM_WINDOW_TYPE");
+    hsAtoms[Utf8String] = atomByName("UTF8_STRING");
+    hsAtoms[HildonTypeHomeApplet] = atomByName("_HILDON_WM_WINDOW_TYPE_HOME_APPLET");
+    hsAtoms[HildonAppletSettings] = atomByName("_HILDON_APPLET_SETTINGS");
+    hsAtoms[HildonAppletShowSettings] = atomByName("_HILDON_APPLET_SHOW_SETTINGS");
+    hsAtoms[HildonAppletOnCurrentDesktop] = atomByName("_HILDON_APPLET_ON_CURRENT_DESKTOP");
+}
+
+/*! \class QMaemo5HomescreenAdaptor
+
+    \brief The QMaemo5HomescreenAdaptor flags a top-level QWidget as homescreen widget
+
+    QMaemo5HomescreenAdaptor is used in conjunction with the Qt for Maemo homescreen
+    loader. It evaluates the two command line arguments "-plugin-id" and "-write-pipe"
+    to set up a Qt top-level widget as Maemo 5 homescreen widget.
+
+    Note: By default, the widget will have a black background. In order to make the
+    widget transparent, set the Qt::WA_TranslucentBackground widget attribute.
+
+    Example:
+
+    \code
+    QLabel *label = new QLabel("Hello Homescreen");
+    new QMaemo5HomescreenAdaptor(label);
+    label->show();
+    \endcode
+
+    Maemo 5 supports homescreen widgets with settings dialogs. To use it, set
+    the settingsAvailable() property and show a settings dialog when the
+    settingsRequested() signal is emitted.
+
+    Maemo 5 supports more than one homescreen. In order to determine whether
+    the homescreen widget is on the currently visible homescreen, connect to
+    the homescreenChanged() signal.
+*/
+
+/*! \property QMaemo5HomescreenAdaptor::settingsAvailable
+
+    Set this property to true if the widget can make use of a settings dialog,
+    otherwise to false. When this property is set to true, the Maemo 5 homescreen
+    renders a small settings icon on top of the homescreen widget when the
+    user enters the desktop menu. When the user clicks that settings icon, the
+    settingsRequested() signal is emitted.
+
+    The default is false.
+
+    \sa settingsRequested()
+ */
+
+/*! \fn void settingsRequested()
+
+    This signal is emitted every time the homescreen widget's settings icon is
+    invoked by the user. Note that this icon is only visible when the settingsAvailable()
+    property is set.
+
+    \sa settingsAvailable()
+ */
+
+/*! \fn void homescreenChanged(bool isOnCurrentHomescreen)
+
+    This is signal is emitted when current homescreen changes and the homescreen
+    widget becomes visible or invisible. The \a isOnCurrentHomescreen argument
+    indicates whether the homescreen widget is on the current homescreen or not.
+
+    This signal can be used to start/stop background processing in order to save
+    battery life.
+ */
+
+/*!
+    Constructs a new QMaemo5HomescreenAdaptor for the given \a widget.
+
+    Note: The widget must be a top-level widget, and must not be reparented
+    during the lifetime of this adaptor.
+
+    Note: \a widget is also the parent of this class, if the widget is destroyed,
+    so is this adaptor.
+ */
+QMaemo5HomescreenAdaptor::QMaemo5HomescreenAdaptor(QWidget *widget)
+    : QObject(widget),
+      hasSettings(false)
+{
+    Q_ASSERT(widget->isWindow());
+
+    if (!hsAtoms[0])
+        initAtoms();
+
+    Display *display = QX11Info::display();
+
+    const QStringList args = QApplication::arguments();
+
+    // parse the command line arguments.
+    int idx;
+    if ((idx = args.indexOf(QLatin1String("-plugin-id"))) != -1) {
+        appletId = args.value(idx + 1);
+        const QByteArray pluginId = appletId.toUtf8();
+        if (!pluginId.isEmpty()) {
+            XChangeProperty(display,
+                    widget->winId(),
+                    hsAtoms[HildonAppletId],
+                    hsAtoms[Utf8String], 8, PropModeReplace,
+                    reinterpret_cast<const unsigned char *>(pluginId.constData()),
+                    pluginId.length());
+        }
+    }
+    if ((idx = args.indexOf(QLatin1String("-write-pipe"))) != -1) {
+        bool ok;
+        int sockId = args.value(idx + 1).toInt(&ok);
+        if (ok) {
+            socketNotifier = new QSocketNotifier(sockId, QSocketNotifier::Exception, this);
+            connect(socketNotifier, SIGNAL(activated(int)), this, SLOT(socketException()));
+        }
+    }
+
+    // set the X11 atoms to flag our widget as homescreen widget
+    if (!appletId.isEmpty()) {
+        XChangeProperty(display,
+                widget->winId(),
+                hsAtoms[NetWmWindowType],
+                XA_ATOM, 32, PropModeReplace,
+                reinterpret_cast<const unsigned char *>(&hsAtoms[HildonTypeHomeApplet]),
+                1);
+
+        updateStatus();
+
+        // --- make this window a child of root
+        XSetTransientForHint(display, widget->winId(),
+                             RootWindow(display, widget->x11Info().screen()));
+
+        // --- add an x11 event filter
+        if (!oldEventFilter)
+            oldEventFilter = QCoreApplication::instance()->setEventFilter(applicationEventFilter);
+
+        allDesktopItems.append(this);
+
+        // --- set WM input hints indicating that we don't want focus events
+        XWMHints *h = XGetWMHints(display, widget->winId());
+        XWMHints wm_hints;
+        if (!h) {
+            memset(&wm_hints, 0, sizeof(wm_hints)); // make valgrind happy
+            h = &wm_hints;
+        }
+        h->flags |= InputHint;
+        h->input = False;
+
+        XSetWMHints(display, widget->winId(), h);
+        if (h != &wm_hints)
+            XFree(h);
+
+        widget->setMouseTracking(true);
+    }
+}
+
+QMaemo5HomescreenAdaptor::~QMaemo5HomescreenAdaptor()
+{
+    allDesktopItems.removeOne(this);
+}
+
+/*! \internal */
+void QMaemo5HomescreenAdaptor::updateStatus()
+{
+    if (appletId.isEmpty())
+        return;
+
+    Display *display = QX11Info::display();
+
+    // Set or remove settings property
+    if (hasSettings)
+        XChangeProperty(display,
+                appletWidget()->winId(),
+                hsAtoms[HildonAppletSettings],
+                XA_CARDINAL, 32, PropModeReplace,
+                (const unsigned char *) &(hasSettings), 1);
+    else
+        XDeleteProperty(display,
+                appletWidget()->winId(),
+                hsAtoms[HildonAppletSettings]);
+}
+
+/*! \internal */
+void QMaemo5HomescreenAdaptor::socketException()
+{
+    socketNotifier->setEnabled(false);
+    appletWidget()->close();
+}
+
+bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
+{
+    return QCoreApplication::sendSpontaneousEvent(receiver, event);
+}
+
+
+
+/*! \internal */
+bool QMaemo5HomescreenAdaptor::applicationEventFilter(void *message, long *result)
+{
+    static QPointer<QWidget> lastMouseWidget;
+    bool retval = false;
+
+    if (oldEventFilter)
+        retval = oldEventFilter(message, result);
+
+    if (allDesktopItems.isEmpty())
+        return retval;
+
+    XEvent *ev = reinterpret_cast<XEvent *>(message);
+
+    // Generate a mouse release for a leave Notify (as we don't get the mouse release from X11)
+    if (ev->type == ButtonPress) {
+        QPoint globalPos( ev->xbutton.x_root, ev->xbutton.y_root);
+        QWidget *widget = QWidget::find((WId)ev->xany.window);
+        if (widget) {
+            lastMouseWidget = widget->childAt(widget->mapFromGlobal(globalPos));
+            if (!lastMouseWidget)
+                lastMouseWidget = widget;
+        }
+
+    } else if (ev->type == ButtonRelease) {
+        lastMouseWidget = 0;
+
+    } else if (ev->type == LeaveNotify) {
+        if (lastMouseWidget) {
+            // create a mouse up event that lies in Nirvana.
+            QPoint pos(-1000, -1000);
+            QMouseEvent e(QEvent::MouseButtonRelease, pos, pos, Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
+            qt_sendSpontaneousEvent(lastMouseWidget, &e);
+            lastMouseWidget = 0;
+       }
+
+    } else if (ev->type == ClientMessage) {
+        XClientMessageEvent *cm = (XClientMessageEvent *)message;
+        if (cm->message_type == hsAtoms[HildonAppletShowSettings]) {
+            for (int i = 0; i < allDesktopItems.count(); ++i) {
+                if (allDesktopItems.at(i)->appletWidget()->winId() == ev->xproperty.window) {
+                    emit allDesktopItems.at(i)->settingsRequested();
+                    retval = true;
+                }
+            }
+        }
+    } else if (ev->type == PropertyNotify) {
+        if (ev->xproperty.atom == hsAtoms[HildonAppletOnCurrentDesktop]) {
+            for (int i = 0; i < allDesktopItems.count(); ++i) {
+                if (allDesktopItems.at(i)->appletWidget()->winId() == ev->xproperty.window) {
+                    emit allDesktopItems.at(i)->homescreenChanged(ev->xproperty.state == 0);
+                    retval = true;
+                }
+            }
+        }
+    }
+
+    return retval;
+}
+
diff --git a/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.h b/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.h
new file mode 100644 (file)
index 0000000..9270649
--- /dev/null
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 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:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights.  These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMAEMO5HOMESCREENADAPTOR_H
+#define QMAEMO5HOMESCREENADAPTOR_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qpointer.h>
+#include <QtGui/qwidget.h>
+
+class QWidget;
+class QSocketNotifier;
+
+class QMaemo5HomescreenAdaptor : public QObject
+{
+    Q_OBJECT
+    Q_PROPERTY(bool settingsAvailable READ settingsAvailable WRITE setSettingsAvailable)
+
+public:
+    QMaemo5HomescreenAdaptor(QWidget *widget);
+    ~QMaemo5HomescreenAdaptor();
+
+    inline void setSettingsAvailable(bool available)
+    {
+        hasSettings = available;
+        updateStatus();
+    }
+
+    inline bool settingsAvailable() const
+    {
+        return hasSettings;
+    }
+
+Q_SIGNALS:
+    void settingsRequested();
+    void homescreenChanged(bool isOnCurrentHomescreen);
+
+private Q_SLOTS:
+    void socketException();
+
+private:
+    inline QWidget *appletWidget() const { return static_cast<QWidget *>(parent()); }
+
+    void updateStatus();
+
+    static bool applicationEventFilter(void *message, long *result);
+
+    bool hasSettings;
+    QString appletId;
+    QSocketNotifier *socketNotifier;
+};
+
+#endif
diff --git a/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.pri b/qmaemo5homescreenadaptor/qmaemo5homescreenadaptor.pri
new file mode 100644 (file)
index 0000000..73d41c3
--- /dev/null
@@ -0,0 +1,4 @@
+HEADERS += $$PWD/qmaemo5homescreenadaptor.h
+SOURCES += $$PWD/qmaemo5homescreenadaptor.cpp
+
+INCLUDEPATH += $$PWD
diff --git a/qml/lichvietwidget/imgs/0.png b/qml/lichvietwidget/imgs/0.png
new file mode 100644 (file)
index 0000000..53ec83e
Binary files /dev/null and b/qml/lichvietwidget/imgs/0.png differ
diff --git a/qml/lichvietwidget/imgs/1.png b/qml/lichvietwidget/imgs/1.png
new file mode 100644 (file)
index 0000000..2e6e916
Binary files /dev/null and b/qml/lichvietwidget/imgs/1.png differ
diff --git a/qml/lichvietwidget/imgs/2.png b/qml/lichvietwidget/imgs/2.png
new file mode 100644 (file)
index 0000000..b8c2ae0
Binary files /dev/null and b/qml/lichvietwidget/imgs/2.png differ
diff --git a/qml/lichvietwidget/imgs/3.png b/qml/lichvietwidget/imgs/3.png
new file mode 100644 (file)
index 0000000..c97cdfd
Binary files /dev/null and b/qml/lichvietwidget/imgs/3.png differ
diff --git a/qml/lichvietwidget/imgs/4.png b/qml/lichvietwidget/imgs/4.png
new file mode 100644 (file)
index 0000000..9d62e43
Binary files /dev/null and b/qml/lichvietwidget/imgs/4.png differ
diff --git a/qml/lichvietwidget/imgs/5.png b/qml/lichvietwidget/imgs/5.png
new file mode 100644 (file)
index 0000000..f878709
Binary files /dev/null and b/qml/lichvietwidget/imgs/5.png differ
diff --git a/qml/lichvietwidget/imgs/6.png b/qml/lichvietwidget/imgs/6.png
new file mode 100644 (file)
index 0000000..3f6500b
Binary files /dev/null and b/qml/lichvietwidget/imgs/6.png differ
diff --git a/qml/lichvietwidget/imgs/7.png b/qml/lichvietwidget/imgs/7.png
new file mode 100644 (file)
index 0000000..0debc12
Binary files /dev/null and b/qml/lichvietwidget/imgs/7.png differ
diff --git a/qml/lichvietwidget/imgs/8.png b/qml/lichvietwidget/imgs/8.png
new file mode 100644 (file)
index 0000000..3022cee
Binary files /dev/null and b/qml/lichvietwidget/imgs/8.png differ
diff --git a/qml/lichvietwidget/imgs/9.png b/qml/lichvietwidget/imgs/9.png
new file mode 100644 (file)
index 0000000..627ce3b
Binary files /dev/null and b/qml/lichvietwidget/imgs/9.png differ
diff --git a/qml/lichvietwidget/imgs/logo.png b/qml/lichvietwidget/imgs/logo.png
new file mode 100644 (file)
index 0000000..5014800
Binary files /dev/null and b/qml/lichvietwidget/imgs/logo.png differ
diff --git a/qml/lichvietwidget/main.js b/qml/lichvietwidget/main.js
new file mode 100644 (file)
index 0000000..67a0f63
--- /dev/null
@@ -0,0 +1,467 @@
+
+
+var IMGS_RESOURCE_PATH = "/opt/lichvietwidget/qml/lichvietwidget/imgs/";
+
+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) {
+    var date = new Date();
+
+    var lunar = getLunarDate(date.getDate(),date.getMonth(),date.getFullYear());
+    var lunarCanChi = getCanChi(lunar);
+    var xday = lunar.day; //need to replace it by lunar day
+    var xmonth = lunar.month;
+    var xyear = lunar.year;
+
+    txt_detail.text = "Ngày <b>"+lunarCanChi[0]+"</b>, Tháng <b>"+lunarCanChi[1]+"</b><br>Năm <b>"+lunarCanChi[2]+"</b>";
+
+    if (xday <= 9){
+        day_center_img.visible = true;
+        day_center_img.source = IMGS_RESOURCE_PATH + xday + ".png";
+        day_left_img.visible = false;
+        day_right_img.visible = false;
+    }else{
+        var strxday = xday+'';
+        var firstday = strxday[0];
+        var secondday = strxday[1];
+        day_center_img.visible = false;
+        day_left_img.visible = true;
+        day_left_img.source = IMGS_RESOURCE_PATH + firstday + ".png";
+        day_right_img.visible = true;
+        day_right_img.source = IMGS_RESOURCE_PATH + secondday + ".png";
+    }
+
+    if (xmonth <=9){
+        month_left_img.source = IMGS_RESOURCE_PATH +"0.png";
+        month_right_img.source = IMGS_RESOURCE_PATH + xmonth + ".png";
+    }else
+    {
+        var strxmonth = xmonth+'';
+        var firstmonth = strxmonth[0];
+        var secondmonth = strxmonth[1];
+        month_left_img.source = IMGS_RESOURCE_PATH + firstmonth +".png";
+        month_right_img.source = IMGS_RESOURCE_PATH + secondmonth + ".png";
+    }
+
+    var strxyear = xyear+'';
+    year_1_img.source = IMGS_RESOURCE_PATH + strxyear[0] +".png";
+    year_2_img.source = IMGS_RESOURCE_PATH + strxyear[1] + ".png";
+    year_3_img.source = IMGS_RESOURCE_PATH + strxyear[2] +".png";
+    year_4_img.source = IMGS_RESOURCE_PATH + strxyear[3] + ".png";
+
+}
+
+/**
+ * Copyright 2004 Ho Ngoc Duc [http://come.to/duc]. All Rights Reserved.<p>
+ * Permission to use, copy, modify, and redistribute this software and its
+ * documentation for personal, non-commercial use is hereby granted provided that
+ * this copyright notice appears in all copies.
+ */
+
+var ABOUT = "\u00C2m l\u1ECBch Vi\u1EC7t Nam - Version 0.8"+"\n\u00A9 2004 H\u1ED3 Ng\u1ECDc \u0110\u1EE9c [http://come.to/duc]";
+var TK19 = new Array(
+        0x30baa3, 0x56ab50, 0x422ba0, 0x2cab61, 0x52a370, 0x3c51e8, 0x60d160, 0x4ae4b0, 0x376926, 0x58daa0,
+        0x445b50, 0x3116d2, 0x562ae0, 0x3ea2e0, 0x28e2d2, 0x4ec950, 0x38d556, 0x5cb520, 0x46b690, 0x325da4,
+        0x5855d0, 0x4225d0, 0x2ca5b3, 0x52a2b0, 0x3da8b7, 0x60a950, 0x4ab4a0, 0x35b2a5, 0x5aad50, 0x4455b0,
+        0x302b74, 0x562570, 0x4052f9, 0x6452b0, 0x4e6950, 0x386d56, 0x5e5aa0, 0x46ab50, 0x3256d4, 0x584ae0,
+        0x42a570, 0x2d4553, 0x50d2a0, 0x3be8a7, 0x60d550, 0x4a5aa0, 0x34ada5, 0x5a95d0, 0x464ae0, 0x2eaab4,
+        0x54a4d0, 0x3ed2b8, 0x64b290, 0x4cb550, 0x385757, 0x5e2da0, 0x4895d0, 0x324d75, 0x5849b0, 0x42a4b0,
+        0x2da4b3, 0x506a90, 0x3aad98, 0x606b50, 0x4c2b60, 0x359365, 0x5a9370, 0x464970, 0x306964, 0x52e4a0,
+        0x3cea6a, 0x62da90, 0x4e5ad0, 0x392ad6, 0x5e2ae0, 0x4892e0, 0x32cad5, 0x56c950, 0x40d4a0, 0x2bd4a3,
+        0x50b690, 0x3a57a7, 0x6055b0, 0x4c25d0, 0x3695b5, 0x5a92b0, 0x44a950, 0x2ed954, 0x54b4a0, 0x3cb550,
+        0x286b52, 0x4e55b0, 0x3a2776, 0x5e2570, 0x4852b0, 0x32aaa5, 0x56e950, 0x406aa0, 0x2abaa3, 0x50ab50
+); /* Years 2000-2099 */
+
+var TK20 = new Array(
+        0x3c4bd8, 0x624ae0, 0x4ca570, 0x3854d5, 0x5cd260, 0x44d950, 0x315554, 0x5656a0, 0x409ad0, 0x2a55d2,
+        0x504ae0, 0x3aa5b6, 0x60a4d0, 0x48d250, 0x33d255, 0x58b540, 0x42d6a0, 0x2cada2, 0x5295b0, 0x3f4977,
+        0x644970, 0x4ca4b0, 0x36b4b5, 0x5c6a50, 0x466d50, 0x312b54, 0x562b60, 0x409570, 0x2c52f2, 0x504970,
+        0x3a6566, 0x5ed4a0, 0x48ea50, 0x336a95, 0x585ad0, 0x442b60, 0x2f86e3, 0x5292e0, 0x3dc8d7, 0x62c950,
+        0x4cd4a0, 0x35d8a6, 0x5ab550, 0x4656a0, 0x31a5b4, 0x5625d0, 0x4092d0, 0x2ad2b2, 0x50a950, 0x38b557,
+        0x5e6ca0, 0x48b550, 0x355355, 0x584da0, 0x42a5b0, 0x2f4573, 0x5452b0, 0x3ca9a8, 0x60e950, 0x4c6aa0,
+        0x36aea6, 0x5aab50, 0x464b60, 0x30aae4, 0x56a570, 0x405260, 0x28f263, 0x4ed940, 0x38db47, 0x5cd6a0,
+        0x4896d0, 0x344dd5, 0x5a4ad0, 0x42a4d0, 0x2cd4b4, 0x52b250, 0x3cd558, 0x60b540, 0x4ab5a0, 0x3755a6,
+        0x5c95b0, 0x4649b0, 0x30a974, 0x56a4b0, 0x40aa50, 0x29aa52, 0x4e6d20, 0x39ad47, 0x5eab60, 0x489370,
+        0x344af5, 0x5a4970, 0x4464b0, 0x2c74a3, 0x50ea50, 0x3d6a58, 0x6256a0, 0x4aaad0, 0x3696d5, 0x5c92e0
+); /* Years 1900-1999 */
+
+var TK21 = new Array(
+        0x46c960, 0x2ed954, 0x54d4a0, 0x3eda50, 0x2a7552, 0x4e56a0, 0x38a7a7, 0x5ea5d0, 0x4a92b0, 0x32aab5,
+        0x58a950, 0x42b4a0, 0x2cbaa4, 0x50ad50, 0x3c55d9, 0x624ba0, 0x4ca5b0, 0x375176, 0x5c5270, 0x466930,
+        0x307934, 0x546aa0, 0x3ead50, 0x2a5b52, 0x504b60, 0x38a6e6, 0x5ea4e0, 0x48d260, 0x32ea65, 0x56d520,
+        0x40daa0, 0x2d56a3, 0x5256d0, 0x3c4afb, 0x6249d0, 0x4ca4d0, 0x37d0b6, 0x5ab250, 0x44b520, 0x2edd25,
+        0x54b5a0, 0x3e55d0, 0x2a55b2, 0x5049b0, 0x3aa577, 0x5ea4b0, 0x48aa50, 0x33b255, 0x586d20, 0x40ad60,
+        0x2d4b63, 0x525370, 0x3e49e8, 0x60c970, 0x4c54b0, 0x3768a6, 0x5ada50, 0x445aa0, 0x2fa6a4, 0x54aad0,
+        0x4052e0, 0x28d2e3, 0x4ec950, 0x38d557, 0x5ed4a0, 0x46d950, 0x325d55, 0x5856a0, 0x42a6d0, 0x2c55d4,
+        0x5252b0, 0x3ca9b8, 0x62a930, 0x4ab490, 0x34b6a6, 0x5aad50, 0x4655a0, 0x2eab64, 0x54a570, 0x4052b0,
+        0x2ab173, 0x4e6930, 0x386b37, 0x5e6aa0, 0x48ad50, 0x332ad5, 0x582b60, 0x42a570, 0x2e52e4, 0x50d160,
+        0x3ae958, 0x60d520, 0x4ada90, 0x355aa6, 0x5a56d0, 0x462ae0, 0x30a9d4, 0x54a2d0, 0x3ed150, 0x28e952
+); /* Years 2000-2099 */
+
+var TK22 = new Array(
+                0x4eb520, 0x38d727, 0x5eada0, 0x4a55b0, 0x362db5, 0x5a45b0, 0x44a2b0, 0x2eb2b4, 0x54a950, 0x3cb559,
+                0x626b20, 0x4cad50, 0x385766, 0x5c5370, 0x484570, 0x326574, 0x5852b0, 0x406950, 0x2a7953, 0x505aa0,
+                0x3baaa7, 0x5ea6d0, 0x4a4ae0, 0x35a2e5, 0x5aa550, 0x42d2a0, 0x2de2a4, 0x52d550, 0x3e5abb, 0x6256a0,
+                0x4c96d0, 0x3949b6, 0x5e4ab0, 0x46a8d0, 0x30d4b5, 0x56b290, 0x40b550, 0x2a6d52, 0x504da0, 0x3b9567,
+                0x609570, 0x4a49b0, 0x34a975, 0x5a64b0, 0x446a90, 0x2cba94, 0x526b50, 0x3e2b60, 0x28ab61, 0x4c9570,
+                0x384ae6, 0x5cd160, 0x46e4a0, 0x2eed25, 0x54da90, 0x405b50, 0x2c36d3, 0x502ae0, 0x3a93d7, 0x6092d0,
+                0x4ac950, 0x32d556, 0x58b4a0, 0x42b690, 0x2e5d94, 0x5255b0, 0x3e25fa, 0x6425b0, 0x4e92b0, 0x36aab6,
+                0x5c6950, 0x4674a0, 0x31b2a5, 0x54ad50, 0x4055a0, 0x2aab73, 0x522570, 0x3a5377, 0x6052b0, 0x4a6950,
+                0x346d56, 0x585aa0, 0x42ab50, 0x2e56d4, 0x544ae0, 0x3ca570, 0x2864d2, 0x4cd260, 0x36eaa6, 0x5ad550,
+                0x465aa0, 0x30ada5, 0x5695d0, 0x404ad0, 0x2aa9b3, 0x50a4d0, 0x3ad2b7, 0x5eb250, 0x48b540, 0x33d556
+); /* Years 2100-2199 */
+
+var CAN = new Array("Gi\341p", "\u1EA4t", "B\355nh", "\u0110inh", "M\u1EADu", "K\u1EF7", "Canh", "T\342n", "Nh\342m", "Qu\375");
+var CHI = new Array("T\375", "S\u1EEDu", "D\u1EA7n", "Mão", "Th\354n", "T\u1EF5", "Ng\u1ECD", "M\371i", "Th\342n", "D\u1EADu", "Tu\u1EA5t", "H\u1EE3i");
+var TUAN = new Array("Ch\u1EE7 Nh\u1EADt", "Th\u1EE9 Hai", "Th\u1EE9 Ba", "Th\u1EE9 T\u01B0", "Th\u1EE9 N\u0103m", "Th\u1EE9 S\341u", "Th\u1EE9 B\u1EA3y");
+var GIO_HD = new Array("110100101100", "001101001011", "110011010010", "101100110100", "001011001101", "010010110011");
+var TIETKHI = new Array("Xu\u00E2n ph\u00E2n", "Thanh minh", "C\u1ED1c v\u0169", "L\u1EADp h\u1EA1", "Ti\u1EC3u m\u00E3n", "Mang ch\u1EE7ng",
+        "H\u1EA1 ch\u00ED", "Ti\u1EC3u th\u1EED", "\u0110\u1EA1i th\u1EED", "L\u1EADp thu", "X\u1EED th\u1EED", "B\u1EA1ch l\u1ED9",
+        "Thu ph\u00E2n", "H\u00E0n l\u1ED9", "S\u01B0\u01A1ng gi\u00E1ng", "L\u1EADp \u0111\u00F4ng", "Ti\u1EC3u tuy\u1EBFt", "\u0110\u1EA1i tuy\u1EBFt",
+        "\u0110\u00F4ng ch\u00ED", "Ti\u1EC3u h\u00E0n", "\u0110\u1EA1i h\u00E0n", "L\u1EADp xu\u00E2n", "V\u0169 Th\u1EE7y", "Kinh tr\u1EADp"
+);
+
+var LML,RMM;
+
+/* Create lunar date object, stores (lunar) date, month, year, leap month indicator, and Julian date number */
+function LunarDate(dd, mm, yy, leap, jd) {
+        this.day = dd;
+        this.month = mm;
+        this.year = yy;
+        this.leap = leap;
+        this.jd = jd;
+}
+
+var PI = Math.PI;
+
+/* Discard the fractional part of a number, e.g., INT(3.2) = 3 */
+function INT(d) {
+        return Math.floor(d);
+}
+
+function jdn(dd, mm, yy) {
+        var a = INT((14 - mm) / 12);
+        var y = yy+4800-a;
+        var m = mm+12*a-3;
+        var jd = dd + INT((153*m+2)/5) + 365*y + INT(y/4) - INT(y/100) + INT(y/400) - 32045;
+        return jd;
+        //return 367*yy - INT(7*(yy+INT((mm+9)/12))/4) - INT(3*(INT((yy+(mm-9)/7)/100)+1)/4) + INT(275*mm/9)+dd+1721029;
+}
+
+function jdn2date(jd) {
+        var Z, A, alpha, B, C, D, E, dd, mm, yyyy, F;
+        Z = jd;
+        if (Z < 2299161) {
+          A = Z;
+        } else {
+          alpha = INT((Z-1867216.25)/36524.25);
+          A = Z + 1 + alpha - INT(alpha/4);
+        }
+        B = A + 1524;
+        C = INT( (B-122.1)/365.25);
+        D = INT( 365.25*C );
+        E = INT( (B-D)/30.6001 );
+        dd = INT(B - D - INT(30.6001*E));
+        if (E < 14) {
+          mm = E - 1;
+        } else {
+          mm = E - 13;
+        }
+        if (mm < 3) {
+          yyyy = C - 4715;
+        } else {
+          yyyy = C - 4716;
+        }
+        return new Array(dd, mm, yyyy);
+}
+
+function decodeLunarYear(yy, k) {
+        var monthLengths, regularMonths, offsetOfTet, leapMonth, leapMonthLength, solarNY, currentJD, j, mm;
+        var ly = new Array();
+        monthLengths = new Array(29, 30);
+        var regularMonths = new Array(12);
+        offsetOfTet = k >> 17;
+        leapMonth = k & 0xf;
+        leapMonthLength = monthLengths[k >> 16 & 0x1];
+        solarNY = jdn(1, 1, yy);
+        currentJD = solarNY+offsetOfTet;
+        j = k >> 4;
+        for(var i = 0; i < 12; i++) {
+                regularMonths[12 - i - 1] = monthLengths[j & 0x1];
+                j >>= 1;
+        }
+        if (leapMonth == 0) {
+                for(mm = 1; mm <= 12; mm++) {
+                        ly.push(new LunarDate(1, mm, yy, 0, currentJD));
+                        currentJD += regularMonths[mm-1];
+                }
+        } else {
+                for(mm = 1; mm <= leapMonth; mm++) {
+                        ly.push(new LunarDate(1, mm, yy, 0, currentJD));
+                        currentJD += regularMonths[mm-1];
+                }
+                ly.push(new LunarDate(1, leapMonth, yy, 1, currentJD));
+                currentJD += leapMonthLength;
+                for(mm = leapMonth+1; mm <= 12; mm++) {
+                        ly.push(new LunarDate(1, mm, yy, 0, currentJD));
+                        currentJD += regularMonths[mm-1];
+                }
+        }
+
+       LML = leapMonthLength;
+       RMM = regularMonths;
+        return ly;
+}
+
+function leapMonth(yyyy){
+    var yearCode = getYearCode(yyyy);
+    return yearCode & 0xf;
+}
+
+function monthLength(yyyy){
+    var yearCode = getYearCode(yyyy);
+    return yearCode >> 16 & 0x1;
+}
+
+function getYearCode(yyyy){
+    var yearCode;
+    if (yyyy < 1900) {
+            yearCode = TK19[yyyy - 1800];
+    } else if (yyyy < 2000) {
+            yearCode = TK20[yyyy - 1900];
+    } else if (yyyy < 2100) {
+            yearCode = TK21[yyyy - 2000];
+    } else {
+            yearCode = TK22[yyyy - 2100];
+    }
+    return yearCode;
+}
+
+function getYearInfo(yyyy) {
+        var yearCode;
+        if (yyyy < 1900) {
+                yearCode = TK19[yyyy - 1800];
+        } else if (yyyy < 2000) {
+                yearCode = TK20[yyyy - 1900];
+        } else if (yyyy < 2100) {
+                yearCode = TK21[yyyy - 2000];
+        } else {
+                yearCode = TK22[yyyy - 2100];
+        }
+        return decodeLunarYear(yyyy, yearCode);
+}
+
+var FIRST_DAY = jdn(25, 1, 1800); // Tet am lich 1800
+var LAST_DAY = jdn(31, 12, 2199);
+
+function findLunarDate(jd, ly) {
+        if (jd > LAST_DAY || jd < FIRST_DAY || ly[0].jd > jd) {
+                return new LunarDate(0, 0, 0, 0, jd);
+        }
+        var i = ly.length-1;
+        while (jd < ly[i].jd) {
+                i--;
+        }
+        var off = jd - ly[i].jd;
+        var ret = new LunarDate(ly[i].day+off, ly[i].month, ly[i].year, ly[i].leap, jd);
+        return ret;
+}
+
+function getLunarDate(dd, mm, yyyy) {
+        var ly, jd;
+        if (yyyy < 1800 || 2199 < yyyy) {
+                //return new LunarDate(0, 0, 0, 0, 0);
+        }
+        ly = getYearInfo(yyyy);
+        jd = jdn(dd, mm, yyyy);
+        if (jd < ly[0].jd) {
+                ly = getYearInfo(yyyy - 1);
+        }
+        return findLunarDate(jd, ly);
+}
+
+/* Compute the longitude of the sun at any time.
+ * Parameter: floating number jdn, the number of days since 1/1/4713 BC noon
+ * Algorithm from: "Astronomical Algorithms" by Jean Meeus, 1998
+ */
+function SunLongitude(jdn) {
+        var T, T2, dr, M, L0, DL, lambda, theta, omega;
+        T = (jdn - 2451545.0 ) / 36525; // Time in Julian centuries from 2000-01-01 12:00:00 GMT
+        T2 = T*T;
+        dr = PI/180; // degree to radian
+        M = 357.52910 + 35999.05030*T - 0.0001559*T2 - 0.00000048*T*T2; // mean anomaly, degree
+        L0 = 280.46645 + 36000.76983*T + 0.0003032*T2; // mean longitude, degree
+        DL = (1.914600 - 0.004817*T - 0.000014*T2)*Math.sin(dr*M);
+        DL = DL + (0.019993 - 0.000101*T)*Math.sin(dr*2*M) + 0.000290*Math.sin(dr*3*M);
+    theta = L0 + DL; // true longitude, degree
+    // obtain apparent longitude by correcting for nutation and aberration
+    omega = 125.04 - 1934.136 * T;
+    lambda = theta - 0.00569 - 0.00478 * Math.sin(omega * dr);
+    // Convert to radians
+    lambda = lambda*dr;
+        lambda = lambda - PI*2*(INT(lambda/(PI*2))); // Normalize to (0, 2*PI)
+    return lambda;
+}
+
+/* Compute the sun segment at start (00:00) of the day with the given integral Julian day number.
+ * The time zone if the time difference between local time and UTC: 7.0 for UTC+7:00.
+ * The function returns a number between 0 and 23.
+ * From the day after March equinox and the 1st major term after March equinox, 0 is returned.
+ * After that, return 1, 2, 3 ...
+ */
+function getSunLongitude(dayNumber, timeZone) {
+        return INT(SunLongitude(dayNumber - 0.5 - timeZone/24.0) / PI * 12);
+}
+
+var today = new Date();
+//var currentLunarYear = getYearInfo(today.getFullYear());
+var currentLunarDate = getLunarDate(today.getDate(), today.getMonth()+1, today.getFullYear());
+var currentMonth = today.getMonth()+1;
+var currentYear = today.getFullYear();
+
+function parseQuery(q) {
+        var ret = new Array();
+        if (q.length < 2) return ret;
+        var s = q.substring(1, q.length);
+        var arr = s.split("&");
+        var i, j;
+        for (i = 0; i < arr.length; i++) {
+                var a = arr[i].split("=");
+                for (j = 0; j < a.length; j++) {
+                        ret.push(a[j]);
+                }
+        }
+        return ret;
+}
+
+function getSelectedMonth() {
+        var query = window.location.search;
+        var arr = parseQuery(query);
+        var idx;
+        for (idx = 0; idx < arr.length; idx++) {
+                if (arr[idx] == "mm") {
+                        currentMonth = parseInt(arr[idx+1]);
+                } else if (arr[idx] == "yy") {
+                        currentYear = parseInt(arr[idx+1]);
+                }
+        }
+}
+
+function getMonth(mm, yy) {
+        var ly1, ly2, tet1, jd1, jd2, mm1, yy1, result, i;
+        if (mm < 12) {
+                mm1 = mm + 1;
+                yy1 = yy;
+        } else {
+                mm1 = 1;
+                yy1 = yy + 1;
+        }
+        jd1 = jdn(1, mm, yy);
+        jd2 = jdn(1, mm1, yy1);
+        ly1 = getYearInfo(yy);
+        //alert('1/'+mm+'/'+yy+' = '+jd1+'; 1/'+mm1+'/'+yy1+' = '+jd2);
+        tet1 = ly1[0].jd;
+        result = new Array();
+        if (tet1 <= jd1) { /* tet(yy) = tet1 < jd1 < jd2 <= 1.1.(yy+1) < tet(yy+1) */
+                for (i = jd1; i < jd2; i++) {
+                        result.push(findLunarDate(i, ly1));
+                }
+        } else if (jd1 < tet1 && jd2 < tet1) { /* tet(yy-1) < jd1 < jd2 < tet1 = tet(yy) */
+                ly1 = getYearInfo(yy - 1);
+                for (i = jd1; i < jd2; i++) {
+                        result.push(findLunarDate(i, ly1));
+                }
+        } else if (jd1 < tet1 && tet1 <= jd2) { /* tet(yy-1) < jd1 < tet1 <= jd2 < tet(yy+1) */
+                ly2 = getYearInfo(yy - 1);
+                for (i = jd1; i < tet1; i++) {
+                        result.push(findLunarDate(i, ly2));
+                }
+                for (i = tet1; i < jd2; i++) {
+                        result.push(findLunarDate(i, ly1));
+                }
+        }
+        return result;
+}
+
+function getDayName(lunarDate) {
+        if (lunarDate.day == 0) {
+                return "";
+        }
+        var cc = getCanChi(lunarDate);
+        var s = "Ng\u00E0y " + cc[0] +", th\341ng "+cc[1] + ", n\u0103m " + cc[2];
+        return s;
+}
+
+function getYearCanChi(year) {
+        return CAN[(year+6) % 10] + " " + CHI[(year+8) % 12];
+}
+
+/*
+ * Can cua gio Chinh Ty (00:00) cua ngay voi JDN nay
+ */
+function getCanHour0(jdn) {
+        return CAN[(jdn-1)*2 % 10];
+}
+
+function getCanChi(lunar) {
+        var dayName, monthName, yearName;
+        dayName = CAN[(lunar.jd + 9) % 10] + " " + CHI[(lunar.jd+1)%12];
+        monthName = CAN[(lunar.year*12+lunar.month+3) % 10] + " " + CHI[(lunar.month+1)%12];
+        if (lunar.leap == 1) {
+                monthName += " (N)";
+        }
+        yearName = getYearCanChi(lunar.year);
+        return new Array(dayName, monthName, yearName);
+}
+
+function getDayString(lunar, solarDay, solarMonth, solarYear) {
+        var s;
+        var dayOfWeek = TUAN[(lunar.jd + 1) % 7];
+        s = dayOfWeek + " " + solarDay + "/" + solarMonth + "/" + solarYear;
+        s += " -+- ";
+        s = s + "Ng\u00E0y " + lunar.day+" th\341ng "+lunar.month;
+        if (lunar.leap == 1) {
+                s = s + " nhu\u1EADn";
+        }
+        return s;
+}
+
+function getTodayString() {
+        var s = getDayString(currentLunarDate, today.getDate(), today.getMonth()+1, today.getFullYear());
+        s += " n\u0103m " + getYearCanChi(currentLunarDate.year);
+        return s;
+}
+
+function getCurrentTime() {
+        today = new Date();
+        var Std = today.getHours();
+        var Min = today.getMinutes();
+        var Sec = today.getSeconds();
+        var s1  = ((Std < 10) ? "0" + Std : Std);
+        var s2  = ((Min < 10) ? "0" + Min : Min);
+        //var s3  = ((Sec < 10) ? "0" + Sec : Sec);
+        //return s1 + ":" + s2 + ":" + s3;
+        return s1 + ":" + s2;
+}
+
+function getGioHoangDao(jd) {
+        var chiOfDay = (jd+1) % 12;
+        var gioHD = GIO_HD[chiOfDay % 6]; // same values for Ty' (1) and Ngo. (6), for Suu and Mui etc.
+        var ret = "";
+        var count = 0;
+        for (var i = 0; i < 12; i++) {
+                if (gioHD.charAt(i) == '1') {
+                        ret += CHI[i];
+                        ret += ' ('+(i*2+23)%24+'h-'+(i*2+1)%24+'h)';
+                        if (count++ < 5) ret += ', ';
+                        if (count == 3) ret += '<br>';
+                }
+        }
+        return ret;
+}
+
+function getTHU(jd){
+    return TUAN[(jd+1)%7];
+}
+
+function getTHUINT(jd){
+    return (jd+1)%7;
+}
diff --git a/qml/lichvietwidget/main.qml b/qml/lichvietwidget/main.qml
new file mode 100644 (file)
index 0000000..c43908a
--- /dev/null
@@ -0,0 +1,162 @@
+import QtQuick 1.0
+import "main.js" as Main
+
+Item {
+    id: lichvietwidget
+
+    width: 344
+    height: 200
+
+    Rectangle {
+        id: lvwidgetrec
+        color: "#272020"
+        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
+        anchors.fill: parent
+        radius: 8
+        gradient: Gradient {
+            GradientStop {
+                position: 0
+                color: "#000000"
+            }
+
+            GradientStop {
+                position: 0.03
+                color: "#f0eef7"
+            }
+        }
+        clip: true
+        smooth: true
+        z: 0
+        anchors.rightMargin: 5
+        anchors.bottomMargin: 40
+        anchors.leftMargin: 5
+        anchors.topMargin: 5
+        border.color: "#6382c6"
+        border.width: 1
+        opacity: 0.9
+
+        Image {
+            id: day_left_img
+            x: -5
+            y: -1
+            width: 100
+            height: 100
+            source: "imgs/1.png"
+            visible:false
+        }
+
+        Image {
+            id: day_right_img
+            x: 74
+            y: -1
+            width: 100
+            height: 100
+            visible: false
+            source: "imgs/4.png"
+        }
+
+        Image {
+            id: day_center_img
+            x: 33
+            y: -1
+            width: 100
+            height: 100
+            source: "imgs/4.png"
+            visible: false
+        }
+
+        Image {
+            id: month_right_img
+            x: 245
+            y: 5
+            width: 50
+            height: 47
+        }
+
+        Image {
+            id: month_left_img
+            x: 206
+            y: 5
+            width: 50
+            height: 47
+        }
+
+        Image {
+            id: year_1_img
+            x: 167
+            y: 45
+            width: 50
+            height: 47
+        }
+
+        Image {
+            id: year_2_img
+            x: 206
+            y: 45
+            width: 50
+            height: 47
+        }
+
+        Image {
+            id: year_3_img
+            x: 245
+            y: 45
+            width: 50
+            height: 47
+        }
+
+        Image {
+            id: year_4_img
+            x: 284
+            y: 45
+            width: 50
+            height: 47
+        }
+
+        Text {
+            id: txt_detail
+            x: 62
+            y: 99
+            width: 205
+            color: "#1a1d20"
+            text: ""
+            verticalAlignment: Text.AlignVCenter
+            wrapMode: Text.NoWrap
+            style: Text.Normal
+            font.family: "Tahoma"
+            horizontalAlignment: Text.AlignHCenter
+            font.pixelSize: 20
+        }
+    }
+
+    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)
+    }
+
+}
diff --git a/qmlapplicationviewer/qmlapplicationviewer.cpp b/qmlapplicationviewer/qmlapplicationviewer.cpp
new file mode 100644 (file)
index 0000000..b3e862c
--- /dev/null
@@ -0,0 +1,156 @@
+// checksum 0x7895 version 0x4000b
+/*
+  This file was generated by the Qt Quick Application wizard of Qt Creator.
+  QmlApplicationViewer is a convenience class containing mobile device specific
+  code such as screen orientation handling. Also QML paths and debugging are
+  handled here.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
+#include "qmlapplicationviewer.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtCore/QFileInfo>
+#include <QtDeclarative/QDeclarativeComponent>
+#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeContext>
+
+#if defined(QMLJSDEBUGGER)
+#include <qt_private/qdeclarativedebughelper_p.h>
+#endif
+
+#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
+#include <jsdebuggeragent.h>
+#endif
+#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
+#include <qdeclarativeviewobserver.h>
+#endif
+
+#if defined(QMLJSDEBUGGER)
+
+// Enable debugging before any QDeclarativeEngine is created
+struct QmlJsDebuggingEnabler
+{
+    QmlJsDebuggingEnabler()
+    {
+        QDeclarativeDebugHelper::enableDebugging();
+    }
+};
+
+// Execute code in constructor before first QDeclarativeEngine is instantiated
+static QmlJsDebuggingEnabler enableDebuggingHelper;
+
+#endif // QMLJSDEBUGGER
+
+class QmlApplicationViewerPrivate
+{
+    QString mainQmlFile;
+    friend class QmlApplicationViewer;
+    static QString adjustPath(const QString &path);
+};
+
+QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
+{
+#ifdef Q_OS_UNIX
+#ifdef Q_OS_MAC
+    if (!QDir::isAbsolutePath(path))
+        return QCoreApplication::applicationDirPath()
+                + QLatin1String("/../Resources/") + path;
+#else
+    const QString pathInInstallDir = QCoreApplication::applicationDirPath()
+        + QLatin1String("/../") + path;
+    if (pathInInstallDir.contains(QLatin1String("opt"))
+            && pathInInstallDir.contains(QLatin1String("bin"))
+            && QFileInfo(pathInInstallDir).exists()) {
+        return pathInInstallDir;
+    }
+#endif
+#endif
+    return path;
+}
+
+QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
+    QDeclarativeView(parent),
+    m_d(new QmlApplicationViewerPrivate)
+{
+    connect(engine(), SIGNAL(quit()), SLOT(close()));
+    setResizeMode(QDeclarativeView::SizeRootObjectToView);
+#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
+    new QmlJSDebugger::JSDebuggerAgent(engine());
+#endif
+#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
+    new QmlJSDebugger::QDeclarativeViewObserver(this, this);
+#endif
+}
+
+QmlApplicationViewer::~QmlApplicationViewer()
+{
+    delete m_d;
+}
+
+void QmlApplicationViewer::setMainQmlFile(const QString &file)
+{
+    m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
+    setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
+}
+
+void QmlApplicationViewer::addImportPath(const QString &path)
+{
+    engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
+}
+
+void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
+{
+#if defined(Q_OS_SYMBIAN)
+    // If the version of Qt on the device is < 4.7.2, that attribute won't work
+    if (orientation != ScreenOrientationAuto) {
+        const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.'));
+        if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) {
+            qWarning("Screen orientation locking only supported with Qt 4.7.2 and above");
+            return;
+        }
+    }
+#endif // Q_OS_SYMBIAN
+
+    Qt::WidgetAttribute attribute;
+    switch (orientation) {
+#if QT_VERSION < 0x040702
+    // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes
+    case ScreenOrientationLockPortrait:
+        attribute = static_cast<Qt::WidgetAttribute>(128);
+        break;
+    case ScreenOrientationLockLandscape:
+        attribute = static_cast<Qt::WidgetAttribute>(129);
+        break;
+    default:
+    case ScreenOrientationAuto:
+        attribute = static_cast<Qt::WidgetAttribute>(130);
+        break;
+#else // QT_VERSION < 0x040702
+    case ScreenOrientationLockPortrait:
+        attribute = Qt::WA_LockPortraitOrientation;
+        break;
+    case ScreenOrientationLockLandscape:
+        attribute = Qt::WA_LockLandscapeOrientation;
+        break;
+    default:
+    case ScreenOrientationAuto:
+        attribute = Qt::WA_AutoOrientation;
+        break;
+#endif // QT_VERSION < 0x040702
+    };
+    setAttribute(attribute, true);
+}
+
+void QmlApplicationViewer::showExpanded()
+{
+#ifdef Q_OS_SYMBIAN
+    showFullScreen();
+#elif defined(Q_WS_MAEMO_5)
+    showMaximized();
+#else
+    show();
+#endif
+}
diff --git a/qmlapplicationviewer/qmlapplicationviewer.h b/qmlapplicationviewer/qmlapplicationviewer.h
new file mode 100644 (file)
index 0000000..19875a3
--- /dev/null
@@ -0,0 +1,42 @@
+// checksum 0x382f version 0x4000b
+/*
+  This file was generated by the Qt Quick Application wizard of Qt Creator.
+  QmlApplicationViewer is a convenience class containing mobile device specific
+  code such as screen orientation handling. Also QML paths and debugging are
+  handled here.
+  It is recommended not to modify this file, since newer versions of Qt Creator
+  may offer an updated version of it.
+*/
+
+#ifndef QMLAPPLICATIONVIEWER_H
+#define QMLAPPLICATIONVIEWER_H
+
+#include <QtDeclarative/QDeclarativeView>
+
+class QmlApplicationViewer : public QDeclarativeView
+{
+    Q_OBJECT
+
+public:
+    enum ScreenOrientation {
+        ScreenOrientationLockPortrait,
+        ScreenOrientationLockLandscape,
+        ScreenOrientationAuto
+    };
+
+    explicit QmlApplicationViewer(QWidget *parent = 0);
+    virtual ~QmlApplicationViewer();
+
+    void setMainQmlFile(const QString &file);
+    void addImportPath(const QString &path);
+
+    // Note that this will only have an effect on Symbian and Fremantle.
+    void setOrientation(ScreenOrientation orientation);
+
+    void showExpanded();
+
+private:
+    class QmlApplicationViewerPrivate *m_d;
+};
+
+#endif // QMLAPPLICATIONVIEWER_H
diff --git a/qmlapplicationviewer/qmlapplicationviewer.pri b/qmlapplicationviewer/qmlapplicationviewer.pri
new file mode 100644 (file)
index 0000000..b07f873
--- /dev/null
@@ -0,0 +1,133 @@
+# checksum 0xcaf1 version 0x4000b
+# 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.
+# It is recommended not to modify this file, since newer versions of Qt Creator
+# may offer an updated version of it.
+
+QT += declarative
+
+SOURCES += $$PWD/qmlapplicationviewer.cpp
+HEADERS += $$PWD/qmlapplicationviewer.h
+INCLUDEPATH += $$PWD
+
+# Include JS debugger library if QMLJSDEBUGGER_PATH is set
+!isEmpty(QMLJSDEBUGGER_PATH) {
+    include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
+} else {
+    DEFINES -= QMLJSDEBUGGER
+}
+# This file was generated by an application wizard of Qt Creator.
+# The code below handles deployment to Symbian and Maemo, aswell as copying
+# of the application data to shadow build directories on desktop.
+# It is recommended not to modify this file, since newer versions of Qt Creator
+# may offer an updated version of it.
+
+defineTest(qtcAddDeployment) {
+for(deploymentfolder, DEPLOYMENTFOLDERS) {
+    item = item$${deploymentfolder}
+    itemsources = $${item}.sources
+    $$itemsources = $$eval($${deploymentfolder}.source)
+    itempath = $${item}.path
+    $$itempath= $$eval($${deploymentfolder}.target)
+    export($$itemsources)
+    export($$itempath)
+    DEPLOYMENT += $$item
+}
+
+MAINPROFILEPWD = $$PWD
+
+symbian {
+    isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
+    isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+} else:win32 {
+    copyCommand =
+    for(deploymentfolder, DEPLOYMENTFOLDERS) {
+        source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+        source = $$replace(source, /, \\)
+        sourcePathSegments = $$split(source, \\)
+        target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
+        target = $$replace(target, /, \\)
+        !isEqual(source,$$target) {
+            !isEmpty(copyCommand):copyCommand += &&
+            isEqual(QMAKE_DIR_SEP, \\) {
+                copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+            } else {
+                source = $$replace(source, \\\\, /)
+                target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+                target = $$replace(target, \\\\, /)
+                copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
+            }
+        }
+    }
+    !isEmpty(copyCommand) {
+        copyCommand = @echo Copying application data... && $$copyCommand
+        copydeploymentfolders.commands = $$copyCommand
+        first.depends = $(first) copydeploymentfolders
+        export(first.depends)
+        export(copydeploymentfolders.commands)
+        QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+    }
+} else:unix {
+    maemo5 {
+        desktopfile.path = /usr/share/applications/hildon
+    } else {
+        desktopfile.path = /usr/share/applications
+        copyCommand =
+        for(deploymentfolder, DEPLOYMENTFOLDERS) {
+            source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+            source = $$replace(source, \\\\, /)
+            macx {
+                target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
+            } else {
+                target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+            }
+            target = $$replace(target, \\\\, /)
+            sourcePathSegments = $$split(source, /)
+            targetFullPath = $$target/$$last(sourcePathSegments)
+            !isEqual(source,$$targetFullPath) {
+                !isEmpty(copyCommand):copyCommand += &&
+                copyCommand += $(MKDIR) \"$$target\"
+                copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
+            }
+        }
+        !isEmpty(copyCommand) {
+            copyCommand = @echo Copying application data... && $$copyCommand
+            copydeploymentfolders.commands = $$copyCommand
+            first.depends = $(first) copydeploymentfolders
+            export(first.depends)
+            export(copydeploymentfolders.commands)
+            QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+        }
+    }
+    installPrefix = /opt/$${TARGET}
+    for(deploymentfolder, DEPLOYMENTFOLDERS) {
+        item = item$${deploymentfolder}
+        itemfiles = $${item}.files
+        $$itemfiles = $$eval($${deploymentfolder}.source)
+        itempath = $${item}.path
+        $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
+        export($$itemfiles)
+        export($$itempath)
+        INSTALLS += $$item
+    }
+    icon.files = $${TARGET}.png
+    icon.path = /usr/share/icons/hicolor/64x64/apps
+    desktopfile.files = $${TARGET}.desktop
+    target.path = $${installPrefix}/bin
+    export(icon.files)
+    export(icon.path)
+    export(desktopfile.files)
+    export(desktopfile.path)
+    export(target.path)
+    INSTALLS += desktopfile icon target
+}
+
+export (ICON)
+export (INSTALLS)
+export (DEPLOYMENT)
+export (TARGET.EPOCHEAPSIZE)
+export (TARGET.CAPABILITY)
+export (LIBS)
+export (QMAKE_EXTRA_TARGETS)
+}
diff --git a/qtc_packaging/debian_fremantle/README b/qtc_packaging/debian_fremantle/README
new file mode 100644 (file)
index 0000000..659c98d
--- /dev/null
@@ -0,0 +1,6 @@
+The Debian Package lichvietwidget
+----------------------------
+
+Comments regarding the Package
+
+ -- Cuong Le <metacuong@gmail.com>  Thu, 08 Sep 2011 16:04:24 +0700
diff --git a/qtc_packaging/debian_fremantle/changelog b/qtc_packaging/debian_fremantle/changelog
new file mode 100644 (file)
index 0000000..f9f9c2f
--- /dev/null
@@ -0,0 +1,5 @@
+lichvietwidget (0.1.0) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Cuong Le <metacuong@gmail.com>  Thu, 08 Sep 2011 16:04:24 +0700
diff --git a/qtc_packaging/debian_fremantle/compat b/qtc_packaging/debian_fremantle/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/qtc_packaging/debian_fremantle/control b/qtc_packaging/debian_fremantle/control
new file mode 100644 (file)
index 0000000..6130807
--- /dev/null
@@ -0,0 +1,41 @@
+Source: lichvietwidget
+Section: user/utilities
+Priority: optional
+Maintainer: Cuong Le <cuonglb@unknown>
+Build-Depends: debhelper (>= 5), libqt4-dev
+Standards-Version: 3.7.3
+Homepage: http://lichviet-widget.garage.maemo.org
+
+Package: lichvietwidget
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: 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:
+ iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c
+ 6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0
+ SU1FB9sIFw0HNVi5oxwAAAPSSURBVGje7ZlNiBxVEMd/NZnNLMbRsBLNJYle
+ AkL0JERQBEF5dZE9COJBhXjxqAbBJAYDORgPIvHmTTCgN3PT13gxflwU9OxF
+ VNglJn5kja7O4m55sHp5tN2z0z09mxnNg4bpj1evqt7/Xx9vYMSRZdlIz+qM
+ NmRKzQWfA272214I4QRjjnFldmuudxTYl9yPbcC4Mjs1F9ug/TGWzA4zPjpt
+ EfJajU0OhBDIsswqvvs5hHBLBQlfAY43WHuoTDM7LvLvGGNmd6jqt3UhdHXI
+ u0FD5w2VWaZ8GWc6BetmlwMAQ6yeJOk7rXBgxPF6mnRaMmAsmd0ihCp2YcOJ
+ frZFDrQiUwrsH0qCIkcSY61uWZI7q0qmmZmUeNPMDqjq940gNIQjUtf9uawq
+ mTICIaui0NSFomF6dUu8Ima2oKq/TJMRMUYr25SqENafyTwwzYmsihJ1E9m1
+ 5sF/uJz+30Foq/6h7f6iyrl1a6FNxbx/uAt4ANjjcXpgZl+r6nl/j9c5x4A/
+ txA9b2avqurKJGoh0sbH4/Ip4AUzu0FEOsn8QYzxCxF5PISwFGPcLSLHRtTn
+ TWBl4hDKsuwR4CVgl8+5DFxyL/eA+4GTMcYdSQZdK7nWC6LXtwNCc8CTwJw/
+ et/MnhGRNRF5AjjjRjwqIi+b2U/A065wutNd4DSw3x+fEpHlSZXT6TdzwO8i
+ sgbsBN5V1SU37hzwoojcZmZ7gJ6qXgbeKikNngX2+3qfhRBON4lC3boQUtVV
+ 4Ihfm8R2bhwCdrmsZTMbFAOAk/t24Kw75FcPBCOV360nskSpHnASuNFfXSgS
+ Mg8AwHs5pkXkiKpuNA27tSFUgEGu/A4z+0hE7vVG5A8ze01V10oMXjSzO72Z
+ +fgfMTE1brIQKvH8PuBzYK/LWAdOqOqXCbTyOT3gKWAeWBeRt0MIq3U6uFYg
+ lCsWYzwMfALsdeEXzeyxEMIbReVjjHmZ/rB7/wrwwbbXQglsDovIBTM74HMv
+ AQ+q6vmi8k5+zOw+oO/e/CaEMHLYbDMKEWO8FfgQ2OlzfhORe8zsxyzL+mZG
+ lmUCXA0hWCJ/MVnnXJNDgLETWYyx4wmqn5wgLIvIO56c8tavDzwE/JBMP5T8
+ /qqNIq92FBKRBWAxPVIRkYPAwRSCjvPiQdXd+RohhE/bKKebRKGee/e7LRa5
+ Cfir8MmqiFxs0nO3BqEQwhKwu2HkWijJ3rPRkRWVrav89ab+elO/zU39xqzs
+ QLfC2qNZlq1MkZ6DOonMzOz5aSN01f8FZRCSaYxGiVIybAfOiMhgiiE/D1yp
+ LJNncfwNJVPfwjeRWUoAAAAASUVORK5CYII=
+ ====
diff --git a/qtc_packaging/debian_fremantle/copyright b/qtc_packaging/debian_fremantle/copyright
new file mode 100644 (file)
index 0000000..ded9593
--- /dev/null
@@ -0,0 +1,35 @@
+This package was debianized by Cuong Le <metacuong@gmail.com> on
+Thu, 08 Sep 2011 16:04:24 +0700.
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+    Cuong Le <metacuong@gmail.com>
+
+Copyright:
+
+    Copyright (C) 2011 Cuong Le>
+
+License:
+
+    This package 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 package 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 package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2011, Cuong Le <metacuong@gmail.com> and
+is licensed under the GPL, see above.
+
diff --git a/qtc_packaging/debian_fremantle/rules b/qtc_packaging/debian_fremantle/rules
new file mode 100755 (executable)
index 0000000..7d3f3ac
--- /dev/null
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
+
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp  
+       dh_testdir
+
+       # Add here commands to compile the package.
+       # $(MAKE) # Uncomment this line for use without Qt Creator
+       #docbook-to-man debian/lichvietwidget.sgml > lichvietwidget.1
+
+       touch $@
+
+clean: 
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       $(MAKE) clean
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/lichvietwidget.
+       $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/lichvietwidget install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+        #dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+       # dh_shlibdeps # Uncomment this line for use without Qt Creator
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/settingsdlg.cpp b/settingsdlg.cpp
new file mode 100644 (file)
index 0000000..7df76b8
--- /dev/null
@@ -0,0 +1,48 @@
+#include "settingsdlg.h"
+
+
+SettingsDlg::SettingsDlg(QWidget *parent) :
+    QDialog(parent)
+{
+    this->setWindowTitle(QString::fromUtf8("Lựa Chọn"));
+
+    buttonBox = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
+    buttonBox->setOrientation(Qt::Vertical);
+    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+    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"));
+
+    mainLayout = new QGridLayout(this);
+
+    mainLayout->addWidget(tabWidget,0,0,1,1);
+    mainLayout->addWidget(buttonBox,0,1,1,1);
+\
+    this->setLayout(mainLayout);
+
+}
+
+void SettingsDlg::showSettingsDialog(){
+    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 (344 x 200) pixel.")));
+    themes->addItem(new QListWidgetItem( QString::fromUtf8("Lớn (430 x 500) pixel.")));
+    mainLayout = new QVBoxLayout;
+    mainLayout->addWidget(themes);
+    setLayout(mainLayout);
+}
+
diff --git a/settingsdlg.h b/settingsdlg.h
new file mode 100644 (file)
index 0000000..491d31b
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef SETTINGSDLG_H
+#define SETTINGSDLG_H
+
+#include <QDialog>
+#include <QTableWidget>
+#include <QDialogButtonBox>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QListWidget>
+#include <QListWidgetItem>
+
+class SettingsDlg : public QDialog
+{
+    Q_OBJECT
+public:
+    explicit SettingsDlg(QWidget *parent = 0);
+
+private:
+    QTabWidget *tabWidget;
+    QDialogButtonBox *buttonBox;
+    QGridLayout *mainLayout;
+
+signals:
+
+public slots:
+    void showSettingsDialog();
+
+};
+
+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