pax_global_header00006660000000000000000000000064111661541220014511gustar00rootroot0000000000000052 comment=d2045a5c8bdce45d23ece11ceccba7d5aaec7988 qzion-mainline/000077500000000000000000000000001116615412200140075ustar00rootroot00000000000000qzion-mainline/.gitignore000066400000000000000000000001741116615412200160010ustar00rootroot00000000000000build *.o moc_*.cpp *.pyc *.pyo *~ Makefile *.edj *.pickle *#* gmon.out *.so *.so.* *.swp *.swo *.out package-all .my-setup qzion-mainline/CMakeLists.txt000066400000000000000000000030471116615412200165530ustar00rootroot00000000000000project(qzion) cmake_minimum_required(VERSION 2.6) set(CMAKE_MODULE_PATH ${qzion_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) include(MacroOutOfSourceBuild) macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please, see INSTALL.") find_package(Qt4 REQUIRED) set(QT_USE_QTWEBKIT ON) include(${QT_USE_FILE}) option(SKIP_TESTS "Skip the test suite" OFF) option(QGV_BACKEND "Build QGraphicsView backend" OFF) option(SKIP_PYTHON_BINDINGS "Skip building Python bindings" OFF) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo") endif (NOT CMAKE_BUILD_TYPE) message("-- Using build type: ${CMAKE_BUILD_TYPE}") # update cxx flags for build types set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG_OUTPUT") set(CMAKE_CXX_FLAGS_MINSIZERELEASE "${CMAKE_CXX_FLAGS_MINSIZERELEASE} -DQT_NO_DEBUG_OUTPUT") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DQT_NO_DEBUG_OUTPUT") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(QZION_LIB_MAJOR_VERSION "0") set(QZION_LIB_MINOR_VERSION "4") set(QZION_LIB_PATCH_VERSION "0") set(QZION_LIB_VERSION_STRING "${QZION_LIB_MAJOR_VERSION}.${QZION_LIB_MINOR_VERSION}.${QZION_LIB_PATCH_VERSION}") # Suffix for x86/x86_64: SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") add_subdirectory(src) if (NOT SKIP_TESTS) add_subdirectory(tests) endif (NOT SKIP_TESTS) if (NOT SKIP_PYTHON_BINDINGS) add_subdirectory(python) endif (NOT SKIP_PYTHON_BINDINGS) qzion-mainline/COPYING000066400000000000000000001047271116615412200150550ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Lesser General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU Lesser General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU Lesser General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our Lesser General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Lesser General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero Lesser General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero Lesser General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero Lesser General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Lesser General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Lesser General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LESSER GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the Lesser General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU Lesser General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser Lesser General Public License instead of this License. But first, please read . qzion-mainline/INSTALL000066400000000000000000000007431116615412200150440ustar00rootroot00000000000000Using cmake =========== With cmake we create a separate directory for the build, that will have the generated files $ mkdir build $ cd build $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. $ make $ make install Use the option "-DQGV_BACKEND=ON" to compile the experimental QGraphicsView backend. Use the option "-DSKIP_TESTS=ON" to skip the build of the tests. Use the option "-DSKIP_PYTHON_BINDINGS=ON" if you do not want the bindings to be automatically compiled for you. qzion-mainline/README000066400000000000000000000010061116615412200146640ustar00rootroot00000000000000QZion is a canvas abstraction used by and made for QEdje. As it is an abstraction, different implementations can exist, making it possible to optimize QEdje for different platforms/devices. Currently an implementation, based on KGameCanvas (from libkdegames) exists, but work is being done on providing an implementation using QT's QGraphicsView. The KGameCanvas-based implementation is very lightweight and works relatively well on embedded devices, where QGraphicsView is currently slow and not yet optimized for. qzion-mainline/cmake/000077500000000000000000000000001116615412200150675ustar00rootroot00000000000000qzion-mainline/cmake/modules/000077500000000000000000000000001116615412200165375ustar00rootroot00000000000000qzion-mainline/cmake/modules/COPYING-CMAKE-SCRIPTS000066400000000000000000000024561116615412200215440ustar00rootroot00000000000000Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. qzion-mainline/cmake/modules/FindLibPython.py000066400000000000000000000010111116615412200216130ustar00rootroot00000000000000# Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. import sys import distutils.sysconfig print("exec_prefix:%s" % sys.exec_prefix) print("short_version:%s" % sys.version[:3]) print("long_version:%s" % sys.version.split()[0]) print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) qzion-mainline/cmake/modules/FindPyQt.py000066400000000000000000000013111116615412200206030ustar00rootroot00000000000000# Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. import PyQt4.pyqtconfig pyqtcfg = PyQt4.pyqtconfig.Configuration() print("pyqt_version:%06.0x" % pyqtcfg.pyqt_version) print("pyqt_version_str:%s" % pyqtcfg.pyqt_version_str) pyqt_version_tag = "" in_t = False for item in pyqtcfg.pyqt_sip_flags.split(' '): if item=="-t": in_t = True elif in_t: if item.startswith("Qt_4"): pyqt_version_tag = item else: in_t = False print("pyqt_version_tag:%s" % pyqt_version_tag) print("pyqt_sip_dir:%s" % pyqtcfg.pyqt_sip_dir) qzion-mainline/cmake/modules/FindPyQt4.cmake000066400000000000000000000034471116615412200213330ustar00rootroot00000000000000# Find PyQt4 # ~~~~~~~~~~ # Copyright (c) 2007-2008, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # PyQt4 website: http://www.riverbankcomputing.co.uk/pyqt/index.php # # Find the installed version of PyQt4. FindPyQt4 should only be called after # Python has been found. # # This file defines the following variables: # # PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number # suitable for comparision as a string # # PYQT4_VERSION_STR - The version of PyQt4 as a human readable string. # # PYQT4_VERSION_TAG - The PyQt version tag using by PyQt's sip files. # # PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files. IF(EXISTS PYQT4_VERSION) # Already in cache, be silent SET(PYQT4_FOUND TRUE) ELSE(EXISTS PYQT4_VERSION) FIND_FILE(_find_pyqt_py FindPyQt.py PATHS ${CMAKE_MODULE_PATH}) EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config) IF(pyqt_config) STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT4_VERSION ${pyqt_config}) STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT4_VERSION_STR ${pyqt_config}) STRING(REGEX REPLACE ".*\npyqt_version_tag:([^\n]+).*$" "\\1" PYQT4_VERSION_TAG ${pyqt_config}) STRING(REGEX REPLACE ".*\npyqt_sip_dir:([^\n]+).*$" "\\1" PYQT4_SIP_DIR ${pyqt_config}) SET(PYQT4_FOUND TRUE) ENDIF(pyqt_config) IF(PYQT4_FOUND) IF(NOT PYQT4_FIND_QUIETLY) MESSAGE(STATUS "Found PyQt4 version: ${PYQT4_VERSION_STR}") ENDIF(NOT PYQT4_FIND_QUIETLY) ELSE(PYQT4_FOUND) IF(PYQT4_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find Python") ENDIF(PYQT4_FIND_REQUIRED) ENDIF(PYQT4_FOUND) ENDIF(EXISTS PYQT4_VERSION) qzion-mainline/cmake/modules/FindPythonLibrary.cmake000066400000000000000000000067261116615412200231630ustar00rootroot00000000000000# Find Python # ~~~~~~~~~~~ # Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Find the Python interpreter and related Python directories. # # This file defines the following variables: # # PYTHON_EXECUTABLE - The path and filename of the Python interpreter. # # PYTHON_SHORT_VERSION - The version of the Python interpreter found, # excluding the patch version number. (e.g. 2.5 and not 2.5.1)) # # PYTHON_LONG_VERSION - The version of the Python interpreter found as a human # readable string. # # PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory. # # PYTHON_INCLUDE_PATH - Directory holding the python.h include file. # # PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library. INCLUDE(CMakeFindFrameworks) IF(EXISTS PYTHON_LIBRARY) # Already in cache, be silent SET(PYTHONLIBRARY_FOUND TRUE) ELSE(EXISTS PYTHON_LIBRARY) FIND_PACKAGE(PythonInterp REQUIRED) FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH}) EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_lib_python_py} OUTPUT_VARIABLE python_config) IF(python_config) STRING(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config}) STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config}) STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config}) STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" PYTHON_INCLUDE_PATH ${python_config}) STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config}) STRING(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) if(WIN32) STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) endif(WIN32) FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH) SET(PYTHONLIBRARY_FOUND TRUE) ENDIF(python_config) # adapted from cmake's builtin FindPythonLibs if(APPLE) CMAKE_FIND_FRAMEWORKS(Python) SET(PYTHON_FRAMEWORK_INCLUDES) IF(Python_FRAMEWORKS) # If a framework has been selected for the include path, # make sure "-framework" is used to link it. IF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") SET(PYTHON_LIBRARY "") SET(PYTHON_DEBUG_LIBRARY "") ENDIF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") IF(NOT PYTHON_LIBRARY) SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) ENDIF(NOT PYTHON_LIBRARY) SET(PYTHONLIBRARY_FOUND TRUE) ENDIF(Python_FRAMEWORKS) ENDIF(APPLE) IF(PYTHONLIBRARY_FOUND) SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) IF(NOT PYTHONLIBRARY_FIND_QUIETLY) MESSAGE(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}") MESSAGE(STATUS "Found Python version: ${PYTHON_LONG_VERSION}") MESSAGE(STATUS "Found Python library: ${PYTHON_LIBRARY}") ENDIF(NOT PYTHONLIBRARY_FIND_QUIETLY) ELSE(PYTHONLIBRARY_FOUND) IF(PYTHONLIBRARY_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find Python") ENDIF(PYTHONLIBRARY_FIND_REQUIRED) ENDIF(PYTHONLIBRARY_FOUND) ENDIF (EXISTS PYTHON_LIBRARY) qzion-mainline/cmake/modules/FindSIP.cmake000066400000000000000000000036071116615412200210030ustar00rootroot00000000000000# Find SIP # ~~~~~~~~ # Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # SIP website: http://www.riverbankcomputing.co.uk/sip/index.php # # Find the installed version of SIP. FindSIP should be called after Python # has been found. # # This file defines the following variables: # # SIP_VERSION - The version of SIP found expressed as a 6 digit hex number # suitable for comparision as a string. # # SIP_VERSION_STR - The version of SIP found as a human readable string. # # SIP_EXECUTABLE - Path and filename of the SIP command line executable. # # SIP_INCLUDE_DIR - Directory holding the SIP C++ header file. # # SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed # into. IF(SIP_VERSION) # Already in cache, be silent SET(SIP_FOUND TRUE) ELSE(SIP_VERSION) FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH}) EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config) IF(sip_config) STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config}) STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config}) STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config}) STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config}) STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) SET(SIP_FOUND TRUE) ENDIF(sip_config) IF(SIP_FOUND) IF(NOT SIP_FIND_QUIETLY) MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}") ENDIF(NOT SIP_FIND_QUIETLY) ELSE(SIP_FOUND) IF(SIP_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find SIP") ENDIF(SIP_FIND_REQUIRED) ENDIF(SIP_FOUND) ENDIF(SIP_VERSION) qzion-mainline/cmake/modules/FindSIP.py000066400000000000000000000010041116615412200203400ustar00rootroot00000000000000# FindSIP.py # # Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. import sys import sipconfig sipcfg = sipconfig.Configuration() print("sip_version:%06.0x" % sipcfg.sip_version) print("sip_version_str:%s" % sipcfg.sip_version_str) print("sip_bin:%s" % sipcfg.sip_bin) print("default_sip_dir:%s" % sipcfg.default_sip_dir) print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) qzion-mainline/cmake/modules/MacroOutOfSourceBuild.cmake000066400000000000000000000007201116615412200237170ustar00rootroot00000000000000# Ensures that we do an out of source build MACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD MSG) STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) GET_FILENAME_COMPONENT(PARENTDIR ${CMAKE_SOURCE_DIR} PATH) STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir) IF(insource OR insourcesubdir) MESSAGE(FATAL_ERROR "${MSG}") ENDIF(insource OR insourcesubdir) ENDMACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD) qzion-mainline/cmake/modules/PythonCompile.py000066400000000000000000000001621116615412200217020ustar00rootroot00000000000000# By Simon Edwards # This file is in the public domain. import py_compile py_compile.main() qzion-mainline/cmake/modules/PythonMacros.cmake000066400000000000000000000042721116615412200221740ustar00rootroot00000000000000# Python macros # ~~~~~~~~~~~~~ # Copyright (c) 2007, Simon Edwards # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # This file defines the following macros: # # PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR) # Install the SOURCE_FILE, which is a Python .py file, into the # destination directory during install. The file will be byte compiled # and both the .py file and .pyc file will be installed. GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) ADD_CUSTOM_TARGET(compile_python_files ALL) MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) # Install the source file. INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) # Byte compile and install the .pyc file. GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. ADD_CUSTOM_COMMAND( TARGET compile_python_files COMMAND ${CMAKE_COMMAND} -E echo ${message} COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} DEPENDS ${_absfilename} ) ELSE(_abs_bin_py STREQUAL ${_absfilename}) ADD_CUSTOM_COMMAND( TARGET compile_python_files COMMAND ${CMAKE_COMMAND} -E echo ${message} COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} DEPENDS ${_absfilename} ) ENDIF(_abs_bin_py STREQUAL ${_absfilename}) INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) ENDMACRO(PYTHON_INSTALL) qzion-mainline/cmake/modules/SIPMacros.cmake000066400000000000000000000115261116615412200213460ustar00rootroot00000000000000# Macros for SIP # ~~~~~~~~~~~~~~ # Copyright (c) 2007, Simon Edwards # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # SIP website: http://www.riverbankcomputing.co.uk/sip/index.php # # This file defines the following macros: # # ADD_SIP_PYTHON_MODULE (MODULE_NAME MODULE_SIP [library1, libaray2, ...]) # Specifies a SIP file to be built into a Python module and installed. # MODULE_NAME is the name of Python module including any path name. (e.g. # os.sys, Foo.bar etc). MODULE_SIP the path and filename of the .sip file # to process and compile. libraryN are libraries that the Python module, # which is typically a shared library, should be linked to. The built # module will also be install into Python's site-packages directory. # # The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a # number of variables: # # SIP_INCLUDES - List of directories which SIP will scan through when looking # for included .sip files. (Corresponds to the -I option for SIP.) # # SIP_TAGS - List of tags to define when running SIP. (Corresponds to the -t # option for SIP.) # # SIP_CONCAT_PARTS - An integer which defines the number of parts the C++ code # of each module should be split into. Defaults to 8. (Corresponds to the # -j option for SIP.) # # SIP_DISABLE_FEATURES - List of feature names which should be disabled # running SIP. (Corresponds to the -x option for SIP.) # # SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to # SIP. SET(SIP_INCLUDES) SET(SIP_TAGS) SET(SIP_CONCAT_PARTS 8) SET(SIP_DISABLE_FEATURES) SET(SIP_EXTRA_OPTIONS) MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP) # FIXME this removes -fvisibility=hidden from the compiler flags and has global affect. if (CMAKE_CXX_FLAGS) STRING(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) endif (CMAKE_CXX_FLAGS) SET(EXTRA_LINK_LIBRARIES ${ARGN}) STRING(REPLACE "." "/" _x ${MODULE_NAME}) GET_FILENAME_COMPONENT(_parent_module_path ${_x} PATH) GET_FILENAME_COMPONENT(_child_module_name ${_x} NAME) GET_FILENAME_COMPONENT(_module_path ${MODULE_SIP} PATH) GET_FILENAME_COMPONENT(_abs_module_sip ${MODULE_SIP} ABSOLUTE) # We give this target a long logical target name. # (This is to avoid having the library name clash with any already # install library names. If that happens then cmake dependancy # tracking get confused.) STRING(REPLACE "." "_" _logical_name ${MODULE_NAME}) SET(_logical_name "python_module_${_logical_name}") FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_module_path}) # Output goes in this dir. SET(_sip_includes) FOREACH (_inc ${SIP_INCLUDES}) GET_FILENAME_COMPONENT(_abs_inc ${_inc} ABSOLUTE) LIST(APPEND _sip_includes -I ${_abs_inc}) ENDFOREACH (_inc ) SET(_sip_tags) FOREACH (_tag ${SIP_TAGS}) LIST(APPEND _sip_tags -t ${_tag}) ENDFOREACH (_tag) SET(_sip_x) FOREACH (_x ${SIP_DISABLE_FEATURES}) LIST(APPEND _sip_x -x ${_x}) ENDFOREACH (_x ${SIP_DISABLE_FEATURES}) SET(_message "-DMESSAGE=Generating CPP code for module ${MODULE_NAME}") SET(_sip_output_files) FOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) IF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) SET(_sip_output_files ${_sip_output_files} ${CMAKE_CURRENT_BINARY_DIR}/${_module_path}/sip${_child_module_name}part${CONCAT_NUM}.cpp ) ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) IF(NOT WIN32) SET(TOUCH_COMMAND touch) ELSE(NOT WIN32) SET(TOUCH_COMMAND echo) # instead of a touch command, give out the name and append to the files # this is basically what the touch command does. FOREACH(filename ${_sip_output_files}) FILE(APPEND filename "") ENDFOREACH(filename ${_sip_output_files}) ENDIF(NOT WIN32) ADD_CUSTOM_COMMAND( OUTPUT ${_sip_output_files} COMMAND ${CMAKE_COMMAND} -E echo ${message} COMMAND ${TOUCH_COMMAND} ${_sip_output_files} COMMAND ${SIP_EXECUTABLE} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} ${_sip_includes} ${_abs_module_sip} DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND} ) ADD_LIBRARY(${_logical_name} SHARED ${_sip_output_files} ) TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARY}) TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/${_parent_module_path}") ENDMACRO(ADD_SIP_PYTHON_MODULE) qzion-mainline/python/000077500000000000000000000000001116615412200153305ustar00rootroot00000000000000qzion-mainline/python/.gitignore000066400000000000000000000000061116615412200173140ustar00rootroot00000000000000build qzion-mainline/python/CMakeLists.txt000066400000000000000000000017221116615412200200720ustar00rootroot00000000000000find_package(PythonLibrary REQUIRED) find_package(SIP REQUIRED) find_package(PyQt4 REQUIRED) include(PythonMacros) include(SIPMacros) include_directories(BEFORE ../src/common/ ${PYTHON_INCLUDE_PATH} ${SIP_INCLUDE_DIR} ) set(SIP_INCLUDES ${PYQT4_SIP_DIR} qzion) set(SIP_CONCAT_PARTS 8) set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG}) set(SIP_EXTRA_OPTIONS -g) set(PYTHON_SITE_PACKAGES_DIR ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_SHORT_VERSION}/site-packages) # Putting inside the "concepts" package until we release. file(GLOB qzion_files_sip qzion/*.sip) set(SIP_EXTRA_FILES_DEPEND ${qzion_files_sip}) add_sip_python_module(qzion.qzion qzion/qzionmod.sip qzion ${QT_LIBRARIES}) set(PYTHON_FILES_TO_INSTALL qzion/__init__.py ) foreach (f ${PYTHON_FILES_TO_INSTALL}) get_filename_component(p ${f} PATH) python_install(${f} ${PYTHON_SITE_PACKAGES_DIR}/${p}) endforeach(f) install(FILES ${qzion_files_sip} DESTINATION share/sip/qzion/) qzion-mainline/python/qzion/000077500000000000000000000000001116615412200164705ustar00rootroot00000000000000qzion-mainline/python/qzion/__init__.py000066400000000000000000000000241116615412200205750ustar00rootroot00000000000000from qzion import * qzion-mainline/python/qzion/qzionabstractcanvas.sip000066400000000000000000000033051116615412200232660ustar00rootroot00000000000000%ModuleCode #include %End class QZionAbstractCanvas { %TypeHeaderCode #include %End public: QZionAbstractCanvas(); virtual ~QZionAbstractCanvas(); const QList* items() const; QZionObject* itemAt(const QPoint& pos) const; QZionObject* itemAt(int x, int y) const; QList itemsAt(const QPoint& pos) const; QList itemsAt(int x, int y) const; virtual void ensurePendingUpdate() = 0; virtual void invalidate(const QRect& r, bool translate = true) = 0; virtual void invalidate(const QRegion& r, bool translate = true) = 0; virtual int canvasWidth() const; virtual int canvasHeight() const; int zValue(QZionObject *obj) const; void setZValue(QZionObject *obj, int zValue); void stackAbove(QZionObject *obj, QZionObject *ref); void stackBelow(QZionObject *obj, QZionObject *ref); void raise(QZionObject *obj); void lower(QZionObject *obj); void addObject(QZionObject *obj /Transfer/); void removeObject(QZionObject *obj /TransferBack/); virtual void updateChanges() = 0; virtual QSize size() const = 0; virtual void setSize(const QSize &size) = 0; virtual QPoint mapToLocal(const QPoint &pt) const; virtual void mouseMoveEvent(QMouseEvent *e); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent *e); virtual void mouseObjectMoveEvent(QZionObject *, QMouseEvent *); virtual void mouseObjectPressEvent(QZionObject *, QMouseEvent *); virtual void mouseObjectReleaseEvent(QZionObject *, QMouseEvent *); virtual void wheelObjectEvent(QZionObject *, QWheelEvent *); }; qzion-mainline/python/qzion/qzioncanvas.sip000066400000000000000000000017331116615412200215450ustar00rootroot00000000000000%ModuleCode #include %End class QZionCanvas : QObject, QZionAbstractCanvas { %TypeHeaderCode #include %End public: QZionCanvas(QWidget* parent /TransferThis/ = NULL); virtual ~QZionCanvas(); virtual void ensurePendingUpdate(); virtual void invalidate(const QRect& r, bool translate = true); virtual void invalidate(const QRegion& r, bool translate = true); virtual int canvasWidth() const; virtual int canvasHeight() const; virtual QSize sizeHint() const; virtual QSize size() const; virtual void setSize(const QSize &size); virtual void resize(const QSize &size); virtual void resize(int width, int height); QWidget *widget(); void show(); void hide(); virtual void updateChanges(); signals: void updated(const QRegion &); protected: virtual void paintEvent(QPaintEvent *event); virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); }; qzion-mainline/python/qzion/qzionclippedgroup.sip000066400000000000000000000004601116615412200227630ustar00rootroot00000000000000%ModuleCode #include %End class QZionClippedGroup : QZionGroup { %TypeHeaderCode #include %End public: QZionClippedGroup(QZionAbstractCanvas *canvas /TransferThis/); ~QZionClippedGroup(); virtual QRect rect() const; virtual void setClipper(QZionRectangle *rect); }; qzion-mainline/python/qzion/qzioncustomobject.sip000066400000000000000000000004731116615412200227730ustar00rootroot00000000000000%ModuleCode #include %End class QZionCustomObject : QZionObject { %TypeHeaderCode #include %End public: QZionCustomObject(QZionAbstractCanvas *canvas /TransferThis/ = NULL); virtual ~QZionCustomObject(); virtual QSize size() const; virtual void setSize(const QSize &size); }; qzion-mainline/python/qzion/qziongroup.sip000066400000000000000000000021561116615412200214260ustar00rootroot00000000000000%ModuleCode #include %End class QZionGroup : QZionObject, QZionAbstractCanvas { %TypeHeaderCode #include %End public: QZionGroup(QZionAbstractCanvas* canvas /TransferThis/ = NULL); virtual ~QZionGroup(); virtual void changed(); virtual void paint(QPainter* p); virtual QRect rect() const; virtual QSize size() const; virtual void setSize(const QSize &size); virtual void ensurePendingUpdate(); virtual void invalidate(const QRect& r, bool translate = true); virtual void invalidate(const QRegion& r, bool translate = true); virtual QColor color() const; virtual void setColor(const QColor& /*color*/); virtual void setClipper(QZionRectangle *rect); virtual int canvasWidth() const; virtual int canvasHeight() const; virtual QPoint mapToLocal(const QPoint &pt) const; virtual void mouseMoveEvent(QMouseEvent *e); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent *e); virtual void updateChanges(); virtual QColor effectiveColor(); }; qzion-mainline/python/qzion/qzionimage.sip000066400000000000000000000016241116615412200213530ustar00rootroot00000000000000%ModuleCode #include %End class QZionImage : QZionObject { %TypeHeaderCode #include %End public: QZionImage(QZionAbstractCanvas *canvas /TransferThis/ = NULL); QZionImage(QZionAbstractCanvas *canvas /TransferThis/, const QString &filepath); QZionImage(QZionAbstractCanvas *canvas /TransferThis/, const QPixmap &pixmap); QZionImage(QZionAbstractCanvas *canvas /TransferThis/, const QImage &image); virtual ~QZionImage(); QPixmap pixmap() const; bool load(const QString &filename); bool reload(); void clear(); virtual QSize size() const; virtual void setSize(const QSize &size); virtual void paint(QPainter* p); virtual QRect rect() const; virtual QColor color() const; virtual void setColor(const QColor& color); virtual void changed(); void setBorder(const int left, const int right, const int top, const int bottom); }; qzion-mainline/python/qzion/qzionmod.sip000066400000000000000000000005321116615412200210450ustar00rootroot00000000000000%Module qzion 0 %Import QtCore/QtCoremod.sip %Import QtGui/QtGuimod.sip %Include qzioncanvas.sip %Include qzionobject.sip %Include qzionabstractcanvas.sip %Include qzionimage.sip %Include qzionrectangle.sip %Include qziongroup.sip %Include qziontext.sip %Include qziontextblock.sip %Include qzionclippedgroup.sip %Include qzioncustomobject.sip qzion-mainline/python/qzion/qzionobject.sip000066400000000000000000000047101116615412200215360ustar00rootroot00000000000000%ModuleCode #include %End class QZionObject : QObject { %TypeHeaderCode #include %End %ConvertToSubClassCode static struct classes { char *name; sipWrapperType **type; } cls[] = { {sipName_QZionText, &sipClass_QZionText}, {sipName_QZionRectangle, &sipClass_QZionRectangle}, {sipName_QZionImage, &sipClass_QZionImage}, {sipName_QZionGroup, &sipClass_QZionGroup}, {sipName_QZionClippedGroup, &sipClass_QZionClippedGroup}, {0, 0} }; sipClass = NULL; const char *class_name = sipCpp->metaObject()->className(); for (struct classes *p = cls; p->name; p++) { if (!strcmp(class_name, p->name)) { sipClass = *p->type; break; } } %End public: enum Attributes { EmitSizeChanges = 0, HandleOutOfBoundsEvents = 1 }; QZionObject(QZionAbstractCanvas *canvas /TransferThis/ = NULL); virtual ~QZionObject(); QZionAbstractCanvas *canvas() const; void show(); void hide(); bool testAttribute(const Attributes attribute); void setAttribute(const Attributes attribute, const bool on = true); QPoint pos() const; virtual void setPos(const QPoint &newpos); void setPos(const int x, const int y); int opacity() const; void setOpacity(const int value); bool visible() const; void setVisible(const bool value); bool mouseEvents() const; void setMouseEvents(const bool value); int zValue(); void setZValue(const int zValue); void raise() /PyName=raise_/; void lower(); void stackAbove(QZionObject *ref); void stackBelow(QZionObject *ref); virtual void changed(); QZionRectangle *clipper(); virtual void setClipper(QZionRectangle *rect); virtual QSize size() const = 0; virtual void setSize(const QSize &size) = 0; virtual void setSize(const int width, const int height); virtual QColor color() const = 0; virtual void setColor(const QColor& color) = 0; virtual void setColor(const int r, const int g, const int b, const int a=255); virtual QColor effectiveColor() const; virtual QRect effectiveRect() const; virtual void paint(QPainter *p) = 0; virtual QRect rect() const = 0; virtual bool contains(const QPoint &point) const; virtual bool layered() const; signals: void sizeChanged(const QSize &size); private: QZionObject(const QZionObject &); }; qzion-mainline/python/qzion/qzionrectangle.sip000066400000000000000000000014001116615412200222250ustar00rootroot00000000000000%ModuleCode #include %End class QZionRectangle : QZionObject { %TypeHeaderCode #include %End public: QZionRectangle(QZionAbstractCanvas *canvas /TransferThis/ = NULL); QZionRectangle(QZionAbstractCanvas *canvas /TransferThis/, const QColor& color, const QSize &size); virtual ~QZionRectangle(); virtual QColor color() const; virtual void setColor(const QColor& color); virtual QSize size() const; virtual void setSize(const QSize &size); virtual void setPos(const QPoint &newpos); void setPos(const int x, const int y); virtual void paint(QPainter* p); virtual QRect rect() const; virtual QColor effectiveColor() const; virtual QRect effectiveRect() const; virtual void changed(); }; qzion-mainline/python/qzion/qziontext.sip000066400000000000000000000023671116615412200212620ustar00rootroot00000000000000%ModuleCode #include %End class QZionText : QZionObject { %TypeHeaderCode #include %End public: QZionText(QZionAbstractCanvas *canvas /TransferThis/ = NULL); QZionText(QZionAbstractCanvas *canvas /TransferThis/, const QString& text, const QFont& font, const QColor& color=Qt::black); virtual ~QZionText(); enum TextStyle { NoStyle, OutLine, Shadow }; virtual void setStyle(TextStyle style); virtual TextStyle style() const; virtual QSize size() const; virtual void setSize(const QSize &size); QString text() const; void setText(const QString& text); virtual QColor color() const; virtual void setColor(const QColor& color); virtual QColor textColor() const; virtual void setTextColor(const QColor& color); virtual QColor shadowColor() const; virtual void setShadowColor(const QColor& color); virtual QColor outlineColor() const; virtual void setOutlineColor(const QColor& color); QFont font() const; void setFont(const QFont& font); QPointF alignment() const; void setAlignment(const QPointF& alignment); virtual void paint(QPainter* p); virtual QRect rect() const; virtual void changed(); }; qzion-mainline/python/qzion/qziontextblock.sip000066400000000000000000000016171116615412200222720ustar00rootroot00000000000000%ModuleCode #include %End class QZionTextBlock : QZionObject { %TypeHeaderCode #include %End public: QZionTextBlock(QZionAbstractCanvas *canvas /TransferThis/ = NULL); QZionTextBlock(QZionAbstractCanvas *canvas /TransferThis/, const QString &text); virtual ~QZionTextBlock(); QString text() const; void setText(const QString &text); QSize size() const; void setSize(const QSize &size); QSize contentsSize() const; int preferredWidth(); void setPreferredWidth(const int width); double scale(); void setScale(double factor); virtual QColor color() const; virtual void setColor(const QColor &color); virtual QRect rect() const; virtual void paint(QPainter *p); virtual QPixmap toPixmap(); virtual QImage toImage(); signals: void contentsChanged(); void contentsLoadFinished(); }; qzion-mainline/python/tests/000077500000000000000000000000001116615412200164725ustar00rootroot00000000000000qzion-mainline/python/tests/base.py000066400000000000000000000010441116615412200177550ustar00rootroot00000000000000import sys from PyQt4.QtCore import QSize from PyQt4.QtGui import QApplication from qzion import QZionCanvas, QZionImage, QZionClippedGroup if __name__ == "__main__": app = QApplication(sys.argv) canvas = QZionCanvas() canvas.show() image = QZionImage(canvas, "bg.jpg") image.show() image2 = QZionImage(canvas, "ico.png") image2.setPos(20, 20) image2.show() sm = QZionClippedGroup(canvas) sm.setPos(0, 0) sm.setSize(QSize(150, 200)) sm.addObject(image2) sm.show() sys.exit(app.exec_()) qzion-mainline/python/tests/bg.jpg000066400000000000000000000454551116615412200176010ustar00rootroot00000000000000JFIFddDucky<Adobed        {!1AQaqRS"2B!1A ?G7_ F>Ⱥkx5~DѼ!Wd5u!/d5t<:솦_ཐCï^Ȧ@dSC{W=Md ]mثp]t\x.. AvE48AuMd =-qLDz!Dz"閸 : ^Zae&ZaeDT?쉴7_⽑6dMx+ x+ x+-Ch-C7Ch-Eڍ⽐ {!PW.~+غd4{!=솅z5 j.z5~CB?iG ]>i}_}C.F>iG 4<"m4|!Wd]4|"iGWG&Z5~ eWd4j#솃G A&:솠u~ ï^hCF&/d4Wདt>Ⱥi^_}ҽ"=!8"i}t> ]o M}CqCM M}[d5uqCM}[d4> 5qCW^+EP  ؁bt.@p.\ b+BbP 4 Chw"8PD,Q!ؙ4!:L+FQ2DuQ e6 l@؀1bq(*,! Q(؁+BJ8. @ H l@8bĀD 8+EBU+Ehh5b#P B81b AÁ@bĀb@Ġ8YJFX#* Ԡ Ɔh>455Aj.k8DQ#RDQ"e.DSL@l8&b D P*  8 +B8 0`Ċ؀qp *! 6$D#`q*qaKB*($]AtF Fh]6%6 AGb 6 lPt[(V[*Ġ8 e C`MQ lXDP34tPat-!B訑ufu*up``Ѱ(8PT 05:APxPXPH8.l<`p " ]6@*+B+B8+ P!CPj CA.ѱ"6lJ2tJ6l@G( F !AP`+L`+Lb\J@q8lJ ԣ6,(6QM.4S(t:Vk3kFP2P"@(M``Ue8U D:APeA(WzGz‘paa[zG^A`Tp@@p\\GpnR+81&]F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47 3B 7p⡌&E0~RAJ4ʑkMs @_' V'e0):46t8Nq2e㟷Ȅ1dV2+0r=ngp'NDN Ȇ&he/K~r*GG#z0fZSѮGRH#s,O#rQ/ ,Ȗr2ߓvȦ*`<Bd-CcZYBQlϧXC0pTPy~ARC00TPҽلop]g?D`cIENDB`qzion-mainline/python/tests/sizechanges.py000066400000000000000000000013411116615412200213460ustar00rootroot00000000000000import sys from PyQt4.QtGui import QApplication from PyQt4.QtCore import QSize, SIGNAL from qzion import QZionObject, QZionCanvas, QZionRectangle def cb_size_changed(size): print "size changed: ", size if __name__ == "__main__": app = QApplication(sys.argv) canvas = QZionCanvas() canvas.show() image = QZionRectangle(canvas) image.setAttribute(QZionObject.EmitSizeChanges) image.connect(image, SIGNAL("sizeChanged(QSize)"), cb_size_changed) image.show() image.setSize(QSize(30, 30)) image.setAttribute(QZionObject.EmitSizeChanges, False) image.setSize(QSize(80, 80)) image.setAttribute(QZionObject.EmitSizeChanges, True) image.setSize(QSize(90, 90)) sys.exit(app.exec_()) qzion-mainline/src/000077500000000000000000000000001116615412200145765ustar00rootroot00000000000000qzion-mainline/src/CMakeLists.txt000066400000000000000000000016331116615412200173410ustar00rootroot00000000000000set(qzion_HEADERS common/qzion.h common/qzionmacros.h common/qziontext.h common/qziontextblock.h common/qzionrectangle.h common/qziongroup.h common/qzionclippedgroup.h common/qzionimage.h common/qzioncanvas.h common/qzionobject.h common/qzionabstractcanvas.h common/qzioncustomobject.h ) # convenience for the backends foreach (h ${qzion_HEADERS}) set (qzion_DOTDOT_HEADERS ${qzion_DOTDOT_HEADERS} ../${h}) endforeach (h) if (QGV_BACKEND) message(STATUS "Using QGV backend") add_subdirectory(qgraphicsview) else (QGV_BACKEND) message(STATUS "Using QPainter backend") add_subdirectory(qpainter) endif (QGV_BACKEND) install(FILES ${qzion_HEADERS} DESTINATION include/) if (NOT WIN32) configure_file(common/qzion.pc.cmake qzion.pc @ONLY) install(FILES ${CMAKE_BINARY_DIR}/qzion.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/) endif (NOT WIN32) qzion-mainline/src/common.cmake000066400000000000000000000017201116615412200170700ustar00rootroot00000000000000# This file should be included by the backends. set(CMAKE_INCLUDE_CURRENT_DIR ON) function(create_qzion create_qzion_EXTRA_SRCS create_qzion_EXTRA_MOCS) include_directories(../common) set(qzion_SRCS qzioncanvas.cpp qzionabstractcanvas.cpp qziongroup.cpp qzionimage.cpp qzionobject.cpp qzionrectangle.cpp qziontext.cpp qziontextblock.cpp qzionclippedgroup.cpp qzioncustomobject.cpp ${create_qzion_EXTRA_SRCS} ) qt4_wrap_cpp(qzion_MOC_SRCS ${create_qzion_EXTRA_MOCS} ${qzion_DOTDOT_HEADERS} ) add_library(qzion SHARED ${qzion_SRCS} ${qzion_MOC_SRCS}) target_link_libraries(qzion ${QT_LIBRARIES}) set_target_properties(qzion PROPERTIES VERSION ${QZION_LIB_VERSION_STRING} SOVERSION ${QZION_LIB_MAJOR_VERSION} ) install(TARGETS qzion LIBRARY DESTINATION ${LIB_INSTALL_DIR}/) endfunction(create_qzion) qzion-mainline/src/common/000077500000000000000000000000001116615412200160665ustar00rootroot00000000000000qzion-mainline/src/common/qzion.h000066400000000000000000000020661116615412200174030ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZION_H__ #define __QZION_H__ #include "qzionmacros.h" #include "qzioncanvas.h" #include "qzionobject.h" #include "qziongroup.h" #include "qziontext.h" #include "qziontextblock.h" #include "qzionimage.h" #include "qzionrectangle.h" #include "qzionclippedgroup.h" #include "qzioncustomobject.h" #endif qzion-mainline/src/common/qzion.pc.cmake000066400000000000000000000003501116615412200206270ustar00rootroot00000000000000prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=@LIB_INSTALL_DIR@ includedir=${prefix}/include Name: QZion Description: QZion Library Version: @QZION_LIB_VERSION_STRING@ Libs: -L${libdir} -lqzion Cflags: -I${includedir} qzion-mainline/src/common/qzionabstractcanvas.h000066400000000000000000000146111116615412200223220ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONABSTRACTCANVAS_H__ #define __QZIONABSTRACTCANVAS_H__ #include #include #include #include #include #include #include class QZionObject; class QZionObjectPrivate; class QZionAbstractCanvasPrivate; /*! \class QZionAbstractCanvas \brief Container class. A QZionAbstractCanvas is a set of canvas items. */ class QZionAbstractCanvas { public: QZionAbstractCanvas(); virtual ~QZionAbstractCanvas(); /*! Returns a const pointer to the list holding all the items in the canvas. */ const QList *items() const; /*! Returns the topmost object at a given position. \sa itemsAt() */ QZionObject *itemAt(const QPoint &pos) const; /*! \overload It's equivalent to calling itemAt(QPoint(x, y)). \sa itemsAt() */ QZionObject *itemAt(const int x, const int y) const; /*! Returns all the items at the given position, starting from the topmost one. */ QList itemsAt(const QPoint &pos) const; /*! \overload It's equivalent to calling itemsAt(QPoint(x, y)). */ QList itemsAt(const int x, const int y) const; /*! Virtual function to ensure an update is pending, called from children. */ virtual void ensurePendingUpdate() = 0; /*! Virtual function to mark a rect as dirty in canvas. This dirty rect will be repainted in the next paint event. */ virtual void invalidate(const QRect &r, bool translate = true) = 0; /*! Virtual function to mark a region as dirty in canvas. This dirty region will be repainted in the next paint event. */ virtual void invalidate(const QRegion &r, bool translate = true) = 0; virtual int canvasWidth() const; virtual int canvasHeight() const; int zValue(QZionObject *obj) const; void setZValue(QZionObject *obj, int zValue); /*! Put the object \a obj in front of the reference object passed by \a ref. Both objects must be in the Canvas. */ void stackAbove(QZionObject *obj, QZionObject *ref); /*! Put the object \a obj behind the reference object passed by \a ref. Both objects must be in the Canvas. */ void stackBelow(QZionObject *obj, QZionObject *ref); /*! Bring an object to the front of the canvas. \sa setZValue(), lower(), stackAbove(), stackBelow() */ void raise(QZionObject *obj); /*! Bring the object to the back of the canvas. \sa setZValue(), raise(), stackBelow(), stackAbove() */ void lower(QZionObject *obj); /*! Add a QZionObject to this AbstractCanvas, removing it from a previous AbstractCanvas if needed. \sa removeObject() */ void addObject(QZionObject *obj); /*! Remove a QZionObject from this AbstractCanvas. \sa addObject() */ void removeObject(QZionObject *obj); virtual void updateChanges() = 0; virtual QSize size() const = 0; virtual void setSize(const QSize &size) = 0; /*! Translate a given point to local coordinates. Defaults to the identity functions. QZionGroup should override it to translate the point according to its position. */ virtual QPoint mapToLocal(const QPoint &pt) const; typedef void(QZionObject::*memberMouseAction)(QMouseEvent *); typedef void(QZionAbstractCanvas::*mouseAction)(QZionObject *, QMouseEvent *); /*! \brief Handle Mouse Events: common code to all mouse events Function that contains common code to all mouseEvents. It receives the QMouseEvent to handle and what member functions must be called. \sa mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent() */ virtual void mouseEventHandler(QMouseEvent *e, memberMouseAction m_ma, mouseAction ma); /*! This function is called when an mouse Move event happens. You shouldn't need to call it manually, but you can to simulate events if needed. */ virtual void mouseMoveEvent(QMouseEvent *e); /*! This function is called when an mouse Press event happens. You shouldn't need to call it manually, but you can to simulate events if needed. */ virtual void mousePressEvent(QMouseEvent *e); /*! This function is called when an mouse Release event happens. You shouldn't need to call it manually, but you can to simulate events if needed. */ virtual void mouseReleaseEvent(QMouseEvent *e); /*! This function is called when a wheel event happens. You shouldn't need to call it manually, but you can to simulate events if needed. */ virtual void wheelEvent(QWheelEvent *e); /*! \internal Shortcut function for tracking children Move event. */ virtual void mouseObjectMoveEvent(QZionObject *, QMouseEvent *) {} /*! \internal Shortcut function for tracking children Press event. */ virtual void mouseObjectPressEvent(QZionObject *, QMouseEvent *) {} /*! \internal Shortcut function for tracking children Release event. */ virtual void mouseObjectReleaseEvent(QZionObject *, QMouseEvent *) {} /*! \internal Shortcut function for tracking children Wheel event. */ virtual void wheelObjectEvent(QZionObject *, QWheelEvent *) {} protected: QZionAbstractCanvasPrivate *_QZionAbstractCanvas_data; private: friend class QZionObjectPrivate; friend class QZionAbstractCanvasPrivate; }; #endif qzion-mainline/src/common/qzioncanvas.h000066400000000000000000000052171116615412200206000ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONCANVAS_H__ #define __QZIONCANVAS_H__ #include #include "qzionobject.h" #include "qzionabstractcanvas.h" class QZionCanvasPrivate; /*! \class QZionCanvas A QZionCanvas can contain many QZionObjects (images, rectangles, lines, etc.). It also can provides access to a QWidget that can be shown in the screen with the canvas contents. Portions of the widget are automatically redrawn to update the changes made to the items. */ class QZionCanvas : public QObject, public QZionAbstractCanvas { Q_OBJECT public: QZionCanvas(QWidget *parent = NULL); virtual ~QZionCanvas(); virtual void ensurePendingUpdate(); virtual void invalidate(const QRect &r, bool translate = true); virtual void invalidate(const QRegion &r, bool translate = true); inline virtual int canvasWidth() const; inline virtual int canvasHeight() const; virtual QSize sizeHint() const { return size(); } virtual QSize size() const; virtual void setSize(const QSize &size); inline virtual void resize(const QSize &size); inline virtual void resize(int width, int height); QWidget *widget(); void show() { widget()->show(); } void hide() { widget()->show(); } public Q_SLOTS: virtual void updateChanges(); Q_SIGNALS: void updated(const QRegion &); protected: QZionCanvasPrivate *_QZionCanvas_data; virtual void paintEvent(QPaintEvent *event); virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); private: friend class QZionCanvasPrivate; }; inline int QZionCanvas::canvasWidth() const { return size().width(); } inline int QZionCanvas::canvasHeight() const { return size().height(); } inline void QZionCanvas::resize(const QSize &size) { setSize(size); } inline void QZionCanvas::resize(int width, int height) { setSize(QSize(width, height)); } #endif qzion-mainline/src/common/qzionclippedgroup.h000066400000000000000000000026771116615412200220310ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONCLIPPEDGROUP_H__ #define __QZIONCLIPPEDGROUP_H__ #include "qziongroup.h" /*! \class QZionClippedGroup \brief A group with a clipping area. A QZionClippedGroup is a group with clipping area applied to its objects. */ class QZionClippedGroup : public QZionGroup { Q_OBJECT public: QZionClippedGroup(QZionAbstractCanvas *canvas); virtual ~QZionClippedGroup(); virtual QRect rect() const; virtual void setClipper(QZionRectangle *rect); private: virtual void paintInternal(QPainter *p, const QRect &prect, const QRegion &preg, const QPoint &delta, double cumulative_opacity); }; #endif qzion-mainline/src/common/qzioncustomobject.h000066400000000000000000000027321116615412200220250ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONCUSTOMOBJECT_H__ #define __QZIONCUSTOMOBJECT_H__ #include "qzionobject.h" class QZionCustomObjectPrivate; /*! \brief The QZionCustomObject is the base class to extend QZion widgets. It creates the internal data necessary for the backend. To create a new widget that can blit on canvas, you must inherit QZionCustomObject. */ class QZionCustomObject : public QZionObject { Q_OBJECT public: QZionCustomObject(QZionAbstractCanvas *canvas = NULL); virtual ~QZionCustomObject(); virtual QSize size() const; virtual void setSize(const QSize &size); protected: QZionCustomObjectPrivate *_QZionCustomObject_data; private: friend class QZionCustomObjectPrivate; }; #endif qzion-mainline/src/common/qziongroup.h000066400000000000000000000056531116615412200204650ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONGROUP_H__ #define __QZIONGROUP_H__ #include "qzionobject.h" class QZionGroupPrivate; /*! \class QZionGroup \brief An item containing other items. A QZionGroup is an QZionObject, but it is also a QZionAbstractCanvas, so you can add children items to it. Just an inner canvas, if you prefer. */ class QZionGroup : public QZionObject, public QZionAbstractCanvas { Q_OBJECT public: /*! */ QZionGroup(QZionAbstractCanvas *canvas = NULL); /*! Destroys the QZionGroup. If the group has items, all the items will be deleted. */ virtual ~QZionGroup(); /*! */ virtual void changed(); /*! */ virtual void paint(QPainter *p); /*! Returns the bouding rect of all children. */ virtual QRect rect() const; virtual QSize size() const; virtual void setSize(const QSize &size); /*! */ virtual void ensurePendingUpdate(); /*! */ virtual void invalidate(const QRect &r, bool translate = true); /*! */ virtual void invalidate(const QRegion &r, bool translate = true); inline virtual QColor color() const; virtual void setColor(const QColor &color); virtual void setClipper(QZionRectangle *rect); virtual int canvasWidth() const; virtual int canvasHeight() const; virtual QPoint mapToLocal(const QPoint &pt) const; virtual void mouseMoveEvent(QMouseEvent *e); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent *e); bool contains(const QPoint &point) const; /*! Returns the cummulative color top-down from parents. */ virtual QColor effectiveColor(); public Q_SLOTS: /*! */ virtual void updateChanges(); protected: QZionGroupPrivate *_QZionGroup_data; QSize _size; mutable QRect _lastChildRect; mutable bool _childRectChanged; /*! */ virtual void paintInternal(QPainter *p, const QRect &prect, const QRegion &preg, const QPoint &delta, double cumulativeOpacity); friend class QZionGroupPrivate; }; inline QColor QZionGroup::color() const { return QColor(255, 255, 255); } #endif qzion-mainline/src/common/qzionimage.h000066400000000000000000000072161116615412200204100ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONIMAGE_H__ #define __QZIONIMAGE_H__ #include "qzionobject.h" struct QZionImageBorder { int left; int right; int top; int bottom; QZionImageBorder(): left(0), right(0), top(0), bottom(0) {}; QZionImageBorder(const int left, const int right, const int top, const int bottom) : left(left), right(right), top(top), bottom(bottom) {}; }; class QZionTiledPixmap { private: bool _is_null; QPixmap tiles[9]; QZionImageBorder border; public: enum qzTilePosition{ NORTH_WEST, NORTH, NORTH_EAST, WEST, MIDDLE, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST }; // Start an empty TiledPixmap QZionTiledPixmap() : _is_null(true) {}; QZionTiledPixmap(const QPixmap pixmap, QZionImageBorder border); QRect tileRectAtSize(const qzTilePosition num, QSize size); QPixmap tile(const qzTilePosition num) {return tiles[num];}; bool isNull() {return _is_null;}; }; class QZionImagePrivate; /*! \class QZionImage \brief A pixmap that uses internal image cache. A QZionImage is a pixmap that can be put in the canvas. */ class QZionImage : public QZionObject { Q_OBJECT public: /*! Constructs a QZionImage with empty pixmap. */ QZionImage(QZionAbstractCanvas *canvas = NULL); /*! Constructs a QZionImage with specified image. */ QZionImage(QZionAbstractCanvas *canvas, const QString &filepath); /*! Constructs a QZionImage with specified QPixmap. */ QZionImage(QZionAbstractCanvas *canvas, const QPixmap &pixmap); /*! Constructs a QZionImage with specified QImage. */ QZionImage(QZionAbstractCanvas *canvas, const QImage &image); ~QZionImage(); QPixmap pixmap() const; /*! Load an image from a file. \code QZionImage im(canvas); im.load("icon.png"); \endcode */ bool load(const QString &filename); /*! Reload the image (force cache update) */ bool reload(); /*! Clears the contents of the image pixmap to null. */ void clear(); virtual QSize size() const; /*! Sets image size. */ virtual void setSize(const QSize &size); /*! Paint image on canvas. */ virtual void paint(QPainter *p); virtual QRect rect() const; virtual QColor color() const; virtual void setColor(const QColor &color); virtual void changed(); void setBorder(const int left, const int right, const int top, const int bottom); void setBorder(QZionImageBorder border); QZionImageBorder border(); protected: QZionImagePrivate *_QZionImage_data; QString _filepath; /*! Sets pixmap and mark image as changed. */ void setPixmap(const QPixmap &pixmap); friend class QZionImagePrivate; }; #endif qzion-mainline/src/common/qzionmacros.h000066400000000000000000000031631116615412200206070ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONMACROS_H__ #define __QZIONMACROS_H__ #define QD_PROPERTY_RD(typ, var, getMethod) \ protected: typ var; \ public: inline typ &getMethod() { return var; } #define QE_PROPERTY_RD(typ, var, getMethod) \ protected: typ var; \ public: inline typ getMethod() const { return var; } #define QE_PROPERTY_RW(typ, var, getMethod, setMethod) \ protected: typ var; \ public: inline typ getMethod() const { return var; } \ inline void setMethod(typ val) { var = val; } #define QZD(class_name) class_name##Private *d = _##class_name##_data; #define QZDP(class_name, nm) class_name##Private *nm = _##class_name##_data; #define QZDP_VAR(vp, class_name, nm) class_name##Private *nm = vp->_##class_name##_data; #endif qzion-mainline/src/common/qzionobject.h000066400000000000000000000266401116615412200205760ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONOBJECT_H__ #define __QZIONOBJECT_H__ #include #include "qzionmacros.h" #include "qzionabstractcanvas.h" class QZionGroup; class QZionCanvas; class QZionRectangle; class QZionObjectPrivate; class QZionAbstractCanvasPrivate; /*! \brief The QZionObject class is the base class for all graphical objects in a QZionCanvas. It provides a light-weight foundation for writing your own custom objects. This includes defining the object's geometry, its painting implementation and object interaction through its event handlers. Standard graphical objects are already provided. These are: QZionText provides a text object QZionRectangle provides a rectangle object QZionImage provides an image object QZionGroup provides a group of objects QZionClippedGroup provides a group of objects with a clipper \sa QZionCanvas */ class QZionObject : public QObject { Q_OBJECT public: /* The numbers represent the bit to be used by the flag */ enum Attributes { EmitSizeChanges = 0, HandleOutOfBoundsEvents = 1 }; /*! Constructs a QZionObject in the given \a canvas. If \a canvas is NULL you can add it to a canvas later using QZionAbstractCanvas::addObject(). The object is always hidden after being created. */ QZionObject(QZionAbstractCanvas *canvas = NULL); /*! Destroys the QZionObject. If the object is associated with a canvas, the object will be removed from the canvas before deleted. */ virtual ~QZionObject(); /*! Returns a pointer to the object's canvas if there is one, otherwise returns NULL. */ QZionAbstractCanvas *canvas() const; inline void show(); inline void hide(); /*! Test if an attribute is set. */ bool testAttribute(const Attributes attribute) const; /*! Sets the attribute \a attribute on this object if \a on is true; otherwise clears the attribute. */ void setAttribute(const Attributes attribute, const bool on = true); /*! Returns the object position. \sa setPos() */ QPoint pos() const; /*! Sets the object position. */ virtual void setPos(const QPoint &newpos); /*! Sets the object position. */ inline void setPos(const int x, const int y); /*! Returns the opacity of the object in the range [0, 255]. \sa setOpacity() */ int opacity() const; /*! Sets the object opacity. The \a value must be in the range [0, 255]. Where \a value 0 means full transparent (invisible) and \a value 255 means full opaque. By default object's opacity is equal to 255 (full opaque). Note that even if the object is full transparent and cannot be seen, it still receives mouse events if \a visible() is true. So if you want the object do not receive any mouse events you need to call setVisible() with false. \sa opacity(), setVisible() */ void setOpacity(const int value); /*! Returns true if the widget is visible otherwise returns false. \sa setVisible() */ bool visible() const; /*! Sets the object visibility to true if \a visible is true otherwise the object is made invisible. Invisible objects are not painted and do not receive any mouse events. By default, objects are invisible when created. You need to call setVisible() to show them. \sa visible(), show(), hide() */ void setVisible(const bool value); /*! Returns true if the object receives mouse events, otherwise returns false. \sa setMouseEvents() */ bool mouseEvents() const; /*! Sets mouse events flag for the object. When mouse events flag is false the object will not receive any mouse events, all these events will be passed to the objects behind it. By default mouse events flag is true. If you want an object do not receive mouse events you must call this method with \a value false. Note that even if mouse events is true, invisible objects do not receive mouse events. \sa mouseEvents() */ void setMouseEvents(const bool value); /*! Returns the Z index of the object in canvas. \sa setZValue() */ int zValue() const; /*! Sets the Z index of the object. You can bring to front or bring to back the object in the canvas just changing the \a zValue. \sa zValue(), stackOver(), stackUnder(), raise(), lower() */ void setZValue(const int zValue); /*! Bring the object to the front of the canvas. \sa setZValue() */ void raise(); /*! Bring the object to the back of the canvas. \sa setZValue() */ void lower(); /*! Put the object in front of the reference object passed by \a ref. The reference object must be in the same canvas. */ void stackAbove(QZionObject *ref); /*! Put the object behind the reference object passed by \a ref. The reference object must be in the same canvas. */ void stackBelow(QZionObject *ref); /*! Schedule an object update. You can call this method when you need to repaint the object contents. \sa updateChanges() */ virtual void changed(); /*! Returns the QZionRectangle that this object is clipped to, if there is one, otherwise returns NULL. \sa setClipper() */ QZionRectangle *clipper() const; /*! Sets the clipper of the object. The clipper is a QZionRectangle that confines the object contents to it's area and change object opacity if it's opacity is changed. To remove a clipper you need to call this method with NULL. \sa clipper() */ virtual void setClipper(QZionRectangle *rect); /*! Returns the object size. \sa setSize() */ virtual QSize size() const = 0; /*! Sets the object size. \sa size() */ virtual void setSize(const QSize &size); inline virtual void setSize(const int width, const int height); /*! Returns the object color. \sa setColor() */ virtual QColor color() const = 0; /*! Returns the scene color of the object already composed. */ virtual QColor effectiveColor() const; /*! Returns the visible rect of the object already calculated. */ virtual QRect effectiveRect() const; /*! Sets the object color. \sa color() */ virtual void setColor(const QColor &color) = 0; inline virtual void setColor(const int r, const int g, const int b, const int a=255); /*! Override this function to draw the item with the painter. */ virtual void paint(QPainter *p) = 0; /*! Override this function to return the rect the item will be drawn into. */ virtual QRect rect() const = 0; /*! Returns true if items contains a given point. This function is used for dispatching mouseEvents, the default implementation respects the object boundaries, but you can override to change this behaviour. */ virtual bool contains(const QPoint &point) const; inline virtual bool layered() const; inline virtual void mouseMoveEvent(QMouseEvent *e); inline virtual void mousePressEvent(QMouseEvent *e); inline virtual void mouseReleaseEvent(QMouseEvent *e); inline virtual void wheelEvent(QWheelEvent *e); virtual bool isClipper() const { return false; } Q_SIGNALS: void sizeChanged(const QSize &size); void signalMouseMoveEvent(QZionObject *, QMouseEvent *); void signalMousePressEvent(QZionObject *, QMouseEvent *); void signalMouseReleaseEvent(QZionObject *, QMouseEvent *); void signalWheelEvent(QZionObject *, QWheelEvent *); protected: QZionObjectPrivate *_QZionObject_data; bool _changed; virtual void paintInternal(QPainter *p, const QRect &prect, const QRegion &preg, const QPoint &delta, double cumulativeOpacity); /*! Check if the object has changed and invalidate it's region to repaint it's content on canvas. This method is called from parent. \sa changed() */ virtual void updateChanges(); inline virtual void canvasResizeEvent(QResizeEvent *); private: Q_DISABLE_COPY(QZionObject) friend class QZionAbstractCanvas; friend class QZionAbstractCanvasPrivate; friend class QZionGroup; friend class QZionCanvas; friend class QZionCanvasPrivate; friend class QZionObjectPrivate; }; /*! Shows the object. (Objects are hidden by default) This convenience function is equivalent to calling \c setVisible(true). \sa hide(), setVisible() */ inline void QZionObject::show() { setVisible(true); } /*! Hides the object. (Objects are hidden by default) This convenience function is equivalent to calling \c setVisible(false). \sa show(), setVisible() */ inline void QZionObject::hide() { setVisible(false); } /*! \overload It's equivalent to calling setPos(QPoint(x, y)). */ inline void QZionObject::setPos(const int x, const int y) { setPos(QPoint(x, y)); } /*! Override this function to specify if the painting operations will paint over each other. If not, the item will be drawn more quickly when opacity is != 255, because it does not have to be painted onto a pixmap first. */ inline bool QZionObject::layered() const { return false; } /*! Called on mouseMoveEvent over this object. */ inline void QZionObject::mouseMoveEvent(QMouseEvent *e) { emit signalMouseMoveEvent(this, e); } /*! Called on mousePressEvent over this object. */ inline void QZionObject::mousePressEvent(QMouseEvent *e) { emit signalMousePressEvent(this, e); } /*! Called on mouseReleaseEvent over this object. */ inline void QZionObject::mouseReleaseEvent(QMouseEvent *e) { emit signalMouseReleaseEvent(this, e); } /*! Called on wheelEvent over this object. */ inline void QZionObject::wheelEvent(QWheelEvent *e) { emit signalWheelEvent(this, e); } /*! Called on canvasResizeEvent. */ inline void QZionObject::canvasResizeEvent(QResizeEvent *) { } /*! \overload It's equivalent to calling setSize(QSize(width, height)). \sa size() */ inline void QZionObject::setSize(const int width, const int height) { return setSize(QSize(width, height)); } /*! \overload It's equivalent to calling setColor(QColor(r, g, b, a)). \sa color() */ inline void QZionObject::setColor(const int r, const int g, const int b, const int a) { setColor(QColor(r, g, b, a)); } #endif qzion-mainline/src/common/qzionrectangle.h000066400000000000000000000055011116615412200212650ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONRECTANGLE_H__ #define __QZIONRECTANGLE_H__ #include "qzionobject.h" class QZionRectanglePrivate; /*! \brief A solid rectangle. A QZionRectangle is a rectangle that can be put in the canvas. */ class QZionRectangle : public QZionObject { Q_OBJECT public: /*! Constructs a QZionRectangle with default parameters. */ QZionRectangle(QZionAbstractCanvas *canvas = NULL); /*! Constructs a QZionRectangle with specified parameters. */ QZionRectangle(QZionAbstractCanvas *canvas, const QColor &color, const QSize &size); virtual ~QZionRectangle(); /*! Gets the rectangle color. */ virtual QColor color() const; /*! Sets the rectangle color. */ virtual void setColor(const QColor &color); /*! Gets the rectangle size. */ virtual QSize size() const; /*! Sets the rectangle size. */ virtual void setSize(const QSize &size); /*! Paint rectangle on canvas. */ virtual void paint(QPainter *p); /*! Returns rectangle geometry. */ virtual QRect rect() const; virtual QColor effectiveColor() const; virtual QRect effectiveRect() const; virtual void changed(); virtual bool isClipper() const { return (_clipReferences > 0); } protected: QZionRectanglePrivate *_QZionRectangle_data; private: int _clipReferences; void addClippee(QZionObject* clipee); void removeClippee(QZionObject* clipee); void incClipperRef(); void decClipperRef(); /* XXXX */ friend class QZionObject; friend class QZionRectanglePrivate; }; /*! \internal Add reference to this rectangle to be used as a clipper. If at least one object is using a rectangle as a clipper, it won't be visible. \sa decClipperRef() */ inline void QZionRectangle::incClipperRef() { _clipReferences++; } /*! \internal Remove reference to this rectangle to be used as a clipper. \sa incClipperRef() */ inline void QZionRectangle::decClipperRef() { _clipReferences--; } #endif qzion-mainline/src/common/qziontext.h000066400000000000000000000044431116615412200203110ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONTEXT_H__ #define __QZIONTEXT_H__ #include "qzionobject.h" class QZionTextPrivate; /*! \brief QZionText. A QZionText is a text that can be put in the canvas. */ class QZionText : public QZionObject { Q_OBJECT public: QZionText(QZionAbstractCanvas* canvas = NULL); QZionText(QZionAbstractCanvas* canvas, const QString &text, const QFont &font, const QColor &color=Qt::white); virtual ~QZionText(); enum TextStyle { NoStyle, OutLine, Shadow }; virtual void setStyle(TextStyle style); virtual TextStyle style() const; virtual QSize size() const; virtual void setSize(const QSize &size); QString text() const; void setText(const QString &text); virtual QColor color() const; virtual void setColor(const QColor &color); virtual QColor textColor() const; virtual void setTextColor(const QColor &color); virtual QColor outlineColor() const; virtual void setOutlineColor(const QColor &color); virtual QColor shadowColor() const; virtual void setShadowColor(const QColor &color); QFont font() const; void setFont(const QFont &font); QPointF alignment() const; void setAlignment(const QPointF &alignment); qreal ellipsisAlignment() const; void setEllipsisAlignment(const qreal alignment); virtual QRect rect() const; /*! Paint text on canvas. */ virtual void paint(QPainter* p); virtual void changed(); protected: QZionTextPrivate *_QZionText_data; friend class QZionTextPrivate; }; #endif qzion-mainline/src/common/qziontextblock.h000066400000000000000000000037711116615412200213270ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONTEXTBLOCK_H__ #define __QZIONTEXTBLOCK_H__ #include "qzionobject.h" class QZionTextBlockPrivate; /*! \brief QZionTextBlock. A QZionTextBlock is a text that can be put in the canvas. */ class QZionTextBlock : public QZionObject { Q_OBJECT public: QZionTextBlock(QZionAbstractCanvas* canvas = NULL); QZionTextBlock(QZionAbstractCanvas* canvas, const QString &text); virtual ~QZionTextBlock(); QString text() const; void setText(const QString &text); QSize size() const; void setSize(const QSize &size); QSize contentsSize() const; int preferredWidth(); void setPreferredWidth(const int width); double scale(); void setScale(double factor); virtual QColor color() const; virtual void setColor(const QColor &color); virtual QRect rect() const; /*! Paint text on canvas. */ virtual void paint(QPainter* p); /*! Return a Pixmap of the Widget */ virtual QPixmap toPixmap(); /*! Return a Image of the Widget */ virtual QImage toImage(); Q_SIGNALS: void contentsChanged(); void contentsLoadFinished(); protected: QZionTextBlockPrivate *_QZionTextBlock_data; friend class QZionTextBlockPrivate; }; #endif qzion-mainline/src/doxyfile000066400000000000000000001513471116615412200163570ustar00rootroot00000000000000# Doxyfile 1.5.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = QZion # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 0.4.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = ../doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be extracted # and appear in the documentation as a namespace called 'anonymous_namespace{file}', # where file will be replaced with the base name of the file that contains the anonymous # namespace. By default anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH # then you must also enable this option. If you don't then doxygen will produce # a warning and turn it on anyway SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the number # of direct children of the root node in a graph is already larger than # MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO qzion-mainline/src/qgraphicsview/000077500000000000000000000000001116615412200174525ustar00rootroot00000000000000qzion-mainline/src/qgraphicsview/CMakeLists.txt000066400000000000000000000002041116615412200222060ustar00rootroot00000000000000include(../common.cmake) create_qzion( "qgraphicsziongroup.cpp;qziontextblock_p.cpp;qzionobject_p.cpp;qziontext_p.cpp" "") qzion-mainline/src/qgraphicsview/qgraphicsziongroup.cpp000066400000000000000000000056631116615412200241260ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include #include #include "qgraphicsziongroup.h" #include "qzionabstractcanvas.h" QGraphicsZionGroup::QGraphicsZionGroup(QGraphicsItem *parent) : QGraphicsItem(parent) { setClipping(true); setAcceptHoverEvents(false); setHandlesChildEvents(true); } QGraphicsZionGroup::~QGraphicsZionGroup() { } bool QGraphicsZionGroup::clipping() const { return (bool) (flags() & QGraphicsItem::ItemClipsChildrenToShape); } void QGraphicsZionGroup::setClipping(const bool on) { setFlag(QGraphicsItem::ItemClipsChildrenToShape, on); } QSize QGraphicsZionGroup::size() const { return _boundingRect.size().toSize(); } void QGraphicsZionGroup::setSize(const QSize &size) { if (size == this->size()) return; prepareGeometryChange(); _boundingRect = QRectF(0, 0, size.width(), size.height()); update(); } QRectF QGraphicsZionGroup::boundingRect() const { return _boundingRect; } void QGraphicsZionGroup::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) { } void QGraphicsZionGroup::mousePressEvent(QGraphicsSceneMouseEvent *e) { const QPoint np = e->pos().toPoint(); QMouseEvent event = QMouseEvent(e->type(), np, e->button(), e->buttons(), Qt::NoModifier); owner->mousePressEvent(&event); } void QGraphicsZionGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) { const QPoint np = e->pos().toPoint(); QMouseEvent event = QMouseEvent(e->type(), np, e->button(), e->buttons(), Qt::NoModifier); owner->mouseReleaseEvent(&event); } void QGraphicsZionGroup::hoverMoveEvent(QGraphicsSceneHoverEvent *e) { const QPoint np = e->pos().toPoint(); QMouseEvent event = QMouseEvent(e->type(), np, Qt::NoButton, Qt::NoButton, Qt::NoModifier); owner->mouseMoveEvent(&event); } void QGraphicsZionGroup::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { const QPoint np = e->pos().toPoint(); QMouseEvent event = QMouseEvent(e->type(), np, e->button(), e->buttons(), Qt::NoModifier); owner->mouseMoveEvent(&event); } qzion-mainline/src/qgraphicsview/qgraphicsziongroup.h000066400000000000000000000031611116615412200235620ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QGRAPHICSZIONGROUP_H__ #define __QGRAPHICSZIONGROUP_H__ #include #include #include "qzionabstractcanvas.h" class QGraphicsZionGroup : public QGraphicsItem { public: QGraphicsZionGroup(QGraphicsItem *parent = 0); virtual ~QGraphicsZionGroup(); bool clipping() const; void setClipping(const bool on=true); QSize size() const; void setSize(const QSize &size); virtual QRectF boundingRect() const; void paint(QPainter * painter, const QStyleOptionGraphicsItem* option, QWidget* widget); void mouseMoveEvent(QGraphicsSceneMouseEvent *e); void mousePressEvent(QGraphicsSceneMouseEvent *e); void mouseReleaseEvent(QGraphicsSceneMouseEvent *e); void hoverMoveEvent(QGraphicsSceneHoverEvent *e); QZionAbstractCanvas *owner; private: QRectF _boundingRect; }; #endif qzion-mainline/src/qgraphicsview/qzionabstractcanvas.cpp000066400000000000000000000225661116615412200242510ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzionabstractcanvas.h" #include #include #include #include #include "qzionobject.h" #include "qzionobject_p.h" #include "qzionabstractcanvas_p.h" QSet QZionAbstractCanvasPrivate::grabbedItems; QZionAbstractCanvas::QZionAbstractCanvas() { _QZionAbstractCanvas_data = new QZionAbstractCanvasPrivate(this); } QZionAbstractCanvas::~QZionAbstractCanvas() { delete _QZionAbstractCanvas_data; } void QZionAbstractCanvas::addObject(QZionObject *obj) { QZionAbstractCanvas *prev_canvas = obj->canvas(); if (prev_canvas == this) return; if (prev_canvas) prev_canvas->removeObject(obj); QZD(QZionAbstractCanvas); d->items.append(obj); QZDP_VAR(obj, QZionObject, dobj); dobj->canvas = this; dobj->item->setParentItem(d->canvasGroup); dobj->item->setZValue(d->items.size() - 1); obj->changed(); } void QZionAbstractCanvas::removeObject(QZionObject *obj) { if (obj->canvas() != this) return; QZD(QZionAbstractCanvas); d->items.removeAll(obj); QZDP_VAR(obj, QZionObject, dobj); dobj->canvas = 0; if (d->grabbedItems.contains(obj)) d->grabbedItems.clear(); if (dobj->item) { dobj->item->setParentItem(0); dobj->item->setZValue(0); } d->updateAfterRestack(obj, 0, d->items.size() - 1); } QZionObject *QZionAbstractCanvas::itemAt(const QPoint &pt) const { QZD(QZionAbstractCanvas); for (int i = d->items.size() - 1; i >= 0; i--) { QZionObject *obj = d->items[i]; if (obj->visible() && obj->contains(pt)) return obj; } return NULL; } QList QZionAbstractCanvas::itemsAt(const QPoint &pt) const { QZD(QZionAbstractCanvas); QList retv; for (int i = d->items.size() - 1; i >= 0; i--) { QZionObject *obj = d->items[i]; if (obj->visible() && obj->contains(pt)) retv.append(obj); } return retv; } void QZionAbstractCanvas::setZValue(QZionObject *obj, int zValue) { if (zValue < 0) return; QZD(QZionAbstractCanvas); int obj_pos = d->items.indexOf(obj); if (obj_pos == zValue) return; d->items.removeAt(obj_pos); d->items.insert(zValue, obj); int from = qMin(obj_pos, zValue); int to = qMax(obj_pos, zValue); d->updateAfterRestack(obj, from, to); } void QZionAbstractCanvas::raise(QZionObject *obj) { QZD(QZionAbstractCanvas); if (d->items.last() == obj) return; int obj_pos = d->items.indexOf(obj); d->items.removeAt(obj_pos); d->items.append(obj); int from = obj_pos; int to = d->items.size() - 1; d->updateAfterRestack(obj, from, to); } void QZionAbstractCanvas::lower(QZionObject *obj) { QZD(QZionAbstractCanvas); if (d->items.first() == obj) return; int obj_pos = d->items.indexOf(obj); d->items.removeAt(obj_pos); d->items.prepend(obj); int from = 0; int to = obj_pos; d->updateAfterRestack(obj, from, to); } void QZionAbstractCanvas::stackAbove(QZionObject *obj, QZionObject* ref) { QZD(QZionAbstractCanvas); int obj_pos = d->items.indexOf(obj); int ref_pos = d->items.indexOf(ref); if (obj_pos == -1 || ref_pos == -1) { qCritical("QZionAbstractCanvas::stackAbove: " "arguments must be of the same canvas.\n"); return; } if (obj_pos == ref_pos + 1) return; d->items.removeAt(obj_pos); if (obj_pos < ref_pos) d->items.insert(ref_pos, obj); else d->items.insert(ref_pos + 1, obj); int from = qMin(obj_pos, ref_pos + 1); int to = qMax(obj_pos, ref_pos + 1); to = qMin(to, d->items.size() - 1); d->updateAfterRestack(obj, from, to); } void QZionAbstractCanvas::stackBelow(QZionObject *obj, QZionObject* ref) { QZD(QZionAbstractCanvas); int obj_pos = d->items.indexOf(obj); int ref_pos = d->items.indexOf(ref); if (obj_pos == -1 || ref_pos == -1) { qCritical("QZionAbstractCanvas::stackBelow: " "arguments must be of the same canvas.\n"); return; } if (obj_pos == ref_pos - 1) return; d->items.removeAt(obj_pos); if (obj_pos < ref_pos) d->items.insert(ref_pos - 1, obj); else d->items.insert(ref_pos, obj); int from = qMin(obj_pos, ref_pos - 1); from = qMax(from, 0); int to = qMax(obj_pos, ref_pos - 1); d->updateAfterRestack(obj, from, to); } const QList *QZionAbstractCanvas::items() const { QZD(QZionAbstractCanvas); return &(d->items); } QZionObject *QZionAbstractCanvas::itemAt(const int x, const int y) const { return itemAt(QPoint(x,y)); } QList QZionAbstractCanvas::itemsAt(const int x, const int y) const { return itemsAt(QPoint(x,y)); } int QZionAbstractCanvas::canvasWidth() const { return 0; } int QZionAbstractCanvas::canvasHeight() const { return 0; } int QZionAbstractCanvas::zValue(QZionObject *obj) const { QZD(QZionAbstractCanvas); return d->items.indexOf(obj); } QPoint QZionAbstractCanvas::mapToLocal(const QPoint &pt) const { return pt; } void QZionAbstractCanvas::mouseEventHandler(QMouseEvent *e, memberMouseAction m_ma, mouseAction ma) { QZD(QZionAbstractCanvas); QPoint relativePoint = mapToLocal(e->pos()); QMouseEvent re = QMouseEvent(e->type(), relativePoint, e->pos(), e->button(), e->buttons(), e->modifiers()); QList::iterator it = d->items.end(); while (it != d->items.begin()) { --it; QZionObject *obj = *it; if (d->grabbedItems.isEmpty()) { if (!obj->mouseEvents() || !obj->visible() || !obj->contains(relativePoint)) continue; } else if (!d->grabbedItems.contains(obj)) { continue; } // Default for events is to be accepted. Handlers should explicitly // call event->ignore() to ignore them. re.setAccepted(true); (obj->*m_ma)(&re); if (re.isAccepted()) { if (m_ma == &QZionObject::mousePressEvent && e->buttons() == e->button()) d->grabbedItems.insert(obj); else if (m_ma == &QZionObject::mouseReleaseEvent && e->buttons() == Qt::NoButton) d->grabbedItems.remove(obj); // Calls the shorthand function of group for this event. // This is an easy way to a subclass of QZionGroup to // track its children events. (this->*ma)(obj, &re); return; } } // If no child handled the event, we just ignore it. e->ignore(); } void QZionAbstractCanvas::mouseMoveEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mouseMoveEvent, &QZionAbstractCanvas::mouseObjectMoveEvent); } void QZionAbstractCanvas::mousePressEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mousePressEvent, &QZionAbstractCanvas::mouseObjectPressEvent); } void QZionAbstractCanvas::mouseReleaseEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mouseReleaseEvent, &QZionAbstractCanvas::mouseObjectReleaseEvent); } /* Maybe we can unify all event handlers in the future, as this method has some code in common with mouseEventHandler() */ void QZionAbstractCanvas::wheelEvent(QWheelEvent *e) { QZD(QZionAbstractCanvas); QPoint relativePoint = mapToLocal(e->pos()); QWheelEvent re = QWheelEvent(relativePoint, e->pos(), e->delta(), e->buttons(), e->modifiers(), e->orientation()); QList::iterator it = d->items.end(); while (it != d->items.begin()) { --it; QZionObject *obj = *it; // XXX: to Edje, wheel is a mouse event, so we check it here if (!obj->mouseEvents() || !obj->visible() || !obj->contains(relativePoint)) continue; // Default for events is to be accepted. Handlers should explicitly // call event->ignore() to ignore them. re.setAccepted(true); obj->wheelEvent(&re); if (re.isAccepted()) { // Calls the shorthand function of group for this event. // This is an easy way to a subclass of QZionGroup to // track its children events. wheelObjectEvent(obj, &re); return; } } // If no child handled the event, we just ignore it. e->ignore(); } qzion-mainline/src/qgraphicsview/qzionabstractcanvas_p.h000066400000000000000000000035351116615412200242300ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONABSTRACTCANVAS_P_H__ #define __QZIONABSTRACTCANVAS_P_H__ #include "qzionobject.h" #include "qzionobject_p.h" #include "qzionabstractcanvas.h" class QZionAbstractCanvasPrivate { public: QList items; QZionAbstractCanvas *owner; QGraphicsItem *canvasGroup; // This set contains all objects that have grabbed the mouse. // Currently this is a static variable for all canvas. static QSet grabbedItems; QZionAbstractCanvasPrivate(QZionAbstractCanvas *owner) : owner(owner) {}; virtual ~QZionAbstractCanvasPrivate() {}; inline void updateAfterRestack(QZionObject *obj, int from, int to); }; void QZionAbstractCanvasPrivate::updateAfterRestack(QZionObject *obj, int from, int to) { Q_UNUSED(obj); /* This function is being used here to reset the ZValue after some restacking. This will trigger updates on the QGV. */ for (int i = from; i <= to; ++i) { QGraphicsItem *item = items[i]->_QZionObject_data->item; item->setZValue(i); } } #endif qzion-mainline/src/qgraphicsview/qzioncanvas.cpp000066400000000000000000000074311116615412200225170ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzioncanvas.h" #include #include #include #include #include #include #include #include #include #include "qzionmacros.h" #include "qgraphicsziongroup.h" #include "qzionabstractcanvas_p.h" class QZionCanvasPrivate : public QGraphicsView { public: QZionCanvasPrivate(QZionCanvas *owner, QWidget *parent = 0); virtual ~QZionCanvasPrivate(); QZionCanvas *owner; QGraphicsZionGroup *group; protected: virtual void paintEvent(QPaintEvent *event); virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); private: virtual void resizeEvent(QResizeEvent *event); }; QZionCanvasPrivate::QZionCanvasPrivate(QZionCanvas *owner, QWidget *parent) : QGraphicsView(new QGraphicsScene, parent), owner(owner) { group = new QGraphicsZionGroup; group->owner = owner; group->setClipping(false); group->show(); // Always top most. When children are removed from this main group, // it's zValue are adjusted to zero to not block canvas events. group->setZValue(999999); scene()->addItem(group); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); } QZionCanvasPrivate::~QZionCanvasPrivate() { delete group; } void QZionCanvasPrivate::paintEvent(QPaintEvent *event) { QGraphicsView::paintEvent(event); owner->paintEvent(event); } void QZionCanvasPrivate::resizeEvent(QResizeEvent *event) { QGraphicsView::resizeEvent(event); scene()->setSceneRect(QRect(0, 0, size().width(), size().height())); QZionAbstractCanvasPrivate *da = owner->_QZionAbstractCanvas_data; foreach (QZionObject *obj, da->items) obj->canvasResizeEvent(event); } void QZionCanvasPrivate::keyPressEvent(QKeyEvent *event) { owner->keyPressEvent(event); } void QZionCanvasPrivate::keyReleaseEvent(QKeyEvent *event) { owner->keyReleaseEvent(event); } QZionCanvas::QZionCanvas(QWidget *parent) : QObject(), QZionAbstractCanvas() { _QZionCanvas_data = new QZionCanvasPrivate(this, parent); QZDP(QZionAbstractCanvas, da); da->canvasGroup = _QZionCanvas_data->group; } QZionCanvas::~QZionCanvas() { delete _QZionCanvas_data; } QSize QZionCanvas::size() const { QZD(QZionCanvas); return d->size(); } void QZionCanvas::setSize(const QSize &size) { QZD(QZionCanvas); d->resize(size); } QWidget *QZionCanvas::widget() { return _QZionCanvas_data; } void QZionCanvas::keyPressEvent(QKeyEvent *) { } void QZionCanvas::keyReleaseEvent(QKeyEvent *) { } void QZionCanvas::paintEvent(QPaintEvent *) { QZD(QZionCanvas); emit updated(QRegion(d->scene()->sceneRect().toRect())); } ////////////////////////////////////////////////////////////// void QZionCanvas::updateChanges() {} void QZionCanvas::ensurePendingUpdate() {} void QZionCanvas::invalidate(const QRect &, bool) {} void QZionCanvas::invalidate(const QRegion &, bool) {} qzion-mainline/src/qgraphicsview/qzionclippedgroup.cpp000066400000000000000000000027161116615412200237420ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziongroup_p.h" #include "qzionobject_p.h" #include "qzionclippedgroup.h" #include #include QZionClippedGroup::QZionClippedGroup(QZionAbstractCanvas *canvas) : QZionGroup(canvas) { QZD(QZionGroup); d->setClipping(true); } QZionClippedGroup::~QZionClippedGroup() { } QRect QZionClippedGroup::rect() const { return QRect(pos(), size()); } void QZionClippedGroup::setClipper(QZionRectangle *rect) { QZD(QZionGroup); QZionGroup::setClipper(rect); d->setClipping(true); } void QZionClippedGroup::paintInternal(QPainter *, const QRect &, const QRegion &, const QPoint &, double ) { } qzion-mainline/src/qgraphicsview/qzioncommon.h000066400000000000000000000043201116615412200221730ustar00rootroot00000000000000#ifndef __QZIONCOMMON_H__ #define __QZIONCOMMON_H__ #include #include #include #include /*! \internal Composes two colors and returns the final color. */ static inline QColor composeColorClass(QColor cc, QColor cn) { int cc_r, cc_g, cc_b, cc_a; int cn_r, cn_g, cn_b, cn_a; cc.getRgb(&cc_r, &cc_g, &cc_b, &cc_a); cn.getRgb(&cn_r, &cn_g, &cn_b, &cn_a); int r = ((cc_r + 1) * cn_r) >> 8; int g = ((cc_g + 1) * cn_g) >> 8; int b = ((cc_b + 1) * cn_b) >> 8; int a = ((cc_a + 1) * cn_a) >> 8; return QColor(r, g, b, a); } #define QZINIT(class_name, cv) { \ _##class_name##_data = new class_name##Private(0); \ _QZionObject_data->item = this->_##class_name##_data; \ _##class_name##_data->owner = this; \ if (cv) cv->addObject(this); \ } #define QZDELETE(class_name) delete this->_##class_name##_data; #define QGV_EFFECTIVE_SHAPE(class_name) \ virtual QPainterPath shape() const \ { \ if (owner->clipper()) { \ QRect baseClipper = owner->clipper()->effectiveRect(); \ QRect paintClipper = boundingRect().toRect() & \ baseClipper.translated(-owner->pos()); \ QPainterPath path; \ path.addRect(paintClipper); \ return path; \ } else { \ return class_name::shape(); \ } \ }; #define QGV_MOUSE_EVENT_HANDLERS() \ void mousePressEvent(QGraphicsSceneMouseEvent *) {} \ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) {} \ void hoverMoveEvent(QGraphicsSceneHoverEvent *) {} #endif qzion-mainline/src/qgraphicsview/qzioncustomobject.cpp000066400000000000000000000050061116615412200237410ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzionmacros.h" #include "qzioncommon.h" #include "qzionobject_p.h" #include "qzioncustomobject.h" class QZionCustomObjectPrivate : public QGraphicsItem { public: QZionCustomObjectPrivate(QGraphicsItem *parent = 0); virtual ~QZionCustomObjectPrivate(); QSize size() const; void setSize(const QSize &size); virtual QRectF boundingRect() const; virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QZionCustomObject *owner; private: QRectF _boundingRect; }; QZionCustomObjectPrivate::QZionCustomObjectPrivate(QGraphicsItem *parent) : QGraphicsItem(parent) { setFlag(QGraphicsItem::ItemClipsToShape, true); } QZionCustomObjectPrivate::~QZionCustomObjectPrivate() { } QSize QZionCustomObjectPrivate::size() const { return _boundingRect.size().toSize(); } void QZionCustomObjectPrivate::setSize(const QSize &size) { if (size == this->size()) return; prepareGeometryChange(); _boundingRect = QRectF(0, 0, size.width(), size.height()); update(); } QRectF QZionCustomObjectPrivate::boundingRect() const { return _boundingRect; } void QZionCustomObjectPrivate::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) { owner->paint(painter); } QZionCustomObject::QZionCustomObject(QZionAbstractCanvas *canvas) : QZionObject(canvas) { QZINIT(QZionCustomObject, canvas); } QZionCustomObject::~QZionCustomObject() { QZDELETE(QZionCustomObject); } QSize QZionCustomObject::size() const { QZD(QZionCustomObject); return d->size(); } void QZionCustomObject::setSize(const QSize &size) { QZD(QZionCustomObject); d->setSize(size); QZionObject::setSize(size); } qzion-mainline/src/qgraphicsview/qziongroup.cpp000066400000000000000000000067651116615412200224110ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziongroup.h" #include #include #include "qzioncommon.h" #include "qziongroup_p.h" #include "qzionobject_p.h" #include "qzionabstractcanvas.h" #include "qzionabstractcanvas_p.h" QZionGroup::QZionGroup(QZionAbstractCanvas *canvas) : QZionObject(canvas), QZionAbstractCanvas() { QZINIT(QZionGroup, canvas); QZD(QZionGroup); d->setClipping(false); QZDP(QZionAbstractCanvas, da); da->canvasGroup = _QZionGroup_data; } QZionGroup::~QZionGroup() { QZDELETE(QZionGroup); } QRect QZionGroup::rect() const { QZD(QZionGroup); return d->boundingRect().toRect().translated(pos()); } void QZionGroup::setColor(const QColor &color) { setOpacity(color.alpha()); } QSize QZionGroup::size() const { QZD(QZionGroup); return d->size(); } void QZionGroup::setSize(const QSize &size) { QZD(QZionGroup); d->setSize(size); QZionObject::setSize(size); } int QZionGroup::canvasWidth() const { QZD(QZionObject); return d->canvas ? d->canvas->canvasWidth() : 0; } int QZionGroup::canvasHeight() const { QZD(QZionObject); return d->canvas ? d->canvas->canvasHeight() : 0; } QPoint QZionGroup::mapToLocal(const QPoint &pt) const { return pt - pos(); } void QZionGroup::mouseMoveEvent(QMouseEvent *e) { QZionAbstractCanvas::mouseMoveEvent(e); } void QZionGroup::mousePressEvent(QMouseEvent *e) { QZionAbstractCanvas::mousePressEvent(e); } void QZionGroup::mouseReleaseEvent(QMouseEvent *e) { QZionAbstractCanvas::mouseReleaseEvent(e); } void QZionGroup::wheelEvent(QWheelEvent *e) { QZionAbstractCanvas::wheelEvent(e); } bool QZionGroup::contains(const QPoint &point) const { QZD(QZionObject); QPointF mappedPt = d->item->mapFromParent(point); return d->item->contains(mappedPt) || (testAttribute(HandleOutOfBoundsEvents) && d->item->childrenBoundingRect().contains(mappedPt)); } void QZionGroup::setClipper(QZionRectangle *rect) { QZionObject::setClipper(rect); QZD(QZionGroup); d->setClipping(rect != NULL); } QColor QZionGroup::effectiveColor() { // optimization candidate (caching) return QZionObject::effectiveColor(); } void QZionGroup::changed() { QZD(QZionAbstractCanvas); foreach (QZionObject *obj, d->items) if (obj->clipper() == NULL) obj->changed(); QZionObject::changed(); } ////////////////////////////////////////////////////////////// void QZionGroup::updateChanges() {} void QZionGroup::ensurePendingUpdate() {} void QZionGroup::invalidate(const QRect &, bool) {} void QZionGroup::invalidate(const QRegion &, bool) {} void QZionGroup::paint(QPainter *) {} void QZionGroup::paintInternal(QPainter *, const QRect &, const QRegion &, const QPoint &, double) {} qzion-mainline/src/qgraphicsview/qziongroup_p.h000066400000000000000000000032461116615412200223640ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONGROUP_P_H__ #define __QZIONGROUP_P_H__ #include #include "qziongroup.h" #include "qzioncommon.h" #include "qzionrectangle.h" #include "qgraphicsziongroup.h" class QZionGroupPrivate : public QGraphicsZionGroup { public: QZionGroupPrivate(QGraphicsItem *parent = 0) : QGraphicsZionGroup(parent) {} virtual ~QZionGroupPrivate() {} virtual inline QPainterPath shape() const; }; inline QPainterPath QZionGroupPrivate::shape() const { QZionGroup *owner = static_cast(this->owner); if (owner->clipper()) { QRect baseClipper = owner->clipper()->effectiveRect(); QRect paintClipper = baseClipper.translated(-owner->pos()); // todo: intersect with boundingRect if clipping is enabled QPainterPath path; path.addRect(paintClipper); return path; } else { return QGraphicsZionGroup::shape(); } } #endif qzion-mainline/src/qgraphicsview/qzionimage.cpp000066400000000000000000000076201116615412200223260ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzionimage.h" #include "qzionrectangle.h" #include #include #include #include #include "qzionimage_p.h" #include "qzionobject_p.h" static int MAX_CACHE_SIZE = 4096; // 4 mb QZionImage::QZionImage(QZionAbstractCanvas *canvas) : QZionObject(canvas) { QZINIT(QZionImage, canvas); QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QString &filepath) : QZionObject(canvas), _filepath(filepath) { QZINIT(QZionImage, canvas); QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); load(filepath); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QPixmap &pixmap) : QZionObject(canvas) { QZINIT(QZionImage, canvas); QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); setPixmap(pixmap); setSize(pixmap.size()); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QImage &image) : QZionObject(canvas) { QZINIT(QZionImage, canvas); QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); QPixmap pixmap = QPixmap::fromImage(image); setPixmap(pixmap); setSize(pixmap.size()); } QZionImage::~QZionImage() { QZDELETE(QZionImage); } bool QZionImage::load(const QString &filename) { QPixmap result; if (QPixmapCache::find(filename, result)) { setPixmap(result); return true; } if (!result.load(filename)) return false; _filepath = filename; QPixmapCache::insert(filename, result); setPixmap(result); return true; } bool QZionImage::reload() { QZD(QZionImage); if (d->pixmap().isNull()) return true; QPixmap result; if (!result.load(_filepath)) { clear(); return false; } QPixmapCache::insert(_filepath, result); setPixmap(result); return true; } void QZionImage::clear() { setPixmap(QPixmap()); } QPixmap QZionImage::pixmap() const { QZD(QZionImage); return d->pixmap(); } void QZionImage::setPixmap(const QPixmap &p) { QZD(QZionImage); d->setPixmap(p); if (d->size.isEmpty()) d->size = pixmap().size(); } QSize QZionImage::size() const { QZD(QZionImage); return d->size; } void QZionImage::setSize(const QSize &size) { QSize fp = pixmap().size(); if (fp.width() <= 0 || fp.height() <= 0) return; QZD(QZionImage); d->size = size; double dx = (double)size.width() / fp.width(); double dy = (double)size.height() / fp.height(); d->setTransform(QTransform().scale(dx, dy)); QZionObject::setSize(size); } void QZionImage::setBorder(const int left, const int right, const int top, const int bottom) { } void QZionImage::setBorder(QZionImageBorder border) { } QZionImageBorder QZionImage::border() { } QRect QZionImage::rect() const { return QRect(pos(), size()); } QColor QZionImage::color() const { return Qt::white; } void QZionImage::setColor(const QColor &color) { setOpacity(color.alpha()); } void QZionImage::paint(QPainter *painter) { Q_UNUSED(painter); } void QZionImage::changed() { QZD(QZionImage); d->updateEffectiveColor(); QZionObject::changed(); } qzion-mainline/src/qgraphicsview/qzionimage_p.h000066400000000000000000000100651116615412200223070ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONIMAGE_P_H__ #define __QZIONIMAGE_P_H__ #include #include #include "qzioncommon.h" #include "qzionrectangle.h" #include "qgraphicsziongroup.h" class QZionImagePrivate : public QGraphicsPixmapItem { public: QZionImage *owner; QSize size; QColor effectiveColor; QImage *buffer, *image; inline QZionImagePrivate(QGraphicsItem *parent = 0); virtual ~QZionImagePrivate(); inline void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); inline void applyColorFilter(QRgb color); inline void updateEffectiveColor(); QGV_MOUSE_EVENT_HANDLERS(); QGV_EFFECTIVE_SHAPE(QGraphicsPixmapItem); }; inline QZionImagePrivate::QZionImagePrivate(QGraphicsItem *parent) : QGraphicsPixmapItem(parent), effectiveColor(Qt::white), buffer(NULL), image(NULL) { setAcceptHoverEvents(true); setShapeMode(QGraphicsPixmapItem::BoundingRectShape); setTransformationMode(Qt::SmoothTransformation); setFlag(QGraphicsItem::ItemClipsToShape, true); } inline QZionImagePrivate::~QZionImagePrivate() { delete buffer; delete image; } inline void QZionImagePrivate::paint(QPainter * painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { int opacity = owner->effectiveColor().alpha(); if (opacity >= 255) { QGraphicsPixmapItem::paint(painter, option, widget); } else { painter->setOpacity(opacity / (float) 255); QGraphicsPixmapItem::paint(painter, option, widget); painter->setOpacity(1.0); } } /*! \brief Apply a multiplication color filter to the image White filters (default) don't require the expensive color transformations. For all other colors we proceed as follows: 1) Save original image in 'QImage image' so we can restore it when needed. 2) Create ARGB32 QImage for pixel-to-pixel multiplication. 3) Fill QImage with filter color. 4) Apply original image on top of it using Multiply composition mode. 5) Set pixmap to the new image. Original image and work buffer are saved for future use. When color processing is no longer needed (aka white filter) we: 1) Set pixmap to original image. 2) Free buffers. */ inline void QZionImagePrivate::applyColorFilter(QRgb filterRgb) { if (QColor(filterRgb) != Qt::white) { if (buffer == NULL) { image = new QImage(pixmap().toImage()); buffer = new QImage(image->size(), QImage::Format_ARGB32_Premultiplied); } buffer->fill(filterRgb); QPainter buffer_painter(buffer); buffer_painter.setCompositionMode(QPainter::CompositionMode_Multiply); buffer_painter.drawImage(QPoint(0, 0), *image); setPixmap(QPixmap::fromImage(*buffer)); } else { setPixmap(QPixmap::fromImage(*image)); delete buffer; buffer = NULL; delete image; image = NULL; } } inline void QZionImagePrivate::updateEffectiveColor() { QColor oldEffectiveColor = effectiveColor; effectiveColor = owner->clipper() ? owner->clipper()->effectiveColor() : Qt::white; if (oldEffectiveColor.rgb() != effectiveColor.rgb()) applyColorFilter(effectiveColor.rgb()); } #endif qzion-mainline/src/qgraphicsview/qzionobject.cpp000066400000000000000000000140241116615412200225060ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include #include #include "qziongroup.h" #include "qzioncommon.h" #include "qzionobject.h" #include "qzionobject_p.h" #include "qzionrectangle.h" #include "qzionabstractcanvas.h" void QZionObject::changed() { QZD(QZionObject); if (d->skipUpdate) d->skipUpdate = false; else d->item->update(); } void QZionObject::updateChanges() {} QZionObject::QZionObject(QZionAbstractCanvas*) : QObject() { _QZionObject_data = new QZionObjectPrivate; QZD(QZionObject); d->owner = this; d->skipUpdate = false; } QZionObject::~QZionObject() { QZD(QZionObject); // Clear the item to avoid removeObject() try to reparent it. // At this point the subclasses already deleted the inner item, since // their dtor runs before QZionObject's. d->item = 0; if (d->canvas) d->canvas->removeObject(this); setClipper(NULL); delete _QZionObject_data; } int QZionObject::opacity() const { QZD(QZionObject); return d->opacity; } void QZionObject::setOpacity(const int value) { QZD(QZionObject); if (value == d->opacity) return; d->opacity = (value < 0) ? 0 : (0 > 255) ? 255 : value; changed(); } bool QZionObject::visible() const { QZD(QZionObject); return d->item->isVisible(); } void QZionObject::setVisible(const bool value) { QZD(QZionObject); d->skipUpdate = true; changed(); d->item->setVisible(value); } QPoint QZionObject::pos() const { QZD(QZionObject); return d->item->pos().toPoint(); } void QZionObject::setPos(const QPoint &newpos) { QZD(QZionObject); d->skipUpdate = true; changed(); d->item->setPos(newpos); } bool QZionObject::mouseEvents() const { QZD(QZionObject); return (d->item->acceptedMouseButtons() != Qt::NoButton); } void QZionObject::setMouseEvents(const bool value) { QZD(QZionObject); d->skipUpdate = true; changed(); if (!value) d->item->setAcceptedMouseButtons(Qt::NoButton); else d->item->setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton | Qt::MidButton); } int QZionObject::zValue() const { QZD(QZionObject); return d->item ? int(d->item->zValue()) : -1; } void QZionObject::setZValue(const int zValue) { QZD(QZionObject); d->skipUpdate = true; changed(); if (d->canvas) d->canvas->setZValue(this, zValue); } void QZionObject::raise() { QZD(QZionObject); d->skipUpdate = true; changed(); if (d->canvas) d->canvas->raise(this); } void QZionObject::lower() { QZD(QZionObject); d->skipUpdate = true; changed(); if (d->canvas) d->canvas->lower(this); } QZionRectangle *QZionObject::clipper() const { QZD(QZionObject); return d->clipper; } void QZionObject::setClipper(QZionRectangle *rect) { QZD(QZionObject); // There's no need to change clipper. if (d->clipper == rect) return; // Had an old clipper? Remove it. if (d->clipper) { d->clipper->removeClippee(this); d->clipper->decClipperRef(); d->clipper = NULL; } // Has a new one? Add it. if (rect) { d->clipper = rect; d->clipper->addClippee(this); d->clipper->incClipperRef(); } // Reflect changes if (d->item) changed(); } QZionAbstractCanvas *QZionObject::canvas() const { QZD(QZionObject); return d->canvas; } void QZionObject::stackAbove(QZionObject *ref) { QZD(QZionObject); d->skipUpdate = true; changed(); if (d->canvas) d->canvas->stackAbove(this, ref); } void QZionObject::stackBelow(QZionObject *ref) { QZD(QZionObject); d->skipUpdate = true; changed(); if (d->canvas) d->canvas->stackBelow(this, ref); } void QZionObject::setSize(const QSize &size) { changed(); if (testAttribute(EmitSizeChanges)) emit sizeChanged(size); } bool QZionObject::testAttribute(const Attributes attribute) const { QZD(QZionObject); return (bool)(d->attributes & (1 << attribute)); } void QZionObject::setAttribute(const Attributes attribute, const bool on) { QZD(QZionObject); if (on) d->attributes |= (1 << attribute); else d->attributes &= ~(1 << attribute); changed(); } void QZionObject::paintInternal(QPainter*, const QRect&, const QRegion&, const QPoint&, double) { } QColor QZionObject::effectiveColor() const { QColor result; result = color(); result.setAlpha(opacity()); QZionRectangle *clip = clipper(); if (clip) result = composeColorClass(clip->effectiveColor(), result); else { QZionGroup *group = dynamic_cast(canvas()); if (group) result = composeColorClass(group->effectiveColor(), result); } return result; } QRect QZionObject::effectiveRect() const { QRect result = rect(); QZionRectangle *clip = clipper(); if (clip) result &= clip->effectiveRect(); return result; } bool QZionObject::contains(const QPoint &point) const { QZD(QZionObject); QPointF mappedPt = d->item->mapFromParent(point); return d->item->contains(mappedPt); } qzion-mainline/src/qgraphicsview/qzionobject_p.cpp000066400000000000000000000021411116615412200230220ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzionobject_p.h" #include "qzionabstractcanvas_p.h" QZionObjectPrivate::QZionObjectPrivate() : item(NULL), opacity(255), visible(false), attributes(0), mouseEvents(true), clipper(NULL), canvas(NULL) { } QGraphicsItem *QZionObjectPrivate::realGroup(QZionAbstractCanvas *cv) { return cv->_QZionAbstractCanvas_data->canvasGroup; } qzion-mainline/src/qgraphicsview/qzionobject_p.h000066400000000000000000000023711116615412200224740ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONOBJECT_P_H__ #define __QZIONOBJECT_P_H__ #include "qzionobject.h" #include "qzionabstractcanvas.h" class QZionObjectPrivate { public: QZionObject *owner; QGraphicsItem *item; QPoint pos; int opacity; bool visible; int attributes; bool mouseEvents; QZionRectangle *clipper; QZionAbstractCanvas *canvas; bool skipUpdate; QZionObjectPrivate(); virtual ~QZionObjectPrivate() {} QGraphicsItem *realGroup(QZionAbstractCanvas *cv); }; #endif qzion-mainline/src/qgraphicsview/qzionrectangle.cpp000066400000000000000000000064041116615412200232070ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzionrectangle.h" #include #include #include "qzionobject_p.h" #include "qzionrectangle_p.h" QZionRectangle::QZionRectangle(QZionAbstractCanvas *canvas) : QZionObject(canvas), _clipReferences(0) { QZINIT(QZionRectangle, canvas); } QZionRectangle::QZionRectangle(QZionAbstractCanvas *canvas, const QColor &color, const QSize &size) : QZionObject(canvas), _clipReferences(0) { QZINIT(QZionRectangle, canvas); setColor(color); setSize(size); } QZionRectangle::~QZionRectangle() { QZD(QZionRectangle); // Update clippees foreach (QZionObject *clippee, d->clippees) { clippee->setClipper(NULL); } QZDELETE(QZionRectangle); } QColor QZionRectangle::color() const { QZD(QZionRectangle); return d->color; } void QZionRectangle::setColor(const QColor &color) { QZD(QZionRectangle); if (this->color().rgb() != color.rgb()) d->color = color.rgb(); if (opacity() != color.alpha()) setOpacity(color.alpha()); else changed(); } QSize QZionRectangle::size() const { QZD(QZionRectangle); return d->rect().size().toSize(); } void QZionRectangle::setSize(const QSize &size) { QZD(QZionRectangle); QRectF orig = d->rect(); d->setRect(orig.x(), orig.y(), size.width(), size.height()); QZionObject::setSize(size); } QRect QZionRectangle::rect() const { QZD(QZionRectangle); return d->rect().toRect().translated(pos()); } void QZionRectangle::paint(QPainter * /*painter*/) { } void QZionRectangle::addClippee(QZionObject* clippee) { QZD(QZionRectangle); /* Rect became a clipper itself */ if (d->clippees.isEmpty()) changed(); d->clippees.insert(clippee); } void QZionRectangle::removeClippee(QZionObject* clippee) { QZD(QZionRectangle); d->clippees.remove(clippee); /* Rect used to be a clipper */ if (d->clippees.isEmpty()) changed(); } QColor QZionRectangle::effectiveColor() const { QZD(QZionRectangle); if (d->colorDirty) return QZionObject::effectiveColor(); else return d->brush().color(); } QRect QZionRectangle::effectiveRect() const { QZD(QZionRectangle); if (d->rectDirty) return QZionObject::effectiveRect(); else return d->effectiveRect; } void QZionRectangle::changed() { QZD(QZionRectangle); d->updateEffectiveColor(); d->updateEffectiveRect(); if (_clipReferences) d->updateChildren(); QZionObject::changed(); } qzion-mainline/src/qgraphicsview/qzionrectangle_p.h000066400000000000000000000050331116615412200231700ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONRECTANGLE_P_H__ #define __QZIONRECTANGLE_P_H__ #include #include #include #include "qzioncommon.h" #include "qzionrectangle.h" class QZionRectanglePrivate : public QGraphicsRectItem { public: QZionRectangle *owner; QSet clippees; QColor color; QRect effectiveRect; bool colorDirty; bool rectDirty; QZionRectanglePrivate(QGraphicsItem *parent = 0); void updateEffectiveColor(); void updateEffectiveRect(); void updateChildren(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); QGV_MOUSE_EVENT_HANDLERS(); QGV_EFFECTIVE_SHAPE(QGraphicsRectItem); }; inline QZionRectanglePrivate::QZionRectanglePrivate(QGraphicsItem *parent) : QGraphicsRectItem(parent), clippees(), colorDirty(false), rectDirty(false) { setPen(Qt::NoPen); setFlag(QGraphicsItem::ItemClipsToShape, true); setAcceptHoverEvents(true); } inline void QZionRectanglePrivate::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (owner->_clipReferences > 0) return; QGraphicsRectItem::paint(painter, option, widget); } inline void QZionRectanglePrivate::updateEffectiveColor() { colorDirty = true; setBrush(QBrush(owner->effectiveColor())); colorDirty = false; } inline void QZionRectanglePrivate::updateEffectiveRect() { rectDirty = true; effectiveRect = owner->effectiveRect(); rectDirty = false; } inline void QZionRectanglePrivate::updateChildren() { foreach(QZionObject* clippee, clippees) { clippee->setClipper(owner); clippee->changed(); } } #endif qzion-mainline/src/qgraphicsview/qziontext.cpp000066400000000000000000000076031116615412200222310ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziontext.h" #include "qziontext_p.h" #include #include #include #include #include #include #include #include "qzionobject_p.h" QZionText::QZionText(QZionAbstractCanvas *canvas) : QZionObject(canvas) { QZINIT(QZionText, canvas); } QZionText::QZionText(QZionAbstractCanvas *canvas, const QString &text, const QFont &font, const QColor &color) : QZionObject(canvas) { QZINIT(QZionText, canvas); QZD(QZionText); d->setText(text); d->setFont(font); d->setTextColor(color); } QZionText::~QZionText() { QZDELETE(QZionText); } QZionText::TextStyle QZionText::style() const { QZD(QZionText); return (QZionText::TextStyle) d->style(); } void QZionText::setStyle(QZionText::TextStyle style) { QZD(QZionText); d->setStyle((QGraphicsQZionTextItem::TextStyle) style); } QSize QZionText::size() const { QZD(QZionText); return d->size(); } void QZionText::setSize(const QSize &size) { QZD(QZionText); d->setSize(size); QZionObject::setSize(size); } QString QZionText::text() const { QZD(QZionText); return d->text(); } void QZionText::setText(const QString &text) { QZD(QZionText); d->setText(text); } QColor QZionText::color() const { QZD(QZionText); return d->baseColor; } void QZionText::setColor(const QColor &color) { QZD(QZionText); if (d->baseColor.rgb() != color.rgb()) d->baseColor.setRgb(color.rgb()); if (opacity() != color.alpha()) setOpacity(color.alpha()); else changed(); } void QZionText::setEllipsisAlignment(const qreal alignment) { QZD(QZionText); d->setEllipsisAlignment(alignment); } qreal QZionText::ellipsisAlignment() const { QZD(QZionText); return d->ellipsisAlignment(); } QColor QZionText::textColor() const { QZD(QZionText); return d->myTextColor; } void QZionText::setTextColor(const QColor &color) { QZD(QZionText); d->myTextColor = color; changed(); } QColor QZionText::outlineColor() const { QZD(QZionText); return d->myOutlineColor; } void QZionText::setOutlineColor(const QColor &color) { QZD(QZionText); d->myOutlineColor = color; changed(); } QColor QZionText::shadowColor() const { QZD(QZionText); return d->myShadowColor; } void QZionText::setShadowColor(const QColor &color) { QZD(QZionText); d->myShadowColor = color; changed(); } QFont QZionText::font() const { QZD(QZionText); return d->font(); } void QZionText::setFont(const QFont &font) { QZD(QZionText); d->setFont(font); } QPointF QZionText::alignment() const { QZD(QZionText); return d->alignment(); } void QZionText::setAlignment(const QPointF &alignment) { QZD(QZionText); d->setAlignment(alignment); } QRect QZionText::rect() const { QZD(QZionText); return d->sceneBoundingRect().toRect().translated(pos()); } void QZionText::paint(QPainter *painter) { /* deprecated */ Q_UNUSED(painter); } void QZionText::changed() { QZD(QZionText); d->updateColors(); QZionObject::changed(); } qzion-mainline/src/qgraphicsview/qziontext_p.cpp000066400000000000000000000154011116615412200225430ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziontext_p.h" QGraphicsQZionTextItem::QGraphicsQZionTextItem(QGraphicsItem *parent) : QAbstractGraphicsShapeItem(parent), _text(""), _color(Qt::white), _color2(Qt::black), _alignment(QPointF(0.5, 0.5)), _ellipsisAlignment(0.0), _style(NoStyle) { updateBoundingRect(); } QRectF QGraphicsQZionTextItem::boundingRect() const { return _boundingRect; } /*! \internal */ void QGraphicsQZionTextItem::updateBoundingRect() { int realWidth; int realHeight; int realX; int realY; QRectF fontBoundingRect; prepareGeometryChange(); fontBoundingRect = QFontMetrics(_font).boundingRect(0, 0, _size.width(), _size.height(), Qt::TextSingleLine | Qt::AlignHCenter, _text); // Does the bounding rect fit in the available width? if (fontBoundingRect.width() < _size.width()) { realWidth = fontBoundingRect.width(); realX = _alignment.x() * (_size.width() - realWidth); } else { realWidth = _size.width(); realX = 0; } // Does the bounding rect fit in the available height? if (fontBoundingRect.height() < _size.height()) { realHeight = fontBoundingRect.height(); realY = _alignment.y() * (_size.height() - realHeight); } else { realHeight = _size.height(); realY = 0; } switch (_style) { case OutLine: _boundingRect = QRectF(realX + 1, realY + 1, realWidth + 1, realHeight + 1); break; case Shadow: _boundingRect = QRectF(realX, realY, realWidth + 1, realHeight + 1); break; case NoStyle: // fall through default: _boundingRect = QRectF(realX, realY, realWidth, realHeight); break; } _boundingRect = QRectF(realX, realY, realWidth, realHeight); update(); } void QGraphicsQZionTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); painter->save(); painter->setPen(_color); painter->setFont(_font); QRectF rt = boundingRect(); QString text; int flags = Qt::TextSingleLine | Qt::AlignHCenter; if ((int) rt.width() == _size.width()) { if (_ellipsisAlignment >= 0.5) text = QFontMetricsF(_font).elidedText(_text, Qt::ElideLeft, rt.width()); else text = QFontMetricsF(_font).elidedText(_text, Qt::ElideRight, rt.width()); } else { text = _text; } switch (_style) { case NoStyle: painter->drawText(rt, flags, text); break; case OutLine: drawTextWithOutline(painter, rt, flags, text); break; case Shadow: drawTextWithShadow(painter, rt, flags, text); break; default: break; } painter->restore(); } void QGraphicsQZionTextItem::drawTextWithOutline(QPainter *painter, const QRectF tileRect, int flags, QString text) { Q_UNUSED(flags); int width = 1; QPainterPath path; QFont outlineFont = QFont(_font); outlineFont.setStyleStrategy(QFont::ForceOutline); QPointF basepoint = tileRect.bottomLeft(); basepoint.setY(basepoint.y() - width - QFontMetrics(outlineFont).descent()); path.addText(basepoint, outlineFont, text); painter->setRenderHint(QPainter::Antialiasing); painter->setPen(QPen(_color3, width, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter->setBrush(_color); painter->drawPath(path); } void QGraphicsQZionTextItem::drawTextWithShadow(QPainter *painter, const QRectF tileRect, int flags, QString text) { _color3.setAlpha(128); painter->setPen(_color3); painter->drawText(tileRect.translated(1, 1), flags, text); painter->setPen(_color); painter->drawText(tileRect, flags, text); } QSize QGraphicsQZionTextItem::size() const { return _size; } void QGraphicsQZionTextItem::setSize(const QSize &size) { _size = size; updateBoundingRect(); } QString QGraphicsQZionTextItem::text() const { return _text; } void QGraphicsQZionTextItem::setText(const QString &text) { if (_text != text) { _text = text; updateBoundingRect(); } } QGraphicsQZionTextItem::TextStyle QGraphicsQZionTextItem::style() const { return _style; } void QGraphicsQZionTextItem::setStyle(const QGraphicsQZionTextItem::TextStyle style) { if (_style != style) { _style = style; update(); } } QColor QGraphicsQZionTextItem::textColor() const { return _color; } void QGraphicsQZionTextItem::setTextColor(const QColor &color) { _color = color; update(); } QColor QGraphicsQZionTextItem::outlineColor() const { return _color2; } void QGraphicsQZionTextItem::setOutlineColor(const QColor &color) { _color2 = color; update(); } QColor QGraphicsQZionTextItem::shadowColor() const { return _color3; } void QGraphicsQZionTextItem::setShadowColor(const QColor &color) { _color3 = color; update(); } QFont QGraphicsQZionTextItem::font() const { return _font; } void QGraphicsQZionTextItem::setFont(const QFont &font) { _font = font; updateBoundingRect(); } QPointF QGraphicsQZionTextItem::alignment() const { return _alignment; } void QGraphicsQZionTextItem::setAlignment(const QPointF &alignment) { _alignment = alignment; updateBoundingRect(); } qreal QGraphicsQZionTextItem::ellipsisAlignment() const { return _ellipsisAlignment; } void QGraphicsQZionTextItem::setEllipsisAlignment(const qreal alignment) { _ellipsisAlignment = alignment; update(); } /*! \reimp */ bool QGraphicsQZionTextItem::contains(const QPointF &point) const { return _boundingRect.contains(point); } qzion-mainline/src/qgraphicsview/qziontext_p.h000066400000000000000000000101061116615412200222050ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONTEXT_P_H__ #define __QZIONTEXT_P_H__ #include #include #include "qziontext.h" #include "qzionrectangle.h" #include "qzioncommon.h" class QGraphicsQZionTextItem : public QAbstractGraphicsShapeItem { public: enum TextStyle { NoStyle, OutLine, Shadow }; QGraphicsQZionTextItem(QGraphicsItem *parent = 0); QRectF boundingRect () const; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QString text() const; void setText(const QString &text); void setStyle(TextStyle style); TextStyle style() const; QColor textColor() const; void setTextColor(const QColor &color); QColor outlineColor() const; void setOutlineColor(const QColor &color); QColor shadowColor() const; void setShadowColor(const QColor &color); QFont font() const; void setFont(const QFont &font); QSize size() const; void setSize(const QSize &size); QPointF alignment() const; void setAlignment(const QPointF &alignment); qreal ellipsisAlignment() const; void setEllipsisAlignment(const qreal alignment); bool contains(const QPointF &point) const; private: void updateBoundingRect(); void drawTextWithOutline(QPainter *painter, const QRectF rect, int flags, QString text); void drawTextWithShadow(QPainter *painter, const QRectF rect, int flags, QString text); QString _text; QFont _font; QRectF _boundingRect; QColor _color; QColor _color2; QColor _color3; QSize _size; QPointF _alignment; qreal _ellipsisAlignment; TextStyle _style; }; class QZionTextPrivate : public QGraphicsQZionTextItem { public: QZionText *owner; QColor baseColor; QColor myTextColor; QColor myOutlineColor; QColor myShadowColor; QZionTextPrivate(QGraphicsItem *parent); inline virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); inline void updateColors(); QGV_EFFECTIVE_SHAPE(QGraphicsQZionTextItem); }; inline QZionTextPrivate::QZionTextPrivate(QGraphicsItem *parent = 0) : QGraphicsQZionTextItem(parent), baseColor(Qt::white), myTextColor(Qt::white), myOutlineColor(Qt::white), myShadowColor(Qt::white) { setFlag(QGraphicsItem::ItemClipsToShape, true); } void QZionTextPrivate::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { // we assume no one else has changed opacity int opacity = owner->effectiveColor().alpha(); if (opacity >= 255) { QGraphicsQZionTextItem::paint(painter, option, widget); } else { painter->setOpacity(opacity / (float) 255); QGraphicsQZionTextItem::paint(painter, option, widget); painter->setOpacity(1.0); } } void QZionTextPrivate::updateColors() { // alpha composition will be done later, in paint time QColor effectiveColor = QColor(owner->effectiveColor().rgb()); // Call low level QGraphicsZionTextItem setColor methods setTextColor(composeColorClass(myTextColor, effectiveColor)); setOutlineColor(composeColorClass(myOutlineColor, effectiveColor)); setShadowColor(composeColorClass(myShadowColor, effectiveColor)); } #endif qzion-mainline/src/qgraphicsview/qziontextblock.cpp000066400000000000000000000077331116615412200232500ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziontextblock.h" #include "qziontextblock_p.h" #include #include #include #include #include #include "qzionobject_p.h" QZionTextBlock::QZionTextBlock(QZionAbstractCanvas *canvas) : QZionObject(canvas) { QZINIT(QZionTextBlock, canvas); QZD(QZionTextBlock); QObject::connect(d->page(), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsChanged())); QObject::connect(d->page(), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsLoadFinished())); QObject::connect(d->page(), SIGNAL(loadProgress(int)), this, SIGNAL(contentsChanged())); } QZionTextBlock::QZionTextBlock(QZionAbstractCanvas *canvas, const QString &text) : QZionObject(canvas) { QZINIT(QZionTextBlock, canvas); QZD(QZionTextBlock); d->setText(text); QObject::connect(d->page(), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsChanged())); QObject::connect(d->page(), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsLoadFinished())); QObject::connect(d->page(), SIGNAL(loadProgress(int)), this, SIGNAL(contentsChanged())); } QZionTextBlock::~QZionTextBlock() { QZDELETE(QZionTextBlock); } QSize QZionTextBlock::size() const { QZD(QZionTextBlock); return d->size(); } void QZionTextBlock::setSize(const QSize &size) { QZD(QZionTextBlock); d->setSize(size); QZionObject::setSize(size); } int QZionTextBlock::preferredWidth() { QZD(QZionTextBlock); return d->preferredWidth; } void QZionTextBlock::setPreferredWidth(const int width) { QZD(QZionTextBlock); d->preferredWidth = width; // need to do this to get the correct height (webkit way) d->page()->setViewportSize(QSize(width, 1)); d->page()->setViewportSize(d->page()->mainFrame()->contentsSize()); } QSize QZionTextBlock::contentsSize() const { QZD(QZionTextBlock); return d->page()->mainFrame()->contentsSize() * d->scale(); } double QZionTextBlock::scale() { QZD(QZionTextBlock); return d->scale(); } void QZionTextBlock::setScale(double factor) { QZD(QZionTextBlock); d->setScale(factor); } QPixmap QZionTextBlock::toPixmap() { QZD(QZionTextBlock); QPixmap pixmap(d->page()->viewportSize()); pixmap.fill(); QPainter painter(&pixmap); d->page()->mainFrame()->render(&painter); return pixmap; } QImage QZionTextBlock::toImage() { QZD(QZionTextBlock); QImage image(d->page()->viewportSize(), QImage::Format_RGB32); // Fills white image.fill(0xFFFFFF); QPainter painter(&image); d->page()->mainFrame()->render(&painter); return image; } QString QZionTextBlock::text() const { QZD(QZionTextBlock); return d->text(); } QColor QZionTextBlock::color() const { return QColor(255, 255, 255, 0); } void QZionTextBlock::setColor(const QColor &color) { Q_UNUSED(color); } void QZionTextBlock::setText(const QString &text) { QZD(QZionTextBlock); d->setText(text); } QRect QZionTextBlock::rect() const { QZD(QZionTextBlock); return d->sceneBoundingRect().toRect().translated(pos()); } void QZionTextBlock::paint(QPainter* painter) { Q_UNUSED(painter); } qzion-mainline/src/qgraphicsview/qziontextblock_p.cpp000066400000000000000000000054421116615412200235620ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qziontextblock_p.h" QGraphicsQZionTextBlockItem::QGraphicsQZionTextBlockItem(QGraphicsItem *parent) : QAbstractGraphicsShapeItem(parent), _text(""), _scale(1.0) { setFlag(QGraphicsItem::ItemClipsToShape, true); QPalette palette; palette.setBrush(QPalette::Window, QBrush(QColor(255, 255, 255, 0))); _page.setPalette(palette); _page.mainFrame()->setHtml(_text); _page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); _page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); } QRectF QGraphicsQZionTextBlockItem::boundingRect() const { return QRectF(0, 0, _size.width(), _size.height()); } void QGraphicsQZionTextBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); // tests with zooming on webkit showed these flags // provide the best results (good image scaling and // no loss of details, specially underlined text) painter->setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing); painter->scale(_scale, _scale); _page.mainFrame()->render(painter); } QSize QGraphicsQZionTextBlockItem::size() const { return _size; } void QGraphicsQZionTextBlockItem::setSize(const QSize &size) { if (_size == size) return; prepareGeometryChange(); _size = size; if (preferredWidth) { update(); return; } _page.setViewportSize(QSize(size.width(), 1)); _page.setViewportSize(_page.mainFrame()->contentsSize()); update(); } double QGraphicsQZionTextBlockItem::scale() { return _scale; } void QGraphicsQZionTextBlockItem::setScale(double factor) { _scale = factor; } QString QGraphicsQZionTextBlockItem::text() const { return _text; } void QGraphicsQZionTextBlockItem::setText(const QString &text) { if (_text != text) { _text = text; _page.mainFrame()->setHtml(text); } } qzion-mainline/src/qgraphicsview/qziontextblock_p.h000066400000000000000000000050101116615412200232160ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONTEXTBLOCK_P_H__ #define __QZIONTEXTBLOCK_P_H__ #include #include #include #include #include "qziontextblock.h" #include "qzionrectangle.h" #include "qzioncommon.h" class QGraphicsQZionTextBlockItem : public QAbstractGraphicsShapeItem { public: QGraphicsQZionTextBlockItem(QGraphicsItem *parent = 0); QRectF boundingRect () const; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QString text() const; void setText(const QString &text); QSize size() const; void setSize(const QSize &size); double scale(); void setScale(double factor); QWebPage *page() { return &_page; }; int preferredWidth; private: QWebPage _page; QString _text; QSize _size; double _scale; }; class QZionTextBlockPrivate : public QGraphicsQZionTextBlockItem { public: QZionTextBlock *owner; QZionTextBlockPrivate(QGraphicsItem *parent = 0) : QGraphicsQZionTextBlockItem(parent) {}; virtual inline void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QGV_EFFECTIVE_SHAPE(QGraphicsQZionTextBlockItem); }; void QZionTextBlockPrivate::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { int opacity = owner->effectiveColor().alpha(); if (opacity >= 255) { QGraphicsQZionTextBlockItem::paint(painter, option, widget); } else { painter->setOpacity(opacity / (float) 255); QGraphicsQZionTextBlockItem::paint(painter, option, widget); painter->setOpacity(1.0); } } #endif qzion-mainline/src/qpainter/000077500000000000000000000000001116615412200164215ustar00rootroot00000000000000qzion-mainline/src/qpainter/CMakeLists.txt000066400000000000000000000001001116615412200211500ustar00rootroot00000000000000include(../common.cmake) create_qzion("" "qziontextblock_p.h") qzion-mainline/src/qpainter/qzionabstractcanvas.cpp000066400000000000000000000252601116615412200232120ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include "qzionabstractcanvas.h" #include "qzionobject_p.h" #include #include #include #include #include "qzionobject.h" #include "qzionabstractcanvas_p.h" QSet QZionAbstractCanvasPrivate::grabbedItems; QZionAbstractCanvas::QZionAbstractCanvas() { _QZionAbstractCanvas_data = new QZionAbstractCanvasPrivate(this); } QZionAbstractCanvas::~QZionAbstractCanvas() { delete _QZionAbstractCanvas_data; } QZionObject *QZionAbstractCanvas::itemAt(const QPoint &pt) const { QZD(QZionAbstractCanvas); for (int i = d->items.size() - 1; i >= 0; i--) { QZionObject *obj = d->items[i]; if (obj->visible() && obj->contains(pt)) return obj; } return NULL; } QList QZionAbstractCanvas::itemsAt(const QPoint &pt) const { QZD(QZionAbstractCanvas); QList retv; for (int i = d->items.size() - 1; i >= 0; i--) { QZionObject *obj = d->items[i]; if (obj->visible() && obj->contains(pt)) retv.append(obj); } return retv; } void QZionAbstractCanvas::setZValue(QZionObject *obj, int zValue) { QZD(QZionAbstractCanvas); if (zValue < 0) return; int obj_pos = d->items.indexOf(obj); if (obj_pos == zValue) return; d->items.removeAt(obj_pos); d->items.insert(zValue, obj); if (obj->visible()) d->updateAfterRestack(obj, obj_pos, zValue); } void QZionAbstractCanvas::raise(QZionObject *obj) { QZD(QZionAbstractCanvas); if (d->items.last() == obj) return; int obj_pos = d->items.indexOf(obj); d->items.removeAt(obj_pos); d->items.append(obj); if (obj->visible()) d->updateAfterRestack(obj, obj_pos, d->items.size() - 1); } void QZionAbstractCanvas::lower(QZionObject *obj) { QZD(QZionAbstractCanvas); if (d->items.first() == obj) return; int obj_pos = d->items.indexOf(obj); d->items.removeAt(obj_pos); d->items.prepend(obj); if (obj->visible()) d->updateAfterRestack(obj, obj_pos, 0); } void QZionAbstractCanvas::stackAbove(QZionObject *obj, QZionObject* ref) { QZD(QZionAbstractCanvas); int obj_pos = d->items.indexOf(obj); int ref_pos = d->items.indexOf(ref); if (obj_pos == -1 || ref_pos == -1) { qCritical("QZionAbstractCanvas::stackAbove: " "arguments must be of the same canvas.\n"); return; } if (obj_pos == ref_pos + 1) return; d->items.removeAt(obj_pos); if (obj_pos < ref_pos) d->items.insert(ref_pos, obj); else d->items.insert(ref_pos + 1, obj); if (obj->visible()) d->updateAfterRestack(obj, obj_pos, ref_pos + 1); } void QZionAbstractCanvas::stackBelow(QZionObject *obj, QZionObject* ref) { QZD(QZionAbstractCanvas); int obj_pos = d->items.indexOf(obj); int ref_pos = d->items.indexOf(ref); if (obj_pos == -1 || ref_pos == -1) { qCritical("QZionAbstractCanvas::stackBelow: " "arguments must be of the same canvas.\n"); return; } if (obj_pos == ref_pos - 1) return; d->items.removeAt(obj_pos); if (obj_pos < ref_pos) d->items.insert(ref_pos - 1, obj); else d->items.insert(ref_pos, obj); if (obj->visible()) d->updateAfterRestack(obj, obj_pos, ref_pos); } void QZionAbstractCanvas::addObject(QZionObject *obj) { QZionAbstractCanvas *prev_canvas = obj->canvas(); if (prev_canvas == this) return; if (prev_canvas) prev_canvas->removeObject(obj); QZD(QZionAbstractCanvas); d->items.append(obj); QZDP_VAR(obj, QZionObject, dobj); dobj->canvas = this; if (obj->visible()) obj->changed(); } void QZionAbstractCanvas::removeObject(QZionObject *obj) { if (obj->canvas() != this) return; if (obj->visible()) { QZionObjectPrivate *da = obj->_QZionObject_data; invalidate(da->lastRect, false); } QZD(QZionAbstractCanvas); d->items.removeAll(obj); QZDP_VAR(obj, QZionObject, dobj); if (d->grabbedItems.contains(obj)) d->grabbedItems.clear(); dobj->canvas = 0; } const QList *QZionAbstractCanvas::items() const { QZD(QZionAbstractCanvas); return &(d->items); } QZionObject *QZionAbstractCanvas::itemAt(const int x, const int y) const { return itemAt(QPoint(x,y)); } QList QZionAbstractCanvas::itemsAt(const int x, const int y) const { return itemsAt(QPoint(x,y)); } int QZionAbstractCanvas::canvasWidth() const { return 0; } int QZionAbstractCanvas::canvasHeight() const { return 0; } int QZionAbstractCanvas::zValue(QZionObject *obj) const { QZD(QZionAbstractCanvas); return d->items.indexOf(obj); } QPoint QZionAbstractCanvas::mapToLocal(const QPoint &pt) const { return pt; } void QZionAbstractCanvas::mouseEventHandler(QMouseEvent *e, memberMouseAction m_ma, mouseAction ma) { QZD(QZionAbstractCanvas); QPoint relativePoint = mapToLocal(e->pos()); QMouseEvent re = QMouseEvent(e->type(), relativePoint, e->pos(), e->button(), e->buttons(), e->modifiers()); QList::iterator it = d->items.end(); while (it != d->items.begin()) { --it; QZionObject *obj = *it; if (d->grabbedItems.isEmpty()) { if (!obj->mouseEvents() || !obj->visible() || !obj->contains(relativePoint)) continue; } else if (!d->grabbedItems.contains(obj)) { continue; } // Default for events is to be accepted. Handlers should explicitly // call event->ignore() to ignore them. re.setAccepted(true); (obj->*m_ma)(&re); if (re.isAccepted()) { if (m_ma == &QZionObject::mousePressEvent && e->buttons() == e->button()) d->grabbedItems.insert(obj); else if (m_ma == &QZionObject::mouseReleaseEvent && e->buttons() == Qt::NoButton) d->grabbedItems.remove(obj); // Calls the shorthand function of group for this event. // This is an easy way to a subclass of QZionGroup to // track its children events. (this->*ma)(obj, &re); return; } } // If no child handled the event, we just ignore it. e->ignore(); } void QZionAbstractCanvas::mouseMoveEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mouseMoveEvent, &QZionAbstractCanvas::mouseObjectMoveEvent); } void QZionAbstractCanvas::mousePressEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mousePressEvent, &QZionAbstractCanvas::mouseObjectPressEvent); } void QZionAbstractCanvas::mouseReleaseEvent(QMouseEvent *e) { mouseEventHandler(e, &QZionObject::mouseReleaseEvent, &QZionAbstractCanvas::mouseObjectReleaseEvent); } /* Maybe we can unify all event handlers in the future, as this method has some code in common with mouseEventHandler() */ void QZionAbstractCanvas::wheelEvent(QWheelEvent *e) { QZD(QZionAbstractCanvas); QPoint relativePoint = mapToLocal(e->pos()); QWheelEvent re = QWheelEvent(relativePoint, e->pos(), e->delta(), e->buttons(), e->modifiers(), e->orientation()); QList::iterator it = d->items.end(); while (it != d->items.begin()) { --it; QZionObject *obj = *it; // XXX: to Edje, wheel is a mouse event, so we check it here if (!obj->mouseEvents() || !obj->visible() || !obj->contains(relativePoint)) continue; // Default for events is to be accepted. Handlers should explicitly // call event->ignore() to ignore them. re.setAccepted(true); obj->wheelEvent(&re); if (re.isAccepted()) { // Calls the shorthand function of group for this event. // This is an easy way to a subclass of QZionGroup to // track its children events. wheelObjectEvent(obj, &re); return; } } // If no child handled the event, we just ignore it. e->ignore(); } qzion-mainline/src/qpainter/qzionabstractcanvas_p.h000066400000000000000000000037001116615412200231710ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONABSTRACTCANVAS_P_H__ #define __QZIONABSTRACTCANVAS_P_H__ #include #include "qzionobject.h" #include "qzionabstractcanvas.h" class QZionAbstractCanvasPrivate { public: QList items; // This set contains all objects that have grabbed the mouse. // Currently this is a static variable for all canvas. static QSet grabbedItems; QZionAbstractCanvas *owner; QZionAbstractCanvasPrivate(QZionAbstractCanvas *owner) : owner(owner) {}; virtual ~QZionAbstractCanvasPrivate() {}; inline void updateAfterRestack(QZionObject *obj, int from, int to); }; inline void QZionAbstractCanvasPrivate::updateAfterRestack(QZionObject *obj, int from, int to) { from = qMin(from, to); to = qMax(from, to); QRegion toUpdate; QRect obj_rect = obj->rect(); for (int i = from; i <= to; ++i) { QZionObject *other = items.at(i); if (!other->visible()) continue; QRect r = other->rect() & obj_rect; if (!r.isEmpty()) toUpdate |= r; } if (!toUpdate.isEmpty()) owner->invalidate(toUpdate); } #endif qzion-mainline/src/qpainter/qzioncanvas.cpp000066400000000000000000000162741116615412200214730ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include #include #include #include #include #include #include "qzioncanvas.h" #include "qzionabstractcanvas.h" #include "qzionabstractcanvas_p.h" /*! \class QZionCanvasPrivate \brief Private class for QZionCanvas. */ class QZionCanvasPrivate : public QWidget { Q_DECLARE_PUBLIC(QZionCanvas) public: QZionCanvasPrivate(QWidget *parent = 0); bool pendingUpdate; QRegion pendingUpdateRegion; #ifdef QZION_DEBUG_DIRTY bool debugPaints; #endif QZionCanvas *q_ptr; protected: virtual void resizeEvent(QResizeEvent *event); virtual void mouseMoveEvent(QMouseEvent *e); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseReleaseEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent *event); virtual void paintEvent(QPaintEvent *event); virtual void keyPressEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event); }; QZionCanvasPrivate::QZionCanvasPrivate(QWidget *parent) : QWidget(parent) { setMouseTracking(true); setAttribute(Qt::WA_NoSystemBackground, true); } void QZionCanvasPrivate::resizeEvent(QResizeEvent *event) { QWidget::resizeEvent(event); QZionAbstractCanvasPrivate *da = q_ptr->_QZionAbstractCanvas_data; foreach (QZionObject *obj, da->items) { obj->canvasResizeEvent(event); } } void QZionCanvasPrivate::keyPressEvent(QKeyEvent *event) { q_ptr->keyPressEvent(event); } void QZionCanvasPrivate::keyReleaseEvent(QKeyEvent *event) { q_ptr->keyReleaseEvent(event); } /*! Repass QWidget event to QZion event structure. */ void QZionCanvasPrivate::mouseMoveEvent(QMouseEvent *e) { q_ptr->mouseMoveEvent(e); } /*! Repass QWidget event to QZion event structure. */ void QZionCanvasPrivate::mousePressEvent(QMouseEvent *e) { q_ptr->mousePressEvent(e); } /*! Repass QWidget event to QZion event structure. */ void QZionCanvasPrivate::mouseReleaseEvent(QMouseEvent *e) { q_ptr->mouseReleaseEvent(e); } void QZionCanvasPrivate::wheelEvent(QWheelEvent *event) { q_ptr->wheelEvent(event); } void QZionCanvasPrivate::paintEvent(QPaintEvent *event) { #ifdef QZION_DEBUG_DIRTY if (debugPaints) { QPainter p(this); p.fillRect(event->rect(), Qt::magenta); return; } #endif QPainter p(this); #ifndef QZION_LOW_QUALITY p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); #endif QRect eventRect = event->rect(); QRegion eventRegion = event->region(); QZionAbstractCanvasPrivate *da = q_ptr->_QZionAbstractCanvas_data; foreach (QZionObject *obj, da->items) { QRect objRect = obj->rect(); if (obj->visible() && eventRect.intersects(objRect) && eventRegion.contains(objRect)) { obj->paintInternal(&p, eventRect, eventRegion, QPoint(), 1.0); } } q_ptr->paintEvent(event); } QZionCanvas::QZionCanvas(QWidget *parent) : QObject(), _QZionCanvas_data(new QZionCanvasPrivate(parent)) { QZD(QZionCanvas); d->q_ptr = this; d->pendingUpdate = false; } QZionCanvas::~QZionCanvas() { QZD(QZionCanvas); QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { delete obj; } delete d; } void QZionCanvas::ensurePendingUpdate() { QZD(QZionCanvas); if (!d->pendingUpdate) { d->pendingUpdate = true; QTimer::singleShot(0, this, SLOT(updateChanges())); } } void QZionCanvas::updateChanges() { QZD(QZionCanvas); QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { if (obj->_changed) obj->updateChanges(); } d->pendingUpdate = false; if (d->pendingUpdateRegion.isEmpty()) return; #ifdef QZION_DEBUG_DIRTY d->repaint(); d->debugPaints = true; d->repaint(d->pendingUpdateRegion); QApplication::syncX(); d->debugPaints = false; usleep(100000); d->repaint(d->pendingUpdateRegion); QApplication::syncX(); usleep(100000); #else d->update(d->pendingUpdateRegion); #endif emit updated(d->pendingUpdateRegion); d->pendingUpdateRegion = QRegion(); } void QZionCanvas::invalidate(const QRect &r, bool /*translate*/) { QZD(QZionCanvas); d->pendingUpdateRegion |= r; ensurePendingUpdate(); } void QZionCanvas::invalidate(const QRegion &r, bool /*translate*/) { QZD(QZionCanvas); d->pendingUpdateRegion |= r; ensurePendingUpdate(); } QSize QZionCanvas::size() const { QZD(QZionCanvas); return d->size(); } void QZionCanvas::setSize(const QSize &size) { QZD(QZionCanvas); d->resize(size); } QWidget *QZionCanvas::widget() { return _QZionCanvas_data; } void QZionCanvas::keyPressEvent(QKeyEvent *) { } void QZionCanvas::keyReleaseEvent(QKeyEvent *) { } void QZionCanvas::paintEvent(QPaintEvent *) { } qzion-mainline/src/qpainter/qzionclippedgroup.cpp000066400000000000000000000035141116615412200227060ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include #include #include #include #include "qzionclippedgroup.h" #include "qzionobject_p.h" QZionClippedGroup::QZionClippedGroup(QZionAbstractCanvas *canvas) : QZionGroup(canvas) { } QZionClippedGroup::~QZionClippedGroup() { } QRect QZionClippedGroup::rect() const { QZionObjectPrivate *d_obj = _QZionObject_data; return QRect(d_obj->pos.x(), d_obj->pos.y(), _size.width(), _size.height()); } /*! TODO */ void QZionClippedGroup::paintInternal(QPainter *p, const QRect &prect, const QRegion &preg, const QPoint &delta, double cumulative_opacity) { p->save(); // clip to bounding rect if (p->clipRegion().isEmpty()) p->setClipRect(this->rect()); else p->setClipRect(this->rect(), Qt::IntersectClip); if (!p->clipRegion().isEmpty()) QZionGroup::paintInternal(p, prect, preg, delta, cumulative_opacity); p->restore(); } void QZionClippedGroup::setClipper(QZionRectangle *rect) { QZionGroup::setClipper(rect); } qzion-mainline/src/qpainter/qzioncommon.h000066400000000000000000000017661116615412200211550ustar00rootroot00000000000000#ifndef __QZIONCOMMON_H__ #define __QZIONCOMMON_H__ #include #include /*! \internal Composes two colors and returns the final color. */ static inline QColor composeColorClass(QColor cc, QColor cn) { int cc_r, cc_g, cc_b, cc_a; int cn_r, cn_g, cn_b, cn_a; cc.getRgb(&cc_r, &cc_g, &cc_b, &cc_a); cn.getRgb(&cn_r, &cn_g, &cn_b, &cn_a); int r = ((cc_r + 1) * cn_r) >> 8; int g = ((cc_g + 1) * cn_g) >> 8; int b = ((cc_b + 1) * cn_b) >> 8; int a = ((cc_a + 1) * cn_a) >> 8; return QColor(r, g, b, a); } #define QZINIT(class_name, cv) { \ _##class_name##_data = new class_name##Private(0); \ _QZionObject_data->item = this->_##class_name##_data; \ _##class_name##_data->owner = this; \ if (cv) cv->addObject(this); \ } #define QZDELETE(class_name) delete this->_##class_name##_data; #endif qzion-mainline/src/qpainter/qzioncustomobject.cpp000066400000000000000000000020521116615412200227060ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzioncustomobject.h" QZionCustomObject::QZionCustomObject(QZionAbstractCanvas *canvas) : QZionObject(canvas) { } QZionCustomObject::~QZionCustomObject() { } QSize QZionCustomObject::size() const { return QSize(); } void QZionCustomObject::setSize(const QSize & /*size*/) { } qzion-mainline/src/qpainter/qziongroup.cpp000066400000000000000000000152051116615412200213450ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include #include #include #include #include "qziongroup.h" #include "qzionobject_p.h" #include "qzionrectangle.h" #include "qzionabstractcanvas_p.h" QZionGroup::QZionGroup(QZionAbstractCanvas *canvas) : QZionObject(canvas), QZionAbstractCanvas(), _childRectChanged(true) { } QZionGroup::~QZionGroup() { QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { delete obj; } } void QZionGroup::ensurePendingUpdate() { if(!_changed || !_childRectChanged) { _childRectChanged = true; QZionObject::changed(); } } void QZionGroup::updateChanges() { if(!_changed) return; QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { if (obj->_changed) obj->updateChanges(); } _changed = false; } void QZionGroup::changed() { QZionObject::changed(); QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) obj->changed(); } void QZionGroup::invalidate(const QRect &r, bool translate) { QZD(QZionObject); if(d->canvas) d->canvas->invalidate(translate ? r.translated(pos()) : r, translate); if(!_changed) ensurePendingUpdate(); } void QZionGroup::invalidate(const QRegion &r, bool translate) { QZD(QZionObject); if(d->canvas) d->canvas->invalidate(translate ? r.translated(pos()) : r, translate); if(!_changed) ensurePendingUpdate(); } void QZionGroup::paintInternal(QPainter *p, const QRect &prect, const QRegion &preg, const QPoint &delta, double cumulativeOpacity) { QZD(QZionObject); cumulativeOpacity *= (d->opacity / 255.0); p->save(); QPoint adelta = delta + pos(); QRegion clipRegion = p->clipRegion(); if (d->clipper != NULL) { QRect effectiveClipper = d->clipper->effectiveRect(); int effectiveOpacity = d->clipper->effectiveColor().alpha(); if (p->clipRegion().boundingRect().isNull()) p->setClipRect(effectiveClipper); else p->setClipRegion(p->clipRegion() & effectiveClipper); cumulativeOpacity *= (effectiveOpacity / 255.0); } p->translate(pos()); QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { QRect r = obj->rect().translated(adelta); if (obj->visible() && prect.intersects(r) && preg.contains(r)) { obj->paintInternal(p, prect, preg, adelta, cumulativeOpacity); } } p->restore(); } void QZionGroup::paint(QPainter *p) { paintInternal(p, rect(), QRegion(rect()), QPoint(), 1.0); } QRect QZionGroup::rect() const { if(!_childRectChanged) return _lastChildRect.translated(pos()); _childRectChanged = false; _lastChildRect = QRect(); QZDP(QZionAbstractCanvas, da); foreach (QZionObject *obj, da->items) { if (obj->visible()) _lastChildRect |= obj->rect(); } return _lastChildRect.translated(pos()); } int QZionGroup::canvasWidth() const { QZD(QZionObject); return d->canvas ? d->canvas->canvasWidth() : 0; } int QZionGroup::canvasHeight() const { QZD(QZionObject); return d->canvas ? d->canvas->canvasHeight() : 0; } void QZionGroup::setColor(const QColor &color) { _QZionObject_data->opacity = color.alpha(); } QSize QZionGroup::size() const { return _size; } void QZionGroup::setSize(const QSize &size) { QZionObject::setSize(size); _size = size; } void QZionGroup::setClipper(QZionRectangle *rect) { QZionObject::setClipper(rect); } QColor QZionGroup::effectiveColor() { QZionObject::effectiveColor(); } QPoint QZionGroup::mapToLocal(const QPoint &pt) const { return pt - pos(); } void QZionGroup::mouseMoveEvent(QMouseEvent *e) { QZionAbstractCanvas::mouseMoveEvent(e); } void QZionGroup::mousePressEvent(QMouseEvent *e) { QZionAbstractCanvas::mousePressEvent(e); } void QZionGroup::mouseReleaseEvent(QMouseEvent *e) { QZionAbstractCanvas::mouseReleaseEvent(e); } void QZionGroup::wheelEvent(QWheelEvent *e) { QZionAbstractCanvas::wheelEvent(e); } bool QZionGroup::contains(const QPoint &point) const { // XXX: need to support testAttribute(HandleOutOfBoundsEvents) return QZionObject::contains(point); } qzion-mainline/src/qpainter/qzionimage.cpp000066400000000000000000000242531116615412200212760ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include #include #include #include #include #include "qzionimage.h" #include "qzionobject_p.h" static int MAX_CACHE_SIZE = 4096; // 4 mb QZionTiledPixmap::QZionTiledPixmap(const QPixmap pixmap, QZionImageBorder border) : _is_null(false) { this->border = border; QRect rect; for(int i = 0; i < 9; i++) { rect = tileRectAtSize( (qzTilePosition) i, pixmap.size()); if (rect.width() == 0 && rect.height() == 0) tiles[i] = QPixmap(); else tiles[i] = pixmap.copy(rect); } } QRect QZionTiledPixmap::tileRectAtSize(const qzTilePosition num, QSize size) { // Positioning of each tile // TILE: POINT SIZE // NW: (0, 0) (left, top) // N: (left, 0) (width - left - right, top) // NE: (width - right, 0) (right, top) // W: (0, top) (left, height - top - bottom) // C: (left, top) (width - left - right, height - top - bottom ) // E: (width - right, top) (right, height - top - bottom) // SW: (0, height - bottom) (left, bottom) // S: (left, height - bottom) (width - left - right, bottom) // SE: (widht - right, height - bottom) (right, bottom) int w = size.width(); int h = size.height(); int tw, th, tx, ty; tw = th = tx = ty = 0; switch(num) { case NORTH_WEST: tx = 0; ty = 0; tw = border.left; th = border.top; break; case NORTH: tx = border.left; ty = 0; tw = w - border.left - border.right; th = border.top; break; case NORTH_EAST: tx = w - border.right; ty = 0; tw = border.right; th = border.top; break; case WEST: tx = 0; ty = border.top; tw = border.left; th = h - border.top - border.bottom; break; case MIDDLE: tx = border.left; ty = border.top; tw = w - border.left - border.right; th = h - border.top - border.bottom; break; case EAST: tx = w - border.right; ty = border.top; tw = border.right; th = h - border.top - border.bottom; break; case SOUTH_WEST: tx = 0; ty = h - border.bottom; tw = border.left; th = border.bottom; break; case SOUTH: tx = border.left; ty = h - border.bottom; tw = w - border.left - border.right; th = border.bottom; break; case SOUTH_EAST: tx = w - border.right; ty = h - border.bottom; tw = border.right; th = border.bottom; break; } return QRect(tx, ty, tw, th); } class QZionImagePrivate { public: QSize size; QPixmap pixmap; QZionImageBorder border; QZionTiledPixmap tiledPixmap; }; QZionImage::QZionImage(QZionAbstractCanvas *canvas) : QZionObject(canvas), _QZionImage_data(new QZionImagePrivate) { QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QString &filepath) : QZionObject(canvas), _QZionImage_data(new QZionImagePrivate) { QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); load(filepath); QZD(QZionImage); setSize(d->pixmap.size()); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QPixmap &pixmap) : QZionObject(canvas), _QZionImage_data(new QZionImagePrivate) { QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); setPixmap(pixmap); setSize(pixmap.size()); } QZionImage::QZionImage(QZionAbstractCanvas *canvas, const QImage &image) : QZionObject(canvas), _QZionImage_data(new QZionImagePrivate) { QPixmapCache::setCacheLimit(MAX_CACHE_SIZE); QPixmap pixmap = QPixmap::fromImage(image); setPixmap(pixmap); setSize(pixmap.size()); } QZionImage::~QZionImage() { delete _QZionImage_data; } QPixmap QZionImage::pixmap() const { QZD(QZionImage); return d->pixmap; } bool QZionImage::load(const QString &filename) { if (_filepath == filename) return true; _filepath = filename; QPixmap result; if (QPixmapCache::find(filename, result)) { setPixmap(result); return true; } if (!result.load(filename)) { clear(); return false; } QPixmapCache::insert(filename, result); setPixmap(result); return true; } bool QZionImage::reload() { QZD(QZionImage); if (d->pixmap.isNull()) return true; QPixmap result; if (!result.load(_filepath)) { clear(); return false; } QPixmapCache::insert(_filepath, result); setPixmap(result); return true; } void QZionImage::setPixmap(const QPixmap &p) { QZD(QZionImage); d->tiledPixmap = QZionTiledPixmap(); d->pixmap = p; if (visible() && canvas()) changed(); } void QZionImage::clear() { setPixmap(QPixmap()); } QSize QZionImage::size() const { QZD(QZionImage); return d->size; } void QZionImage::setSize(const QSize &size) { QZD(QZionImage); d->size = size; QZionObject::setSize(size); } void QZionImage::setBorder(const int left, const int right, const int top, const int bottom) { QZD(QZionImage); if (border().left == left && border().right == right && border().top == top && border().bottom == bottom) { return; } if (left | right | top | bottom) { d->border = QZionImageBorder(left, right, top, bottom); d->tiledPixmap = QZionTiledPixmap(d->pixmap, d->border); } else { d->border = QZionImageBorder(); d->tiledPixmap = QZionTiledPixmap(); } if (visible() && canvas()) changed(); } void QZionImage::setBorder(QZionImageBorder border) { setBorder(border.left, border.right, border.top, border.bottom); } QZionImageBorder QZionImage::border() { QZD(QZionImage); return d->border; } void QZionImage::paint(QPainter *p) { QZD(QZionImage); if (d->pixmap.isNull()) return; if (!d->tiledPixmap.isNull()) { QPixmap tile; QRect rect; for(int i = 0; i < 9; i++) { tile = d->tiledPixmap.tile((QZionTiledPixmap::qzTilePosition) i); if (tile.isNull()) continue; p->save(); rect = d->tiledPixmap.tileRectAtSize( (QZionTiledPixmap::qzTilePosition) i, size()); // QPainter needs to stay in the exactly position // to draw an scaled pixmap correctly. Otherwise // it will scale the offset position too, and this // behavior is not wanted QPoint newPoint = pos() + rect.topLeft(); p->translate(pos() + rect.topLeft()); p->scale((double) rect.width() / tile.width(), (double) rect.height() / tile.height()); p->drawPixmap(QPoint(0, 0), tile); p->restore(); } return; } if (d->size == d->pixmap.size()) { p->drawPixmap(pos(), d->pixmap); return; } p->translate(pos()); p->scale((double)d->size.width() / d->pixmap.size().width(), (double)d->size.height() / d->pixmap.size().height()); p->drawPixmap(QPoint(0, 0), d->pixmap); p->scale(1, 1); p->translate(-pos()); } QRect QZionImage::rect() const { return QRect(pos(), size()); } QColor QZionImage::color() const { return QColor(255, 255, 255); } void QZionImage::setColor(const QColor &color) { setOpacity(color.alpha()); } void QZionImage::changed() { QZionObject::changed(); } qzion-mainline/src/qpainter/qzionobject.cpp000066400000000000000000000230031116615412200214520ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include "qzionobject.h" #include "qzionobject_p.h" #include #include #include #include #include "qzionrectangle.h" #include "qzionabstractcanvas.h" #include "qzioncommon.h" QZionObjectPrivate::QZionObjectPrivate() : pos(QPoint(0,0)), opacity(255), visible(false), attributes(0), mouseEvents(true), clipper(NULL), canvas(NULL) { } QZionObject::QZionObject(QZionAbstractCanvas *canvas) : QObject(), _QZionObject_data(new QZionObjectPrivate), _changed(false) { if (canvas) canvas->addObject(this); } QZionObject::~QZionObject() { QZD(QZionObject); setClipper(NULL); if (d->canvas) d->canvas->removeObject(this); delete d; } void QZionObject::setPos(const QPoint &newpos) { QZD(QZionObject); if (d->pos != newpos) { d->pos = newpos; if (d->visible && d->canvas) changed(); } } int QZionObject::opacity() const { return _QZionObject_data->opacity; } void QZionObject::setOpacity(const int value) { QZD(QZionObject); if (value == d->opacity) return; d->opacity = (value < 0) ? 0 : (value > 255) ? 255 : value; if (d->canvas && d->visible) changed(); } void QZionObject::setVisible(const bool value) { QZD(QZionObject); if (d->visible == value) return; d->visible = value; if (d->canvas) changed(); } bool QZionObject::mouseEvents() const { return _QZionObject_data->mouseEvents; } void QZionObject::setMouseEvents(const bool value) { _QZionObject_data->mouseEvents = value; } int QZionObject::zValue() const { QZD(QZionObject); if (d->canvas) return d->canvas->items()->indexOf(const_cast(this)); else return -1; } void QZionObject::setZValue(const int zValue) { QZD(QZionObject); if (d->canvas) d->canvas->setZValue(this, zValue); } void QZionObject::raise() { QZD(QZionObject); if (d->canvas) d->canvas->raise(this); } void QZionObject::lower() { QZD(QZionObject); if (d->canvas) d->canvas->lower(this); } void QZionObject::changed() { QZD(QZionObject); _changed = true; if (d->canvas) d->canvas->ensurePendingUpdate(); } QZionRectangle *QZionObject::clipper() const { return _QZionObject_data->clipper; } void QZionObject::setClipper(QZionRectangle *rect) { QZD(QZionObject); // There's no need to change clipper. if (d->clipper == rect) return; // Had an old clipper? Remove it. if (d->clipper) { d->clipper->removeClippee(this); d->clipper->decClipperRef(); d->clipper = NULL; } // Has a new one? Add it. if (rect) { d->clipper = rect; d->clipper->addClippee(this); d->clipper->incClipperRef(); } // Reflect changes if (d->canvas) changed(); } void QZionObject::updateChanges() { QZD(QZionObject); if (!_changed) return; if (d->canvas) { d->canvas->invalidate(d->lastRect, false); if(d->visible) d->canvas->invalidate(rect()); } _changed = false; } QPixmap *QZionObjectPrivate::transparencePixmapCache = NULL; QPixmap* QZionObjectPrivate::transparenceCache(const QSize &s) { if (!transparencePixmapCache) transparencePixmapCache = new QPixmap(); if (s.width() > transparencePixmapCache->width() || s.height() > transparencePixmapCache->height()) { /* Strange that a pixmap with alpha should be created this way, I think a qt bug */ *transparencePixmapCache = QPixmap::fromImage(QImage(s.expandedTo(transparencePixmapCache->size()), QImage::Format_ARGB32)); } return transparencePixmapCache; } void QZionObject::paintInternal(QPainter* pp, const QRect& /*prect*/, const QRegion& /* preg */, const QPoint& delta, double cumulativeOpacity) { QZD(QZionObject); d->lastRect = QRect(); if (d->clipper != NULL) { int effectiveOpacity = d->clipper->effectiveColor().alpha(); cumulativeOpacity *= (effectiveOpacity / 255.0); } int opacity = int(cumulativeOpacity * d->opacity + 0.5); if (opacity <= 0) { return; } pp->save(); d->lastRect = rect().translated(delta); if (d->clipper != NULL) { QRect effectiveClipper = d->clipper->effectiveRect(); if (pp->clipRegion().boundingRect().isNull()) pp->setClipRect(effectiveClipper); else pp->setClipRegion(pp->clipRegion() & effectiveClipper); d->lastRect &= effectiveClipper.translated(delta); } if (opacity >= 255) { paint(pp); } else if (!layered()) { pp->setOpacity(opacity / 255.0); paint(pp); pp->setOpacity(1.0); } else { QRect mr = rect(); QPixmap* cache = d->transparenceCache(mr.size()); QPainter p(cache); /* clear */ p.setBrush(QColor(255, 255, 255, 0)); p.setPen(Qt::NoPen); p.setCompositionMode(QPainter::CompositionMode_Source); p.drawRect(QRect(QPoint(), mr.size())); /* paint on the item */ p.translate(-mr.topLeft()); paint(&p); p.translate(mr.topLeft()); /* make the opacity */ p.setBrush(QColor(255, 255, 255, 255 - opacity)); p.setPen(Qt::NoPen); p.setCompositionMode(QPainter::CompositionMode_DestinationOut); p.drawRect(QRect(QPoint(), mr.size())); pp->drawPixmap(mr.topLeft(), *cache, QRect(QPoint(), mr.size())); } pp->restore(); } QZionAbstractCanvas *QZionObject::canvas() const { QZD(QZionObject); return d->canvas; } void QZionObject::stackAbove(QZionObject *ref) { QZD(QZionObject); if (d->canvas) d->canvas->stackAbove(this, ref); } void QZionObject::stackBelow(QZionObject *ref) { QZD(QZionObject); if (d->canvas) d->canvas->stackBelow(this, ref); } bool QZionObject::testAttribute(const Attributes attribute) const { QZD(QZionObject); return (bool)(d->attributes & (1 << attribute)); } void QZionObject::setAttribute(const Attributes attribute, const bool on) { QZD(QZionObject); if (on) d->attributes |= (1 << attribute); else d->attributes &= ~(1 << attribute); } void QZionObject::setSize(const QSize &size) { if (testAttribute(EmitSizeChanges)) emit sizeChanged(size); } bool QZionObject::visible() const { return _QZionObject_data->visible; } QPoint QZionObject::pos() const { return _QZionObject_data->pos; } QColor QZionObject::effectiveColor() const { QColor result; result = color(); result.setAlpha(opacity()); QZionRectangle *clip = clipper(); if (clip) result = composeColorClass(result, clip->effectiveColor()); return result; } QRect QZionObject::effectiveRect() const { QRect result = rect(); QZionRectangle *clip = clipper(); if (clip) result &= clip->effectiveRect(); return result; } bool QZionObject::contains(const QPoint &point) const { return effectiveRect().contains(point); } qzion-mainline/src/qpainter/qzionobject_p.h000066400000000000000000000025531116615412200214450ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * *********************************************************** * THIS IS NOT A PUBLIC HEADER AND SHOULD NOT BE INSTALLED * *********************************************************** */ #ifndef __QZIONOBJECT_P_H__ #define __QZIONOBJECT_P_H__ #include "qzionrectangle.h" class QZionObjectPrivate { public: QZionObjectPrivate(); QPoint pos; int opacity; bool visible; QRect lastRect; int attributes; bool mouseEvents; QZionRectangle *clipper; QZionAbstractCanvas *canvas; static QPixmap *transparencePixmapCache; static QPixmap *transparenceCache(const QSize &s); }; #endif qzion-mainline/src/qpainter/qzionrectangle.cpp000066400000000000000000000140601116615412200221530ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include #include #include #include #include "qzionrectangle.h" #include "qzionobject_p.h" class QZionRectanglePrivate { public: QZionRectangle *owner; QSet clipees; QRect effectiveRect; QColor effectiveColor; bool rectDirty; bool colorDirty; QSize size; QColor color; QZionRectanglePrivate(const QSize &s, const QColor &c); void updateEffectiveRect(); void updateEffectiveColor(); void updateChildren(); friend class QZionRectangle; }; QZionRectanglePrivate::QZionRectanglePrivate(const QSize &s, const QColor &c) : size(s), color(c) { } QZionRectangle::QZionRectangle(QZionAbstractCanvas *canvas) : QZionObject(canvas), _clipReferences(0) { _QZionRectangle_data = new QZionRectanglePrivate(QSize(50, 50), Qt::white); _QZionRectangle_data->owner = this; } QZionRectangle::QZionRectangle(QZionAbstractCanvas *canvas, const QColor &color, const QSize &size) : QZionObject(canvas), _clipReferences(0) { _QZionRectangle_data = new QZionRectanglePrivate(size, color); _QZionRectangle_data->owner = this; } QZionRectangle::~QZionRectangle() { QZD(QZionRectangle); // Update clipees foreach (QZionObject *clipee, d->clipees) clipee->setClipper(NULL); delete _QZionRectangle_data; _QZionRectangle_data = 0; } QColor QZionRectangle::color() const { QZD(QZionRectangle); return d->color; } void QZionRectangle::setColor(const QColor &color) { QZD(QZionRectangle); _QZionObject_data->opacity = color.alpha(); d->color.setRgb(color.rgb()); if (visible() && canvas()) changed(); } QSize QZionRectangle::size() const { QZD(QZionRectangle); return d->size; } void QZionRectangle::setSize(const QSize &size) { QZD(QZionRectangle); QZionObject::setSize(size); d->size = size; if (visible() && canvas()) changed(); } void QZionRectangle::paint(QPainter *p) { QZD(QZionRectangle); // only paint if it's not a clipper if (_clipReferences == 0) p->fillRect(rect(), d->color); } QRect QZionRectangle::rect() const { QZD(QZionRectangle); return QRect(pos(), d->size); } void QZionRectangle::addClippee(QZionObject* clippee) { QZD(QZionRectangle); /* Rect became a clipper itself */ if (d->clipees.isEmpty()) changed(); d->clipees.insert(clippee); } void QZionRectangle::removeClippee(QZionObject* clippee) { QZD(QZionRectangle); d->clipees.remove(clippee); /* Rect used to be a clipper */ if (d->clipees.isEmpty()) changed(); } QColor QZionRectangle::effectiveColor() const { QZD(QZionRectangle); if (d->colorDirty) return QZionObject::effectiveColor(); else return d->effectiveColor; } QRect QZionRectangle::effectiveRect() const { QZD(QZionRectangle); if (d->rectDirty) return QZionObject::effectiveRect(); else return d->effectiveRect; } void QZionRectangle::changed() { QZD(QZionRectangle); d->updateEffectiveRect(); d->updateEffectiveColor(); if (_clipReferences) d->updateChildren(); QZionObject::changed(); } inline void QZionRectanglePrivate::updateEffectiveRect() { rectDirty = true; effectiveRect = owner->effectiveRect(); rectDirty = false; } inline void QZionRectanglePrivate::updateEffectiveColor() { colorDirty = true; effectiveColor = owner->effectiveColor(); colorDirty = false; } inline void QZionRectanglePrivate::updateChildren() { foreach(QZionObject* clippee, clipees) { clippee->setClipper(owner); clippee->changed(); } } qzion-mainline/src/qpainter/qziontext.cpp000066400000000000000000000155571116615412200212070ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright 2006 Maurizio Monge * * BSD License * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Attention: note that even being named "BSD License" by the * copyright holder, the license above is a variation of the license * known as BSD License. This variation is compatible with GNU GPL. */ #include #include #include #include #include #include "qziontext.h" #include "qziontext_p.h" #include "qzionmacros.h" #include "qzionobject_p.h" QZionText::QZionText(QZionAbstractCanvas *canvas, const QString &text, const QFont &font, const QColor &color) : QZionObject(canvas), _QZionText_data(new QZionTextPrivate(text, font, color)) { _QZionText_data->owner = this; } QZionText::QZionText(QZionAbstractCanvas *canvas) : QZionObject(canvas), _QZionText_data(new QZionTextPrivate("")) { _QZionText_data->owner = this; } QZionText::~QZionText() { delete _QZionText_data; } QSize QZionText::size() const { QZD(QZionText); return d->size; } void QZionText::setSize(const QSize &size) { QZD(QZionText); QZionObject::setSize(size); d->size = size; d->refresh(); } QZionText::TextStyle QZionText::style() const { QZD(QZionText); return d->style; } void QZionText::setStyle(const QZionText::TextStyle style) { QZD(QZionText); if (d->style != style) { d->style = style; d->refresh(true); } } QString QZionText::text() const { QZD(QZionText); return d->text; } void QZionText::setText(const QString &text) { QZD(QZionText); if (d->text != text) { d->text = text; d->refresh(true); } } QColor QZionText::color() const { QZD(QZionText); return d->color; } void QZionText::setColor(const QColor &color) { QZD(QZionText); setOpacity(color.alpha()); d->color.setRgb(color.rgb()); d->refresh(); } QColor QZionText::textColor() const { // XXX: match QGV's behavior return color(); } void QZionText::setTextColor(const QColor &color) { // XXX: match QGV's behavior setColor(color); } QColor QZionText::outlineColor() const { QZD(QZionText); return d->color2; } void QZionText::setOutlineColor(const QColor &color) { QZD(QZionText); d->color2.setRgb(color.rgb()); d->refresh(); } QColor QZionText::shadowColor() const { QZD(QZionText); return d->color3; } void QZionText::setShadowColor(const QColor &color) { QZD(QZionText); d->color3.setRgb(color.rgb()); d->refresh(); } QFont QZionText::font() const { QZD(QZionText); return d->font; } void QZionText::setFont(const QFont &font) { QZD(QZionText); d->font = font; d->refresh(true); } QPointF QZionText::alignment() const { QZD(QZionText); return d->alignment; } void QZionText::setAlignment(const QPointF &alignment) { QZD(QZionText); d->alignment = alignment; d->refresh(); } QRect QZionText::rect() const { QZD(QZionText); return d->realBoundingRect(); } void QZionText::paint(QPainter *painter) { QZD(QZionText); painter->setPen(d->color); painter->setFont(d->font); QRect tileRect = d->realBoundingRect(); int flags = Qt::TextSingleLine | Qt::AlignLeft; QString text; if (tileRect.width() == d->size.width()) { text = QFontMetricsF(d->font).elidedText(d->text, Qt::ElideRight, tileRect.width()); } else { text = d->text; } switch (d->style) { case NoStyle: painter->drawText(tileRect, flags, text); break; case OutLine: { int width = 1; QPainterPath path; QFont outlineFont = QFont(d->font); outlineFont.setStyleStrategy(QFont::ForceOutline); QPointF basepoint = tileRect.bottomLeft(); basepoint.setY(basepoint.y() - width - QFontMetrics(outlineFont).descent()); path.addText(basepoint, outlineFont, text); painter->setRenderHint(QPainter::Antialiasing); painter->setPen(QPen(d->color3, width, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter->setBrush(d->color); painter->drawPath(path); } break; case Shadow: d->color3.setAlpha(128); painter->setPen(d->color3); painter->drawText(tileRect.translated(1, 1), flags, text); painter->setPen(d->color); painter->drawText(tileRect, flags, text); break; default: break; } } void QZionText::changed() { QZionObject::changed(); } // TODO qreal QZionText::ellipsisAlignment() const { return 0.0; } // TODO void QZionText::setEllipsisAlignment(const qreal alignment) { } qzion-mainline/src/qpainter/qziontext_p.h000066400000000000000000000063461116615412200211670ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include #include "qzionmacros.h" #include "qziontext.h" class QZionTextPrivate { public: QZionText *owner; QZionTextPrivate(const QString &text, const QFont &font=QApplication::font(), const QColor &color=Qt::black) : text(text), font(font), color(color), alignment(QPointF(0.5, 0.5)) { multiline = false; style = QZionText::NoStyle; calcBoundingRect(); } QZionText::TextStyle style; QString text; QFont font; QColor color; QColor color2; QColor color3; QRect boundingRect; QSize size; QSize maxSize; bool multiline; QPointF alignment; int lineAscent; int lineDescent; inline void calcBoundingRect(); inline QRect realBoundingRect() const; inline void refresh(const bool calculateBound=false); }; inline void QZionTextPrivate::refresh(const bool calculateBound) { if (calculateBound) calcBoundingRect(); if (owner->visible() && owner->canvas()) owner->changed(); } inline void QZionTextPrivate::calcBoundingRect() { if (!multiline) { boundingRect = QFontMetrics(font).boundingRect(0, 0, size.width(), size.height(), Qt::TextSingleLine | Qt::AlignHCenter, text); } else { QRect r = QRect(QPoint(0, 0), size); boundingRect = QFontMetrics(font).boundingRect(r, Qt::TextWordWrap, text); } lineAscent = QFontMetrics(font).ascent(); lineDescent = QFontMetrics(font).descent(); } inline QRect QZionTextPrivate::realBoundingRect() const { int real_width; int real_height; int real_x; int real_y; // Does the bounding rect fit in the available width ? if (boundingRect.width() < size.width()) { real_width = boundingRect.width(); real_x = alignment.x() * (size.width() - real_width); } else { real_width = size.width(); real_x = 0; } // Does the bounding rect fit in the available height ? if (boundingRect.height() < size.height()) { real_height = boundingRect.height(); real_y = alignment.y() * (size.height() - real_height); } else { real_height = size.height(); real_y = 0; } // Move to absolute position. real_x += owner->pos().x(); real_y += owner->pos().y(); return QRect(real_x, real_y, real_width, real_height); } qzion-mainline/src/qpainter/qziontextblock.cpp000066400000000000000000000131541116615412200222110ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include #include #include #include #include #include #include #include "qziontextblock_p.h" #include "qziontextblock.h" #include "qzionmacros.h" QZionTextBlock::QZionTextBlock(QZionAbstractCanvas *canvas) : QZionObject(canvas), _QZionTextBlock_data(new QZionTextBlockPrivate()) { QZD(QZionTextBlock); d->owner = this; d->text = ""; QPalette palette; palette.setBrush(QPalette::Window, QBrush(QColor(255, 255, 255, 0))); d->page.setPalette(palette); d->page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); d->page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsChanged())); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsLoadFinished())); QObject::connect(&(d->page), SIGNAL(loadProgress(int)), this, SIGNAL(contentsChanged())); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), d, SLOT(resizeContents())); d->page.mainFrame()->setHtml(d->text); } QZionTextBlock::QZionTextBlock(QZionAbstractCanvas *canvas, const QString &text) : QZionObject(canvas), _QZionTextBlock_data(new QZionTextBlockPrivate()) { QZD(QZionTextBlock); d->owner = this; d->text = text; QPalette palette; palette.setBrush(QPalette::Window, QBrush(QColor(255, 255, 255, 0))); d->page.setPalette(palette); d->page.mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); d->page.mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsChanged())); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), this, SIGNAL(contentsLoadFinished())); QObject::connect(&(d->page), SIGNAL(loadProgress(int)), this, SIGNAL(contentsChanged())); QObject::connect(&(d->page), SIGNAL(loadFinished(bool)), d, SLOT(resizeContents())); d->page.mainFrame()->setHtml(d->text); } QZionTextBlock::~QZionTextBlock() { delete _QZionTextBlock_data; } QSize QZionTextBlock::size() const { QZD(QZionTextBlock); return d->size; } QSize QZionTextBlock::contentsSize() const { QZD(QZionTextBlock); return d->page.mainFrame()->contentsSize() * d->scale; } int QZionTextBlock::preferredWidth() { QZD(QZionTextBlock); return d->preferredWidth; } void QZionTextBlock::setPreferredWidth(const int width) { QZD(QZionTextBlock); d->preferredWidth = width; // need to do this to get the correct height (webkit way) d->page.setViewportSize(QSize(width, 1)); d->page.setViewportSize(d->page.mainFrame()->contentsSize()); d->refresh(); } void QZionTextBlock::setSize(const QSize &size) { QZD(QZionTextBlock); QZionObject::setSize(size); d->size = size; if (d->preferredWidth) return; d->page.setViewportSize(QSize(size.width(), 1)); d->page.setViewportSize(d->page.mainFrame()->contentsSize()); d->refresh(); } QColor QZionTextBlock::color() const { return QColor(255, 255, 255, 0); } void QZionTextBlock::setColor(const QColor &color) { Q_UNUSED(color); } QString QZionTextBlock::text() const { QZD(QZionTextBlock); return d->text; } void QZionTextBlock::setText(const QString &text) { QZD(QZionTextBlock); if (d->text != text) { d->text = text; d->page.mainFrame()->setHtml(d->text); d->refresh(); } } QRect QZionTextBlock::rect() const { return QRect(pos(), size()); } double QZionTextBlock::scale() { QZD(QZionTextBlock); return d->scale; } void QZionTextBlock::setScale(double factor) { QZD(QZionTextBlock); d->scale = factor; d->refresh(); } QPixmap QZionTextBlock::toPixmap() { QZD(QZionTextBlock); QPixmap pixmap(d->page.viewportSize()); pixmap.fill(); QPainter painter(&pixmap); d->page.mainFrame()->render(&painter); return pixmap; } QImage QZionTextBlock::toImage() { QZD(QZionTextBlock); QImage image(d->page.viewportSize(), QImage::Format_RGB32); // Fills white image.fill(0xFFFFFF); QPainter painter(&image); d->page.mainFrame()->render(&painter); return image; } void QZionTextBlock::paint(QPainter *painter) { QZD(QZionTextBlock); painter->translate(pos()); painter->scale(d->scale, d->scale); QRect scaledRect = rect().translated(-pos()); scaledRect.setSize(QSize(scaledRect.width() / d->scale, scaledRect.height() / d->scale)); QRegion clipRegion = painter->clipRegion().boundingRect() & scaledRect; d->page.mainFrame()->render(painter, clipRegion); painter->translate(-pos()); } qzion-mainline/src/qpainter/qziontextblock_p.h000066400000000000000000000030301116615412200221650ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __QZIONTEXTBLOCK_P_H__ #define __QZIONTEXTBLOCK_P_H__ #include #include "qzionmacros.h" #include "qziontext.h" #include "qziontextblock.h" #include #include class QZionTextBlockPrivate : public QObject { Q_OBJECT public: QZionTextBlock *owner; QZionTextBlockPrivate() : QObject(), scale(1.0), preferredWidth(0) {}; void refresh(); QWebPage page; QString text; double scale; QSize size; int preferredWidth; public Q_SLOTS: inline void resizeContents(); }; inline void QZionTextBlockPrivate::refresh() { if (owner->visible() && owner->canvas()) owner->changed(); } inline void QZionTextBlockPrivate::resizeContents() { page.setViewportSize(page.mainFrame()->contentsSize()); } #endif qzion-mainline/tests/000077500000000000000000000000001116615412200151515ustar00rootroot00000000000000qzion-mainline/tests/CMakeLists.txt000066400000000000000000000015561116615412200177200ustar00rootroot00000000000000include_directories(../src/common) function(qzion_test qzion_test_NAME qzion_test_SRCS qzion_test_MOCS) qt4_wrap_cpp(qzion_test_MOC_SRCS ${qzion_test_MOCS}) add_executable(${qzion_test_NAME} ${qzion_test_SRCS} ${qzion_test_MOC_SRCS}) target_link_libraries(${qzion_test_NAME} qzion ${QT_LIBRARIES}) endfunction(qzion_test) add_subdirectory(clipper) add_subdirectory(expedite) add_subdirectory(simple) add_subdirectory(zvalue) add_subdirectory(text) add_subdirectory(resize) # copy data for tests function(qzion_copy_data copy_data_FILENAME) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${copy_data_FILENAME} ${CMAKE_CURRENT_BINARY_DIR}/${copy_data_FILENAME} COPYONLY ) endfunction(qzion_copy_data) qzion_copy_data(images/bg.jpg) qzion_copy_data(images/image.png) qzion_copy_data(images/logo.png) qzion_copy_data(images/square.png) qzion-mainline/tests/clipper/000077500000000000000000000000001116615412200166075ustar00rootroot00000000000000qzion-mainline/tests/clipper/CMakeLists.txt000066400000000000000000000000421116615412200213430ustar00rootroot00000000000000qzion_test(clipper "main.cpp" "") qzion-mainline/tests/clipper/main.cpp000066400000000000000000000106151116615412200202420ustar00rootroot00000000000000#include "qzion.h" #include #define printrgb(color) \ printf("R: %d G: %d B: %d A: %d\n", color.red(), color.green(), \ color.blue(), color.alpha()); QZionRectangle *createRect(QColor color, int x, int w, QZionCanvas &canvas) { QZionRectangle *rect = new QZionRectangle(&canvas); rect->setColor(color); rect->setSize(QSize(w,600)); rect->setPos(x, 0); rect->show(); return rect; } int main(int argc, char** argv) { QApplication app(argc, argv); QZionCanvas canvas; QList list; canvas.setSize(QSize(800, 600)); /**************************************************/ /**** RECTANGLES TEST ****/ /**************************************************/ QZionRectangle *bg = new QZionRectangle(&canvas); bg->setColor(Qt::black); bg->setSize(QSize(800, 600)); bg->setPos(0, 0); bg->show(); // list.append(bg); // Red Rect QZionRectangle *rect1 = createRect(Qt::red, 0, 114, canvas); list.append(rect1); // Green Rect QZionRectangle *rect2 = createRect(Qt::green, 114, 114, canvas); list.append(rect2); // Blue Rect QZionRectangle *rect3 = createRect(Qt::blue, 228, 114, canvas); list.append(rect3); // White Rect QZionRectangle *rect4 = createRect(Qt::white, 353, 94, canvas); list.append(rect4); // Cyan Rect QZionRectangle *rect5 = createRect(Qt::cyan, 458, 114, canvas); list.append(rect5); // Magenta Rect QZionRectangle *rect6 = createRect(Qt::magenta, 572, 114, canvas); list.append(rect6); // Yellow Rect QZionRectangle *rect7 = createRect(Qt::yellow, 686, 114, canvas); list.append(rect7); // Clipper QZionRectangle *clip3 = new QZionRectangle(&canvas); clip3->setColor(QColor(255, 255, 255, 255)); clip3->setSize(QSize(800, 600)); clip3->setPos(20, 100); clip3->show(); QZionGroup *group = new QZionGroup(&canvas); group->setColor(QColor(255, 255, 255, 128)); group->setSize(QSize(800, 600)); group->setPos(0, 0); group->show(); QZionGroup *group2 = new QZionGroup(&canvas); group2->setColor(QColor(255, 255, 255, 128)); group2->setSize(QSize(300, 200)); group2->setPos(0, 0); group2->show(); foreach(QZionObject *obj, list) { //obj->setClipper(clip3); group->addObject(obj); } group2->addObject(group); group->setClipper(clip3); list.append(clip3); QZionRectangle *clip2 = new QZionRectangle(&canvas); clip2->setColor(QColor(255, 255, 255, 128)); clip2->setSize(QSize(800, 300)); clip2->setPos(0, 0); clip2->show(); list.append(clip2); clip3->setClipper(clip2); /**************************************************/ /**** IMAGES TEST ****/ /**************************************************/ QZionImage *img1 = new QZionImage(&canvas, "../images/image.png"); img1->setPos(350, 10); img1->show(); img1->setClipper(clip3); list.append(img1); /**************************************************/ /**** TEXT TEST ****/ /**************************************************/ /* QZionText *text1 = new QZionText(&canvas); // text1->setTextColor(Qt::white); text1->setShadowColor(Qt::white); // text1->setColor(Qt::magenta); text1->setText("Hello World"); text1->setFont(QFont("Nokia Sans", 25)); text1->setPos(QPoint(205, 85)); text1->setSize(QSize(200, 50)); text1->show(); text1->setClipper(clip3); // text1->setOpacity(200); text1->setStyle(QZionText::Shadow); */ /**************************************************/ /**** TEXTBLOCK TEST ****/ /**************************************************/ QZionTextBlock *tblock = new QZionTextBlock(&canvas); tblock->setSize(QSize(300, 300)); tblock->setPos(100, 76); tblock->setText("TESTE
LOREMIPSUM"); tblock->show(); tblock->setClipper(clip3); list.append(tblock); /**************************************************/ /**** RUN EVERYTHING ****/ /**************************************************/ canvas.show(); app.exec(); foreach(QZionObject *obj, list) { delete obj; } // delete img1; // delete clip1; } qzion-mainline/tests/expedite/000077500000000000000000000000001116615412200167605ustar00rootroot00000000000000qzion-mainline/tests/expedite/CMakeLists.txt000066400000000000000000000000521116615412200215150ustar00rootroot00000000000000qzion_test(expedite "main.cpp" "scene.h") qzion-mainline/tests/expedite/image.png000066400000000000000000001201321116615412200205470ustar00rootroot00000000000000PNG  IHDRxHk? pHYs  tIME  #/PR[_ IDATx|yU'x}˷Ėke^Rڬ,o acӞ;g4@3@4 vcb2eYdK־*՞{dm{,s&E8@ r7OKPPDz JUr.e e Й۽z.بѵ}{+񻷾(UuS3ߺ?0QΏ?k ƃ{ʋOj&`+_yS= >\11۸;N_Xf ˗N']W_vu ,>&m%)XWG?O~\}J ؎SШcG$j~GjՒPѢq  h!X48Iٶce"k٠VDZR( i-m(/X]eT&}ŘTeQ\;אּzG wnꮛ}yl֙iwiE(r@ծѤ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&\GE#Z'2 V @s<{*}464Tk/Ɖ<8QB|xibʫAY=|10;r7WHKDQMcbu My/.sOHn;׫J9qu-D 3{Č `GeEb&_/ ^V ^*xns>)]TO@t?|`&"p)dȍ̔reT,>x3LspfcGNeDny -es؜%ݝd L䄖ZM_xP-OfLZ&+9PV|܃Lf6g f7si&8ǔJXiOE{Y)R'%`L91rmB(8!gMq1s|T':U8>n8Z<%ܰ^W!x܉EN9Rq%nlyX5w4+ɥM~xHWbM@\eKq /3ޱWsJͰf289PlCZn;w)7СS$hnزa1EYW*b/9łN ZfHdb=ArW92y];sǿZ{eU #include #include "scene.h" #define windowWidth 800 #define windowHeight 480 #define refreshInterval 450 static QTime timeClock; Scene::Scene(QZionCanvas *cnv, int item_count) { canvas = cnv; for (int i=0; i < item_count; i++) { QZionImage *pixmap = new QZionImage(canvas, "image.png"); pixmap->show(); pixmap->setPos(random() % windowWidth, random() % windowHeight); images.append(pixmap); } ncount = 0; } void Scene::tick_all() { int i; int x, y; int w, h; int win_h, win_w, SLOW; w = 120; h = 160; win_h = 400; win_w = 400; SLOW = 5; ncount++; for (int i=0; i < images.size(); i++) { QZionImage *pixmap = (QZionImage *) images[i]; x = (win_w / 2) - (w / 2); x += sin((double)(ncount + (i * 13)) / (36.7 * SLOW)) * (w / 2); y = (win_h / 2) - (h / 2); y += cos((double)(ncount + (i * 28)) / (43.8 * SLOW)) * (h / 2); pixmap->setPos(x, y); } } int main(int argc, char **argv) { QTimer timer; QApplication app(argc, argv); QZionCanvas canvas; Scene *scene = new Scene(&canvas); QObject::connect(&timer, SIGNAL(timeout()), scene, SLOT(tick_all())); canvas.show(); timer.start(0); return app.exec(); } qzion-mainline/tests/expedite/main.py000066400000000000000000000021341116615412200202560ustar00rootroot00000000000000import sys from math import cos, sin from PyQt4.QtGui import * from PyQt4.QtCore import * from qzion import * images = [] frames = 0 lastTime = 0 counter = QTime() def tick(): global frames, lastTime SLOW = 5 w, h = 120, 160 win_h, win_w = 400, 400 frames += 1.0 for i, image in enumerate(images): x = (win_w / 2) - (w / 2) x += sin(float(frames + (i * 13)) / (36.7 * SLOW)) * (w / 2) y = (win_h / 2) - (h / 2) y += cos(float(frames + (i * 28)) / (43.8 * SLOW)) * (h / 2) image.setPos(x, y) if frames % 5 == 0: elapsed = counter.elapsed() / 1000 if elapsed != lastTime: lastTime = elapsed print "fps:", int(frames / elapsed) if __name__ == "__main__": app = QApplication(sys.argv) canvas = QZionCanvas() canvas.show() timer = QTimer() for i in xrange(128): image = QZionImage(canvas, "image.png") image.show() images.append(image) QObject.connect(timer, SIGNAL("timeout()"), tick) timer.start() counter.start() sys.exit(app.exec_()) qzion-mainline/tests/expedite/scene.h000066400000000000000000000005361116615412200202320ustar00rootroot00000000000000#ifndef __ACTOR_H__ #define __ACTOR_H__ #include #include "qzion.h" class Scene : public QObject { Q_OBJECT private: int ncount; QZionCanvas *canvas; QZionRectangle *rectangle; QList images; public: Scene(QZionCanvas *cnv = NULL, int item_count=128); public Q_SLOTS: void tick_all(); }; #endif qzion-mainline/tests/images/000077500000000000000000000000001116615412200164165ustar00rootroot00000000000000qzion-mainline/tests/images/bg.jpg000066400000000000000000000454551116615412200175250ustar00rootroot00000000000000JFIFddDucky<Adobed        {!1AQaqRS"2B!1A ?G7_ F>Ⱥkx5~DѼ!Wd5u!/d5t<:솦_ཐCï^Ȧ@dSC{W=Md ]mثp]t\x.. AvE48AuMd =-qLDz!Dz"閸 : ^Zae&ZaeDT?쉴7_⽑6dMx+ x+ x+-Ch-C7Ch-Eڍ⽐ {!PW.~+غd4{!=솅z5 j.z5~CB?iG ]>i}_}C.F>iG 4<"m4|!Wd]4|"iGWG&Z5~ eWd4j#솃G A&:솠u~ ï^hCF&/d4Wདt>Ⱥi^_}ҽ"=!8"i}t> ]o M}CqCM M}[d5uqCM}[d4> 5qCW^+EP  ؁bt.@p.\ b+BbP 4 Chw"8PD,Q!ؙ4!:L+FQ2DuQ e6 l@؀1bq(*,! Q(؁+BJ8. @ H l@8bĀD 8+E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(ـW2s\s\@dD !$ ! )D  )dЌj\eL 2eQTjPMOF+RMcz6;5l3Y[ ^tGpdw1H"`{N[Il \2S)2FȠP̪2RdH"X)?DeDdXNKLIKTeU#:ZlGD6K / GD6X )0*rD ')JR 1nQR(tHRAP@0E0`W29A `dlR P FD0j jȠb ZfL Pcejf@ *0s3bW^qL7PDV;B)[B70)\T@e!9 6EȪ\PE2D##d@c#2RD%&iRV'$hUa?RVjgm{.KD6_^Rbbܻhp" #.*rI|19|{qHT5T:`Q00H!(rdPAA!\W"rd @ 02@j *0+e![ ] @5"J } APFr(PcT+&zZE6A]r%+; J+LZC8vV;u\*¶A6@l6E"@(dQLLd̃r"R"%2R* ȰJ\TUMɠ;_baȡ0ï"rx R?2DH\baʓ&&LaKPɁ@  C&QE l9dPTllT 6Q jʡRB0 `[ j*H7R^`0Vqzion-mainline/tests/images/image.png000066400000000000000000001201321116615412200202050ustar00rootroot00000000000000PNG  IHDRxHk? pHYs  tIME  #/PR[_ IDATx|yU'x}˷Ėke^Rڬ,o acӞ;g4@3@4 vcb2eYdK־*՞{dm{,s&E8@ r7OKPPDz JUr.e e Й۽z.بѵ}{+񻷾(UuS3ߺ?0QΏ?k ƃ{ʋOj&`+_yS= >\11۸;N_Xf ˗N']W_vu ,>&m%)XWG?O~\}J ؎SШcG$j~GjՒPѢq  h!X48Iٶce"k٠VDZR( i-m(/X]eT&}ŘTeQ\;אּzG wnꮛ}yl֙iwiE(r@ծѤ9a j "hDP@zA Kjm޼gBuGQ 6zk,f"p-ZgBԤh UW 2Ӟnln[h%#P#+e%-9t !JtF|(1!XA Pr|icfc_垉lcO?cN~α40?un*6n'N}5ΛsųN E)AEC!9E5Y2phcIėHGioPǁE$!zmD$ة+v7wϩvuC«_^9qƣzdsWQ_:{b47v1ɽ˗VrTH]*Ab˞ADvHA0ъ4sre{ZXdj7:M "C--,y@D$U j@ Hx.h}o@=nN]/RqԨa̮pLHʫ.\ZUOZ,U3UITȮu]T᰹]|!'=ya6$cgLb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<@r ۢp~1~\jbJ7{bCoqG6lldهgƾpg#*E-Y,ep\]^QиP_9|7^i n?ũ'7n[{t~1Xdõv=-\5}ϔk*>-}c(|)=gWF4*Tc8kPu6}KH켆z{kV/xmD;~5ZSgcO767WDR"PZlcFƞFe(;NtW2Iq'aQg??lV{1[./ o\KK.q䶕(jiTo)-R;Fvhm_|}`?rvKv91 7wW>Qwc里IxkM'TcU_WJQg"KcuhS**j;i))/RC9K[, 7?-7ǵ?ڸ m DmQg'&z Gjew,~$xz[P.9v\zqv ^xٵ?]}ZgGs_Uվ7|sݕ}ҁ`St5~ÚϾkTXK@:QQពyetǝHAjo}k\w*,H\ oh/= z$2(R*vO}`۾dҡYӍrt"?.8~9d\ 7^ s,P[ŧ*,"$:)3 g7&WPva T{h*\ҍ7A5ӭ ~閰aNOc{M|Юbܭ/>jfn!:$9|@7߿Soi(t MM;ۇꘋ:^U-7?7ڳ@ wNGJn.kۇ圴 iJ-#a-檴:s_Tei-yE4v{awn9\8`8}hF/H8O=;22b6mE QXIIwUU_lr((}qM}z{{~k9 G0펽 y$G}0:fy9Bxr| DDH]&GOQfa`Z@"d-3DrcXgB"UK'Z;DIt3$R#캝 uʝDʓ->`ev9aOI¶ev9;e9D"}tW)XMKVD]LRT b(/!#dܾ@9H9D" bu e|H}%E}2>$1rD*(*XJ}{j쩔ٷ`)C$Ri.Н<6J;^(v*.RIENDB`qzion-mainline/tests/resize/000077500000000000000000000000001116615412200164525ustar00rootroot00000000000000qzion-mainline/tests/resize/CMakeLists.txt000066400000000000000000000000461116615412200212120ustar00rootroot00000000000000qzion_test(resize "main.cpp" "main.h")qzion-mainline/tests/resize/main.cpp000066400000000000000000000034501116615412200201040ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "main.h" #include #include #include #include #include #include Scene::Scene(QZionAbstractCanvas *canvas) :group(new QZionGroup(canvas)) { group->setSize(QSize(400,400)); img = new QZionImage(group, "../images/square.png"); img->setPos(QPoint(20,20)); img->setSize(QSize(30,30)); img->setBorder(3,3,27,3); img->show(); group->show(); connect(&timer, SIGNAL(timeout()), this, SLOT(resize())); timer.start(5); } void Scene::resize() { img->setSize(QSize(img->size().width()+3, img->size().height() + 3)); img->changed(); if (img->size().width() > 400) img->setSize(QSize(30, 30)); }; int main(int argc, char **argv) { QApplication app(argc, argv); QZionCanvas canvas; QSize size(800, 480); canvas.setSize(size); canvas.show(); QZionRectangle *bg = new QZionRectangle(&canvas); bg->setColor(QColor(0, 0, 150)); bg->setSize(size); bg->show(); Scene scene(&canvas); app.exec(); return 0; } qzion-mainline/tests/resize/main.h000066400000000000000000000020211116615412200175420ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __MAIN_H__ #define __MAIN_H__ #include #include class Scene : public QObject { Q_OBJECT public: Scene(QZionAbstractCanvas *canvas); QTimer timer; QZionImage * img; QZionGroup *group; public Q_SLOTS: void resize(); }; #endif qzion-mainline/tests/simple/000077500000000000000000000000001116615412200164425ustar00rootroot00000000000000qzion-mainline/tests/simple/CMakeLists.txt000066400000000000000000000000501116615412200211750ustar00rootroot00000000000000qzion_test(simple "main.cpp" "scene.h") qzion-mainline/tests/simple/main.cpp000066400000000000000000000062731116615412200201020ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzion.h" #include #include #include "scene.h" Scene::Scene(QZionAbstractCanvas *canvas) { this->canvas = canvas; } void Scene::add(QZionObject *obj, bool mouseEvents) { objects.append(obj); if (mouseEvents) { connect(obj, SIGNAL(signalMousePressEvent(QZionObject *, QMouseEvent *)), this, SLOT(mousePressEvent(QZionObject *, QMouseEvent *))); } } void Scene::valueChanged(qreal value) { int x = (int) (initX + (finalX - initX) * value); target->setPos(x, target->pos().y()); } void Scene::mousePressEvent(QZionObject *obj, QMouseEvent *) { if (timeline.state() == QTimeLine::Running) return; timeline.setDuration(800); timeline.setUpdateInterval(1); connect(&timeline, SIGNAL(valueChanged(qreal)), this, SLOT(valueChanged(qreal))); initX = obj->pos().x(); finalX = (initX >= 450) ? 20 : 450; target = obj; timeline.start(); } int main(int argc, char **argv) { QApplication app(argc, argv); QZionCanvas canvas; Scene scene(&canvas); canvas.show(); canvas.setSize(QSize(800, 480)); // loading image from image file QZionObject *background = new QZionImage(&canvas, "../images/bg.jpg"); background->setPos(0, 0); background->show(); scene.add(background); // title QZionText *title = new QZionText(&canvas, QString("Zion Test 1"), QFont("SansSerif", 20, QFont::Bold), QColor(200, 200, 200)); title->setPos(200, 30); title->setSize(QSize(250, 25)); title->show(); scene.add(title); // loading image from file QZionObject *ball1 = new QZionImage(&canvas, "../images/logo.png"); ball1->setPos(0, 0); ball1->show(); scene.add(ball1, true); // loading image from file QZionObject *ball2 = new QZionImage(&canvas, "../images/image.png"); ball2->setPos(0, 130); ball2->setOpacity(150); ball2->show(); scene.add(ball2, true); // clipper QZionRectangle *clipper = new QZionRectangle(&canvas); clipper->setMouseEvents(false); clipper->setPos(50, 170); clipper->setSize(QSize(480, 100)); clipper->show(); scene.add(clipper); // adding clipper ball2->setClipper(clipper); app.exec(); delete title; delete ball1; delete ball2; delete clipper; delete background; return 1; } qzion-mainline/tests/simple/scene.h000066400000000000000000000023421116615412200177110ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __SCENE_H__ #define __SCENE_H__ #include #include "qzion.h" class Scene : public QObject { Q_OBJECT private: QZionAbstractCanvas *canvas; QTimeLine timeline; QZionObject *target; int initX, finalX; QList objects; public: Scene(QZionAbstractCanvas *canvas); void add(QZionObject *obj, bool mouseEvents=false); public Q_SLOTS: void valueChanged(qreal); void mousePressEvent(QZionObject *, QMouseEvent*); }; #endif qzion-mainline/tests/text/000077500000000000000000000000001116615412200161355ustar00rootroot00000000000000qzion-mainline/tests/text/CMakeLists.txt000066400000000000000000000000451116615412200206740ustar00rootroot00000000000000qzion_test(text "main.cpp" "scene.h")qzion-mainline/tests/text/main.cpp000066400000000000000000000150661116615412200175750ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "qzion.h" #include #include #include "scene.h" Scene::Scene(QZionAbstractCanvas *canvas) { this->canvas = canvas; } void Scene::add(QZionObject *obj) { objects.append(obj); } void Scene::valueChanged(qreal value) { int v = (int) (initV + (finalV - initV) * value); target1->setSize(v, target1->size().height()); target2->setSize(v, target2->size().height()); } void Scene::startAnim(QZionObject *obj1, QZionObject *obj2) { if (timeline.state() == QTimeLine::Running) return; target1 = obj1; target2 = obj2; timeline.setDuration(4000); timeline.setUpdateInterval(1); timeline.setLoopCount(0); connect(&timeline, SIGNAL(valueChanged(qreal)), this, SLOT(valueChanged(qreal))); initV = target1->size().width(); finalV = (initV >= 600) ? 50 : 600; timeline.start(); } int main(int argc, char **argv) { QApplication app(argc, argv); QZionCanvas canvas; Scene scene(&canvas); canvas.setSize(QSize(600, 425)); canvas.show(); // loading image from image file QZionObject *background = new QZionImage(&canvas, "../images/bg.jpg"); background->setPos(0, 0); background->show(); scene.add(background); // Ellipsizing QZionRectangle *labelRect = new QZionRectangle(&canvas); labelRect->setColor(QColor(200, 200, 200)); labelRect->setPos(0, 0); labelRect->setSize(QSize(600, 50)); labelRect->setOpacity(128); labelRect->show(); scene.add(labelRect); QZionText *label = new QZionText(&canvas, QString("Ellipsizing"), QFont("SansSerif", 20, QFont::Bold)); label->setColor(Qt::white); label->setStyle(QZionText::Shadow); label->setAlignment(QPointF(0.5, 0.5)); label->setPos(labelRect->pos().x(), labelRect->pos().y()); label->setSize(labelRect->size()); label->show(); scene.add(label); scene.startAnim(label, labelRect); // Left aligned QZionRectangle *label1Rect = new QZionRectangle(&canvas); label1Rect->setColor(QColor(200, 0, 200)); label1Rect->setOpacity(128); label1Rect->setPos(0, labelRect->pos().y() + labelRect->size().height() + 5); label1Rect->setSize(QSize(300, 50)); label1Rect->show(); scene.add(label1Rect); QZionText *label1 = new QZionText(&canvas, QString("Left"), QFont("SansSerif", 20, QFont::Bold), QColor(0, 0, 0)); label1->setAlignment(QPointF(0.0, 0.5)); label1->setPos(label1Rect->pos().x(), label1Rect->pos().y()); label1->setSize(label1Rect->size()); label1->show(); scene.add(label1); // Right aligned QZionRectangle *label2Rect = new QZionRectangle(&canvas); label2Rect->setColor(QColor(0, 200, 200)); label2Rect->setOpacity(128); label2Rect->setPos(0, label1Rect->pos().y() + label1Rect->size().height() + 5); label2Rect->setSize(QSize(600, 50)); label2Rect->show(); scene.add(label2Rect); QZionText *label2 = new QZionText(&canvas, QString("Right"), QFont("SansSerif", 20, QFont::Bold), QColor(0, 0, 0)); label2->setAlignment(QPointF(1.0, 0.5)); label2->setPos(label2Rect->pos().x(), label2Rect->pos().y()); label2->setSize(label2Rect->size()); label2->show(); scene.add(label2); // Centered QZionRectangle *label3Rect = new QZionRectangle(&canvas); label3Rect->setColor(QColor(200, 200, 0)); label3Rect->setOpacity(128); label3Rect->setPos(0, label2Rect->pos().y() + label2Rect->size().height() + 5); label3Rect->setSize(QSize(600, 50)); label3Rect->show(); scene.add(label3Rect); QZionText *label3 = new QZionText(&canvas, QString("Centered"), QFont("SansSerif", 20, QFont::Bold), QColor(0, 0, 0)); label3->setAlignment(QPointF(0.5, 0.5)); label3->setColor(Qt::white); label3->setStyle(QZionText::Shadow); label3->setPos(label3Rect->pos().x(), label3Rect->pos().y()); label3->setSize(label3Rect->size()); label3->show(); scene.add(label3); // Top QZionRectangle *label4Rect = new QZionRectangle(&canvas); label4Rect->setColor(QColor(200, 0, 0)); label4Rect->setOpacity(128); label4Rect->setPos(0, label3Rect->pos().y() + label3Rect->size().height() + 5); label4Rect->setSize(QSize(600, 100)); label4Rect->show(); scene.add(label4Rect); QZionText *label4 = new QZionText(&canvas, QString("Top"), QFont("SansSerif", 20, QFont::Bold), QColor(0, 0, 0)); label4->setAlignment(QPointF(0.5, 0.0)); label4->setColor(Qt::white); label4->setStyle(QZionText::OutLine); label4->setPos(label4Rect->pos().x(), label4Rect->pos().y()); label4->setSize(label4Rect->size()); label4->show(); scene.add(label4); // Bottom QZionRectangle *label5Rect = new QZionRectangle(&canvas); label5Rect->setColor(QColor(0, 0, 200)); label5Rect->setOpacity(128); label5Rect->setPos(0, label4Rect->pos().y() + label4Rect->size().height() + 5); label5Rect->setSize(QSize(600, 100)); label5Rect->show(); scene.add(label5Rect); QZionText *label5 = new QZionText(&canvas, QString("Bottom"), QFont("SansSerif", 20, QFont::Bold), QColor(0, 0, 0)); label5->setAlignment(QPointF(0.5, 1.0)); label5->setPos(label5Rect->pos().x(), label5Rect->pos().y()); label5->setSize(label5Rect->size()); label5->show(); scene.add(label5); app.exec(); while (!scene.objects.isEmpty()) delete scene.objects.takeFirst(); return 1; } qzion-mainline/tests/text/scene.h000066400000000000000000000023521116615412200174050ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __SCENE_H__ #define __SCENE_H__ #include #include "qzion.h" class Scene : public QObject { Q_OBJECT private: QZionAbstractCanvas *canvas; QTimeLine timeline; int initV, finalV; QZionObject *target1; QZionObject *target2; public: QList objects; Scene(QZionAbstractCanvas *canvas); void add(QZionObject *obj); void startAnim(QZionObject *obj1, QZionObject *obj2); public Q_SLOTS: void valueChanged(qreal); }; #endif qzion-mainline/tests/zvalue/000077500000000000000000000000001116615412200164575ustar00rootroot00000000000000qzion-mainline/tests/zvalue/CMakeLists.txt000066400000000000000000000000461116615412200212170ustar00rootroot00000000000000qzion_test(zvalue "main.cpp" "main.h")qzion-mainline/tests/zvalue/main.cpp000066400000000000000000000102471116615412200201130ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #include "main.h" #include #include #include #include #define NUM_OBJECTS 3 Scene::Scene(QZionAbstractCanvas *canvas, const QSize &size) : state(1), group(new QZionGroup(canvas)) { group->setSize(size); for (int i = 0; i < NUM_OBJECTS; ++i) { QZionRectangle *r = new QZionRectangle(group); int c = i * 255 / NUM_OBJECTS; r->setColor(QColor(c, c, c)); r->setSize(QSize(100, 100)); r->setPos(QPoint((i * 60) % 90, i * 30)); r->show(); objects.append(r); } text = new QZionText(group, QString("zValue sanity check"), QFont("SansSerif", 20, QFont::Bold), QColor(210, 105, 30)); text->setSize(QSize(size.width() - 250, 100)); text->setPos(QPoint(200, 50)); text->setAlignment(QPoint(0.0, 0.0)); text->show(); enumeration = new QZionText(group, QString("C B A"), QFont("SansSerif", 20, QFont::Bold), QColor(210, 105, 30)); enumeration->setSize(QSize(size.width() - 250, 100)); enumeration->setPos(QPoint(200, 80)); enumeration->setAlignment(QPoint(0.0, 0.0)); enumeration->show(); group->show(); } Scene::~Scene() { foreach (QZionObject *obj, objects) delete obj; delete text; } static void updateEnumeration(Scene *scene) { QString text; QList ordered = scene->group->itemsAt(QPoint(90, 90)); foreach (QZionObject *obj, ordered) { int idx = scene->objects.indexOf(qobject_cast(obj)); if (idx < 0) continue; text.append(QString("%1 ").arg(QChar('A' + idx))); } scene->enumeration->setText(text); } void Scene::iterate() { QZionRectangle *A = objects[0]; QZionRectangle *B = objects[1]; QZionRectangle *C = objects[2]; #define CASE(num, stmt) \ case num: \ stmt; \ text->raise(); \ enumeration->raise(); \ text->setText(#num ". " #stmt); \ updateEnumeration(this); \ break; switch (state) { CASE(1, A->raise()); CASE(2, C->lower()); CASE(3, B->stackAbove(A)); CASE(4, A->stackBelow(C)); CASE(5, A->setZValue(2)); CASE(6, C->stackBelow(A)); CASE(7, B->raise()); CASE(8, C->stackAbove(B)); default: int i = 0; foreach (QZionObject *obj, objects) { obj->setZValue(i); ++i; } text->raise(); text->setText("zValue sanity check"); enumeration->raise(); enumeration->setText("C B A"); state = 1; return; } ++state; } int main(int argc, char **argv) { QApplication app(argc, argv); QZionCanvas canvas; QSize size(800, 480); canvas.setSize(size); canvas.show(); QZionRectangle *bg = new QZionRectangle(&canvas); bg->setColor(QColor(255, 255, 255)); bg->setSize(size); bg->show(); Scene s(&canvas, size - QSize(60, 60)); s.group->setPos(QPoint(30, 30)); QObject::connect( bg, SIGNAL(signalMousePressEvent(QZionObject *, QMouseEvent *)), &s, SLOT(iterate())); app.exec(); return 0; } qzion-mainline/tests/zvalue/main.h000066400000000000000000000021701116615412200175540ustar00rootroot00000000000000/* * Copyright (C) 2008 Instituto Nokia de Tecnologia. All rights reserved. * * This file is part of QZion. * * QZion is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QZion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with QZion. If not, see . */ #ifndef __MAIN_H__ #define __MAIN_H__ #include #include class Scene : public QObject { Q_OBJECT public: Scene(QZionAbstractCanvas *canvas, const QSize &size); virtual ~Scene(); int state; QZionGroup *group; QZionText *text; QZionText *enumeration; QList objects; public Q_SLOTS: void iterate(); }; #endif