[
  {
    "path": ".gitignore",
    "content": "# C++ objects and libs\n\n*.slo\n*.lo\n*.o\n*.a\n*.la\n*.lai\n*.so\n*.dll\n*.dylib\n\n# Qt-es\n\n/.qmake.cache\n/.qmake.stash\n*.pro.user\n*.pro.user.*\n*.qbs.user\n*.qbs.user.*\n*.moc\nmoc_*.cpp\nqrc_*.cpp\nui_*.h\nMakefile*\n*-build-*\n\n# QtCreator\n\n*.autosave\n\n#QtCtreator Qml\n*.qmlproject.user\n*.qmlproject.user.*\n\n*~\ngoogle-services.json\n.DS_STORE\n.build\n.gradle\n.idea\ngen\ngradle.properties\nandroid.iml\nbuild-src*\nsrc/android/gradle.properties\nsrc/android/local.properties\n"
  },
  {
    "path": "COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n"
  },
  {
    "path": "README.md",
    "content": "# Qute Launcher\n\n![](http://iktwo.github.io/QuteLauncher/images/icon.png)\n\nQute Launcher is and Android Launcher written with Qt, it is in alpha state but it already supports launching applications.\n\nRequires Qt >= 5.5\n\n# Screenshot\n![](http://iktwo.github.io/QuteLauncher/images/screenshot.jpg)\n\n# Features\n* Application icon retrieval.\n* Detect app installation or removal.\n\n# TODO\n* Add wallpaper picker.\n* Add support for themes.\n* Add intro screen to configure theme.\n* Add home screens and favorites bar.\n* Support icon themes.\n* Investigate if it is possible to integrate widgets.\n\n# Analytics\n\nThis project uses Firebase Analytics to collect usage data.\n\n# How to compile\n\nIn order to build this project you need to use Gradle. There are no Qt/QML dependencies. If you have Qt >= 5.5 for Android open the project with QtCreator or follow this instructions if you don't want to use QtCreator http://doc.qt.io/qt-5/deployment-android.html passing --gradle to the androiddeployqt tool.\n"
  },
  {
    "path": "qute-launcher.pro",
    "content": "TEMPLATE = subdirs\nCONFIG += ordered\n\nSUBDIRS += \\\n    src\n\nOTHER_FILES += \\\n    README.md\n"
  },
  {
    "path": "src/android/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.iktwo.qutelauncher\"\n    android:installLocation=\"auto\"\n    android:versionCode=\"6\"\n    android:versionName=\"0.06\">\n\n    <application\n        android:name=\"org.qtproject.qt5.android.bindings.QtApplication\"\n        android:hardwareAccelerated=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"QuteLauncher\"\n        android:theme=\"@style/AppTheme\">\n\n        <activity\n            android:name=\"com.iktwo.qutelauncher.QuteLauncherFlavored\"\n            android:configChanges=\"orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation\"\n            android:label=\"Qutelauncher\"\n            android:launchMode=\"singleInstance\"\n            android:screenOrientation=\"unspecified\">\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.HOME\" />\n                <category android:name=\"android.intent.category.DEFAULT\" />\n            </intent-filter>\n\n            <meta-data\n                android:name=\"android.app.lib_name\"\n                android:value=\"qute-launcher\" />\n            <meta-data\n                android:name=\"android.app.qt_sources_resource_id\"\n                android:resource=\"@array/qt_sources\" />\n            <meta-data\n                android:name=\"android.app.repository\"\n                android:value=\"default\" />\n            <meta-data\n                android:name=\"android.app.qt_libs_resource_id\"\n                android:resource=\"@array/qt_libs\" />\n            <meta-data\n                android:name=\"android.app.bundled_libs_resource_id\"\n                android:resource=\"@array/bundled_libs\" />\n            <!-- Deploy Qt libs as part of package -->\n            <meta-data\n                android:name=\"android.app.bundle_local_qt_libs\"\n                android:value=\"-- %%BUNDLE_LOCAL_QT_LIBS%% --\" />\n            <meta-data\n                android:name=\"android.app.bundled_in_lib_resource_id\"\n                android:resource=\"@array/bundled_in_lib\" />\n            <meta-data\n                android:name=\"android.app.bundled_in_assets_resource_id\"\n                android:resource=\"@array/bundled_in_assets\" />\n            <!-- Run with local libs -->\n            <meta-data\n                android:name=\"android.app.use_local_qt_libs\"\n                android:value=\"-- %%USE_LOCAL_QT_LIBS%% --\" />\n            <meta-data\n                android:name=\"android.app.libs_prefix\"\n                android:value=\"/data/local/tmp/qt/\" />\n            <meta-data\n                android:name=\"android.app.load_local_libs\"\n                android:value=\"-- %%INSERT_LOCAL_LIBS%% --\" />\n            <meta-data\n                android:name=\"android.app.load_local_jars\"\n                android:value=\"-- %%INSERT_LOCAL_JARS%% --\" />\n            <meta-data\n                android:name=\"android.app.static_init_classes\"\n                android:value=\"-- %%INSERT_INIT_CLASSES%% --\" />\n        </activity>\n\n    </application>\n\n    <supports-screens\n        android:anyDensity=\"true\"\n        android:largeScreens=\"true\"\n        android:normalScreens=\"true\"\n        android:smallScreens=\"true\" />\n\n\n    <uses-sdk android:minSdkVersion=\"21\" />\n</manifest>\n"
  },
  {
    "path": "src/android/build.gradle",
    "content": "buildscript {\n    ext {\n        kotlin_version = '1.3.0'\n        gradle_version = '3.3.1'\n    }\n\n    repositories {\n        google()\n        jcenter()\n    }\n\n    dependencies {\n        classpath \"com.android.tools.build:gradle:$gradle_version\"\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n    }\n}\n\napply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.61\"\n}\n\nandroid {\n    /*******************************************************\n     * The following variables:\n     * - androidBuildToolsVersion,\n     * - androidCompileSdkVersion\n     * - qt5AndroidDir - holds the path to qt android files\n     *                   needed to build any Qt application\n     *                   on Android.\n     *\n     * are defined in gradle.properties file. This file is\n     * updated by QtCreator and androiddeployqt tools.\n     * Changing them manually might break the compilation!\n     *******************************************************/\n\n    /**\n     * Uncomment the following lines and remove minsdk from manifest to sync inside IntelliJ:\n     *\n     * String androidBuildToolsVersion = \"28.0.3\"\n     * String androidCompileSdkVersion = \"28\"\n     * String qt5AndroidDir = \"\"\n     */\n\n\n    compileSdkVersion androidCompileSdkVersion.toInteger()\n\n    buildToolsVersion androidBuildToolsVersion\n\n    defaultConfig {\n        applicationId \"com.iktwo.qutelauncher\"\n        targetSdkVersion 28\n    }\n\n    String APK_NAME = \"qutelauncher\"\n\n    productFlavors {\n        full {\n            dimension \"analytics\"\n        }\n\n        noanalytics {\n            dimension \"analytics\"\n        }\n    }\n\n    flavorDimensions \"analytics\"\n\n    sourceSets {\n        main {\n            manifest.srcFile 'AndroidManifest.xml'\n            java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']\n            aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']\n            res.srcDirs = [qt5AndroidDir + '/res', 'res']\n            resources.srcDirs = ['src']\n            renderscript.srcDirs = ['src']\n            assets.srcDirs = ['assets']\n            jniLibs.srcDirs = ['libs']\n       }\n\n        full {\n            java.srcDirs = ['full']\n            manifest.srcFile 'full/AndroidManifest.xml'\n        }\n\n        noanalytics {\n            java.srcDirs = ['noanalytics']\n        }\n    }\n\n    lintOptions {\n        abortOnError false\n    }\n\n    afterEvaluate {\n        assembleRelease.doLast {\n\n        }\n    }\n\n    applicationVariants.all { variant ->\n        variant.outputs.all { output ->\n            output.outputFileName = [APK_NAME, variant.productFlavors[0].name, variant.buildType.name].join(\"_\") + \".apk\"\n        }\n\n        variant.assemble.doLast {\n            variant.outputs.all { output ->\n                String apk_name = [APK_NAME, variant.productFlavors[0].name, variant.buildType.name].join(\"_\") + \".apk\"\n\n                if (variant.productFlavors[0].name == \"full\") {\n                    copy {\n                        from output.outputFile\n                        into file(buildDir.getPath() + \"/outputs/apk/\")\n                        rename { String fileName ->\n                            fileName.replace(apk_name, \"android-build-\" + variant.buildType.name + \".apk\")\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/android/full/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.iktwo.qutelauncher\">\n\n    <application>\n\n        <service android:name=\"com.iktwo.qutelauncher.CustomFirebaseMessagingService\">\n            <intent-filter>\n                <action android:name=\"com.google.firebase.MESSAGING_EVENT\" />\n            </intent-filter>\n        </service>\n\n    </application>\n\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>\n"
  },
  {
    "path": "src/android/full/com/iktwo/qutelauncher/QuteLauncherFlavored.kt",
    "content": "package com.iktwo.qutelauncher\n\nimport android.os.Bundle\n\nclass QuteLauncherFlavored : QuteLauncher() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n    }\n}\n"
  },
  {
    "path": "src/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Feb 28 21:51:51 PST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.10.1-all.zip\n"
  },
  {
    "path": "src/android/gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "src/android/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "src/android/noanalytics/com/iktwo/qutelauncher/QuteLauncherFlavored.kt",
    "content": "package com.iktwo.qutelauncher\n\nclass QuteLauncherFlavored : QuteLauncher()\n"
  },
  {
    "path": "src/android/res/values/libs.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<resources>\n    <array name=\"qt_sources\">\n        <item>https://download.qt.io/ministro/android/qt5/qt-5.6</item>\n    </array>\n\n    <!-- The following is handled automatically by the deployment tool. It should\n         not be edited manually. -->\n\n    <array name=\"bundled_libs\">\n        <!-- %%INSERT_EXTRA_LIBS%% -->\n    </array>\n\n     <array name=\"qt_libs\">\n         <!-- %%INSERT_QT_LIBS%% -->\n     </array>\n\n    <array name=\"bundled_in_lib\">\n        <!-- %%INSERT_BUNDLED_IN_LIB%% -->\n    </array>\n    <array name=\"bundled_in_assets\">\n        <!-- %%INSERT_BUNDLED_IN_ASSETS%% -->\n    </array>\n\n</resources>\n"
  },
  {
    "path": "src/android/res/values/screen_data.xml",
    "content": "<resources>\n    <bool name=\"isTablet\">false</bool>\n</resources>\n"
  },
  {
    "path": "src/android/res/values-sw600dp/screen_data.xml",
    "content": "<resources>\n    <bool name=\"isTablet\">true</bool>\n</resources>\n"
  },
  {
    "path": "src/android/res/values-v21/styles.xml",
    "content": "<resources>\n    <style name=\"AppTheme\" parent=\"android:Theme.Material\">\n    <item name=\"android:navigationBarColor\">@android:color/transparent</item>\n    <item name=\"android:statusBarColor\">@android:color/transparent</item>\n    <item name=\"android:windowShowWallpaper\">true</item>\n  </style>\n</resources>\n"
  },
  {
    "path": "src/android/src/com/iktwo/qutelauncher/Application.kt",
    "content": "package com.iktwo.qutelauncher\n\nclass Application(var name: String, var packageName: String) : Comparable<Application> {\n\n    override fun compareTo(application: Application): Int {\n        return this.name.toUpperCase().compareTo(application.name.toUpperCase())\n    }\n}\n"
  },
  {
    "path": "src/android/src/com/iktwo/qutelauncher/PackageChangedReceiver.kt",
    "content": "package com.iktwo.qutelauncher\n\nimport android.content.BroadcastReceiver\nimport android.content.Context\nimport android.content.Intent\n\nclass PackageChangedReceiver : BroadcastReceiver() {\n\n    override fun onReceive(context: Context, intent: Intent) {\n        val packageName = intent.data!!.schemeSpecificPart\n\n        if (packageName == null || packageName.isEmpty()) {\n            return\n        }\n\n        val action = intent.action\n\n        if (action == \"android.intent.action.PACKAGE_ADDED\") {\n            if (QuteLauncher.isApplaunchable(packageName))\n                jpackageAdded(QuteLauncher.getApplicationLabel(packageName), packageName, internalQtObject)\n        } else if (action == \"android.intent.action.PACKAGE_REMOVED\") {\n            jpackageRemoved(packageName, internalQtObject)\n        }\n\n    }\n\n    companion object {\n        @JvmStatic\n        var internalQtObject: Long = 0\n\n        @JvmStatic\n        fun setQtObject(qtObject2: Long) {\n            internalQtObject = qtObject2\n        }\n\n        @JvmStatic\n        private external fun jpackageAdded(label: String, packageName: String, qtObject: Long)\n\n        @JvmStatic\n        private external fun jpackageRemoved(packageName: String, qtObject: Long)\n    }\n}\n"
  },
  {
    "path": "src/android/src/com/iktwo/qutelauncher/QuteLauncher.kt",
    "content": "package com.iktwo.qutelauncher\n\nimport android.app.ActivityManager\nimport android.app.WallpaperManager\nimport android.content.Context\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.graphics.Bitmap\nimport android.graphics.Canvas\nimport android.graphics.drawable.AdaptiveIconDrawable\nimport android.graphics.drawable.BitmapDrawable\nimport android.graphics.drawable.Drawable\nimport android.graphics.drawable.LayerDrawable\nimport android.net.ConnectivityManager\nimport android.net.Uri\nimport android.os.Build\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.View\nimport java.io.ByteArrayOutputStream\n\nopen class QuteLauncher : org.qtproject.qt5.android.bindings.QtActivity() {\n    init {\n        instance = this\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        this.QT_ANDROID_DEFAULT_THEME = \"AppTheme\"\n\n        super.onCreate(savedInstanceState)\n\n        getWindow().getDecorView().setSystemUiVisibility(\n                View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n                        or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n                        or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)\n    }\n\n    override fun onStart() {\n        super.onStart()\n        instance = this\n\n        val activityManager = instance!!.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager\n        mIconDpi = activityManager.launcherLargeIconDensity\n\n        mPm = instance!!.getPackageManager() as PackageManager\n    }\n\n    override fun onNewIntent(intent: Intent) {\n        super.onNewIntent(intent)\n        jnewIntent(qtObject)\n    }\n\n    companion object {\n        private val TAG = \"QuteLauncher\"\n        private var cm: ConnectivityManager? = null\n        var instance: QuteLauncher? = null\n            private set\n        private val wm: WallpaperManager? = null\n        private var mIconDpi: Int = 0\n        private var mPm: PackageManager? = null\n        private var qtObject: Long = 0\n\n        fun connectionType(): String {\n            cm = instance!!.getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager\n            val netInfo = cm!!.activeNetworkInfo\n            return netInfo.typeName\n        }\n\n        fun isApplaunchable(packageName: String): Boolean {\n            return mPm!!.getLaunchIntentForPackage(packageName) != null\n        }\n\n        val dpi: Int\n            get() {\n                val dm = instance!!.getResources().getDisplayMetrics()\n                return dm.densityDpi\n            }\n\n        @JvmStatic\n        fun applications(): Array<Application> {\n            val intent = Intent(Intent.ACTION_MAIN, null)\n            intent.addCategory(Intent.CATEGORY_LAUNCHER)\n            val availableActivities = mPm!!.queryIntentActivities(intent, 0)\n\n            val applications = mutableListOf<Application>()\n\n            for (i in availableActivities.indices) {\n                applications.add(Application(availableActivities[i].loadLabel(mPm).toString(), availableActivities[i].activityInfo.packageName))\n            }\n\n            for (i in applications.indices) {\n                if (applications[i].name.isNotEmpty() && (Character.isSpaceChar(applications[i].name[0]) || Character.isWhitespace(applications[i].name[0]))) {\n                    val charToReplace = applications[i].name[0]\n                    applications[i].name = applications[i].name.replace(charToReplace, ' ').trim { it <= ' ' }\n                    applications[i].name = applications[i].name.trim { it <= ' ' }\n                }\n            }\n\n            applications.sort()\n\n            return applications.toTypedArray()\n        }\n\n        @JvmStatic\n        fun launchApplication(packageName: String) {\n            val intent = mPm!!.getLaunchIntentForPackage(packageName)\n\n            if (intent != null) {\n                instance!!.startActivity(intent)\n            }\n        }\n\n        @JvmStatic\n        fun getApplicationIcon(packageName: String): ByteArray {\n            var icon: Drawable?\n\n            try {\n                val app = mPm!!.getApplicationInfo(packageName, 0)\n                val resources = mPm!!.getResourcesForApplication(app)\n                val resolveInfo = mPm!!.resolveActivity(mPm!!.getLaunchIntentForPackage(packageName), 0)\n                icon = resources.getDrawableForDensity(resolveInfo.activityInfo.iconResource, mIconDpi)\n            } catch (e: Exception) {\n                Log.e(TAG, \"exception getApplicationIcon for $packageName\", e)\n                icon = null\n            }\n\n            if (icon == null)\n                icon = defaultApplicationIcon\n\n            val stream = ByteArrayOutputStream()\n            var bitmap: Bitmap? = null\n\n            if (icon is BitmapDrawable) {\n                bitmap = icon.bitmap\n            } else {\n                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n                    if (icon is AdaptiveIconDrawable) {\n                        val arrayOfDrawables = arrayOf(icon.background, icon.foreground)\n                        val layerDrawable = LayerDrawable(arrayOfDrawables)\n\n                        bitmap = Bitmap.createBitmap(layerDrawable.intrinsicWidth, layerDrawable.intrinsicHeight, Bitmap.Config.ARGB_8888)\n\n                        val canvas = Canvas(bitmap)\n\n                        layerDrawable.setBounds(0, 0, canvas.width, canvas.height)\n                        layerDrawable.draw(canvas)\n                    } else {\n                        bitmap = (defaultApplicationIcon as BitmapDrawable).bitmap\n                    }\n                } else {\n                    bitmap = (defaultApplicationIcon as BitmapDrawable).bitmap\n                }\n            }\n\n            bitmap?.compress(Bitmap.CompressFormat.PNG, 100, stream)\n            return stream.toByteArray()\n        }\n\n        val defaultApplicationIcon: Drawable\n            get() = instance!!.getResources().getDrawable(android.R.mipmap.sym_def_app_icon)\n\n        @JvmStatic\n        fun getApplicationLabel(packageName: String): String {\n            try {\n                val app = mPm!!.getApplicationInfo(packageName, 0)\n\n                val resources = mPm!!.getResourcesForApplication(app)\n                val resolveInfo = mPm!!.resolveActivity(mPm!!.getLaunchIntentForPackage(packageName), 0)\n\n                return resolveInfo.loadLabel(mPm).toString()\n            } catch (e: Exception) {\n                Log.e(TAG, \"getApplicationLabel for $packageName\", e)\n                return \"\"\n            }\n\n        }\n\n        fun pickWallpaper() {\n            val intent = Intent(Intent.ACTION_SET_WALLPAPER)\n            instance!!.startActivity(Intent.createChooser(intent, \"Select Wallpaper\"))\n        }\n\n        fun openApplicationInfo(packageName: String) {\n            val intent = Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS)\n            intent.data = Uri.parse(\"package:$packageName\")\n            instance!!.startActivity(intent)\n        }\n\n        fun setQtObject(qtObject: Long) {\n            QuteLauncher.qtObject = qtObject\n        }\n\n        @JvmStatic\n        private external fun jnewIntent(qtObject: Long)\n    }\n}\n"
  },
  {
    "path": "src/deployment.pri",
    "content": "android-no-sdk {\n    target.path = /data/user/qt\n    export(target.path)\n    INSTALLS += target\n} else:android {\n    x86 {\n        target.path = /libs/x86\n    } else: armeabi-v7a {\n        target.path = /libs/armeabi-v7a\n    } else {\n        target.path = /libs/armeabi\n    }\n    export(target.path)\n    INSTALLS += target\n} else:unix {\n    isEmpty(target.path) {\n        qnx {\n            target.path = /tmp/$${TARGET}/bin\n        } else {\n            target.path = /opt/$${TARGET}/bin\n        }\n        export(target.path)\n    }\n    INSTALLS += target\n}\n\nexport(INSTALLS)\n"
  },
  {
    "path": "src/qml/IntroView.qml",
    "content": "import QtQuick 2.5\nimport QtQuick.Controls 1.4\nimport QtQuick.Layouts 1.2\nimport com.iktwo.qutelauncher 1.0 as QL\n\nFocusScope {\n    id: root\n\n    property alias currentIndex: listView.currentIndex\n    property alias model: listView.model\n    property alias progress: animationController.progress\n    property alias enabled: listView.enabled\n    property alias delegate: listView.delegate\n    property alias view: listView\n    property alias buttonsContainerHeight: buttonsContainer.height\n    property alias rectangleDividerHeight: rectangleDivider.height\n    property alias dragging: listView.dragging\n\n    property int navbarMargin\n    property int statusbarMargin\n\n    readonly property double xPosition: (listView.contentX / listView.width)\n    readonly property bool movingLeft: listView.movingLeft\n\n    signal done\n\n    onXPositionChanged:  {\n        if (currentIndex < 0)\n            return\n\n        var result = 0\n\n        if (listView.movingLeft)\n            result = (1 - (xPosition - Math.floor(xPosition))).toFixed(2)\n        else\n            result = (xPosition - Math.floor(xPosition)).toFixed(2)\n\n        if (listView.movingLeft) {\n            if (xPosition > 0 && currentIndex > 0 && xPosition < currentIndex) {\n                propertyAnimationBackground.to = model.get(Math.max(currentIndex - 1, 0)).backgroundColor\n                propertyAnimationBackground.from = model.get(currentIndex).backgroundColor\n            } else {\n                propertyAnimationBackground.to = model.get(currentIndex).backgroundColor\n                propertyAnimationBackground.from = model.get(Math.min(listView.count - 1, currentIndex + 1)).backgroundColor\n            }\n        } else {\n            if (xPosition < (model.count - 1) && currentIndex < (model.count - 1) && currentIndex < xPosition) {\n                propertyAnimationBackground.to = model.get(Math.min(listView.count - 1, currentIndex + 1)).backgroundColor\n                propertyAnimationBackground.from = model.get(currentIndex).backgroundColor\n            } else {\n                propertyAnimationBackground.to = model.get(currentIndex).backgroundColor\n                propertyAnimationBackground.from = model.get(Math.max(currentIndex - 1, 0)).backgroundColor\n            }\n        }\n\n        if (result == 0) {\n            rectangleBackground.color = model.get(currentIndex).backgroundColor\n            propertyAnimationBackground.from = model.get(currentIndex).backgroundColor\n        } else if (xPosition > 0 && xPosition < (model.count - 1)) {\n            progress = result\n        } else if (xPosition < 0) {\n            progress = 0\n            rectangleBackground.color = model.get(currentIndex).backgroundColor\n        }\n    }\n\n    Rectangle {\n        id: rectangleBackground\n\n        anchors.fill: parent\n\n        ColorAnimation on color { duration: 325 }\n    }\n\n    ListView {\n        id: listView\n\n        property double previousX\n\n        property bool movingLeft\n\n        anchors {\n            top: parent.top\n            bottom: buttonsContainer.top\n            left: parent.left\n            right: parent.right\n        }\n\n        model: model\n        orientation: ListView.Horizontal\n\n        snapMode: ListView.SnapToItem\n\n        boundsBehavior: Flickable.StopAtBounds\n\n        onContentXChanged: {\n            if (previousX > contentX)\n                movingLeft = true\n            else\n                movingLeft = false\n\n            previousX = contentX\n        }\n\n        highlightRangeMode: ListView.StrictlyEnforceRange\n\n        preferredHighlightBegin: 0\n        preferredHighlightEnd: width\n        cacheBuffer: width * 3\n        maximumFlickVelocity: width * 2\n\n        delegate: Item {\n            property int parentIndex: listView.currentIndex\n\n            height: ListView.view.height\n            width: ListView.view.width\n\n            onParentIndexChanged: {\n                if (parentIndex === index + 1) {\n                    loader.item.next()\n                }\n            }\n\n            Loader {\n                id: loader\n\n                anchors {\n                    fill: parent\n                    topMargin: statusbarMargin\n                    bottomMargin: navbarMargin\n                }\n\n                source: \"intro/\" + model.name\n            }\n\n            Connections {\n                target: loader.item\n\n                ignoreUnknownSignals: true\n\n                onDone: root.done()\n            }\n        }\n    }\n\n    Item {\n        id: buttonsContainer\n\n        anchors {\n            left: parent.left\n            right: parent.right\n            bottom: parent.bottom; bottomMargin: root.navbarMargin\n        }\n\n        height: 56 * QL.ScreenValues.dp\n\n        Rectangle {\n            id: rectangleDivider\n\n            anchors {\n                left: parent.left\n                right: parent.right\n            }\n\n            height: 1 * QL.ScreenValues.dp\n\n            color: \"#44ffffff\"\n        }\n\n        Row {\n            anchors.centerIn: parent\n\n            spacing: 8 * QL.ScreenValues.dp\n\n            Repeater {\n                model: root.model.count\n\n                Item {\n                    height: 16 * QL.ScreenValues.dp\n                    width: height\n\n                    Rectangle {\n                        id: rectangleIndicator\n\n                        property bool active: index === listView.currentIndex\n\n                        anchors.centerIn: parent\n\n                        height: 10 * QL.ScreenValues.dp\n                        width: height\n                        radius: height\n                        opacity: active ? 1 : 0.6\n\n                        state: \"inactive\"\n                        states: [\n                            State {\n                                name: \"active\"\n                                when: rectangleIndicator.active\n\n                                PropertyChanges {\n                                    target: rectangleIndicator\n                                    height: 16 * QL.ScreenValues.dp\n                                    width: 16 * QL.ScreenValues.dp\n                                }\n                            },\n                            State {\n                                name: \"inactive\"\n                                when: !rectangleIndicator.active\n\n                                PropertyChanges {\n                                    target: rectangleIndicator\n                                    height: 10 * QL.ScreenValues.dp\n                                    width: 10 * QL.ScreenValues.dp\n                                }\n                            }\n                        ]\n\n                        transitions: [\n                            Transition {\n                                from: \"active\"\n                                to: \"inactive\"\n                                reversible: true\n\n                                ParallelAnimation {\n                                    NumberAnimation {\n                                        property: \"height\"\n                                        duration: 175\n                                        easing.type: Easing.OutQuad\n                                    }\n\n                                    NumberAnimation {\n                                        property: \"width\"\n                                        duration: 175\n                                        easing.type: Easing.OutQuad\n                                    }\n                                }\n                            }\n                        ]\n                    }\n                }\n            }\n        }\n    }\n\n    AnimationController {\n        id: animationController\n\n        animation: ParallelAnimation {\n            PropertyAnimation {\n                id: propertyAnimationBackground\n\n                target: rectangleBackground\n                property: \"color\"\n                from: model.count > 0 ? model.get(0).backgroundColor : \"#000000\"\n                to: model.count > 0 ? model.get(1).backgroundColor : \"#000000\"\n\n                onFromChanged: animationController.reload()\n                onToChanged: animationController.reload()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/components/MenuItem.qml",
    "content": "import QtQuick 2.2\nimport QtQuick.Controls 1.1\n\nItem {\n    id: root\n\n    property alias text: textElement.text\n\n    signal clicked()\n\n    width: parent.width\n    height: applicationWindow.height / 7\n\n    Label {\n        id: textElement\n\n        anchors {\n            fill: parent\n            leftMargin: root.width * 0.02\n            rightMargin: root.width * 0.02\n            topMargin: root.height * 0.06\n            bottomMargin: root.height * 0.06\n        }\n\n        verticalAlignment: Text.AlignVCenter\n        elide: Text.ElideRight\n\n        font {\n            pointSize: 22\n        }\n\n        transform: Rotation { origin.x: 0; origin.y: textElement.height / 2; axis { x: 0; y: 1; z: 0 } angle: mouseArea.pressed ? -10 : 0 }\n\n        scale: mouseArea.pressed ? 0.98 : 1\n        color: root.enabled ? \"black\" : \"#8d8d8d\"\n    }\n\n    MouseArea {\n        id: mouseArea\n\n        anchors.fill: parent\n\n        enabled: root.enabled\n\n        onClicked: {\n            root.clicked()\n\n            try {\n                root.parent.close()\n            } catch (e) {\n                console.log(\"MenuItem is meant to be used inside a PressAndHoldMenu\")\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/components/PressAndHoldMenu.qml",
    "content": "import QtQuick 2.2\n\nItem {\n    id: root\n\n    property int expandedWidth: width\n    property int expandedHeight: 300\n    property int menuXPosition: width / 2\n    property int menuYPosition: height / 2\n    property int screenHeight\n\n    default property alias content: container.children\n\n    signal closed\n    signal canceled\n\n    function open(xPosition, yPosition) {\n        /// TODO: add some y offset so it's not oppened under the finger\n        if (yPosition === undefined) {\n            yPosition = screenHeight / 2\n        }\n\n        if (xPosition === undefined) {\n            xPosition = 0\n        }\n\n        if (xPosition < width * 0.15)\n            menuXPosition = width * 0.15\n        else if (xPosition > width * 0.85)\n            menuXPosition = width * 0.85\n        else\n            menuXPosition = xPosition\n\n        menuYPosition = yPosition\n\n        if (yPosition + expandedHeight > height * 0.93) {\n            background.state = \"openedUp\"\n        } else {\n            background.state = \"openedDown\"\n        }\n    }\n\n    function close() {\n        background.state = \"closed\"\n    }\n\n    function cancel() {\n        background.state = \"closed\"\n        root.canceled()\n    }\n\n    anchors.fill: parent\n\n    Rectangle {\n        anchors.fill: parent\n        color: \"black\"\n        opacity: background.state != \"closed\" ? 0.2 : 0\n    }\n\n    MouseArea {\n        anchors.fill: parent\n\n        enabled: background.state != \"closed\"\n\n        onClicked: root.cancel()\n    }\n\n    Rectangle {\n        id: background\n\n        y: menuYPosition\n\n        Column {\n            id: container\n\n            function close() {\n                root.close()\n            }\n\n            anchors.fill: parent\n\n            clip: true\n        }\n\n        state: \"closed\"\n\n        states: [\n            State {\n                name: \"openedDown\"\n                PropertyChanges { target: background; width: root.expandedWidth; height: root.expandedHeight; x: 0 }\n            },\n            State {\n                name: \"closed\"\n                PropertyChanges { target: background; width: 0; height: 0; x: root.menuXPosition }\n            },\n            State {\n                name: \"openedUp\"\n                PropertyChanges { target: background; width: root.expandedWidth; height: root.expandedHeight; x: 0; y: menuYPosition - expandedHeight }\n            }\n        ]\n\n        transitions: [\n            Transition {\n                from: \"closed\"\n                to: \"openedDown\"\n\n                SequentialAnimation {\n                    ScriptAction {\n                        script: background.height = 10\n                    }\n\n                    NumberAnimation { properties: \"x, width\"; duration: 300; easing.type: Easing.InOutQuad }\n                    NumberAnimation { properties: \"height\"; duration: 300; easing.type: Easing.InOutQuad }\n                }\n            },\n            Transition {\n                from: \"closed\"\n                to: \"openedUp\"\n\n                SequentialAnimation {\n                    ScriptAction {\n                        script: {\n                            background.height = 10\n                        }\n                    }\n\n                    NumberAnimation { properties: \"x, width\"; duration: 300; easing.type: Easing.InOutQuad }\n                    ParallelAnimation {\n                        NumberAnimation { properties: \"y\"; duration: 300; easing.type: Easing.InOutQuad }\n                        NumberAnimation { properties: \"height\"; duration: 300; easing.type: Easing.InOutQuad }\n                    }\n                }\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "src/qml/components/RadioButtonStyleDefault.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 1.4\nimport QtQuick.Controls.Styles 1.4\nimport com.iktwo.qutelauncher 1.0 as QL\n\nRadioButtonStyle {\n    label: Label {\n        text: control.text\n        color: \"#ffffff\"\n    }\n\n    indicator: Rectangle {\n        implicitWidth: QL.ScreenValues.dp * 16\n        implicitHeight: QL.ScreenValues.dp * 16\n        radius: QL.ScreenValues.dp * 9\n        border {\n            color: control.activeFocus ? \"darkblue\" : \"gray\"\n            width: QL.ScreenValues.dp * 1\n        }\n\n        Rectangle {\n            anchors {\n                fill: parent\n                margins: QL.ScreenValues.dp * 4\n            }\n\n            visible: control.checked\n            color: \"#555\"\n            radius: QL.ScreenValues.dp * 9\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/components/qmldir",
    "content": "MenuItem 1.0 MenuItem.qml\nRadioButtonStyleDefault 1.0 RadioButtonStyleDefault.qml\nPressAndHoldMenu 1.0 PressAndHoldMenu.qml\n"
  },
  {
    "path": "src/qml/config/Dimensions.qml",
    "content": "pragma Singleton\nimport QtQuick 2.0\nimport com.iktwo.qutelauncher 1.0 as QL\n\nItem {\n    property int barsShadowSize: 85 * QL.ScreenValues.dp\n}\n"
  },
  {
    "path": "src/qml/config/Theme.qml",
    "content": "pragma Singleton\nimport QtQuick 2.0\nimport Qt.labs.settings 1.0\n\nItem {\n    id: root\n\n    property color colorGridContainer: \"#f5f5f5\"\n    property color colorApplicationWindow: \"#00000000\"\n\n    property bool portrait: false\n    property bool tablet: false\n\n    property int columns: getColumns(portrait)\n    property int rows: getRows(portrait)\n\n    property string theme: \"classic\"\n\n    function getColumns(portrait) {\n        if (portrait) {\n            if (tablet) {\n                return 5\n            } else {\n                return 4\n            }\n        } else {\n            if (tablet) {\n                return 6\n            } else {\n                return 4\n            }\n        }\n    }\n\n    function getRows(portrait) {\n        if (portrait) {\n            return 6\n        } else {\n            if (tablet) {\n                return 5\n            } else {\n                return 4\n            }\n        }\n    }\n\n    Settings {\n        property alias theme: root.theme\n    }\n}\n"
  },
  {
    "path": "src/qml/config/qmldir",
    "content": "singleton Dimensions 1.0 Dimensions.qml\nsingleton Theme 1.0 Theme.qml\n"
  },
  {
    "path": "src/qml/debug/Debug.qml",
    "content": "import QtQuick 2.0\nimport QtQuick.Controls 1.4\nimport com.iktwo.qutelauncher 1.0 as QL\n\n/*!\n    \\qmltype Debug\n\n    \\brief Element that displays debug data.\n*/\n\nItem {\n    id: root\n\n    property string jsonStyle: \"<style>\n                                .json-key { color: #3498db; }\n                                .json-value { color: #2ecc71; }\n                                .json-string { color: #e67e22; }</style>\"\n\n    property var debugData\n\n    function _replacer(match, pIndent, pKey, pVal, pEnd) {\n        var key = '<span class=json-key><br>'\n        var val = '<span class=json-value>'\n        var str = '<span class=json-string>'\n        var r = pIndent || ''\n\n        if (pKey)\n            r = r + key + pKey.replace(/[\": ]/g, '') + '</span>: '\n\n        if (pVal)\n            r = r + (pVal[0] === '\"' ? str : val) + pVal + '</span>'\n\n        return r + (pEnd || '')\n    }\n\n    function prettyPrint(obj) {\n        var jsonLine = /^( *)(\"[\\w]+\": )?(\"[^\"]*\"|[\\w.+-]*)?([,[{])?$/mg\n\n        var jsonString = JSON.stringify(obj, null, 2)\n\n        if (!jsonString)\n            return\n\n        return jsonString\n        .replace(/&/g, '&amp;').replace(/\\\\\"/g, '&quot;')\n        .replace(/</g, '&lt;').replace(/>/g, '&gt;')\n        .replace(jsonLine, root._replacer)\n        .replace(\"}\", \"<br>}\")\n    }\n\n    anchors.fill: parent\n\n    Rectangle {\n        anchors.fill: parent\n        color: \"#000000\"\n        opacity: 0.2\n    }\n\n    Label {\n        anchors {\n            fill: parent\n            margins: Math.min(root.height, root.width) * 0.02\n        }\n\n        opacity: 0.8\n        color: \"#95a5a6\"\n        textFormat: Text.RichText\n        wrapMode: Text.Wrap\n        font.pointSize: 22\n        text: jsonStyle + prettyPrint(root.debugData)\n    }\n}\n"
  },
  {
    "path": "src/qml/debug/qmldir",
    "content": "Debug 1.0 Debug.qml\n"
  },
  {
    "path": "src/qml/intro/IntroEnd.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 1.4\nimport com.iktwo.qutelauncher 1.0 as QL\n\nIntroScreen {\n    id: root\n\n    Button {\n        anchors.centerIn: parent\n\n        text: qsTr(\"DONE\")\n\n        onClicked: root.done()\n    }\n}\n"
  },
  {
    "path": "src/qml/intro/IntroMain.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 1.4\nimport com.iktwo.qutelauncher 1.0 as QL\n\nIntroScreen {\n\n    Column {\n        anchors {\n            fill: parent\n            margins: 8 * QL.ScreenValues.dp\n        }\n\n        Label {\n            anchors {\n                left: parent.left\n                right: parent.right\n            }\n\n            text: qsTr(\"QuteLauncher\")\n            color: \"#ffffff\"\n            horizontalAlignment: Text.AlignHCenter\n\n            font.pointSize: 22\n        }\n\n        Item {\n            height: 16 * QL.ScreenValues.dp\n        }\n\n        Label {\n            anchors {\n                left: parent.left\n                right: parent.right\n            }\n\n            text: \"**PLACEHOLDER** Customizable open source Android launcher. Get the source code and contribute at https://iktwo.github.io/QuteLauncher/\"\n            color: \"#ffffff\"\n            horizontalAlignment: Text.AlignJustify\n            wrapMode: Text.Wrap\n\n            font.pointSize: 16\n        }\n\n        Item {\n            height: 24 * QL.ScreenValues.dp\n        }\n\n        Image {\n            anchors.horizontalCenter: parent.horizontalCenter\n\n            width: Math.min(parent.width, parent.height) * 0.34\n            height: width\n            source: \"qrc:/images/icon\"\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/intro/IntroScreen.qml",
    "content": "import QtQuick 2.0\nimport QtQuick.Controls 1.4\nimport QtQuick.Controls.Styles 1.4\nimport Qt.labs.settings 1.0\nimport com.iktwo.qutelauncher 1.0 as QL\nimport components 1.0 as C\n\nFocusScope {\n    signal done\n    signal next\n}\n"
  },
  {
    "path": "src/qml/intro/IntroSelection.qml",
    "content": "import QtQuick 2.0\nimport QtQuick.Controls 1.4\nimport QtQuick.Controls.Styles 1.4\nimport Qt.labs.settings 1.0\nimport com.iktwo.qutelauncher 1.0 as QL\nimport components 1.0 as C\nimport config 1.0 as Config\n\nIntroScreen {\n    Column {\n        anchors.centerIn: parent\n\n        Repeater {\n            id: repeater\n\n            model: [\"Classic\", \"Tiles\"]\n\n            RadioButton {\n                text: modelData\n                checked: index === 0\n\n                style: C.RadioButtonStyleDefault { }\n\n                exclusiveGroup: exclusiveGroupTheme\n            }\n        }\n    }\n\n    Settings {\n        id: settings\n\n        property string theme: repeater.model[0].toLowerCase()\n    }\n\n    ExclusiveGroup {\n        id: exclusiveGroupTheme\n    }\n\n    onNext: Config.Theme.theme = exclusiveGroupTheme.current.text.toLowerCase()\n}\n"
  },
  {
    "path": "src/qml/main.qml",
    "content": "import QtQuick 2.5\nimport QtQuick.Controls 1.4\nimport QtQuick.Window 2.2\nimport Qt.labs.settings 1.0\nimport com.iktwo.qutelauncher 1.0 as QL\nimport config 1.0 as Config\nimport debug 1.0 as D\n\nApplicationWindow {\n    id: applicationWindow\n\n    property bool isWindowActive: Qt.application.state === Qt.ApplicationActive\n    property int dpi: Screen.pixelDensity * 25.4\n\n    property variant favoritesData: ([])\n\n    property var resolutions: [\n        {\"height\": 480, \"width\": 320}, // HVGA\n        {\"height\": 640, \"width\": 480}, // VGA\n        {\"height\": 800, \"width\": 480}, // WVGA\n        {\"height\": 800, \"width\": 600}, // SVGA\n        {\"height\": 640, \"width\": 360}, // nHD\n        {\"height\": 960, \"width\": 540}  // qHD\n    ]\n\n    property int currentResolution: 3\n\n    property bool activeScreen: Qt.application.state === Qt.ApplicationActive\n\n    function updatePortraitMode() {\n        if (height >= width)\n            Config.Theme.portrait = true\n        else\n            Config.Theme.portrait = true\n    }\n\n    color: Config.Theme.colorApplicationWindow\n\n    width: resolutions[currentResolution].width\n    height: resolutions[currentResolution].height\n\n    visible: true\n\n    onWidthChanged: updatePortraitMode()\n    onHeightChanged: updatePortraitMode()\n\n    onActiveScreenChanged: {\n        if (activeScreen)\n            QL.ScreenValues.updateScreenValues()\n    }\n\n    onFavoritesDataChanged: {\n        listModelFavorites.clear()\n\n        for (var i = 0; i < favoritesData.length; ++i) {\n            listModelFavorites.append(favoritesData)\n        }\n    }\n\n    Component.onCompleted: {\n        Config.Theme.tablet = QL.ScreenValues.isTablet\n    }\n\n    Timer {\n        interval: 550\n        running: true\n\n        onTriggered: {\n            QL.Launcher.registerMethods()\n            QL.PackageManager.registerBroadcast()\n        }\n    }\n\n    Loader {\n        id: loaderMainTheme\n\n        anchors.fill: parent\n\n        source: \"themes/\" + Config.Theme.theme + \"/ThemeMain.qml\"\n\n        Keys.onBackPressed: {\n            event.accepted = true\n\n            if (loaderMainTheme.item && loaderMainTheme.item.opened) {\n                QL.Launcher.minimize()\n            }\n        }\n\n        Keys.onEscapePressed: {\n            if (loaderMainTheme.item && loaderMainTheme.item.opened) {\n                QL.Launcher.minimize()\n            }\n        }\n\n    }\n\n    Loader {\n        id: loader\n\n        function unload() {\n            sourceComponent = null\n            loaderMainTheme.focus = true\n        }\n\n        anchors.fill: parent\n\n        sourceComponent: !QL.ApplicationInfo.hasShownInitialDialog ? introView : undefined\n\n        focus: true\n\n        // TODO: Remove this once the intro is ready\n        Component.onCompleted: {\n            unload()\n        }\n\n        Component {\n            id: introView\n\n            IntroView {\n                anchors.fill: parent\n\n                statusbarMargin: QL.ScreenValues.statusBarHeight\n                navbarMargin: QL.ScreenValues.navBarVisible ? QL.ScreenValues.navigationBarHeight : 0\n\n                model: ListModel {\n                    ListElement { name: \"IntroMain.qml\"; backgroundColor: \"#424242\" }\n                    ListElement { name: \"IntroSelection.qml\"; backgroundColor: \"#2c3e50\" }\n                    ListElement { name: \"IntroEnd.qml\"; backgroundColor: \"#424242\" }\n                }\n\n                onDone: {\n                    QL.ApplicationInfo.hasShownInitialDialog = true\n                    loader.unload()\n                }\n            }\n        }\n    }\n\n    Image  {\n        anchors {\n            left: parent.left\n            right: parent.right\n            top: parent.top\n        }\n\n        height: QL.ScreenValues.statusBarHeight\n\n        fillMode: Image.Tile\n\n        source: \"qrc:/images/shadow\"\n    }\n\n    Image  {\n        id: borderImageNavBar\n\n        anchors {\n            left: parent.left\n            right: parent.right\n            bottom: parent.bottom\n        }\n\n        height: QL.ScreenValues.navBarVisible ? QL.ScreenValues.navigationBarHeight : 0\n\n        fillMode: Image.Tile\n\n        source: QL.ScreenValues.navBarVisible ? \"qrc:/images/shadow_navigationbar\" : \"\"\n    }\n\n    Connections {\n        target: QL.PackageManager\n\n        onAddedApplicationToGrid: {\n            var favs = favoritesData\n            favs.push({'name': name, 'packageName': packageName})\n            favoritesData = favs\n        }\n    }\n\n    Settings {\n        property alias favorites: applicationWindow.favoritesData\n    }\n\n    ListModel {\n        id: listModelFavorites\n    }\n\n    //    D.Debug {\n    //        debugData: {\n    //            'sdkInt': QL.System.sdkInt,\n    //                    'height': applicationWindow.height,\n    //                    'width': applicationWindow.width,\n    //                    'dp': QL.ScreenValues.dp.toFixed(2),\n    //                    'dpi': QL.ScreenValues.dpi.toFixed(2),\n    //                    'density': QL.ScreenValues.density.toFixed(2),\n    //                    'isTablet': QL.ScreenValues.isTablet,\n    //                    'navBarVisible': QL.ScreenValues.navBarVisible\n    //        }\n    //    }\n}\n"
  },
  {
    "path": "src/qml/themes/classic/ApplicationGrid.qml",
    "content": "import QtQuick 2.5\nimport QtQuick.Controls 1.4\nimport QtQuick.Controls.Styles 1.3\nimport QtQuick.Layouts 1.1\nimport QtGraphicalEffects 1.0\nimport com.iktwo.qutelauncher 1.0 as QL\nimport config 1.0 as Config\n\nScrollView {\n    id: root\n\n    property alias model: gridView.model\n\n    signal pressAndHold(var model, int x, int y)\n\n    anchors.fill: parent\n\n    style: ScrollViewStyle {\n        transientScrollBars: false\n\n        scrollBarBackground: Rectangle {\n            implicitWidth: 5 * QL.ScreenValues.dp\n\n            color: \"#d9d9d9\"\n        }\n\n        handle: Rectangle {\n            implicitWidth: 5 * QL.ScreenValues.dp\n\n            color: \"#129688\"\n        }\n\n        corner: Item { }\n        decrementControl: Item { }\n        incrementControl: Item { }\n    }\n\n    flickableItem.focus: true\n    flickableItem.interactive: true\n\n    GridView {\n        id: gridView\n\n        property int highlightedItem\n\n        maximumFlickVelocity: height * 5\n\n        header: Item {\n            width: parent.width\n            height: 20 * QL.ScreenValues.dp\n        }\n\n        add: Transition {\n            NumberAnimation { properties: \"opacity\"; from: 0; to: 1; duration: 450 }\n            NumberAnimation { property: \"scale\"; from: 0; to: 1.0; duration: 500 }\n        }\n\n        displaced: Transition {\n            NumberAnimation { property: \"opacity\"; to: 1.0 }\n            NumberAnimation { property: \"scale\"; to: 1.0 }\n        }\n\n        clip: true\n        interactive: visible\n\n        cellHeight: height / Config.Theme.getColumns()\n        cellWidth: width / Config.Theme.getRows()\n\n        delegate: ApplicationTile {\n            id: applicationTile\n\n            height: GridView.view.cellHeight\n            width: GridView.view.cellWidth\n\n            source: \"image://icon/\" + model.packageName\n            text: model.name\n\n            onClicked: QL.PackageManager.launchApplication(model.packageName)\n            onPressAndHold: root.pressAndHold(model, x, y)\n        }\n\n        onHeightChanged: {\n            if (height !== 0)\n                cacheBuffer = Math.max(1080, height * 5)\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/classic/ApplicationGridMenu.qml",
    "content": "import QtQuick 2.2\nimport com.iktwo.qutelauncher 1.0 as QL\nimport components 1.0 as C\n\nC.PressAndHoldMenu {\n    property string packageName\n    property string name\n\n    expandedHeight: menuItem.height * 2\n\n    C.MenuItem {\n        id: menuItem\n        text: qsTr(\"Info\")\n        onClicked: QL.PackageManager.openApplicationInfo(packageName)\n    }\n\n    C.MenuItem {\n        /// TODO: consume the click even if not enabled\n        /// TODO: verify this\n        // enabled: QL.PackageManager.packages.indexOf(packageName) === -1\n        text: qsTr(\"Add to grid\")\n\n        onClicked: QL.PackageManager.addApplicationToGrid(name, packageName)\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/classic/ApplicationTile.qml",
    "content": "import QtQuick 2.5\nimport QtQuick.Controls 1.4\nimport QtQuick.Layouts 1.2\nimport com.iktwo.qutelauncher 1.0\n\nItem {\n    id: root\n\n    property alias text: label.text\n    property alias source: image.source\n    property var dragTarget\n\n    property var _originalParent\n    property var _newParent\n\n    signal pressAndHold(var model, int x, int y)\n    signal clicked\n\n    Drag.active: mouseArea.drag.active\n    Drag.hotSpot.x: width / 2\n    Drag.hotSpot.y: height / 2\n\n    width: 80\n    height: 80\n\n    Component.onCompleted: {\n        _originalParent = parent\n        _newParent = _originalParent\n    }\n\n    ColumnLayout {\n        anchors {\n            top: parent.top\n            left: parent.left\n            right: parent.right\n        }\n\n        Image {\n            id: image\n\n            Layout.alignment: Layout.Center\n\n            asynchronous: true\n\n            Layout.preferredHeight: Math.round(48 * ScreenValues.dp)\n            Layout.preferredWidth: Math.round(48 * ScreenValues.dp)\n\n            fillMode: Image.PreserveAspectFit\n        }\n\n        Label {\n            id: label\n\n            Layout.alignment: Layout.Center\n\n            Layout.preferredWidth: parent.width * 0.90\n\n            elide: Text.ElideRight\n            horizontalAlignment: Text.AlignHCenter\n            wrapMode: Text.NoWrap\n            maximumLineCount: 1\n\n            font.pixelSize: 12 * ScreenValues.dp\n\n            color: \"#666666\"\n        }\n    }\n\n    MouseArea {\n        id: mouseArea\n\n        property var originalParent\n\n        anchors.fill: parent\n\n        drag.target: root.dragTarget\n\n        onClicked: root.clicked()\n\n        onPressAndHold: {\n            var mappedItem = mapToItem(loaderMainTheme, mouse.x, mouse.y)\n            root.pressAndHold(model, mappedItem.x, mappedItem.y)\n        }\n\n        onReleased: root._newParent = (root.Drag.target !== null ? root.Drag.target : root._originalParent)\n\n        states: [\n            State {\n                name: \"dragging\"\n                when: mouseArea.drag.active\n\n                ParentChange { target: root; parent: root._originalParent }\n\n                AnchorChanges {\n                    target: root\n                    anchors {\n                        verticalCenter: undefined\n                        horizontalCenter: undefined\n                        left: undefined\n                        right: undefined\n                        top: undefined\n                        bottom: undefined\n                    }\n                }\n            },\n            State {\n                name: \"notDragging\"\n                when: !mouseArea.drag.active\n\n                ParentChange { target: root; parent: root._newParent }\n\n                AnchorChanges {\n                    target: root\n\n                    anchors {\n                        verticalCenter: parent !== root._originalParent ? parent.verticalCenter : undefined\n                        horizontalCenter: parent !== root._originalParent ? parent.horizontalCenter : undefined\n                        left: undefined\n                        right: undefined\n                        top: undefined\n                        bottom: undefined\n                    }\n                }\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/classic/ExpandableItem.qml",
    "content": "import QtQuick 2.5\nimport com.iktwo.qutelauncher 1.0\nimport config 1.0 as Config\n\nItem {\n    default property alias content: itemContainer.data\n    property alias color: rectangleMinizedIndicator.color\n    property alias busy: transition.running\n\n    property int minimizedHeight: Math.round(48 * ScreenValues.dp)\n    property int minimizedWidth: Math.round(48 * ScreenValues.dp)\n\n    property int targetWidth: Math.round(parent.width - (getSideMargin() * ScreenValues.dp))\n    property int targetHeight: Math.round(parent.height - 8 * ScreenValues.dp)\n\n    property point minimizedPoint: Qt.point(Math.round(parent.width / 2), Math.round(parent.height - rectangleMinizedIndicator.height - (4 * ScreenValues.dp)))\n    property point centerPoint: Qt.point(Math.round(parent.width / 2), Math.round(parent.height / 2))\n    property point targetPoint: Qt.point(Math.round(centerPoint.x - (targetWidth / 2)), Math.round(6 * ScreenValues.dp))\n\n    readonly property bool isOpened: stateGroup.state === \"opened\"\n\n    function close() {\n        stateGroup.state = \"closed\"\n    }\n\n    function open() {\n        stateGroup.state = \"opened\"\n    }\n\n    function getSideMargin() {\n        if (applicationWindow.isScreenPortrait) {\n            if (ScreenValues.isTablet)\n                return -1 /// TODO: find right value\n            else\n                return 16\n        } else {\n            if (ScreenValues.isTablet)\n                return 138\n            else\n                return -1 /// TODO: find right value\n        }\n    }\n\n    Rectangle {\n        id: rectangleMinizedIndicator\n\n        color: Config.Theme.colorGridContainer\n\n        width: minimizedWidth\n        height: minimizedHeight\n\n        x: minimizedPoint.x\n        y: minimizedPoint.y\n    }\n\n    StateGroup {\n        id: stateGroup\n\n        state: \"closed\"\n\n        states: [\n            State {\n                name: \"closed\"\n                PropertyChanges {\n                    target: rectangleMinizedIndicator\n                    height: minimizedHeight; width: minimizedWidth\n                    x: Math.round(minimizedPoint.x - (minimizedWidth / 2)); y: minimizedPoint.y\n                    radius: Math.round(minimizedWidth / 2)\n                }\n\n                PropertyChanges {\n                    target: itemContainer\n                    opacity: 0\n                }\n            },\n            State {\n                name: \"opened\"\n                PropertyChanges {\n                    target: rectangleMinizedIndicator\n                    height: targetHeight; width: targetWidth\n                    x: targetPoint.x; y: targetPoint.y\n                    radius: Math.round(2 * ScreenValues.dp)\n                }\n\n                PropertyChanges {\n                    target: itemContainer\n                    opacity: 1\n                }\n            }\n        ]\n\n        transitions: [\n            Transition {\n                id:  transition\n\n                from: \"closed\"\n                to: \"opened\"\n                reversible: true\n                ParallelAnimation {\n                    PropertyAnimation { property: \"y\"; duration: 275; easing.type: Easing.InOutCubic }\n\n                    SequentialAnimation {\n                        PauseAnimation { duration: 50 }\n                        ParallelAnimation {\n                            PropertyAnimation { target: rectangleMinizedIndicator; properties: \"height, width\"; easing.type: Easing.InOutCubic; duration: 250 }\n                            PropertyAnimation { target: rectangleMinizedIndicator; property: \"radius\"; easing.type: Easing.InOutCubic; duration: 250 }\n                            PropertyAnimation { target: rectangleMinizedIndicator; property: \"x\"; easing.type: Easing.InOutCubic; duration: 250 }\n                            SequentialAnimation {\n                                PauseAnimation { duration: 150 }\n                                PropertyAnimation { target: itemContainer; property: \"opacity\"; easing.type: Easing.InOutCubic}\n                            }\n                        }\n                    }\n                }\n            }\n        ]\n    }\n\n    Item {\n        id: itemContainer\n\n        anchors {\n            right: rectangleMinizedIndicator.right; rightMargin: -ScreenValues.dp\n            verticalCenter: rectangleMinizedIndicator.verticalCenter\n        }\n\n        width: targetWidth\n        height: targetHeight\n    }\n\n    MouseArea {\n        anchors.fill: parent\n        enabled: stateGroup.state === \"closed\"\n    }\n\n    MouseArea {\n        anchors.fill: rectangleMinizedIndicator\n        enabled: stateGroup.state === \"closed\"\n\n        onClicked: open()\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/classic/ThemeMain.qml",
    "content": "import QtQuick 2.0\nimport com.iktwo.qutelauncher 1.0 as QL\nimport config 1.0 as Config\n\nFocusScope {\n    id: root\n\n    property int navbarMargin: QL.ScreenValues.navBarVisible ? QL.ScreenValues.navigationBarHeight : 0\n    property int statusbarMargin: QL.ScreenValues.statusBarHeight\n\n    property bool opened: explandableItem.isOpened\n\n    focus: true\n\n    Keys.onUpPressed: {\n        if (Qt.platform.os !== \"android\")\n            explandableItem.open()\n\n        event.accepted = false\n    }\n\n    Keys.onDownPressed: {\n        if (Qt.platform.os !== \"android\")\n            explandableItem.close()\n\n        event.accepted = false\n    }\n\n    MouseArea {\n        anchors.fill: parent\n\n        enabled: !explandableItem.isOpened\n\n        onPressAndHold: QL.Launcher.pickWallpaper()\n    }\n\n    GridView {\n        id: gridView\n\n        anchors.fill: parent\n\n        property int highlightedItem\n\n        maximumFlickVelocity: height * 5\n\n        header: Item {\n            width: parent.width\n            height: 20 * QL.ScreenValues.dp\n        }\n\n        add: Transition {\n            NumberAnimation { properties: \"opacity\"; from: 0; to: 1; duration: 450 }\n            NumberAnimation { property: \"scale\"; from: 0; to: 1.0; duration: 500 }\n        }\n\n        displaced: Transition {\n            NumberAnimation { property: \"opacity\"; to: 1.0 }\n            NumberAnimation { property: \"scale\"; to: 1.0 }\n        }\n\n        clip: true\n        interactive: visible\n        visible: false\n\n        cellHeight: height / Config.Theme.getColumns()\n        cellWidth: width / Config.Theme.getRows()\n\n        model: listModelFavorites\n\n        delegate: ApplicationTile {\n            id: applicationTile\n\n            height: GridView.view.cellHeight\n            width: GridView.view.cellWidth\n\n            source: \"image://icon/\" + model.packageName\n            text: model.name\n\n            onClicked: QL.PackageManager.launchApplication(model.packageName)\n            onPressAndHold: root.pressAndHold(model, x, y)\n        }\n\n        onHeightChanged: {\n            if (height !== 0)\n                cacheBuffer = Math.max(1080, height * 5)\n        }\n    }\n\n    Item {\n        anchors {\n            top: parent.top; topMargin: QL.ScreenValues.statusBarHeight\n            bottom: parent.bottom; bottomMargin: root.navbarMargin\n            left: parent.left\n            right: parent.right\n        }\n\n        ExpandableItem {\n            id: explandableItem\n\n            anchors.fill: parent\n\n            ApplicationGrid {\n                model: QL.PackageManager\n\n                anchors.fill: parent\n\n                onPressAndHold: {\n                    /// TODO: implement this\n                    // applicationTile.source = \"image://icon/\" + model.packageName\n                    // applicationTile.text = model.name\n                    applicationGridMenu.packageName = model.packageName\n                    applicationGridMenu.name = model.name\n                    applicationGridMenu.open(x, y)\n                }\n            }\n        }\n    }\n\n    MouseArea {\n        anchors.fill: parent\n\n        enabled: explandableItem.busy\n    }\n\n    GridView {\n        /// TODO: verify in landscape mode\n        anchors {\n            top: parent.top; topMargin: QL.ScreenValues.statusBarHeight\n            left: parent.left\n            right: parent.right\n        }\n\n        height: 4 * (80 * QL.ScreenValues.dp)\n        model: 16\n        enabled: false\n        interactive: false\n        cellHeight: height / 4\n        cellWidth: width / 4\n\n        delegate: DropArea {\n            width: GridView.view.cellWidth\n            height: GridView.view.cellHeight\n        }\n    }\n\n    Row {\n        id: rowFavorites\n\n        anchors {\n            bottom: parent.bottom; bottomMargin: root.navbarMargin\n        }\n\n        height: 80 * QL.ScreenValues.dp\n\n        Repeater {\n            model: 5\n\n            DropArea {\n                width: 80 * QL.ScreenValues.dp\n                height: 80 * QL.ScreenValues.dp\n            }\n        }\n    }\n\n    Connections {\n        target: QL.Launcher\n\n        onNewIntentReceived: explandableItem.close()\n        onMinimized: explandableItem.close()\n    }\n\n    ApplicationGridMenu {\n        id: applicationGridMenu\n\n        screenHeight: root.height\n\n        onClosed: explandableItem.close()\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ApplicationGrid.qml",
    "content": "import QtQuick 2.2\nimport QtQuick.Controls 1.1\nimport QtGraphicalEffects 1.0\nimport com.iktwo.qutelauncher 1.0 as QL\n\nGridView {\n    id: root\n\n    property bool editMode: false\n    property int highlightedItem\n\n    maximumFlickVelocity: height * 2.5\n    cacheBuffer: height * 5\n\n    add: Transition {\n        NumberAnimation { properties: \"opacity\"; from: 0; to: 1; duration: 450 }\n        NumberAnimation { property: \"scale\"; from: 0; to: 1.0; duration: 500 }\n    }\n\n    displaced: Transition {\n        NumberAnimation { property: \"opacity\"; to: 1.0 }\n        NumberAnimation { property: \"scale\"; to: 1.0 }\n    }\n\n    visible: false\n    interactive: visible\n\n    cellHeight: height / 5\n    cellWidth: width / 4\n\n    onCountChanged: {\n        if (count == 0)\n            editMode = false\n    }\n\n    delegate: Item {\n        id: itemDelegate\n\n        height: GridView.view.cellHeight\n        width: GridView.view.cellWidth\n\n        Item {\n            id: container\n\n            anchors {\n                fill: parent\n                margins: dpi * 0.04\n            }\n\n            scale: editMode && index == highlightedItem ? 1.2 : 1\n\n            Label {\n                anchors {\n                    left: parent.left; leftMargin: dpi * 0.02\n                    right: parent.right; rightMargin: dpi * 0.02\n                    bottom: parent.bottom; bottomMargin: dpi * 0.03\n                }\n\n                text: model.name\n\n                elide: Text.ElideRight\n                horizontalAlignment: Text.AlignHCenter\n                wrapMode: Text.NoWrap\n                maximumLineCount: 2\n\n                font {\n                    pointSize: 14\n                }\n\n                color: \"white\"\n            }\n\n            Image {\n                id: icon\n\n                anchors {\n                    horizontalCenter: parent.horizontalCenter\n                    top: parent.top; topMargin: parent.height * 0.2\n                }\n\n                antialiasing: true\n                height: parent.height * 0.6\n                width: parent.width * 0.6\n                asynchronous: true\n                fillMode: Image.PreserveAspectFit\n                source: \"image://icon/\" + model.packageName\n            }\n\n        }\n\n        MouseArea {\n            anchors.fill: parent\n            onClicked: {\n                if (editMode) {\n                    if (highlightedItem == index) {\n                        editMode = false\n                    } else {\n                        highlightedItem = index\n                    }\n                } else {\n                    QL.PackageManager.launchApplication(model.packageName)\n                }\n            }\n            onPressAndHold: {\n                highlightedItem = index\n                editMode = true\n            }\n        }\n\n        MouseArea {\n            id: test\n            anchors {\n                top: parent.top\n                right: parent.right\n            }\n\n            height: closeButton.height * 1.2\n            width: closeButton.width * 1.2\n            enabled: editMode && index == highlightedItem\n\n            onClicked: {\n                /// TODO: verify this\n                //gridModel.removeApplication(model.packageName)\n                if (root.count > highlightedItem)\n                    highlightedItem -= 1\n            }\n        }\n\n        Rectangle {\n            id: closeButton\n\n            anchors {\n                right: parent.right; rightMargin: - width / 3\n                top: parent.top; topMargin: - height / 3\n            }\n\n            enabled: editMode && index == highlightedItem\n            visible: enabled\n\n            width: parent.width / 4\n            height: width\n\n            radius: height / 2\n            clip: true\n            color: \"black\"\n\n            border {\n                color: \"white\"\n                width: closeButton.width * 0.15\n            }\n\n            Rectangle {\n                rotation: 45\n                width: parent.width * 0.9\n                height: width * 0.1\n                anchors.centerIn: parent\n                smooth: true\n                antialiasing: true\n            }\n\n            Rectangle {\n                rotation: -45\n                width: parent.width * 0.9\n                height: width * 0.1\n                anchors.centerIn: parent\n                smooth: true\n                antialiasing: true\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ApplicationList.qml",
    "content": "import QtQuick 2.2\nimport QtQuick.Layouts 1.1\nimport com.iktwo.qutelauncher 1.0 as QL\nimport \".\"\n\nItem {\n    id: root\n\n    property alias model: listView.model\n    property int delegateHeight: dpi * 0.40\n\n    signal showColorPicker\n\n    function goToIndex(index) {\n        listView.positionViewAtIndex(index, ListView.Beginning)\n        /// Add delegateHeight to move past the section\n        listView.contentY += delegateHeight\n    }\n\n    anchors.fill: parent\n\n    ListView {\n        id: listView\n\n        anchors {\n            top: listHeader.bottom\n            left: parent.left\n            right: parent.right\n            bottom: parent.bottom\n        }\n\n        cacheBuffer: height >= 0 ? (height * 9) : root.height\n        maximumFlickVelocity: root.height * 2.5\n\n        section {\n            property: \"category\"\n            criteria: ViewSection.FirstCharacter\n            delegate: ApplicationSection {\n                text: section\n\n                onClicked: sectionNavigator.open()\n            }\n        }\n\n        delegate: Item {\n            height: delegateHeight\n            width: root.width\n\n            Rectangle {\n                anchors {\n                    fill: icon\n                    margins: -parent.height * 0.05\n                }\n                color: Configuration.color\n            }\n\n            Image {\n                id: icon\n\n                anchors {\n                    left: parent.left; leftMargin: 20\n                    verticalCenter: parent.verticalCenter\n                    //horizontalCenter: parent.horizontalCenter\n                    //top: parent.top; topMargin: parent.height * 0.2\n                }\n\n                antialiasing: true\n                height: parent.height * 0.75\n                width: height\n                asynchronous: true\n                fillMode: Image.PreserveAspectFit\n                source: \"image://icon/\" + model.packageName\n            }\n\n            Text {\n                anchors {\n                    verticalCenter: icon.verticalCenter\n                    left: icon.right; leftMargin: dpi * 0.06\n                    right: parent.right\n                }\n\n                text: model.name\n                elide: Text.ElideRight\n                color: \"white\"\n            }\n\n            MouseArea {\n                anchors.fill: parent\n                onClicked: packageManager.launchApplication(model.packageName)\n                onPressAndHold: {\n                    var mappedItem = mapToItem(root, mouse.x, mouse.y)\n                    menu.packageName = model.packageName\n                    menu.name = model.name\n                    menu.open(mouse.x, mappedItem.y)\n                }\n            }\n        }\n    }\n\n    Rectangle {\n        id: listHeader\n\n        anchors {\n            top: parent.top\n            left: parent.left\n            right: parent.right\n        }\n\n        height: delegateHeight\n        color: \"black\"\n        visible: listView.contentY > delegateHeight\n\n        ApplicationSection {\n            text: listView.currentSection\n\n            onClicked: sectionNavigator.open()\n        }\n    }\n\n    Item {\n        id: btnMenu\n\n        anchors {\n            top: parent.top\n            right: parent.right\n        }\n\n        width: 48 * QL.ScreenValues.dp\n        height: 48 * QL.ScreenValues.dp\n        clip: true\n\n        scale: mouseArea.pressed ? 0.97 : 1\n\n        Image {\n            anchors.fill: parent\n\n            antialiasing: true\n            /// TODO: verify this\n            source: \"qrc:/images/menu\"\n        }\n\n        MouseArea {\n            id: mouseArea\n\n            anchors.fill: parent\n\n            onClicked: root.showColorPicker()\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ApplicationMenu.qml",
    "content": "import QtQuick 2.2\nimport com.iktwo.qutelauncher 1.0 as QL\nimport components 1.0 as C\n\nC.PressAndHoldMenu {\n    property string packageName\n    property string name\n\n    expandedHeight: menuItem.height * 2\n\n    C.MenuItem {\n        id: menuItem\n        text: qsTr(\"Info\")\n        onClicked: QL.PackageManager.openApplicationInfo(packageName)\n    }\n\n    C.MenuItem {\n        /// TODO: consume the click even if not enabled\n        /// TODO: verify this\n        // enabled: QL.PackageManager.packages.indexOf(packageName) === -1\n        text: qsTr(\"Add to grid\")\n\n        onClicked: QL.PackageManager.addApplicationToGrid(name, packageName)\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ApplicationSection.qml",
    "content": "import QtQuick 2.2\nimport \".\"\n\nItem {\n    id: root\n\n    property alias text: textElement.text\n\n    signal clicked()\n\n    width: height\n    height: delegateHeight\n\n    Rectangle {\n        anchors {\n            left: parent.left\n            leftMargin: 20\n            verticalCenter: parent.verticalCenter\n        }\n\n        border.color: Configuration.color\n        border.width: parent.height * 0.01\n        color: \"transparent\"\n        width: parent.height * 0.8\n        height: width\n\n        Text {\n            id: textElement\n\n            anchors.centerIn: parent\n            color: Configuration.color\n            font {\n                pointSize: 24\n                bold: true\n            }\n        }\n    }\n\n    MouseArea {\n        anchors.fill: parent\n\n        onClicked: root.clicked()\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ColorPicker.qml",
    "content": "import QtQuick 2.6\n\nItem {\n    id: root\n\n    property color color\n\n    signal selectedColor()\n\n    function open() {\n        focus = true\n        visible = true\n    }\n\n    function close() {\n        visible = false\n        /// TODO: verify this\n        // backKeyHandler.forceActiveFocus()\n    }\n\n    anchors.fill: parent\n    visible: false\n\n    Keys.onBackPressed: close()\n\n    Rectangle {\n        id: container\n\n        property var colors: [\n            \"#a4c400\", \"#60a917\", \"#008a00\",\n            \"#00aba9\", \"#1ba1e2\", \"#0050ef\",\n            \"#6a00ff\", \"#aa00ff\", \"#f472d0\",\n            \"#d80073\", \"#a20025\", \"#e51400\",\n            \"#fa6800\", \"#f0a30a\", \"#e3c800\",\n            \"#825a2c\", \"#6d8764\", \"#647687\",\n            \"#76608a\", \"#87794e\"\n        ]\n\n        anchors.fill: parent\n\n        color: \"black\"\n\n        GridView {\n            anchors.centerIn: parent\n\n            width: parent.width * 0.9\n            height: parent.height * 0.9\n\n            cellHeight: height / 5\n            cellWidth: width / 4\n\n            model: container.colors.length\n            delegate: Item {\n                height: GridView.view.cellHeight\n                width: GridView.view.cellWidth\n\n                Rectangle {\n                    id: itemColor\n\n                    anchors.centerIn: parent\n                    width: parent.width * 0.9\n                    height: parent.height * 0.9\n                    color: container.colors[index]\n                }\n\n                MouseArea {\n                    anchors.fill: parent\n                    onClicked: {\n                        root.color = itemColor.color\n                        selectedColor()\n                        close()\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/Configuration.qml",
    "content": "pragma Singleton\nimport QtQuick 2.0\nimport Qt.labs.settings 1.0\n\nItem {\n    id: root\n\n    property bool dark: true\n    property color color: \"green\"\n\n    Settings {\n        property alias dark: root.dark\n        property alias color: root.color\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/SectionNavigator.qml",
    "content": "import QtQuick 2.6\nimport com.iktwo.qutelauncher 1.0 as QL\nimport \".\"\n\nItem {\n    id: root\n\n    property var sections: [\n        \"#\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\",\n        \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\",\n        \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\",\n        \"X\", \"Y\", \"Z\", \"%\"\n    ]\n\n    property bool animationRunning: false\n\n    signal goToSection(int sectionIndex)\n    signal closed()\n    signal opened()\n\n    function open() {\n        visible = true\n        focus = true\n        opened()\n    }\n\n    function close() {\n        /// TODO: verify this\n        // backKeyHandler.forceActiveFocus()\n        closed()\n    }\n\n    anchors.fill: parent\n    visible: false\n\n    Keys.onBackPressed: close()\n\n    MouseArea {\n        anchors.fill: parent\n        enabled: parent.visible\n    }\n\n    Rectangle {\n        anchors.fill: parent\n        color: \"black\"\n        opacity: 0.6\n    }\n\n    GridView {\n        id: view\n        anchors {\n            fill: parent\n            rightMargin: parent.width * 0.025\n            leftMargin: parent.width * 0.025\n            topMargin: parent.width * 0.02\n            bottomMargin: parent.width * 0.02\n        }\n        model: root.sections.length\n        cellWidth: width / 4\n        cellHeight: height / 7\n        interactive: false\n        delegate: Item {\n            property bool sectionExists: QL.PackageManager.sections.indexOf(root.sections[index]) !== -1\n\n            height: view.cellHeight\n            width: view.cellWidth\n\n            Flipable {\n                id: flipable\n\n                property bool flipped: !root.visible\n\n                Connections {\n                    target: root\n                    onClosed: flipable.flipped = true\n                    onOpened: flipable.flipped = false\n                }\n\n                anchors.fill: parent\n\n                front: Rectangle {\n                    anchors {\n                        fill: parent\n                        rightMargin: parent.width * 0.06\n                        leftMargin: parent.width * 0.06\n                        topMargin: parent.width * 0.06\n                        bottomMargin: parent.width * 0.06\n                    }\n\n                    color: sectionExists ? Configuration.color : \"black\"\n                    clip: true\n\n                    Text {\n                        anchors {\n                            left: parent.left; leftMargin: 15\n                            bottom: parent.bottom; bottomMargin: 15\n                        }\n\n                        color: \"white\"\n                        font {\n                            pointSize: 22\n                            bold: true\n                        }\n                        text: root.sections[index]\n                    }\n                }\n\n                transform: Rotation {\n                    id: rotation\n                    origin.x: flipable.width/2\n                    origin.y: flipable.height/2\n                    axis.x: 1; axis.y: 0; axis.z: 0\n                    angle: 0\n                }\n\n                states: State {\n                    name: \"back\"\n                    when: flipable.flipped\n                    PropertyChanges { target: rotation; angle: 180 }\n                }\n\n                transitions: Transition {\n                    ParallelAnimation {\n                        alwaysRunToEnd: true\n\n                        NumberAnimation { target: rotation; property: \"angle\"; duration: 450; easing.type: Easing.InOutQuad }\n                        SequentialAnimation {\n                            ScriptAction {\n                                script: root.animationRunning = true\n                            }\n\n                            PauseAnimation { duration: 300 }\n                            ScriptAction {\n                                script: {\n                                    if (flipable.flipped)\n                                        root.visible = false\n\n                                    root.animationRunning = false\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n\n            MouseArea {\n                anchors.fill: parent\n\n                enabled: sectionExists && !root.animationRunning\n\n                onClicked: {\n                    root.goToSection(QL.PackageManager.indexOfSection(root.sections[index]))\n                    close()\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/ThemeMain.qml",
    "content": "import QtQuick 2.6\nimport com.iktwo.qutelauncher 1.0 as QL\nimport \".\"\n\nItem {\n    id: root\n\n    property int navbarMargin: QL.ScreenValues.navBarVisible ? QL.ScreenValues.navigationBarHeight : 0\n    property int statusbarMargin: QL.ScreenValues.statusBarHeight\n\n    /// TODO: adapt this to tiles theme\n    property bool opened: false\n\n    Flickable {\n        anchors.fill: parent\n\n        contentWidth: width * 2\n        boundsBehavior: Flickable.StopAtBounds\n        flickableDirection: Flickable.HorizontalFlick\n        maximumFlickVelocity: applicationWindow.width * 3\n        pressDelay: 50\n\n        flickDeceleration: 5000\n\n        /// TODO: check if this is ok\n        interactive: !applicationGrid.editMode\n\n        //        property bool enableAnimation: true\n\n        Behavior on contentX { SmoothedAnimation { duration: 150 } }\n\n        //        onMovementStarted: {\n\n        //        }\n\n        onMovementEnded: {\n            if (contentX >= width / 2)\n                contentX = width\n            else\n                contentX = 0\n\n            //console.log(\"CONTENT X:\", contentX)\n        }\n\n        Item {\n            anchors {\n                top: parent.top\n                bottom: parent.bottom\n            }\n\n            width: applicationWindow.width * 2\n\n            Rectangle {\n                anchors.fill: parent\n\n                color: \"black\"\n                opacity: 0.3\n                visible: applicationGrid.editMode\n            }\n\n            ApplicationGrid {\n                id: applicationGrid\n\n                anchors {\n                    top: parent.top; topMargin: parent.height * 0.025\n                    bottom: parent.bottom; bottomMargin: parent.height * 0.025\n                    left: parent.left; leftMargin: (parent.width / 2 ) * 0.025\n                }\n\n                model: QL.PackageManager\n\n                width: (parent.width / 2 ) * 0.95\n            }\n\n            Rectangle {\n                anchors {\n                    top: parent.top\n                    bottom: parent.bottom\n                    right: parent.right\n                }\n\n                width: parent.width / 2\n                color: \"black\"\n\n                ApplicationList {\n                    id: applicationList\n\n                    model: QL.PackageManager\n\n                    onShowColorPicker: colorPicker.open()\n                }\n            }\n        }\n    }\n\n    ApplicationMenu {\n        id: menu\n    }\n\n    SectionNavigator {\n        id: sectionNavigator\n\n        onGoToSection: applicationList.goToIndex(sectionIndex)\n    }\n\n    ColorPicker {\n        id: colorPicker\n\n        /// TODO: handle back key\n        onSelectedColor: Configuration.color = color\n    }\n\n    Connections {\n        target: QL.Launcher\n        onNewIntentReceived: explandableItem.close()\n        onMinimized: explandableItem.close()\n    }\n}\n"
  },
  {
    "path": "src/qml/themes/tiles/qmldir",
    "content": "singleton Configuration 1.0 Configuration.qml\n"
  },
  {
    "path": "src/resources.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/qml\">\n        <file>qml/main.qml</file>\n        <file>qml/IntroView.qml</file>\n        <file>qml/config/qmldir</file>\n        <file>qml/config/Theme.qml</file>\n        <file>qml/config/Dimensions.qml</file>\n        <file>qml/debug/Debug.qml</file>\n        <file>qml/debug/qmldir</file>\n        <file>qml/intro/IntroMain.qml</file>\n        <file>qml/intro/IntroEnd.qml</file>\n        <file>qml/themes/classic/ThemeMain.qml</file>\n        <file>qml/themes/classic/ApplicationGrid.qml</file>\n        <file>qml/themes/classic/ExpandableItem.qml</file>\n        <file>qml/themes/classic/ApplicationTile.qml</file>\n        <file>qml/themes/tiles/ThemeMain.qml</file>\n        <file>qml/themes/tiles/ApplicationGrid.qml</file>\n        <file>qml/themes/tiles/ApplicationList.qml</file>\n        <file>qml/themes/tiles/ApplicationMenu.qml</file>\n        <file>qml/themes/tiles/ColorPicker.qml</file>\n        <file>qml/themes/tiles/SectionNavigator.qml</file>\n        <file>qml/themes/tiles/ApplicationSection.qml</file>\n        <file>qml/themes/tiles/Configuration.qml</file>\n        <file>qml/themes/tiles/qmldir</file>\n        <file>qml/components/PressAndHoldMenu.qml</file>\n        <file>qml/components/qmldir</file>\n        <file>qml/themes/classic/ApplicationGridMenu.qml</file>\n        <file>qml/components/MenuItem.qml</file>\n        <file>qml/intro/IntroSelection.qml</file>\n        <file>qml/components/RadioButtonStyleDefault.qml</file>\n        <file>qml/intro/IntroScreen.qml</file>\n    </qresource>\n    <qresource prefix=\"/images\">\n        <file alias=\"test\">resources/images/test.png</file>\n        <file alias=\"shadow\">resources/images/shadow.png</file>\n        <file alias=\"shadow_navigationbar\">resources/images/shadow_navigationbar.png</file>\n        <file alias=\"icon\">resources/images/icon.svg</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "src/src/application.cpp",
    "content": "#include \"application.h\"\n\n#include <QRegExp>\n\nApplication::Application(QObject *parent) :\n    QObject(parent)\n{\n}\n\nApplication::Application(const QString &name, const QString &packageName, QObject *parent) :\n    QObject(parent),\n    mName(name),\n    mPackageName(packageName)\n{\n    setCategory();\n}\n\nQString Application::name() const\n{\n    return mName;\n}\n\nvoid Application::setName(const QString &name)\n{\n    if (mName == name)\n        return;\n\n    mName = name;\n    emit nameChanged();\n    setCategory();\n}\n\nQString Application::packageName() const\n{\n    return mPackageName;\n}\n\nvoid Application::setPackageName(const QString &packageName)\n{\n    if (mPackageName == packageName)\n        return;\n\n    mPackageName = packageName;\n    emit packageNameChanged();\n}\n\nQString Application::category() const\n{\n    return mCategory;\n}\n\nvoid Application::setCategory()\n{\n    QString name = mName.simplified();\n    name.replace(QRegExp(\"[ÁÀÂÃÄ]\"), \"A\");\n    name.replace(QRegExp(\"[áàâãä]\"), \"a\");\n    name.replace(QRegExp(\"[ÉÈÊẼË]\"), \"E\");\n    name.replace(QRegExp(\"[éèêẽë]\"), \"e\");\n    name.replace(QRegExp(\"[ÍÌÎĨÏ]\"), \"I\");\n    name.replace(QRegExp(\"[íìîĩï]\"), \"i\");\n    name.replace(QRegExp(\"[ÓÒÔÕÖ]\"), \"O\");\n    name.replace(QRegExp(\"[óòôõö]\"), \"o\");\n    name.replace(QRegExp(\"[ÚÙÛŨÜ]\"), \"U\");\n    name.replace(QRegExp(\"[úùûũü]\"), \"u\");\n    name.replace(QRegExp(\"[Ç]\"), \"C\");\n    name.replace(QRegExp(\"[ç]\"), \"c\");\n\n    if (name.simplified().isEmpty())\n        mCategory = \" \";\n    else if (name.at(0).isDigit())\n        mCategory = \"#\";\n    else if (name.at(0) <= 'z')\n        mCategory = name.at(0).toUpper();\n    else\n        mCategory = \"%\";\n\n    emit categoryChanged();\n}\n"
  },
  {
    "path": "src/src/application.h",
    "content": "#ifndef APPLICATION_H\n#define APPLICATION_H\n\n#include <QObject>\n\nclass Application : public QObject\n{\n    Q_OBJECT\n\n    Q_PROPERTY(QString name READ name NOTIFY nameChanged)\n    Q_PROPERTY(QString packageName READ packageName NOTIFY packageNameChanged)\n    Q_PROPERTY(QString category READ category NOTIFY categoryChanged)\n\npublic:\n    explicit Application(QObject *parent = 0);\n    Application(const QString &name, const QString &packageName, QObject *parent = 0);\n\n    QString name() const;\n    void setName(const QString &name);\n\n    QString packageName() const;\n    void setPackageName(const QString &packageName);\n\n    QString category() const;\n    void setCategory();\n\nsignals:\n    void nameChanged();\n    void packageNameChanged();\n    void categoryChanged();\n\nprivate:\n    QString mName;\n    QString mPackageName;\n    QString mCategory;\n};\n\n#endif // APPLICATION_H\n"
  },
  {
    "path": "src/src/applicationinfo.cpp",
    "content": "#include \"applicationinfo.h\"\n\n#include <QSettings>\n#include <QDebug>\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniEnvironment>\n#include <QAndroidJniObject>\n#endif\n\nApplicationInfo::ApplicationInfo(QObject *parent) :\n    QObject(parent),\n    m_timesLaunched(0),\n    m_hasShownInitialDialog(false)\n{\n    QSettings settings;\n    m_timesLaunched = settings.value(\"timesLaunched\", 0).toInt();\n    m_hasShownInitialDialog = settings.value(\"hasShownInitialDialog\", false).toBool();\n\n    m_firstTimeLaunched = settings.value(\"firstTimeLaunched\", QDate::fromString(\"20000101\", \"yyyyMMdd\")).toDate();\n\n    if (m_firstTimeLaunched.toString(\"yyyyMMdd\") == \"20000101\")\n        setFirstTimeLaunched(QDate::currentDate());\n\n    m_OSVersion = getOSVersion();\n    setTimesLaunched(m_timesLaunched + 1);\n}\n\nint ApplicationInfo::timesLaunched() const\n{\n    return m_timesLaunched;\n}\n\nvoid ApplicationInfo::setTimesLaunched(int timesLaunched)\n{\n    if (m_timesLaunched == timesLaunched)\n        return;\n\n    m_timesLaunched = timesLaunched;\n\n    QSettings settings;\n    settings.setValue(\"timesLaunched\", m_timesLaunched);\n\n    emit timesLaunchedChanged();\n}\n\nQDate ApplicationInfo::firstTimeLaunched() const\n{\n    return m_firstTimeLaunched;\n}\n\nvoid ApplicationInfo::setFirstTimeLaunched(const QDate &firstTimeLaunched)\n{\n    if (m_firstTimeLaunched == firstTimeLaunched)\n        return;\n\n    m_firstTimeLaunched = firstTimeLaunched;\n\n    QSettings settings;\n    settings.setValue(\"firstTimeLaunched\", m_firstTimeLaunched);\n\n    emit firstTimeLaunchedChanged();\n}\n\nbool ApplicationInfo::hasShownInitialDialog() const\n{\n    return m_hasShownInitialDialog;\n}\n\nvoid ApplicationInfo::setHasShownInitialDialog(bool hasShownInitialDialog)\n{\n    if (m_hasShownInitialDialog == hasShownInitialDialog)\n        return;\n\n    m_hasShownInitialDialog = hasShownInitialDialog;\n\n    QSettings settings;\n    settings.setValue(\"hasShownInitialDialog\", m_hasShownInitialDialog);\n\n    emit hasShownInitialDialogChanged();\n}\n\nint ApplicationInfo::OSVersion() const\n{\n    return m_OSVersion;\n}\n\nvoid ApplicationInfo::setOSVersion(int version)\n{\n    if (m_OSVersion == version)\n        return;\n\n    m_OSVersion = version;\n    emit OSVersionChanged();\n}\n\nint ApplicationInfo::getOSVersion()\n{\n#ifdef Q_OS_ANDROID\n    jint version = QAndroidJniObject::getStaticField<jint>(\"android.os.Build$VERSION\", \"SDK_INT\");\n    return version;\n#else\n    return -1;\n#endif\n}\n\n"
  },
  {
    "path": "src/src/applicationinfo.h",
    "content": "#ifndef APPLICATIONINFO_H\n#define APPLICATIONINFO_H\n\n#include <QObject>\n#include <QDate>\n\nclass ApplicationInfo : public QObject\n{\n    Q_OBJECT\n\n    Q_PROPERTY(int timesLaunched READ timesLaunched NOTIFY timesLaunchedChanged)\n    Q_PROPERTY(QDate firstTimeLaunched READ firstTimeLaunched NOTIFY firstTimeLaunchedChanged)\n    Q_PROPERTY(bool hasShownInitialDialog READ hasShownInitialDialog WRITE setHasShownInitialDialog NOTIFY hasShownInitialDialogChanged)\n    Q_PROPERTY(int OSVersion READ OSVersion WRITE setOSVersion NOTIFY OSVersionChanged)\n\npublic:\n    ApplicationInfo(QObject *parent = 0);\n\n    int timesLaunched() const;\n    void setTimesLaunched(int timesLaunched);\n\n    QDate firstTimeLaunched() const;\n    void setFirstTimeLaunched(const QDate &firstTimeLaunched);\n\n    bool hasShownInitialDialog() const;\n    void setHasShownInitialDialog(bool hasShownInitialDialog);\n\n    int OSVersion() const;\n    void setOSVersion(int version);\n\nsignals:\n    void timesLaunchedChanged();\n    void firstTimeLaunchedChanged();\n    void hasShownInitialDialogChanged();\n    void OSVersionChanged();\n\nprivate:\n    int m_timesLaunched;\n    QDate m_firstTimeLaunched;\n    bool m_hasShownInitialDialog;\n    int m_OSVersion;\n\n    int getOSVersion();\n\n};\n\n#endif // APPLICATIONINFO_H\n"
  },
  {
    "path": "src/src/iconimageprovider.cpp",
    "content": "#include \"iconimageprovider.h\"\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniObject>\n#include <QAndroidJniEnvironment>\n#endif\n\n#include <QDebug>\n\nIconImageProvider::IconImageProvider() :\n    QQuickImageProvider(QQuickImageProvider::Image)\n{\n}\n\nQImage IconImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)\n{\n    Q_UNUSED(size);\n    Q_UNUSED(requestedSize);\n    QImage image;\n\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject appIcon = QAndroidJniObject::callStaticObjectMethod(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                                                          \"getApplicationIcon\",\n                                                                          \"(Ljava/lang/String;)[B\",\n                                                                          QAndroidJniObject::fromString(id).object<jstring>());\n\n    QAndroidJniEnvironment env;\n    jbyteArray iconDataArray = appIcon.object<jbyteArray>();\n\n    if (!iconDataArray) {\n        qDebug() << Q_FUNC_INFO << \"No icon data\";\n\n        return image;\n    }\n\n    jsize iconSize = env->GetArrayLength(iconDataArray);\n\n    if (iconSize > 0) {\n        jboolean jfalse = false;\n        jbyte *icon = env->GetByteArrayElements(iconDataArray, &jfalse);\n        image = QImage::fromData((uchar*) icon, iconSize,\"PNG\");\n        env->ReleaseByteArrayElements(iconDataArray, icon, JNI_ABORT);\n    }\n\n    return image;\n#else\n    Q_UNUSED(id)\n    return QImage(\"://images/test\",\"PNG\");\n#endif\n\n}\n"
  },
  {
    "path": "src/src/iconimageprovider.h",
    "content": "#ifndef ICONIMAGEPROVIDER_H\n#define ICONIMAGEPROVIDER_H\n\n#include <QQuickImageProvider>\n\nclass IconImageProvider : public QQuickImageProvider\n{\npublic:\n    explicit IconImageProvider();\n\n    QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize);\n};\n\n#endif // ICONIMAGEPROVIDER_H\n"
  },
  {
    "path": "src/src/launcher.cpp",
    "content": "#include \"launcher.h\"\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniEnvironment>\n\nstatic void newIntent(JNIEnv *env, jobject thiz, jlong qtObject)\n{\n    Q_UNUSED(env)\n    Q_UNUSED(thiz)\n    reinterpret_cast<Launcher*>(qtObject)->emitNewIntent();\n}\n#endif\n\nLauncher::Launcher(QObject *parent) : QObject(parent)\n{\n#ifdef Q_OS_ANDROID\n    mActivity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\", \"activity\", \"()Landroid/app/Activity;\");\n\n#endif\n}\n\nvoid Launcher::pickWallpaper()\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject::callStaticMethod<void>(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                              \"pickWallpaper\",\n                                              \"()V\");\n#endif\n}\n\nvoid Launcher::emitNewIntent()\n{\n    emit newIntentReceived();\n}\n\nvoid Launcher::registerMethods()\n{\n    registerNativeMethods();\n}\n\nvoid Launcher::minimize()\n{\n    emit minimized();\n}\n\nvoid Launcher::registerNativeMethods()\n{\n#ifdef Q_OS_ANDROID\n    JNINativeMethod methods[] {{\"jnewIntent\", \"(J)V\", reinterpret_cast<void *>(newIntent)}};\n\n    QAndroidJniObject::callStaticMethod<void>(\"com/iktwo/qutelauncher/QuteLauncherFlavored\",\n                                              \"setQtObject\", \"(J)V\",\n                                              \"(J)V\", reinterpret_cast<long>(this));\n\n    QAndroidJniEnvironment env;\n    jclass objectClass = env->GetObjectClass(mActivity.object<jobject>());\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n\n    env->RegisterNatives(objectClass, methods, sizeof(methods) / sizeof(methods[0]));\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n\n    env->DeleteLocalRef(objectClass);\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n#endif\n}\n"
  },
  {
    "path": "src/src/launcher.h",
    "content": "#ifndef LAUNCHER_H\n#define LAUNCHER_H\n\n#include <QObject>\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniObject>\n#endif\n\nclass Launcher : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit Launcher(QObject *parent = 0);\n\n    Q_INVOKABLE void pickWallpaper();\n    Q_INVOKABLE void emitNewIntent();\n    Q_INVOKABLE void registerMethods();\n    Q_INVOKABLE void minimize();\n\nsignals:\n    void newIntentReceived();\n    void minimized();\n\nprivate:\n    void registerNativeMethods();\n\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject mActivity;\n#endif\n};\n\n#endif // LAUNCHER_H\n"
  },
  {
    "path": "src/src/main.cpp",
    "content": "#include <QApplication>\n#include <QQuickView>\n#include <QQmlApplicationEngine>\n#include <QQmlEngine>\n#include <QQmlComponent>\n#include <QQmlContext>\n#include <QSettings>\n#include <QThread>\n#include <QDebug>\n\n#include \"applicationinfo.h\"\n#include \"iconimageprovider.h\"\n#include \"launcher.h\"\n#include \"packagemanager.h\"\n#include \"screenvalues.h\"\n#include \"system.h\"\n\nstatic QObject *package_manager_provider(QQmlEngine *engine, QJSEngine *scriptEngine)\n{\n    Q_UNUSED(engine)\n    Q_UNUSED(scriptEngine)\n\n    return new PackageManager();\n}\n\nstatic QObject *screen_values_provider(QQmlEngine *engine, QJSEngine *scriptEngine)\n{\n    Q_UNUSED(engine)\n    Q_UNUSED(scriptEngine)\n\n    return new ScreenValues();\n}\n\nstatic QObject *launcher_provider(QQmlEngine *engine, QJSEngine *scriptEngine)\n{\n    Q_UNUSED(engine)\n    Q_UNUSED(scriptEngine)\n\n    return new Launcher();\n}\n\nstatic QObject *system_provider(QQmlEngine *engine, QJSEngine *scriptEngine)\n{\n    Q_UNUSED(engine)\n    Q_UNUSED(scriptEngine)\n\n    return new System();\n}\n\nstatic QObject *application_info_provider(QQmlEngine *engine, QJSEngine *scriptEngine)\n{\n    Q_UNUSED(engine)\n    Q_UNUSED(scriptEngine)\n\n    return new ApplicationInfo();\n}\n\nint main(int argc, char *argv[])\n{\n    QScopedPointer<QApplication> app(new QApplication(argc, argv));\n\n    QCoreApplication::setOrganizationName(\"Iktwo Corp.\");\n    QCoreApplication::setOrganizationDomain(\"iktwo.com\");\n    QCoreApplication::setApplicationName(\"QuteLauncher\");\n\n    QQmlApplicationEngine engine;\n\n    QObject::connect(&engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));\n\n    qmlRegisterSingletonType<PackageManager>(\"com.iktwo.qutelauncher\", 1, 0, \"PackageManager\", package_manager_provider);\n    qmlRegisterSingletonType<ApplicationInfo>(\"com.iktwo.qutelauncher\", 1, 0, \"ApplicationInfo\", application_info_provider);\n    qmlRegisterSingletonType<ScreenValues>(\"com.iktwo.qutelauncher\", 1, 0, \"ScreenValues\", screen_values_provider);\n    qmlRegisterSingletonType<System>(\"com.iktwo.qutelauncher\", 1, 0, \"System\", system_provider);\n    qmlRegisterSingletonType<Launcher>(\"com.iktwo.qutelauncher\", 1, 0, \"Launcher\", launcher_provider);\n\n    engine.addImageProvider(QLatin1String(\"icon\"), new IconImageProvider());\n    engine.addImportPath(\"qrc:/qml/qml\");\n\n    engine.load(QUrl(\"qrc:/qml/qml/main.qml\"));\n\n    return app->exec();\n}\n"
  },
  {
    "path": "src/src/packagemanager.cpp",
    "content": "#include \"packagemanager.h\"\n\n#include \"application.h\"\n\n#include <QDebug>\n#include <QImage>\n#include <QSettings>\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniEnvironment>\n\nstatic void packageAdded(JNIEnv *env, jobject thiz, jstring label, jstring packageName, jlong qtObject)\n{\n    Q_UNUSED(env)\n    Q_UNUSED(thiz)\n    reinterpret_cast<PackageManager*>(qtObject)->emitAddApplication(PackageManager::jstringToQString(label).simplified(), PackageManager::jstringToQString(packageName));\n}\n\nstatic void packageRemoved(JNIEnv *env, jobject thiz, jstring packageName, jlong qtObject)\n{\n    Q_UNUSED(env)\n    Q_UNUSED(thiz)\n    reinterpret_cast<PackageManager*>(qtObject)->emitRemoveApplication(PackageManager::jstringToQString(packageName));\n}\n#endif\n\nPackageManager::PackageManager(QObject *parent) :\n    QAbstractListModel(parent)\n{\n#ifdef Q_OS_ANDROID\n    mAndroidActivity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\", \"activity\", \"()Landroid/app/Activity;\");\n    mIntentFilter = QAndroidJniObject(\"android/content/IntentFilter\");\n    mBroadcastReceiver = QAndroidJniObject(\"com/iktwo/qutelauncher/PackageChangedReceiver\");\n#endif\n\n    connect(this, SIGNAL(newApplicationDetected(QString, QString)), this, SLOT(addApplication(QString, QString)));\n    connect(this, SIGNAL(removedApplication(QString)), this, SLOT(removeApplication(QString)));\n}\n\nint PackageManager::rowCount(const QModelIndex &parent) const\n{\n    Q_UNUSED(parent)\n    return mApplications.count();\n}\n\nQVariant PackageManager::data(const QModelIndex &index, int role) const\n{\n    if (index.row() < 0 || index.row() >= mApplications.count())\n        return QVariant();\n\n    switch (role) {\n    case NameRole:\n        return qobject_cast<Application*>(mApplications.at(index.row()))->name();\n        break;\n    case PackageNameRole:\n        return qobject_cast<Application*>(mApplications.at(index.row()))->packageName();\n        break;\n    case CategoryRole:\n        return qobject_cast<Application*>(mApplications.at(index.row()))->category();\n        break;\n    }\n    return QVariant();\n}\n\n#ifdef Q_OS_ANDROID\nvoid PackageManager::registerNativeMethods() {\n    JNINativeMethod methods[] {{\"jpackageRemoved\", \"(Ljava/lang/String;J)V\", reinterpret_cast<void *>(packageRemoved)},\n        {\"jpackageAdded\", \"(Ljava/lang/String;Ljava/lang/String;J)V\", reinterpret_cast<void *>(packageAdded)}};\n\n    QAndroidJniObject::callStaticMethod<void>(\"com/iktwo/qutelauncher/PackageChangedReceiver\",\n                                              \"setQtObject\", \"(J)V\",\n                                              \"(J)V\", reinterpret_cast<long>(this));\n\n    QAndroidJniEnvironment env;\n    jclass objectClass = env->GetObjectClass(mBroadcastReceiver.object<jobject>());\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n\n    env->RegisterNatives(objectClass, methods, sizeof(methods) / sizeof(methods[0]));\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n\n    env->DeleteLocalRef(objectClass);\n\n    if (env->ExceptionCheck())\n        env->ExceptionClear();\n}\n#endif\n\nvoid PackageManager::launchApplication(const QString &application)\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject::callStaticMethod<void>(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                              \"launchApplication\",\n                                              \"(Ljava/lang/String;)V\",\n                                              QAndroidJniObject::fromString(application).object<jstring>());\n#else\n    Q_UNUSED(application)\n#endif\n}\n\nQHash<int, QByteArray> PackageManager::roleNames() const\n{\n    QHash<int, QByteArray> roles;\n    roles[NameRole] = \"name\";\n    roles[PackageNameRole] = \"packageName\";\n    roles[CategoryRole] = \"category\";\n    return roles;\n}\n\nQString GetRandomString()\n{\n    const QString possibleCharacters(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\");\n    const int randomStringLength = 8; // assuming you want random strings of 12 characters\n\n    QString randomString;\n    for(int i=0; i < randomStringLength; ++i)\n    {\n        int index = qrand() % possibleCharacters.length();\n        QChar nextChar = possibleCharacters.at(index);\n        randomString.append(nextChar);\n    }\n\n    return randomString;\n}\n\nvoid PackageManager::retrievePackages()\n{\n    beginResetModel();\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject connectionType = QAndroidJniObject::callStaticObjectMethod(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                                                                 \"applications\",\n                                                                                 \"()[Lcom/iktwo/qutelauncher/Application;\");\n\n\n    jobjectArray array = connectionType.object<jobjectArray>();\n\n    QAndroidJniEnvironment env;\n    jsize size = env->GetArrayLength(array);\n    for (int i = 0; i < size; ++i) {\n        QAndroidJniObject obj = env->GetObjectArrayElement(array, i);\n\n        QString name = jstringToQString((obj.callObjectMethod<jstring>(\"getName\")).object<jstring>());\n        QString packageName = jstringToQString((obj.callObjectMethod<jstring>(\"getPackageName\")).object<jstring>());\n\n        qDebug() << \"name:\" << name  << \" packageName:\"  << packageName;\n\n        if (packageName == \"com.google.android.launcher\")\n            continue;\n\n        mApplications.append(new Application(name.simplified(), packageName));\n    }\n#else\n    mApplications.append(new Application(\"Aero\", \"com.aero\"));\n    mApplications.append(new Application(\"Andale\", \"com.andale\"));\n    mApplications.append(new Application(\"Andate\", \"com.andate\"));\n    mApplications.append(new Application(\"Basurto\", \"com.basurto\"));\n    mApplications.append(new Application(\"Bueno\", \"com.bueno\"));\n    mApplications.append(new Application(\"Casa\", \"com.casa\"));\n    mApplications.append(new Application(\"Cosa\", \"com.cosa\"));\n    mApplications.append(new Application(\"Crosa\", \"com.crosa\"));\n    mApplications.append(new Application(\"Indie\", \"com.indie\"));\n    mApplications.append(new Application(\"Indira\", \"com.indira\"));\n    mApplications.append(new Application(\"Indigo\", \"com.indigo\"));\n    mApplications.append(new Application(\"Juice\", \"com.juice\"));\n    mApplications.append(new Application(\"Kato\", \"com.kato\"));\n    mApplications.append(new Application(\"Keee\", \"com.keee\"));\n    mApplications.append(new Application(\"Kila\", \"com.kila\"));\n    mApplications.append(new Application(\"Kilo\", \"com.kilo\"));\n    mApplications.append(new Application(\"Kudo\", \"com.kudo\"));\n    mApplications.append(new Application(\"Kuelo\", \"com.kuelo\"));\n    mApplications.append(new Application(\"Kuzz\", \"com.kuzz\"));\n    mApplications.append(new Application(\"Locos\", \"com.locos\"));\n    mApplications.append(new Application(\"Lucas\", \"com.lucas\"));\n    mApplications.append(new Application(\"Many\", \"com.many\"));\n    mApplications.append(new Application(\"Mano\", \"com.mano\"));\n    mApplications.append(new Application(\"Mezcla\", \"com.mezcla\"));\n    mApplications.append(new Application(\"Nooooo\", \"com.nooooo\"));\n    mApplications.append(new Application(\"Niurka\", \"com.niurka\"));\n    mApplications.append(new Application(\"Nunca\", \"com.nunca\"));\n    mApplications.append(new Application(\"Tatoo\", \"com.tatoo\"));\n    mApplications.append(new Application(\"Tito\", \"com.tito\"));\n    mApplications.append(new Application(\"Toto\", \"com.toto\"));\n    mApplications.append(new Application(\"Tuto\", \"com.tuto\"));\n    mApplications.append(new Application(\"Radio\", \"com.radio\"));\n    mApplications.append(new Application(\"Rojo\", \"com.rojo\"));\n    mApplications.append(new Application(\"Very long name here\", \"com.very\"));\n    mApplications.append(new Application(\"Zahm\", \"com.zahm\"));\n    mApplications.append(new Application(\"Zooom\", \"com.zooom\"));\n#endif\n\n    QSettings settings;\n    int packagesSize = settings.beginReadArray(\"packages\");\n    settings.endArray();\n    QStringList defaultApps;\n\n#ifdef Q_OS_ANDROID\n    if (packagesSize == 0) {\n        defaultApps << \"com.android.dialer\";\n        defaultApps << \"com.android.contacts\";\n        defaultApps << \"com.android.chrome\";\n        defaultApps << \"com.google.android.GoogleCamera\";\n        defaultApps << \"com.google.android.music\";\n        defaultApps << \"com.google.android.youtube\";\n        defaultApps << \"com.google.android.talk\";\n        defaultApps << \"com.google.android.gallery3d\";\n        defaultApps << \"com.facebook.katana\";\n        defaultApps << \"com.whatsapp\";\n        defaultApps << \"com.google.android.gm\";\n        defaultApps << \"com.android.deskclock\";\n        defaultApps << \"com.google.android.keep\";\n        defaultApps << \"com.google.android.calendar\";\n        defaultApps << \"com.google.android.apps.maps\";\n        defaultApps << \"com.google.earth\";\n        defaultApps << \"com.cyanogenmod.filemanager\";\n        defaultApps << \"com.android.providers.downloads.ui\";\n        defaultApps << \"com.android.vending\";\n        defaultApps << \"com.android.settings\";\n    }\n#else\n    if (packagesSize == 0) {\n        defaultApps << \"com.aero\";\n        defaultApps << \"com.andate\";\n        defaultApps << \"com.basurto\";\n    }\n#endif\n\n    if (packagesSize == 0) {\n        foreach (QString app, defaultApps) {\n            foreach (QObject *applicationObject, mApplications) {\n                Application *application = qobject_cast<Application*>(applicationObject);\n                if (app == application->packageName()) {\n                    emit addedApplicationToGrid(application->name(), application->packageName());\n                    break;\n                }\n            }\n        }\n    }\n\n    /// TODO: add code to clean this before retrieving packages, change this foreach with a for\n    /// This assumes mApplications is ordered, and it should be..\n\n    int i = 0;\n    foreach (QObject *object, mApplications) {\n        Application *application = qobject_cast<Application*>(object);\n\n        if (!mSections.contains(application->category())) {\n            mSections.append(application->category());\n            mSectionsPositions.append(i);\n        }\n\n        ++i;\n    }\n\n    // qDebug() << \"mApplications:\" << mApplications;\n\n    endResetModel();\n    emit sectionsChanged();\n}\n\nvoid PackageManager::registerBroadcast()\n{\n    retrievePackages();\n\n#ifdef Q_OS_ANDROID\n    qDebug() << Q_FUNC_INFO << \"registering broadcast\";\n    QAndroidJniObject addActionString = QAndroidJniObject::fromString(\"android.intent.action.PACKAGE_ADDED\");\n    QAndroidJniObject removeActionString = QAndroidJniObject::fromString(\"android.intent.action.PACKAGE_REMOVED\");\n    QAndroidJniObject dataSchemeString = QAndroidJniObject::fromString(\"package\");\n\n\n    mIntentFilter.callMethod<void>(\"addAction\", \"(Ljava/lang/String;)V\", addActionString.object<jstring>());\n    mIntentFilter.callMethod<void>(\"addAction\", \"(Ljava/lang/String;)V\", removeActionString.object<jstring>());\n    mIntentFilter.callMethod<void>(\"addDataScheme\", \"(Ljava/lang/String;)V\", dataSchemeString.object<jstring>());\n\n    mAndroidActivity.callObjectMethod(\"registerReceiver\",\n                                      \"(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;\",\n                                      mBroadcastReceiver.object<jobject>(), mIntentFilter.object<jobject>());\n\n    registerNativeMethods();\n#endif\n}\n\nint PackageManager::indexOfSection(const QString &section)\n{\n    return mSectionsPositions.at(mSections.indexOf(section));\n}\n\nvoid PackageManager::openApplicationInfo(const QString &packageName)\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject::callStaticObjectMethod(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                              \"openApplicationInfo\",\n                                              \"(Ljava/lang/String;)V\",\n                                              QAndroidJniObject::fromString(packageName).object<jstring>());\n#else\n    Q_UNUSED(packageName)\n#endif\n}\n\nvoid PackageManager::addApplicationToGrid(const QString &name, const QString &packageName)\n{\n    emit addedApplicationToGrid(name, packageName);\n}\n\nvoid PackageManager::testJNICall()\n{\n#ifdef Q_OS_ANDROID\n    qDebug() << \"GEtting instance\";\n    QAndroidJniObject packageManager = QAndroidJniObject::callStaticObjectMethod(\"com/iktwo/qutelauncher/QuteLauncher\",\n                                                                                 \"getInstance\",\n                                                                                 \"()Lcom/iktwo/qutelauncher/QuteLauncher;\");\n\n    packageManager.callMethod<void>(\"selectWidget\");\n    qDebug() << \"PM:\" << packageManager.toString();\n#endif\n}\n\nQStringList PackageManager::sections() const\n{\n    return mSections;\n}\n\n#ifdef Q_OS_ANDROID\nQString PackageManager::jstringToQString(jstring string)\n{\n    QAndroidJniEnvironment env;\n    jboolean jfalse = false;\n    return QString(env->GetStringUTFChars(string, &jfalse));\n}\n#endif\n\nvoid PackageManager::addApplication(const QString &name, const QString &packageName)\n{\n    int i;\n    for (i = 0; i < mApplications.length(); ++i) {\n        Application *application = qobject_cast<Application*>(mApplications.at(i));\n        if (name.compare(application->name()) < 0)\n            break;\n    }\n\n    qDebug() << Q_FUNC_INFO << \"NAME:\" << name << \" PACKAGE:\" << packageName;\n    beginInsertRows(QModelIndex(), i, i);\n    Application *application = new Application(name, packageName);\n    mApplications.insert(i, application);\n    endInsertRows();\n\n    if (!mSections.contains(application->category())) {\n        mSections.append(application->category());\n        mSectionsPositions.append(i);\n    }\n}\n\nvoid PackageManager::removeApplication(const QString &packageName)\n{\n    qDebug() << Q_FUNC_INFO << packageName;\n    int i = 0;\n    foreach (QObject *object, mApplications) {\n        Application *app = qobject_cast<Application*>(object);\n        if (app->packageName() == packageName) {\n            beginRemoveRows(QModelIndex(), i, i);\n            delete mApplications.takeAt(i);\n            endRemoveRows();\n            i--;\n        }\n        i++;\n    }\n\n    mSections.clear();\n    mSectionsPositions.clear();\n\n    i = 0;\n    foreach (QObject *object, mApplications) {\n        Application *application = qobject_cast<Application*>(object);\n\n        if (!mSections.contains(application->category())) {\n            mSections.append(application->category());\n            mSectionsPositions.append(i);\n        }\n\n        ++i;\n    }\n\n    sectionsChanged();\n}\n\nvoid PackageManager::emitAddApplication(const QString &name, const QString &packageName)\n{\n    emit newApplicationDetected(name, packageName);\n}\n\nvoid PackageManager::emitRemoveApplication(const QString &packageName)\n{\n    emit removedApplication(packageName);\n}\n"
  },
  {
    "path": "src/src/packagemanager.h",
    "content": "#ifndef PACKAGEMANAGER_H\n#define PACKAGEMANAGER_H\n\n#include <QAbstractListModel>\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniObject>\n#endif\n\nclass PackageManager : public QAbstractListModel\n{\n    Q_OBJECT\n\n    Q_PROPERTY(QStringList sections READ sections NOTIFY sectionsChanged)\n\npublic:\n    explicit PackageManager(QObject *parent = 0);\n\n    enum Roles {\n        NameRole = Qt::UserRole +1,\n        PackageNameRole,\n        CategoryRole\n    };\n\n    int rowCount(const QModelIndex &parent) const;\n\n    QVariant data(const QModelIndex &index, int role) const;\n\n    Q_INVOKABLE void launchApplication(const QString &application);\n    Q_INVOKABLE void registerBroadcast();\n    Q_INVOKABLE int indexOfSection(const QString &section);\n    Q_INVOKABLE void openApplicationInfo(const QString &packageName);\n    Q_INVOKABLE void addApplicationToGrid(const QString &name, const QString &packageName);\n\n    Q_INVOKABLE void testJNICall();\n\n#ifdef Q_OS_ANDROID\n    static QString jstringToQString(jstring string);\n#endif\n\n    Q_INVOKABLE void emitAddApplication(const QString &name, const QString &packageName);\n    Q_INVOKABLE void emitRemoveApplication(const QString &packageName);\n\n    QStringList sections() const;\n\npublic slots:\n    void retrievePackages();\n    void addApplication(const QString &name, const QString &packageName);\n    void removeApplication(const QString &packageName);\n\nprotected:\n    QHash<int, QByteArray> roleNames() const;\n\nsignals:\n    void newApplicationDetected(const QString &name, const QString &packageName);\n    void addedApplicationToGrid(const QString &name, const QString &packageName);\n    void removedApplication(const QString &packageName);\n    void sectionsChanged();\n\nprivate:\n    QObjectList mApplications;\n    QMap<QString, QObject> mApps;\n    QStringList mSections;\n    QList<int> mSectionsPositions;\n\n    void registerNativeMethods();\n    //void sortApplications();\n\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject mAndroidActivity;\n    QAndroidJniObject mIntentFilter;\n    QAndroidJniObject mBroadcastReceiver;\n#endif\n};\n\n#endif // PACKAGEMANAGER_H\n"
  },
  {
    "path": "src/src/screenvalues.cpp",
    "content": "#include \"screenvalues.h\"\n\n#include <QScreen>\n#include <QGuiApplication>\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniEnvironment>\n#include <QAndroidJniObject>\n#endif\n\n#include <QDebug>\n\nScreenValues::ScreenValues(QObject *parent) :\n    QObject(parent),\n    m_dpi(0),\n    m_isTablet(false)\n{\n    m_dpi = retrieveDpi();\n\n    m_density = retrieveDensity();\n\n    m_dp = (float) m_dpi / 160;\n\n    setStatusBarHeight(getResourceSize(\"status_bar_height\"));\n    setNavigationBarHeight(getResourceSize(\"navigation_bar_height\"));\n    setNavigationBarHeightLandscape(getResourceSize(\"navigation_bar_height_landscape\"));\n\n    updateScreenValues();\n\n    m_isTablet = retrieveIsTablet();\n}\n\nvoid ScreenValues::updateScreenValues()\n{\n#ifdef Q_OS_ANDROID\n    if (m_system.sdkInt() >= 19) {\n        QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\",\n                                                                               \"activity\",\n                                                                               \"()Landroid/app/Activity;\");\n\n        QAndroidJniObject wm = activity.callObjectMethod(\"getWindowManager\", \"()Landroid/view/WindowManager;\");\n        QAndroidJniObject display = wm.callObjectMethod(\"getDefaultDisplay\", \"()Landroid/view/Display;\");\n\n        QAndroidJniObject realSize = QAndroidJniObject(\"android/graphics/Point\");\n        display.callMethod<void>(\"getRealSize\", \"(Landroid/graphics/Point;)V\", realSize.object());\n\n        QAndroidJniObject displayFrame = QAndroidJniObject(\"android/graphics/Rect\");\n        QAndroidJniObject window = activity.callObjectMethod(\"getWindow\", \"()Landroid/view/Window;\");\n        QAndroidJniObject view = window.callObjectMethod(\"getDecorView\", \"()Landroid/view/View;\");\n        QAndroidJniObject rootView = view.callObjectMethod(\"getRootView\", \"()Landroid/view/View;\");\n        rootView.callMethod<void>(\"getWindowVisibleDisplayFrame\", \"(Landroid/graphics/Rect;)V\", displayFrame.object());\n\n        if (((int) realSize.getField<jint>(\"y\") - (int) displayFrame.callMethod<jint>(\"height\")) - m_statusBarHeight == 0)\n            setNavBarVisible(false);\n        else\n            setNavBarVisible(true);\n    }\n#endif\n}\n\nint ScreenValues::dpi() const\n{\n    return m_dpi;\n}\n\nvoid ScreenValues::setDpi(int dpi)\n{\n    if (m_dpi == dpi)\n        return;\n\n    m_dpi = dpi;\n    emit dpiChanged();\n\n    setDp((float) m_dpi / 160);\n}\n\nfloat ScreenValues::dp() const\n{\n    return m_dp;\n}\n\nvoid ScreenValues::setDp(float dp)\n{\n    if (m_dp == dp)\n        return;\n\n    m_dp = dp;\n    emit dpChanged();\n}\n\nbool ScreenValues::isTablet() const\n{\n    return m_isTablet;\n}\n\nvoid ScreenValues::setIsTablet(bool isTablet)\n{\n    if (m_isTablet == isTablet)\n        return;\n\n    m_isTablet = isTablet;\n    emit isTabletChanged();\n}\n\nbool ScreenValues::navBarVisible() const\n{\n    return m_navBarVisible;\n}\n\nfloat ScreenValues::density() const\n{\n    return m_density;\n}\n\nvoid ScreenValues::setDensity(float density)\n{\n    if (m_density == density)\n        return;\n\n    m_density = density;\n    emit densityChanged(density);\n}\n\nint ScreenValues::statusBarHeight() const\n{\n    return m_statusBarHeight;\n}\n\nint ScreenValues::navigationBarHeight() const\n{\n    return m_navigationBarHeight;\n}\n\nint ScreenValues::navigationBarHeightLandscape() const\n{\n    return m_navigationBarHeightLandscape;\n}\n\nvoid ScreenValues::setStatusBarHeight(int statusBarHeight)\n{\n    if (m_statusBarHeight == statusBarHeight)\n        return;\n\n    m_statusBarHeight = statusBarHeight;\n    emit statusBarHeightChanged();\n}\n\nvoid ScreenValues::setNavigationBarHeight(int navigationBarHeight)\n{\n    if (m_navigationBarHeight == navigationBarHeight)\n        return;\n\n    m_navigationBarHeight = navigationBarHeight;\n    emit navigationBarHeightChanged();\n}\n\nvoid ScreenValues::setNavigationBarHeightLandscape(int navigationBarHeightLandscape)\n{\n    if (m_navigationBarHeightLandscape == navigationBarHeightLandscape)\n        return;\n\n    m_navigationBarHeightLandscape = navigationBarHeightLandscape;\n    emit navigationBarHeightLandscapeChanged();\n}\n\nvoid ScreenValues::setNavBarVisible(bool visible)\n{\n    if (m_navBarVisible == visible)\n        return;\n\n    m_navBarVisible = visible;\n    emit navBarVisibleChanged();\n}\n\nbool ScreenValues::retrieveIsTablet()\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniEnvironment env;\n    env->PushLocalFrame(9);\n\n    QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\",\n                                                                           \"activity\",\n                                                                           \"()Landroid/app/Activity;\");\n\n    QAndroidJniObject resources = activity.callObjectMethod(\"getResources\",\n                                                            \"()Landroid/content/res/Resources;\");\n\n    QAndroidJniObject configuration = resources.callObjectMethod(\"getConfiguration\",\n                                                                 \"()Landroid/content/res/Configuration;\");\n\n    jint smallestScreenWidthDp = configuration.getField<jint>(\"smallestScreenWidthDp\");\n\n    return smallestScreenWidthDp >= 600;\n#else\n    return false;\n#endif\n}\n\nint ScreenValues::retrieveDpi()\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniEnvironment env;\n    env->PushLocalFrame(9);\n\n    QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\",\n                                                                           \"activity\",\n                                                                           \"()Landroid/app/Activity;\");\n    jclass activityClass = env->GetObjectClass(activity.object<jobject>());\n\n    jmethodID mIDGetResources = env->GetMethodID(activityClass,\n                                                 \"getResources\",\n                                                 \"()Landroid/content/res/Resources;\");\n\n    jobject resources = env->CallObjectMethod(activity.object<jobject>(), mIDGetResources);\n    jclass resourcesClass = env->GetObjectClass(resources);\n\n    jmethodID mIDGetDisplayMetrics = env->GetMethodID(resourcesClass,\n                                                      \"getDisplayMetrics\",\n                                                      \"()Landroid/util/DisplayMetrics;\");\n\n    jobject displayMetrics = env->CallObjectMethod(resources, mIDGetDisplayMetrics);\n    jclass displayMetricsClass = env->GetObjectClass(displayMetrics);\n\n    jfieldID fIDDensityDpi = env->GetFieldID(displayMetricsClass, \"densityDpi\", \"I\");\n    jint densityDpi = env->GetIntField(displayMetrics, fIDDensityDpi);\n\n    int result = (int)densityDpi;\n\n    env->PopLocalFrame(NULL);\n\n    return result;\n#else\n    return QGuiApplication::primaryScreen()->physicalDotsPerInch();\n#endif\n}\n\nfloat ScreenValues::retrieveDensity()\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniEnvironment env;\n    env->PushLocalFrame(9);\n\n    QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\",\n                                                                           \"activity\",\n                                                                           \"()Landroid/app/Activity;\");\n    jclass activityClass = env->GetObjectClass(activity.object<jobject>());\n\n    jmethodID mIDGetResources = env->GetMethodID(activityClass,\n                                                 \"getResources\",\n                                                 \"()Landroid/content/res/Resources;\");\n\n    jobject resources = env->CallObjectMethod(activity.object<jobject>(), mIDGetResources);\n    jclass resourcesClass = env->GetObjectClass(resources);\n\n    jmethodID mIDGetDisplayMetrics = env->GetMethodID(resourcesClass,\n                                                      \"getDisplayMetrics\",\n                                                      \"()Landroid/util/DisplayMetrics;\");\n\n    jobject displayMetrics = env->CallObjectMethod(resources, mIDGetDisplayMetrics);\n    jclass displayMetricsClass = env->GetObjectClass(displayMetrics);\n\n    jfieldID fIDDensityDpi = env->GetFieldID(displayMetricsClass, \"density\", \"F\");\n    jfloat densityDpi = env->GetFloatField(displayMetrics, fIDDensityDpi);\n\n    float result = (float)densityDpi;\n\n    env->PopLocalFrame(NULL);\n\n    return result;\n#else\n    return QGuiApplication::primaryScreen()->physicalDotsPerInch();\n#endif\n}\n\nint ScreenValues::getResourceSize(const QString &resource)\n{\n#ifdef Q_OS_ANDROID\n    QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod(\"org/qtproject/qt5/android/QtNative\",\n                                                                           \"activity\",\n                                                                           \"()Landroid/app/Activity;\");\n\n    QAndroidJniObject resources = activity.callObjectMethod(\"getResources\", \"()Landroid/content/res/Resources;\");\n\n    QAndroidJniObject jName = QAndroidJniObject::fromString(resource);\n    QAndroidJniObject jDefType = QAndroidJniObject::fromString(\"dimen\");\n    QAndroidJniObject jDefPackage = QAndroidJniObject::fromString(\"android\");\n\n    jint identifier = resources.callMethod<jint>(\"getIdentifier\",\n                                                 \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I\",\n                                                 jName.object<jstring>(),\n                                                 jDefType.object<jstring>(),\n                                                 jDefPackage.object<jstring>());\n\n    jint size = resources.callMethod<jint>(\"getDimensionPixelSize\",\n                                           \"(I)I\", identifier);\n\n    return size;\n#else\n    return 0;\n#endif\n}\n"
  },
  {
    "path": "src/src/screenvalues.h",
    "content": "#ifndef SCREENVALUES_H\n#define SCREENVALUES_H\n\n#include <QObject>\n\n#include \"system.h\"\n\nclass ScreenValues : public QObject\n{\n    Q_OBJECT\n    Q_PROPERTY(int statusBarHeight READ statusBarHeight NOTIFY statusBarHeightChanged)\n    Q_PROPERTY(int navigationBarHeight READ navigationBarHeight NOTIFY navigationBarHeightChanged)\n    Q_PROPERTY(int navigationBarHeightLandscape READ navigationBarHeightLandscape NOTIFY navigationBarHeightLandscapeChanged)\n    Q_PROPERTY(int dpi READ dpi WRITE setDpi NOTIFY dpiChanged)\n    Q_PROPERTY(float dp READ dp WRITE setDp NOTIFY dpChanged)\n    Q_PROPERTY(float density READ density NOTIFY densityChanged)\n    Q_PROPERTY(bool isTablet READ isTablet NOTIFY isTabletChanged)\n    Q_PROPERTY(bool navBarVisible READ navBarVisible NOTIFY navBarVisibleChanged)\n\npublic:\n    explicit ScreenValues(QObject *parent = 0);\n\n    Q_INVOKABLE void updateScreenValues();\n\n    float dp() const;\n    void setDp(float dp);\n\n    float density() const;\n    void setDensity(float density);\n\n    int dpi() const;\n    void setDpi(int dpi);\n\n    int statusBarHeight() const;\n\n    int navigationBarHeight() const;\n\n    int navigationBarHeightLandscape() const;\n\n    bool isTablet() const;\n    void setIsTablet(bool isTablet);\n\n    bool navBarVisible() const;\n\nsignals:\n    void dpChanged();\n    void dpiChanged();\n    void statusBarHeightChanged();\n    void navigationBarHeightChanged();\n    void navigationBarHeightLandscapeChanged();\n    void isTabletChanged();\n    void navBarVisibleChanged();\n\n    void densityChanged(float density);\n\nprivate:\n    System m_system;\n    float m_dp;\n    float m_density;\n    int m_dpi;\n    int m_statusBarHeight;\n    int m_navigationBarHeight;\n    int m_navigationBarHeightLandscape;\n    bool m_isTablet;\n    bool m_navBarVisible;\n\n    float retrieveDensity();\n    int retrieveDpi();\n    int getResourceSize(const QString &resource);\n\n    bool retrieveIsTablet();\n\n    void setStatusBarHeight(int statusBarHeight);\n    void setNavigationBarHeight(int navigationBarHeight);\n    void setNavigationBarHeightLandscape(int navigationBarHeightLandscape);\n    void setNavBarVisible(bool visible);\n};\n\n#endif // SCREENVALUES_H\n"
  },
  {
    "path": "src/src/system.cpp",
    "content": "#include \"system.h\"\n\n#ifdef Q_OS_ANDROID\n#include <QAndroidJniObject>\n#endif\n\nSystem::System(QObject *parent) : QObject(parent)\n{\n    setSdkInt(getSdkInt());\n}\n\nint System::sdkInt() const\n{\n    return m_sdkInt;\n}\n\nvoid System::setSdkInt(int sdkInt)\n{\n    if (m_sdkInt == sdkInt)\n        return;\n\n    m_sdkInt = sdkInt;\n    emit sdkIntChanged(sdkInt);\n}\n\nint System::getSdkInt()\n{\n#ifdef Q_OS_ANDROID\n    return m_sdkInt = QAndroidJniObject::getStaticField<jint>(\"android/os/Build$VERSION\", \"SDK_INT\");\n#else\n    return 0;\n#endif\n}\n"
  },
  {
    "path": "src/src/system.h",
    "content": "#ifndef SYSTEM_H\n#define SYSTEM_H\n\n#include <QObject>\n\nclass System : public QObject\n{\n    Q_OBJECT\n\n    Q_PROPERTY(int sdkInt READ sdkInt NOTIFY sdkIntChanged)\n\npublic:\n    explicit System(QObject *parent = 0);\n\n    int sdkInt() const;\n\nsignals:\n    void sdkIntChanged(int sdkInt);\n\nprivate slots:\n    void setSdkInt(int sdkInt);\n\nprivate:\n    int m_sdkInt;\n\n    int getSdkInt();\n};\n\n#endif // SYSTEM_H\n"
  },
  {
    "path": "src/src.pro",
    "content": "TEMPLATE = app\n\nTARGET = qute-launcher\n\nQT += qml quick widgets svg network\n\nandroid {\n    QT += androidextras\n\n    OTHER_FILES += \\\n        android/src/com/iktwo/qutelauncher/*.java \\\n        android/src/org/qtproject/qt5/android/bindings/*.java \\\n        android/res/values-v21/* \\\n        android/res/values-v19/* \\\n        android/res/values/* \\\n        android/AndroidManifest.xml\n}\n\nQML_IMPORT_PATH = $$PWD/qml\n\nANDROID_PACKAGE_SOURCE_DIR = $$PWD/android\n\nHEADERS += $$files($$PWD/src/*.h)\n\nSOURCES += $$files($$PWD/src/*.cpp)\n\nRESOURCES += resources.qrc\n\ninclude(deployment.pri)\n\nDISTFILES += \\\n    android/gradle/wrapper/gradle-wrapper.jar \\\n    android/gradlew \\\n    android/res/values/libs.xml \\\n    android/build.gradle \\\n    android/gradle/wrapper/gradle-wrapper.properties \\\n    android/gradlew.bat\n"
  }
]