From: Cuong Le Date: Mon, 19 Sep 2011 05:14:54 +0000 (+0700) Subject: init develop X-Git-Url: http://vcs.maemo.org/git/?p=vietkaralist;a=commitdiff_plain;h=f81dd90b1452c4a2622b9a63eb2d47258fe72e37 init develop --- diff --git a/Contributors.txt b/Contributors.txt new file mode 100644 index 0000000..3dbe4d1 --- /dev/null +++ b/Contributors.txt @@ -0,0 +1,3 @@ +Cuong Le + - project owner + - Qt C++ and QML gui diff --git a/Licence.txt b/Licence.txt new file mode 100644 index 0000000..4f3d3e8 --- /dev/null +++ b/Licence.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/appman.cpp b/appman.cpp new file mode 100644 index 0000000..0e84f88 --- /dev/null +++ b/appman.cpp @@ -0,0 +1,49 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#include +#include +#include + +#include "appman.h" + +AppMan::AppMan(QObject *parent) : + QObject(parent) +{ +} + +AppMan::AppMan(QObject *parent, QmlApplicationViewer* viewer) : + QObject(parent) +{ + this->m_viewer = viewer; +} + +void AppMan::setOrientation(const QString &orientation){ + if(orientation=="portrait") + m_viewer->setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait); + else if(orientation=="landscape") + m_viewer->setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); + else //auto + m_viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto); +} + +void AppMan::minimize(){ + QDBusConnection c = QDBusConnection::sessionBus(); + QDBusMessage m = QDBusMessage::createSignal("/", "com.nokia.hildon_desktop", "exit_app_view"); + c.send(m); +} + diff --git a/appman.h b/appman.h new file mode 100644 index 0000000..ca60ffb --- /dev/null +++ b/appman.h @@ -0,0 +1,43 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#ifndef APPMAN_H +#define APPMAN_H + +#include + +#include "qmlapplicationviewer.h" + +class AppMan : public QObject +{ + Q_OBJECT +public: + explicit AppMan(QObject *parent = 0); + explicit AppMan(QObject *parent = 0, QmlApplicationViewer* viewer = 0); + +private: + QmlApplicationViewer* m_viewer; + +signals: + +public slots: + void setOrientation(const QString &orientation); + void minimize(); + +}; + +#endif // APPMAN_H diff --git a/db/vietkaralist.sqlite b/db/vietkaralist.sqlite new file mode 100644 index 0000000..ef3957d Binary files /dev/null and b/db/vietkaralist.sqlite differ diff --git a/dbman.cpp b/dbman.cpp new file mode 100644 index 0000000..048d4f3 --- /dev/null +++ b/dbman.cpp @@ -0,0 +1,51 @@ + +#include +#include +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#include + +#include "dbman.h" +#include "dbthread.h" + +DBMan::DBMan(QObject *parent) : + QObject(parent) +{ +} + +DBMan::DBMan(QObject *parent, QmlApplicationViewer* viewer) : + QObject(parent) +{ + this->m_viewer = viewer; + this->m_dbthread = new DBThread(); + + connect(this, SIGNAL(execQuery(const QString&)), this->m_dbthread, SLOT(slotExecQuery(const QString&))); + + connect(this->m_dbthread, SIGNAL(stopSearch()), this, SIGNAL(stopSearch())); + connect(this->m_dbthread, SIGNAL(removeOldSongs()), this, SIGNAL(removeOldSongs())); + connect(this->m_dbthread, SIGNAL(addSong(QString , QString , QString , QString)), this, SIGNAL(addSong(QString , QString , QString , QString ))); +} + +bool DBMan::doSearch(QString searchText){ + qDebug() << searchText; + + emit startSearch(); + emit execQuery("select * from song where title_simple like '%"+searchText+"%' order by title asc"); + + return true; +} diff --git a/dbman.h b/dbman.h new file mode 100644 index 0000000..3f90baf --- /dev/null +++ b/dbman.h @@ -0,0 +1,53 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#ifndef DBMAN_H +#define DBMAN_H + +#include + +#include "qmlapplicationviewer.h" +#include "dbthread.h" + +class DBMan : public QObject +{ + Q_OBJECT +public: + explicit DBMan(QObject *parent = 0); + explicit DBMan(QObject *parent = 0, QmlApplicationViewer* viewer = 0); + +private: + QmlApplicationViewer *m_viewer; + DBThread *m_dbthread; + + +signals: + void dbChanged(); + void removeOldSongs(); + void addSong(QString m_number, QString m_title, QString m_lyric, QString m_author); + void startSearch(); + void stopSearch(); + + void execQuery(const QString& m_query); + + +public slots: + bool doSearch(QString searchText); + +}; + +#endif // DBMAN_H diff --git a/dbthread.cpp b/dbthread.cpp new file mode 100644 index 0000000..972b7ae --- /dev/null +++ b/dbthread.cpp @@ -0,0 +1,61 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#include +#include +#include +#include +#include +#include + +#include "dbthread.h" + +DBThread::DBThread() +{ + db = QSqlDatabase::addDatabase("QSQLITE"); +#if defined(Q_WS_MAEMO_5) + db.setDatabaseName("/opt/vietkaralist/db/vietkaralist.sqlite"); +#else + db.setDatabaseName("/home/cuonglb/vietkaralist.sqlite"); +#endif + db.open(); +} + +DBThread::~DBThread(){ + db.close(); +} + +void DBThread::run(){ + + QSqlQuery query(this->mm_query); + QSqlRecord record = query.record(); + + if (record.count() > 0) { + emit removeOldSongs(); + while (query.next()) { + emit addSong(query.value(0).toString(),query.value(1).toString(), query.value(4).toString(), query.value(5).toString()); + } + } + + emit stopSearch(); + +} + +void DBThread::slotExecQuery(const QString& m_query){ + this->mm_query = m_query; + this->start(); +} diff --git a/dbthread.h b/dbthread.h new file mode 100644 index 0000000..def3e4a --- /dev/null +++ b/dbthread.h @@ -0,0 +1,48 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#ifndef DBTHREAD_H +#define DBTHREAD_H + +#include +#include + +class DBThread : public QThread +{ + Q_OBJECT + +public: + DBThread(); + ~DBThread(); + + void run(); + +public slots: + void slotExecQuery(const QString& m_query); + +signals: + void removeOldSongs(); + void addSong(QString m_number, QString m_title, QString m_lyric, QString m_author); + void stopSearch(); + +private: + QString mm_query; + QSqlDatabase db; + +}; + +#endif // DBTHREAD_H diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..e1549cf --- /dev/null +++ b/main.cpp @@ -0,0 +1,51 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +#include +#include + +#include "qmlapplicationviewer.h" + +#include "appman.h" +#include "dbman.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QmlApplicationViewer viewer; + + AppMan appman(0, &viewer); + DBMan dbman(0, &viewer); + + QDeclarativeContext *context = viewer.rootContext(); + + context->setContextProperty("AppMan", &appman); + context->setContextProperty("DBMan", &dbman); + + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); + viewer.setMainQmlFile(QLatin1String("qml/vietkaralist/main.qml")); + viewer.setWindowTitle(QString::fromUtf8("Viet Nam Karaoke Song List")); + +#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) + viewer.showFullScreen(); +#else + viewer.show(); + #endif + + return app.exec(); +} diff --git a/qml/vietkaralist/AboutDlg.qml b/qml/vietkaralist/AboutDlg.qml new file mode 100644 index 0000000..9d9ab39 --- /dev/null +++ b/qml/vietkaralist/AboutDlg.qml @@ -0,0 +1,136 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Item{ + + id: aboutdlg + + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height; + x:-(parent.width * 1.5) + + signal close + + Connections { + target: aboutdlg.parent + + onDialogClose: { + aboutdlg.state = "close"; + aboutdlg.destroy(600); + } + } + + + Rectangle { + id: rectangle1 + anchors.fill: parent; anchors.bottomMargin: 0 + visible: true + opacity:0.8 + + Image { + id: image1 + x: 0 + y: 53 + + anchors.horizontalCenter: parent.horizontalCenter + source: "imgs/app_icon.png" + + Text { + id: text1 + x: 11 + y: 91 + height: 20 + text: "Việt Nam Karaoke Song List
OS: Maemo 5 (Fremantle)" + anchors.horizontalCenterOffset: 1 + font.bold: true + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 20 + } + + Text { + id: text2 + x: 10 + y: 154 + height: 20 + text: "Phiên bản : 0.0.1 (18/09/2011)
\ +Phát triển bởi : metacuong@gmail.com" + anchors.horizontalCenterOffset: 0 + wrapMode: Text.NoWrap + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 22 + } + + + } + + Rectangle { + width : aboutdlg.width + height: 50 + color:"grey" + opacity: 0.5 + + MenuButton{ + id:btn_about + source: "imgs/back.png" + x:parent.width-50 + + onClicked: { + aboutdlg.close() + } + + } + } + + } + + Text { + id: title + + anchors { horizontalCenter: parent.horizontalCenter; top: aboutdlg.top; topMargin: 10 } + + y:6 + + font.pixelSize: 22 + color: "black" + text: qsTr("About") + smooth: true + font.bold: true + } + + states: [ + State{ + name:"show" + AnchorChanges { target: aboutdlg; anchors.right: parent.right } + }, + State { + name: "close" + AnchorChanges { target: aboutdlg; anchors.right: parent.left } + } + ] + + transitions: [Transition { + AnchorAnimation { easing.type: Easing.OutQuart; duration: 300 } + } + ] + +} diff --git a/qml/vietkaralist/MenuBar.qml b/qml/vietkaralist/MenuBar.qml new file mode 100644 index 0000000..c1e51e4 --- /dev/null +++ b/qml/vietkaralist/MenuBar.qml @@ -0,0 +1,80 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Item { + + id:mainMenuBar + + signal changeToFavouritePage + signal changeToMainPage + signal option + signal about + + anchors.fill: parent + Rectangle { + width: parent.width + height: 50 + y:parent.height-50 + color:"#2c84a6" + border.color: "grey" + radius: 0 + + + + MenuButton{ + id:btn_favor + source: "imgs/f.png" + x:10 + + onClicked: changeToFavouritePage + + } + + MenuButton{ + id:btn_songlist + source: "imgs/l.png" + x:60 + + onClicked:changeToMainPage + + } + + MenuButton{ + id:btn_opts + source: "imgs/o.png" + x:110 + + onClicked: { + + } + } + + + MenuButton{ + id:btn_about + source: "imgs/ab.png" + x:parent.width-50 + + onClicked:mainMenuBar.about() + + } + + + } +} diff --git a/qml/vietkaralist/MenuButton.qml b/qml/vietkaralist/MenuButton.qml new file mode 100644 index 0000000..5a6f71f --- /dev/null +++ b/qml/vietkaralist/MenuButton.qml @@ -0,0 +1,78 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Rectangle { + + id:mainWindow + + property alias source: img.source + + signal clicked + + width: 44 + height: 38 + radius: 0 + + color: "transparent" + + Rectangle { + id:mask + anchors.fill: parent + visible:false + border.color: "#9c96db" + gradient: Gradient { + GradientStop { + position: 0 + color: "#6289be" + } + + GradientStop { + position: 0.53 + color: "#000000" + } + + GradientStop { + position: 1 + color: "#213f91" + } + } + } + + + anchors.verticalCenter: parent.verticalCenter + + Image { + id: img + anchors.centerIn: parent + } + + MouseArea { + anchors.fill: parent + + onClicked: mainWindow.clicked() + + onPressed: { + mask.visible = true + } + + onReleased: { + mask.visible = false + } + } +} diff --git a/qml/vietkaralist/Page.qml b/qml/vietkaralist/Page.qml new file mode 100644 index 0000000..a9a97ce --- /dev/null +++ b/qml/vietkaralist/Page.qml @@ -0,0 +1,24 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.0 + +Rectangle { + + width: parent.width; height: parent.height + +} diff --git a/qml/vietkaralist/ScrollBar.qml b/qml/vietkaralist/ScrollBar.qml new file mode 100644 index 0000000..04c2d55 --- /dev/null +++ b/qml/vietkaralist/ScrollBar.qml @@ -0,0 +1,31 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Rectangle { + id: scrollbar + + anchors.right: parent.right + y: parent.visibleArea.yPosition * parent.height + width: 8 + height: parent.visibleArea.heightRatio * parent.height + color: "#000000" + opacity: parent.movingVertically ? 0.5 : 0 + + Behavior on opacity { PropertyAnimation { properties: "opacity"; duration: 500 } } +} diff --git a/qml/vietkaralist/SongList.qml b/qml/vietkaralist/SongList.qml new file mode 100644 index 0000000..fd6bb81 --- /dev/null +++ b/qml/vietkaralist/SongList.qml @@ -0,0 +1,117 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Item { + + id:songList + + anchors.fill: parent + anchors.leftMargin: 0 + anchors.rightMargin: 0 + + SongListView { + id:songlistview + } + + + Rectangle { + width: parent.width + height: 50 + color:"lightblue" + + radius: 4 + + border.color: "grey" + + Rectangle { + id: rec_tag + + width: parent.width-80 + x:9 + height: 35 + anchors.verticalCenter: parent.verticalCenter + border.color: "grey" + radius: 4 + TextInput { + id: txt_searchText + width: parent.width-1 + height: 27 + x:10 + text: "" + font.pixelSize: 20 + anchors.verticalCenter: parent.verticalCenter + + Keys.onEnterPressed: { + doSearch(); + } + } + } + + Rectangle { + x:rec_tag.width+20 + width:50 + height: 35 + anchors.verticalCenter: parent.verticalCenter + radius:4 + + color: "white" + border.color: "grey" + + Image { + id: btn_search + source: "imgs/search.png" + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + + MouseArea { + anchors.fill: parent + onClicked: { + doSearch(); + } + onPressed: { + parent.color = "lightblue"; + } + onReleased : { + parent.color = "white" + } + } + } + + } + + WaitingDlg { + id:waitingdlg + anchors.centerIn:parent + visible: false + } + + function doSearch(){ + waitingdlg.visible = true; + DBMan.doSearch(txt_searchText.text); + } + + Connections { + target: DBMan + onStopSearch:{ + waitingdlg.visible = false; + } + } + +} diff --git a/qml/vietkaralist/SongListView.qml b/qml/vietkaralist/SongListView.qml new file mode 100644 index 0000000..a1dda16 --- /dev/null +++ b/qml/vietkaralist/SongListView.qml @@ -0,0 +1,166 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Rectangle { + + id:container + width:parent.width + + property alias songlistView: songlistView + + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.fill: parent;anchors.topMargin: 55;anchors.leftMargin: 0;anchors.rightMargin: 0;anchors.bottomMargin: 30 + + Component { + id: songlistDelegate + Item { + + width: container.width; height: 80 + + Rectangle { + width: container.width + height:1 + border.color: "grey" + } + + Row { + anchors.verticalCenter: parent.verticalCenter + x:6 + Column { + width: 80 + Text { + text:model.number + font.bold: true + font.pixelSize: 20 + color:"blue" + } + } + Column { + width: 350 + Text { + text:model.title + font.bold: true + font.pixelSize: 18 + } + Text { + text:model.lyric + font.pixelSize: 16 + font.italic: true + wrapMode: Text.WordWrap + width: 300 + } + } + + Column { + width:100 + visible: container.width > container.height ? true : false + Text { + text:model.author + font.bold: true + font.pixelSize: 18 + } + } + } + + + MouseArea { + anchors.fill: parent; + onClicked:{ + songlistView.currentIndex = index; + } + } + } + } + + ListModel { + id: songlistModel + + Component.onCompleted: { + + } + + } + + Connections { + target:DBMan + onDbChanged:{ + } + onAddSong:{ + songlistModel.append({"number":m_number, "title":m_title, "lyric":m_lyric, "author":m_author}) + } + onRemoveOldSongs:{ + console.log("Remove old songs") + songlistModel.clear(); + } + } + + Component { + id: highlightsongDelegate + Rectangle { + width: container.width; height: songlistView.currentItem.height-6 + color: "lightsteelblue"; radius: 5 + y: songlistView.currentItem.y+4 + border.color: "grey" + /*Behavior on y { + SpringAnimation { + spring: 4 + damping: 0.1 + } + }*/ + } + } + + Component { + id: sectionHeading + Rectangle { + width: container.width + height: childrenRect.height + color: "lightsteelblue" + + Text { + text: section + font.bold: true + } + } + } + + + ListView { + id : songlistView + anchors.fill: parent + model: songlistModel + delegate: songlistDelegate + highlight: highlightsongDelegate + focus: true + highlightFollowsCurrentItem: false + + + section.property: "the_loai" + section.criteria: ViewSection.FullString + section.delegate: sectionHeading + + ScrollBar{ + + } + + } + + +} diff --git a/qml/vietkaralist/TopBar.qml b/qml/vietkaralist/TopBar.qml new file mode 100644 index 0000000..73bbb5e --- /dev/null +++ b/qml/vietkaralist/TopBar.qml @@ -0,0 +1,160 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Item { + + id:m_topbar + + anchors.fill: parent + + property alias title: mTitle.text + + Rectangle { + + width: parent.width-1 + height: 49 + + color: "white" + + radius: 0 + border.color: "grey" + + Text { + id : mTitle + + color: "blue" + + horizontalAlignment: Text.AlignHCenter + + anchors.horizontalCenter: parent.horizontalCenter + + font.bold: true + font.pixelSize: 22 + + y:10 + + } + + + } + + /* + Minimize button + */ + + Rectangle { + id: btn_minimize + + x:m_topbar.x + 5 + y:m_topbar.y + 5 + + height: 40 + width: 45 + + color: "transparent" + + border.color: "grey" + border.width: 1 + + radius: 4 + + Rectangle { + x:parent.x + y:parent.y + + width: parent.width - 15 + height: parent.height - 15 + + border.color: "white" + color: "grey" + border.width: 1 + } + + Rectangle { + x:parent.x + 5 + y:parent.y + 5 + width: parent.width - 15 + height: parent.height - 15 + + border.color: "white" + color: "grey" + border.width: 1 + } + + MouseArea { + anchors.fill: parent + + onClicked: AppMan.minimize(); + + onPressed: { + parent.color = "blue" + } + + onReleased: { + parent.color = "transparent" + } + } + + } + + /* + Close button + */ + + Rectangle { + id: btn_close + + x:m_topbar.width - 50 + y:m_topbar.y + 5 + + width: 45 + height: 40 + + color: "transparent" + + border.color: "grey" + border.width: 1 + + radius: 4 + + Text { + id: button1 + color: "grey" + anchors.centerIn: parent; font.bold: true + text: "X"; style: Text.Raised; styleColor: "black" + font.pixelSize: 26 + font.family: "Tahoma" + } + + MouseArea { + anchors.fill: parent + + onClicked: Qt.quit() + + onPressed: { + parent.color = "blue" + } + + onReleased: { + parent.color = "transparent" + } + } + } + +} diff --git a/qml/vietkaralist/WaitingDlg.qml b/qml/vietkaralist/WaitingDlg.qml new file mode 100644 index 0000000..9b1f89c --- /dev/null +++ b/qml/vietkaralist/WaitingDlg.qml @@ -0,0 +1,51 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +Item { + id: dialog + + width: 145 + height: 36 + opacity: dialog.visible ? 1 : 0 + + Rectangle { + id: rectangle1 + anchors.fill: parent + x: 23 + y: 0 + width: 200 + height: 200 + color: "lightblue" + radius: 4 + border.color: "#2bb3f7" + + Text { + id: text1 + x: 40 + y: 8 + color: "white" + text: "Đang tìm ..." + font.pointSize: 16 + font.bold: true + anchors.centerIn: parent + } + } + + +} diff --git a/qml/vietkaralist/imgs/ab.png b/qml/vietkaralist/imgs/ab.png new file mode 100644 index 0000000..59b6ea3 Binary files /dev/null and b/qml/vietkaralist/imgs/ab.png differ diff --git a/qml/vietkaralist/imgs/app_icon.png b/qml/vietkaralist/imgs/app_icon.png new file mode 100644 index 0000000..214d83f Binary files /dev/null and b/qml/vietkaralist/imgs/app_icon.png differ diff --git a/qml/vietkaralist/imgs/back.png b/qml/vietkaralist/imgs/back.png new file mode 100644 index 0000000..4669173 Binary files /dev/null and b/qml/vietkaralist/imgs/back.png differ diff --git a/qml/vietkaralist/imgs/busy.png b/qml/vietkaralist/imgs/busy.png new file mode 100644 index 0000000..664c2b1 Binary files /dev/null and b/qml/vietkaralist/imgs/busy.png differ diff --git a/qml/vietkaralist/imgs/f.png b/qml/vietkaralist/imgs/f.png new file mode 100644 index 0000000..fc1de6a Binary files /dev/null and b/qml/vietkaralist/imgs/f.png differ diff --git a/qml/vietkaralist/imgs/l.png b/qml/vietkaralist/imgs/l.png new file mode 100644 index 0000000..bf9a365 Binary files /dev/null and b/qml/vietkaralist/imgs/l.png differ diff --git a/qml/vietkaralist/imgs/o.png b/qml/vietkaralist/imgs/o.png new file mode 100644 index 0000000..c04fb96 Binary files /dev/null and b/qml/vietkaralist/imgs/o.png differ diff --git a/qml/vietkaralist/imgs/search.png b/qml/vietkaralist/imgs/search.png new file mode 100644 index 0000000..d090a49 Binary files /dev/null and b/qml/vietkaralist/imgs/search.png differ diff --git a/qml/vietkaralist/main.qml b/qml/vietkaralist/main.qml new file mode 100644 index 0000000..b60e43c --- /dev/null +++ b/qml/vietkaralist/main.qml @@ -0,0 +1,129 @@ +/* +Copyright (C) 2011 by Cuong Le + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +import QtQuick 1.1 + +import "./scripts/main.js" as Script + +Rectangle { + + id: mainWindow + + width: 480 + height: 800 + + color:"white" + + property variant pageTitle: ["Danh Sách Yêu Thích","Danh Sách Bài Hát"] + + signal dialogClose + + VisualItemModel { + id:pageModel + + Page{ + id:page1 + width: viewModel.width; height: viewModel.height + anchors.topMargin: 4 + color:"white" + } + + Page{ + id:page2 + width: viewModel.width; height: viewModel.height + color:"white" + + SongList{ + id:xsonglist + } + } + + } + + ListView { + id: viewModel + + anchors.fill: parent + anchors.topMargin: 52 + anchors.bottomMargin: 30 + + model: pageModel + + preferredHighlightBegin: 0 + preferredHighlightEnd: 0 + + highlightRangeMode: ListView.StrictlyEnforceRange + orientation: ListView.Horizontal + snapMode: ListView.SnapOneItem + highlightMoveDuration: 300 + + interactive: false + + onCurrentIndexChanged:{ + topbar.title = pageTitle[currentIndex] + } + } + + Component.onCompleted: { + viewModel.currentIndex = 1; + } + + TopBar{ + id:topbar + } + + MenuBar { + id:menubar + + onChangeToFavouritePage: { + + } + + onChangeToMainPage: { + } + + onOption: { + + } + + onAbout: { + mainWindow.state="disable" + var a = Script.createObject("../AboutDlg.qml", mainWindow) + a.close.connect(closeDlg) + a.state = "show" + } + } + + function closeDlg(){ + dialogClose(); + mainWindow.state = "enable" + } + + states: [ + State{ + name:"enable" + }, + State{ + name:"disable" + PropertyChanges {target: topbar; visible:false } + PropertyChanges {target: menubar; visible:false } + PropertyChanges {target: page2; visible:false} + } + ] + + +} diff --git a/qml/vietkaralist/scripts/main.js b/qml/vietkaralist/scripts/main.js new file mode 100644 index 0000000..c51fffe --- /dev/null +++ b/qml/vietkaralist/scripts/main.js @@ -0,0 +1,14 @@ +.pragma library + +function createObject(sourceFile, parentObject) { + var component = Qt.createComponent(sourceFile); + var guiObject = component.createObject(parentObject); + + if (guiObject === null) { + console.log("Error creating object"); + } + else { + console.log("Created") + return guiObject + } +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.cpp b/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..b3e862c --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -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 +#include +#include +#include +#include +#include + +#if defined(QMLJSDEBUGGER) +#include +#endif + +#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) +#include +#endif +#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) +#include +#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(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(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 index 0000000..19875a3 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.h @@ -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 + +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 index 0000000..b07f873 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.pri @@ -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 index 0000000..9a07c22 --- /dev/null +++ b/qtc_packaging/debian_fremantle/README @@ -0,0 +1,6 @@ +The Debian Package vietkaralist +---------------------------- + +Comments regarding the Package + + -- Cuong Le Sat, 17 Sep 2011 13:31:46 +0700 diff --git a/qtc_packaging/debian_fremantle/changelog b/qtc_packaging/debian_fremantle/changelog new file mode 100644 index 0000000..2cbde18 --- /dev/null +++ b/qtc_packaging/debian_fremantle/changelog @@ -0,0 +1,5 @@ +vietkaralist (0.0.1-fremantle3) unstable; urgency=low + + * Fixed for deb package + + -- Cuong Le Sat, 17 Sep 2011 13:31:46 +0700 diff --git a/qtc_packaging/debian_fremantle/compat b/qtc_packaging/debian_fremantle/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/qtc_packaging/debian_fremantle/compat @@ -0,0 +1 @@ +5 diff --git a/qtc_packaging/debian_fremantle/control b/qtc_packaging/debian_fremantle/control new file mode 100644 index 0000000..0fe782b --- /dev/null +++ b/qtc_packaging/debian_fremantle/control @@ -0,0 +1,15 @@ +Source: vietkaralist +Section: user/utilities +Priority: optional +Maintainer: Cuong Le +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.7.3 +Homepage: http://vietkaralist.garage.maemo.org + +Package: vietkaralist +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Viet Nam Karaoke Song List +XB-Maemo-Display-Name: VN Karaoke Song List +XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=2235 +XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAADI9JREFUaIHtV21wVNd5ft5z793du7vaXa0+VhIg9LGSLCQZSwLbWBbEhnqmNqlL6rQTx9R8xKGuZxom9UCcpnacaUraSWLczrTTxJnatWsSyzNxWscJbcCAiYFgEOgLGwzWByBptavVft69X+f0x0oyFOGCE+BHeWZ2zuzdvec8z/s+533PAW7iJm7iJm7i/zNoroevdnU9oWdS22OxCdnpcAghGBiT6MPxzPLt39qyH0TiehO9HOYU8Pw/bBdjo+fgUFxCcSgkSZIgAB+c/ogsUl/JTY2t6+rqsq8z1znB/veDV7veuCM5FQeRJLJalnQ9B8YE5bQ4GZk4zHT0Ebfb/cSNIDsXLhLQ9Z+/+MzE+Y9+fe78GBKJJDldThAkLG6sRkN1CTKaDSIm/H7n82vWffX3bhTpC3GRgFw23WlZJjweL1RVhW1zhOtr0dq2GAWBUhiGCa9HpsmJKJiReHrNn/1l6Y0iPoOLBFgWVIBg2SbcbhXctrHqng6QEoBmylBdTtTOK4QtADLTdzu15L8++udPlt0o8gAgXfhl49e3HzAT5zZk0ylvKpGi8vJizAt5oMgCiXgUy1fcjfHIKMLzQ5gcPQ2mTYQLfe4nl618UKpfetfJ4wffSV1vAZdUoX/+0csP6clIVzweF34PJ845hkYikGWGwkIfamuq0VAXxltd/4bo+RGMiHliYUWILKlg70Q0+s2fvPQve66ngEuq0OMb176uqF4oDpki0aTYues99PSfga5bULiJ4mAApWVleGTDlxFecg8k1U/JyCCmRk+tgJ399+tJHrhMH3jmmdccY8n+b8Qjg08VepxyJpOFS3WgMkhIxaPCV6DSI5u3wePxwu9W8Ks3d2BwcBhnhkbFuWiO4PT/l2x7P/fKK9/LXGsB0lwP9+7tso8c3Pv24ts/8/66tZ9vGo9MJCOxTNomp38yyygVHxN95zWqK5Hh9hWhpjYMt0sGCYtGzp0Xtq6FLWZ/sb/32PYbImAGvd2HBl588aV/qli65odKoGKHzHNl86uqq53eEufY8Adi8sP95HRKqG1ahpKyCgR8PkRGR0jL5YSRzQRalnSea6xf3TcwsPeade05LfR/YfPffL/cZenvZ+NjPgfpaKorRU1tPRqaWuEvLMPQqT50dx8RO3cfoKzOBXMG3uF6aoFLdbkZY4qmablMJpuJx+PRycnYoydOnDj1aQV8YgYuh4O7d6ZXf2HTq1NTmVJdtxZl0ik2GYsgGR1DbWMTissrMa+smCJjZ0U2k6FsJlU5v7qhcF5Zsdfj9ap+v78gWBQsKguFFhiGscHn89X5/f7dsVjMuOYC6uoWNgaDJZuPvrtr7Qd978XSmpkoDJbVZnIGJuNxMDsF1aUgGJqPkqCPZAK0bIZGzkfBJRU+rxuAgCRJYIwhFAopXq+3VdO0Px0ZGfn+1fK5GgvRfffdp7W1tTklSRKGYcy+axoGTJvD4gRu5+CWTAR9Tnz+T/4YVXWLwE0TL7/4Iwy8fxqRKQ0LqhrgVR3gti1GR0cpkUwiEhnHnj17rtrSV5yBysrKlff//v0bZEUWnHMSQkAIAQEBQj4SDBwcMjRTIKOZ0BITMLUUCgqLEA7XwylzaNkshs6NwRIKdF2n7u4jibGxsd2apv3j+Pj4b66JgKKiooLm5uaftLW3lQohCACEECAiYPpqQ0TT+eSQJQkcCmJTU5iIjCERG0fr0mUI1zWiyO9Gf38f4pOTyOqW3bN/b6WnsHBHT0/P/qslD1yhhe699979Tz/91x2ypEDLZpFIJzF6fhRaVoOW05DL5WCaJgDAsixwboNzAc4FLMFgmAbKCxnCC0NY3NqOWxpbcezwr/HuoffE0YEhypkEM5dFNBrZBVA3II7ncrk3hRCmZVnmwMDAZTf3FWUgFCr7hqIohU6HE1OJBGKxGHRdR2GwULhcLliWRYzlTyVCCBBoNjKMOCQmI5E2MTmVwMTYOTQ0NqKu6TZUzgvR+wO90HMaAqUVomVRY00wGLyroMD3OSGw1eVy3q+q6i0ul+t4LBab86B4RQJKSkomjx7tLt67b6+2b9875w8dOjTY3z8gVZRXFDQ0NICISJZlMGKwLAtAPrWcC4AIRByCZORMCVMpDZmps5AYx4KqegQ8Dhh6Br853EuNt9wCr9cDv98vysvLqaioqNzr9d4hbLE8WFQy3tFx14cDAwMX3cfly5GuqKgokmX5iQULFjwwPj5x2jBy3xweHt4983tra+sW1a3+XVlZGQUCAVimBd3QEYvGkM6kkU6lMRmfhGEYsC0LgAWHBNi2goN9MRw+/gYCBf+Be1bciVROgqnr+Pa2v4fbU4CqcJgeWLUcbrcbqqoiHp9amkgl1o6MjPw3AO1CnnPugcrKyprW1tbXN27c2NrS0iKSySR27Pix/p3vbFMBoLGxceFDf/TQ4IMPPggQoOs6OOfgNkdWyyKXyyGbyWJ0bBSZTAZaLodsJgNu2xAALNOGBQbL4jh7phdnhsfQ0tSEY8d6kMpkYJkCj315Hbwet9BzOn65c+cZIeQ/7Ol5r++KLLRy5cqfbt68+c5ly5YJzjmpqoqW5mbl+PGe5TU14a3t7W3f3rRpk7BtG8ibBBAAMQIjBkVR4HQ6ocjTo6LkN/lFpVeAkcAHp0dw7uwoBocGUReuQSwWg8Mhobv3FPwBH44d6zYMg7X19h7+cC6ul2QgHA7feerUqQPpdFoIIcgwDAguYHMb3LZhWTZMy4Rt27AtCza3YZoWbNuGEAKGboCLfDYM0wC3OUzLRCKRQCaTQTqdRiQSga7rME0TpmGCGGE0Momdv/glGHGoqgqH4kAilRQku84+ORWpepaIzyXgkgzU1ze8vn79unk0HVgA+egSYTriYIyB2xzEZloYwIjyLYHy/wd93CsYY5AkCU6nEy6nCwICEmPA9JxccHjdLkiyA4lUBtlsGkIAqstF4Jb/1Es7OurDtX/gK/DWRaPRdy4roKSk5K4vfWnj1zo6OuQ8L4IQAowRMNO4pgXlBzErJl9tCJxzMGKzhXR2nBaiKMqstRyKA1xwzJRgv68A5eXl0E2ByVgEsiwJt8eD6PhE7a233baodfHiu3M57bXx8fHYnAIWLVr02gsvvFDJGCNJkiBJDIwxEDEwic1GX5KlfBQlCWz6N4lJeZISAxGBGM2OkpRfhskMsiRBcTjg8Xjh8/lQWBhEMBiEr8AHwTlU1YnKBeVobm5CVVU1pVM5AjcwMjSEuoY6efCjjwITExM/neF8URm1LLuwp6eH2traZqMmSRKIALJo1hK2ZUORFViWBVmWMTo4CpvbkGVZBAIBkmUZpmHMNjULFiRZAmyAC4LE8lZUmAIBAUWW4XA4YNkWspkMUuk0EokE3G7CHXfchncP2CgtDaLA6xGc82OfZKGKAwcOdq5YsVwEAoFpDXmfz9hjxgqCcyiKgpMnT4rntm+nAwcOoLv7GI2NjSOVSsGlqsLjcZNAXvTs2Ykwa7cZEKbnhEA2q2F6bciyDCJCKFSMoqIgdF2n4eHhTdFoNPHxu5eCbr311g0Oh/Mpl8tVu3btWqxatVLU1NRQPkvW9MeELCv4wQ9+iK985S9mTw7t7e0FuVzOJ0nKmmCw8PkvPvywWLJkCSzbItu2p6uXDWu6glnTFYwYiS1btuyQJGmHLMvPfeHhh8OhklLoeg5Dw8Ni3759FIvF3ujv719zEdk5BMyira2t07b5TiJyhkIheuqpr9HixYuhqipM04Qsy9i1azdWr35gznkWLWp6ubOz85H169dDliUIIcA5h2ma4JzPkrdsC0IIbN26Ndjb2xtfunRpmWGYZ2tra1l5eRkdPnwYmqa9kkwmHxsaGspdsYALhKy2LP7ZXE77LBHUysqFanNzs9O2bZw+fRo///mbF83T0tIyv6Ji/tc7OpY93tnZKUpLSmDZNuVPqh8LEEJA13VIkiT2vL2Hnv3Ws7PztLe3P2qa9mNC8HJZlv6qu7v7x3Nx+1SX+k9CfX19dVVV9clt2/5WCpWGyDAMcD7d1DjPCzAMcCHyfUVAvPGzn9Hbb+9+7tChQ1+92vU+1aX+kxCLxaY8Hu/yo0eP1i5f3imKi4tnb2+UbyfTyG/qEwMn6K233hpJJpOPj4+PT13ter9zAQBQXV39ejw+md71q12r+vr7IUkSqqur8z2EMQgAjElgjInvfvd7YiI68fg1vZH9tmhvb681DOsZzu1m27YLhBAuIrJkWR7s6+u957eZ+7oIuBC33367j3NeKYRIHjlyZPh6r38Tv2v8D66uEeCVyR9lAAAAAElFTkSuQmCC diff --git a/qtc_packaging/debian_fremantle/copyright b/qtc_packaging/debian_fremantle/copyright new file mode 100644 index 0000000..63fac33 --- /dev/null +++ b/qtc_packaging/debian_fremantle/copyright @@ -0,0 +1,34 @@ +This package was debianized by Cuong Le on +Sat, 17 Sep 2011 13:31:46 +0700. + +It was downloaded from + +Upstream Author(s): + + Cuong Le + +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 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 index 0000000..f52712b --- /dev/null +++ b/qtc_packaging/debian_fremantle/rules @@ -0,0 +1,72 @@ +#!/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 + +APPNAME := vietkaralist +builddir: + mkdir -p builddir + +builddir/Makefile: builddir + cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro + +build: build-stamp + +build-stamp: builddir/Makefile + dh_testdir + + # Add here commands to compile the package. + cd builddir && $(MAKE) + #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + rm -rf builddir + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/arora. + cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install + + +# 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_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/vietkaralist.desktop b/vietkaralist.desktop new file mode 100644 index 0000000..e60e90e --- /dev/null +++ b/vietkaralist.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=VN Karaoke Song List +Exec=/opt/vietkaralist/bin/vietkaralist +Icon=vietkaralist +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/vietkaralist.png b/vietkaralist.png new file mode 100644 index 0000000..214d83f Binary files /dev/null and b/vietkaralist.png differ diff --git a/vietkaralist.pro b/vietkaralist.pro new file mode 100644 index 0000000..8d9f51c --- /dev/null +++ b/vietkaralist.pro @@ -0,0 +1,60 @@ +# Add more folders to ship with the application, here +folder_01.source = qml/vietkaralist +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 = 0xE6CF3A6C + +# 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 += + +QT += sql \ + dbus + +# The .cpp file which was generated for your project. Feel free to hack it. +SOURCES += main.cpp \ + appman.cpp \ + dbman.cpp \ + dbthread.cpp + +HEADERS += \ + appman.h \ + dbman.h \ + dbthread.h + +# Please do not modify the following two lines. Required for deployment. +include(qmlapplicationviewer/qmlapplicationviewer.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 \ + qml/vietkaralist/com/TopBar.qml \ + qml/vietkaralist/com/Page.qml \ + qml/vietkaralist/com/ScrollBar.qml \ + qml/vietkaralist/com/SongListView.qml \ + qml/vietkaralist/com/WaitingDlg.qml \ + qml/vietkaralist/com/MenuBar.qml \ + qml/vietkaralist/com/MenuButton.qml \ + db/vietkaralist.sqlite \ + qml/vietkaralist/com/AboutDlg.qml \ + qml/vietkaralist/scripts/main.js diff --git a/vietkaralist.svg b/vietkaralist.svg new file mode 100644 index 0000000..566acfa --- /dev/null +++ b/vietkaralist.svg @@ -0,0 +1,93 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/welcome b/welcome deleted file mode 100644 index e69de29..0000000