pax_global_header00006660000000000000000000000064145510506030014511gustar00rootroot0000000000000052 comment=2dce79ee75bbb3b6a635b35d448a9044769cbc8e plasma5-wallpapers-dynamic-4.4.1/000077500000000000000000000000001455105060300166535ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/.gitignore000066400000000000000000000001661455105060300206460ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 /build plasma5-wallpapers-dynamic-4.4.1/CMakeLists.txt000066400000000000000000000027721455105060300214230ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.0) project(plasma5-wallpapers-dynamic) set(KF5_MIN_VERSION "5.66.0") set(QT_MIN_VERSION "5.12.0") set(PROJECT_VERSION "4.3.1") set(PROJECT_VERSION_MAJOR 4) find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules) include(CMakePackageConfigHelpers) include(FeatureSummary) include(GenerateExportHeader) include(WriteBasicConfigVersionFile) include(ECMGenerateHeaders) include(ECMQMLModules) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) ecm_find_qmlmodule(QtQuick 2.5) ecm_find_qmlmodule(QtQuick.Controls 2.3) ecm_find_qmlmodule(QtQuick.Dialogs 1.3) ecm_find_qmlmodule(QtQuick.Layouts 1.0) ecm_find_qmlmodule(QtQuick.Window 2.2) ecm_find_qmlmodule(QtPositioning 5.12) ecm_find_qmlmodule(org.kde.kcm 1.1) ecm_find_qmlmodule(org.kde.kirigami 2.10) find_package(libavif REQUIRED) find_package(libexif REQUIRED) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config I18n Package Plasma ) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Concurrent Core DBus Gui Positioning Qml Quick ) add_subdirectory(data) add_subdirectory(src) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) plasma5-wallpapers-dynamic-4.4.1/LICENSES/000077500000000000000000000000001455105060300200605ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/LICENSES/BSD-3-Clause.txt000066400000000000000000000027101455105060300226030ustar00rootroot00000000000000Copyright (c) . All rights reserved. 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. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. plasma5-wallpapers-dynamic-4.4.1/LICENSES/CC-BY-SA-4.0.txt000066400000000000000000000430111455105060300222150ustar00rootroot00000000000000Creative Commons Attribution-ShareAlike 4.0 International Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 – Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 – Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: A. reproduce and Share the Licensed Material, in whole or in part; and B. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 5. Downstream recipients. A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 – License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: A. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 – Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 – Disclaimer of Warranties and Limitation of Liability. a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 – Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 – Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 – Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. plasma5-wallpapers-dynamic-4.4.1/LICENSES/CC0-1.0.txt000066400000000000000000000156101455105060300214650ustar00rootroot00000000000000Creative Commons Legal Code CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. plasma5-wallpapers-dynamic-4.4.1/LICENSES/GPL-3.0-or-later.txt000066400000000000000000001032461455105060300232720ustar00rootroot00000000000000GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 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 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 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 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 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 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 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 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 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 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 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 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 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 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 General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . 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 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 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 General Public License instead of this License. But first, please read . plasma5-wallpapers-dynamic-4.4.1/LICENSES/LGPL-3.0-or-later.txt000066400000000000000000000164071455105060300234100ustar00rootroot00000000000000GNU 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. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public 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 Library as you received it 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 published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. plasma5-wallpapers-dynamic-4.4.1/README.md000066400000000000000000000142751455105060300201430ustar00rootroot00000000000000 # Dynamic Wallpaper Engine A wallpaper plugin for KDE Plasma that continuously updates the desktop background based on the current time in your location. ## Additional Wallpapers More dynamic wallpapers can be found at https://github.com/karmanyaahm/awesome-plasma5-dynamic-wallpapers. ## Installation #### Arch Linux ``` yay -S plasma5-wallpapers-dynamic ``` #### Fedora ``` sudo dnf install plasma-wallpapers-dynamic ``` In order to use the dynamic wallpaper builder tool, install `plasma-wallpapers-dynamic-builder` package. #### Ubuntu 20.10 ``` sudo apt install plasma-wallpaper-dynamic ``` ## Building From Git In order to build this wallpaper plugin from source code, you need to install a couple of prerequisites Arch Linux: ```sh sudo pacman -S cmake extra-cmake-modules git plasma-framework qt5-base qt5-declarative \ qt5-location libexif libavif ``` Fedora: ```sh sudo dnf install cmake extra-cmake-modules git kf5-kpackage-devel kf5-plasma-devel \ kf5-ki18n-devel qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtlocation-devel \ libexif-devel libavif-devel qt5-qtbase-private-devel ``` Ubuntu: ```sh sudo apt install cmake extra-cmake-modules git libkf5package-dev libkf5plasma-dev \ libkf5i18n-dev qtbase5-dev qtdeclarative5-dev qtpositioning5-dev gettext \ qml-module-qtpositioning libexif-dev libavif-dev build-essential qtdeclarative5-private-dev \ qtbase5-private-dev ``` Once all prerequisites are installed, you need to grab the source code ```sh git clone https://github.com/zzag/plasma5-wallpapers-dynamic.git cd plasma5-wallpapers-dynamic ``` Configure the build ```sh mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_TESTING=OFF ``` Now trigger the build by running the following command ```sh make ``` To install run ```sh sudo make install ``` ## How to Use It Right-click a blank area of the desktop and choose "Configure Desktop...", select "Dynamic" wallpaper type and click the Apply button. ## How to Create a Dynamic Wallpaper The `kdynamicwallpaperbuilder` command line tool is used to create dynamic wallpapers. As input, it takes a manifest json file describing the wallpaper and produces the wallpaper ```sh kdynamicwallpaperbuilder path/to/manifest.json --output wallpaper.avif ``` This engine supports several types of dynamic wallpapers - _solar_ and _day-night_. #### How to Create a Solar Dynamic Wallpaper With a solar dynamic wallpaper, the engine will try to keep the images in sync with the Sun position at your location.
The manifest file looks as follows ```json { "Type": "solar", "Meta": [ { "SolarAzimuth": "*", "SolarElevation": "*", "CrossFade": true, "Time": "18:00", "FileName": "0.png" }, { "SolarAzimuth": 0, "SolarElevation": -90, "CrossFade": true, "Time": "00:00", "FileName": "1.png" }, { "SolarAzimuth": 90, "SolarElevation": 0, "CrossFade": true, "Time": "06:00", "FileName": "2.png" }, { "SolarAzimuth": 180, "SolarElevation": 90, "CrossFade": true, "Time": "12:00", "FileName": "3.png" } ] } ``` It might look like you must provide a lot of data, but don't be scared. Let's break it down. The `SolarAzimuth` field and the `SolarElevation` field specify the position of the Sun when the associated picture was taken. The `Time` field specifies the time, which is in 24-hour format, when the picture was taken. If the user is not located near the North or the South Pole, the dynamic wallpaper engine will try to show images based on the current position of the Sun; otherwise it will fallback to using time metadata. Note that only the `Time` field is required, the position of the Sun is optional. If `SolarAzimuth` or `SolarElevation` has a special value of `"*"`, then the position of the Sun will be computed based on the time when the picture was taken and the GPS coordinates stored in its Exif metadata. The `CrossFade` field indicates whether the current image can be blended with the next one. The cross-fading is used to make transitions between images smooth. By default, the `CrossFade` field is set to `true`. Last, but not least, the `FileName` field specifies the file path of the image relative to the manifest json file. Now that you have prepared all images and a manifest file, it's time pull out big guns. Run the following command ```sh kdynamicwallpaperbuilder path/to/manifest.json ``` If the command succeeds, you will see a new file in the current working directory `wallpaper.avif`, which can be used as a dynamic wallpaper. Note that encoding the dynamic wallpaper may take a lot of memory (AVIF encoders are very memory hungry) and time! #### How to Create a Day/Night Dynamic Wallpaper A day/night dynamic wallpaper consists of only two images - one for the day, and one for the night. The engine will automagically figure out which one to use based on the current time or the Sun position at your location. The manifest file for a day/night wallpaper looks as follows ```sh { "Type": "day-night", "Meta": [ { "TimeOfDay": "day", "FileName": "day.png" }, { "TimeOfDay": "night", "FileName": "night.png" } ] } ``` ## How to Use Dynamic Wallpapers for macOS Since dynamic wallpapers for macOS and this plugin are incompatible, you need to use a script to convert dynamic wallpapers. ```sh curl -sLO https://raw.githubusercontent.com/zzag/plasma5-wallpapers-dynamic-extras/master/dynamicwallpaperconverter chmod +x dynamicwallpaperconverter ``` Once you've downloaded the dynamicwallpaperconverter script, you can start converting wallpapers ```sh ./dynamicwallpaperconverter --crossfade file.heic ``` After the command above has finished its execution, you should see a file in the current working directory named `wallpaper.avif`, which can be fed into this plugin. plasma5-wallpapers-dynamic-4.4.1/cmake/000077500000000000000000000000001455105060300177335ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/cmake/Modules/000077500000000000000000000000001455105060300213435ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/cmake/Modules/Findlibexif.cmake000066400000000000000000000042141455105060300245710ustar00rootroot00000000000000#.rst: # Findlibexif # ------- # # Try to find libexif on a Unix system. # # This will define the following variables: # # ``libexif_FOUND`` # True if (the requested version of) libexif is available # ``libexif_VERSION`` # The version of libexif # ``libexif_LIBRARIES`` # This should be passed to target_compile_options() if the target is not # used for linking # ``libexif_INCLUDE_DIRS`` # This should be passed to target_include_directories() if the target is not # used for linking # ``libexif_DEFINITIONS`` # This should be passed to target_compile_options() if the target is not # used for linking # # If ``libexif_FOUND`` is TRUE, it will also define the following imported target: # # ``libexif::libexif`` # The libexif library # # In general we recommend using the imported target, as it is easier to use. # Bear in mind, however, that if the target is in the link interface of an # exported library, it must be made available by the package config file. # SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # SPDX-License-Identifier: BSD-3-Clause find_package(PkgConfig) pkg_check_modules(PKG_libexif QUIET libexif) set(libexif_VERSION ${PKG_libexif_VERSION}) set(libexif_DEFINITIONS ${PKG_libexif_CFLAGS_OTHER}) find_path(libexif_INCLUDE_DIR NAMES libexif/exif-data.h HINTS ${PKG_libexif_INCLUDE_DIRS} ) find_library(libexif_LIBRARY NAMES exif HINTS ${PKG_libexif_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(libexif FOUND_VAR libexif_FOUND REQUIRED_VARS libexif_LIBRARY libexif_INCLUDE_DIR VERSION_VAR libexif_VERSION ) if (libexif_FOUND AND NOT TARGET libexif::libexif) add_library(libexif::libexif UNKNOWN IMPORTED) set_target_properties(libexif::libexif PROPERTIES IMPORTED_LOCATION "${libexif_LIBRARY}" INTERFACE_COMPILE_OPTIONS "${libexif_DEFINITIONS}" INTERFACE_INCLUDE_DIRECTORIES "${libexif_INCLUDE_DIR}" ) endif() set(libexif_INCLUDE_DIRS ${libexif_INCLUDE_DIR}) set(libexif_LIBRARIES ${libexif_LIBRARY}) mark_as_advanced(libexif_INCLUDE_DIR) mark_as_advanced(libexif_LIBRARY) plasma5-wallpapers-dynamic-4.4.1/data/000077500000000000000000000000001455105060300175645ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/data/CMakeLists.txt000066400000000000000000000002661455105060300223300ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause install(DIRECTORY "Dynamic" DESTINATION ${WALLPAPER_INSTALL_DIR}) plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/000077500000000000000000000000001455105060300211505ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/contents/000077500000000000000000000000001455105060300230055ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/contents/images/000077500000000000000000000000001455105060300242525ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/contents/images/dynamic.avif000066400000000000000000000075001455105060300265470ustar00rootroot00000000000000(ftypavisavifavismsf1mif1miafMA1AFmeta(hdlrpictlibavifpitm,ilocDZTiinfinfeav01Color,infemimeXMPapplication/rdf+xmlirefcdscjiprpKipcoispe8pixi av1C(colrnclxipma%moovxmvhdee@trakhtkhdee@8meta(hdlrpictlibavifilocD:iinf,infemimeXMPapplication/rdf+xmlmdia,mdhdeeU(hdlrpictlibavifMminfvmhd$dinfdref url  stblstcoZstsc$stszstsssttsstsduav018HH AOM Coding av1C(colrnclx mdat  BwH2d$jp)JJV<Py{qt?oDoS?3˿S dUҞ?I/H[[-]Կ=$$ zb}͌ۿ oTo%'A+-iGO;{Ix1y\IS% S++(Հ? ?H/o)bwV1?N?j?_Y/oz'Rz9OK=ߡroJJR 20F@MI"9φyVKj01W0̒Ly>E-< 6MIQk( ȁ*Dht|'oFI E9wK ̽ɾdae ?R$|<ܝ͉ 9^@8j ==eCwxb>YF?*#Ihg^‹J%n -/^al\?+Uq@pC\ ^dS,L))OSfaaӅJokZK|F/ b89*C%+,z+u_4GܬWWWEJ)G1Sڮx[-P= 5`H5"&՝T1CuyH@"^ҖⲒ=(020F@Ms"9ԩ-yKj01W0̒Ly>E-< 6MIQk( ȁ*Dht|'oFI E9wK ̽ɾdae ?R$|<ܝ͉ 9^@8j ==eCwxb>YF?*#Ihg^‹J%n -/^al\?+Uq@pC\ ^dS,L))OSfaaӅJokZK|F/ b89*C%+,z+u_4GܬWWWEJ)G1Sڮx[-P= 5`H5"&՝T1CuyH@"^ҖⲒ=(020BF@ GC[q,@/&.H9-#߹S A<|#rj} SPDX-License-Identifier: CC-BY-SA-4.0 plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/metadata.desktop000066400000000000000000000002711455105060300243230ustar00rootroot00000000000000[Desktop Entry] Name=Dynamic X-KDE-PluginInfo-Name=Dynamic X-KDE-PluginInfo-Author=Vlad Zahorodnii X-KDE-PluginInfo-Email=vlad.zahorodnii@kde.org X-KDE-PluginInfo-License=CC-BY-SA-4.0 plasma5-wallpapers-dynamic-4.4.1/data/Dynamic/metadata.desktop.license000066400000000000000000000001511455105060300257410ustar00rootroot00000000000000SPDX-FileCopyrightText: 2020 Vlad Zahorodnii SPDX-License-Identifier: CC0-1.0 plasma5-wallpapers-dynamic-4.4.1/data/solar.png000066400000000000000000003721451455105060300214260ustar00rootroot00000000000000PNG  IHDR@oiCCPicc(u;KA?)X(Xj,lHT0j, lhh+*"X|5;FH3832s|ьfa0K4юړQj;TRjwuc'9[pN  :r@+'8Uw|l |g(U*Ҏ)< 63y<&AZ-D$r I$}?oSGxEKW]!._o1:R@Auyc?…Ug%ы-|mpvYђp]vIH~>ÀShC 4/]7䉮aoe7g{<4 pHYsaa?i IDATx^|\ŵM]{7:0^JBPBK$@C-Lƀ+qUջҮvfFeYwUV{?/b-{g~?=sM @@@@@Fsa*             b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =      b%eB      @{@@@@@l'@vKʄ@@@@@@     N햔 !     @@@@@-)B@@@@@       `; [R&     @@@@@@@v@lL@@@@@p      nI     @@@@@@ ݒ2!@@@@@ =     pnFL@@OI|5+-/"i(P_/VKcWJJ#11  q"hR-N4@@@ |UT,5+MPnmICAʪ%PS/AFgp9egn>?c9@@[HtC@@~QTjWo1AuU&QR5$\`#h:r̪gŝܑúM :A~ye~~N  @ V8E@H@g$dKSINGͼ65v TCQ@=G(VL ukSm5Ue2.UҤKSקjz}{Co؉p,bS (_-8}ܼqYR Oܐ#  *@@@6Β-%WF=WՃwq?:ŕ(DdIBn$dKbT>ejHxrWDfކIWjkFNSL5e5P 2ԫ5ѣ5A}:N5ƠU .sœThymD&>F?T@]C&R;f8v ]?<5-MTWVSr@@XH/>SG@$e3:mY:`rL@lZ%Ѳ:pV/ ri݆H#  Θ@@{~v#eU mP6:'6hN  7@f(  `_>YN{vl:*4@@q$  @T/%#a1).2#C Ngh5URQZ11@@bY z@S]ܻ-;vb(9-T å ;ݦ`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R&vҤKӗB @Lu7k @@I6ߘŔ LaGR @ @xYj @9䎻2 @ Pnx,AmJYnA @<@cfӢ^ @(z$@ @ @J,P_5O @ @(:$@ @ @J- )  @ @ @ @NC @ @ @R k @ @(:$@ @ @J- )  @ @ @ @NC @ @ @R k @ @(:$@ @ @J- )  @ @ @ @NC @ @ @R k @ @(:$@ @ @J- ) _hU\mLgQ*|L +̈ł^!XOXQ =XE>"C$ԬH?,|ZF0ӹݻk ν @ @Ld}  @ @ p9  @]?c^쮮8yw̘qM~UܴjE},'@ @mGG sL @`ZjZh׻-*3+cO=};bm+㆕7Oy=<YXm,xFr˔ @d8rMH @C`G's1>>,@6 -m?8m Cc;l Nz%oZ)Z66q @ @ 2N]f @i(ʎGqqH܎]¤(b&OeQ-C웶> @gLk!@H'pѥGrwikM şZpI}j׏~`O:S @ p" Q3 @NR`e~C/k # # SPDX-License-Identifier: BSD-3-Clause plasma_install_package(package com.github.zzag.dynamic wallpapers wallpaper) add_subdirectory(declarative) add_subdirectory(lib) add_subdirectory(plugins) add_subdirectory(tools) add_subdirectory(translations) plasma5-wallpapers-dynamic-4.4.1/src/Messages.sh000066400000000000000000000003541455105060300215470ustar00rootroot00000000000000#! /usr/bin/env bash # SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 $XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/plasma_wallpaper_com.github.zzag.dynamic.pot plasma5-wallpapers-dynamic-4.4.1/src/declarative/000077500000000000000000000000001455105060300217255ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/declarative/CMakeLists.txt000066400000000000000000000025731455105060300244740ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_com.github.zzag.dynamic\") set(FALLBACK_WALLPAPER "Dynamic") configure_file(config-dynamicwallpaper.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dynamicwallpaper.h) set(dynamicwallpaperplugin_SOURCES dynamicwallpapercrawler.cpp dynamicwallpaperengine.cpp dynamicwallpaperengine_daynight.cpp dynamicwallpaperengine_solar.cpp dynamicwallpaperextensionplugin.cpp dynamicwallpaperhandler.cpp dynamicwallpaperimagehandle.cpp dynamicwallpaperimageprovider.cpp dynamicwallpapermodel.cpp dynamicwallpaperpreviewcache.cpp dynamicwallpaperpreviewjob.cpp dynamicwallpaperpreviewprovider.cpp dynamicwallpaperprober.cpp ) add_library(plasma_wallpaper_dynamicplugin ${dynamicwallpaperplugin_SOURCES}) target_link_libraries(plasma_wallpaper_dynamicplugin Qt5::Concurrent Qt5::Core Qt5::Gui Qt5::Positioning Qt5::Qml Qt5::Quick Qt5::QuickPrivate KF5::ConfigCore KF5::I18n KF5::Package KDynamicWallpaper::KDynamicWallpaper ) install(TARGETS plasma_wallpaper_dynamicplugin DESTINATION ${KDE_INSTALL_QMLDIR}/com/github/zzag/plasma/wallpapers/dynamic) install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/com/github/zzag/plasma/wallpapers/dynamic) plasma5-wallpapers-dynamic-4.4.1/src/declarative/config-dynamicwallpaper.h.cmake000066400000000000000000000002651455105060300277570ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #define FALLBACK_WALLPAPER "${FALLBACK_WALLPAPER}" plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpapercrawler.cpp000066400000000000000000000064271455105060300273560ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpapercrawler.h" #include #include /*! * \class DynamicWallpaperCrawler * \brief The DynamicWallpaperCrawler class discovers dynamic wallpapers. */ /*! * Constructs an DynamicWallpaperCrawler object with the given \p parent. */ DynamicWallpaperCrawler::DynamicWallpaperCrawler(QObject *parent) : QThread(parent) , m_token(QUuid::createUuid()) { } /*! * Destructs the DynamicWallpaperCrawler object. */ DynamicWallpaperCrawler::~DynamicWallpaperCrawler() { wait(); } /*! * Returns the UUID that uniquely identifies this crawler. */ QUuid DynamicWallpaperCrawler::token() const { return m_token; } /*! * Sets the list of directories where dynamic wallpapers should be searched to \p roots. * * Dynamic wallpapers will be searched recursively. */ void DynamicWallpaperCrawler::setSearchRoots(const QStringList &roots) { m_searchRoots = roots; } /*! * Returns the list of directories where dynamic wallpapers should be searched recursively. */ QStringList DynamicWallpaperCrawler::searchRoots() const { return m_searchRoots; } /*! * Sets the package structure for dynamic wallpaper packages to \p structure. */ void DynamicWallpaperCrawler::setPackageStructure(KPackage::PackageStructure *structure) { m_packageStructure = structure; } /*! * Returns the package structure for dynamic wallpaper packages. */ KPackage::PackageStructure *DynamicWallpaperCrawler::packageStructure() const { return m_packageStructure; } void DynamicWallpaperCrawler::run() { for (const QString &candidate : qAsConst(m_searchRoots)) visitFolder(candidate); deleteLater(); } void DynamicWallpaperCrawler::visitFolder(const QString &filePath) { QDir currentFolder(filePath); currentFolder.setFilter(QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::Readable | QDir::AllDirs | QDir::Files); currentFolder.setNameFilters({ QStringLiteral("*.avif") }); const QFileInfoList fileInfos = currentFolder.entryInfoList(); for (const QFileInfo &fileInfo : fileInfos) { if (fileInfo.isDir()) { if (checkPackage(fileInfo.filePath())) { Q_EMIT foundPackage(fileInfo.filePath(), token()); } else { visitFolder(fileInfo.filePath()); } } else { visitFile(fileInfo.filePath()); } } } void DynamicWallpaperCrawler::visitFile(const QString &filePath) { // Not every avif file is a dynamic wallpaper, we need to read the file contents to // determine whether filePath actually points to a dynamic wallpaper file. KDynamicWallpaperReader reader(filePath); if (reader.error() == KDynamicWallpaperReader::NoError) Q_EMIT foundFile(filePath, token()); } bool DynamicWallpaperCrawler::checkPackage(const QString &filePath) const { if (!QFile::exists(filePath + QLatin1String("/metadata.desktop")) && !QFile::exists(filePath + QLatin1String("/metadata.json"))) return false; KPackage::Package package(packageStructure()); package.setPath(filePath); const QUrl imageUrl = package.fileUrl(QByteArrayLiteral("dynamic")); return imageUrl.isValid(); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpapercrawler.h000066400000000000000000000021161455105060300270120ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include class DynamicWallpaperCrawler : public QThread { Q_OBJECT public: explicit DynamicWallpaperCrawler(QObject *parent = nullptr); ~DynamicWallpaperCrawler() override; QUuid token() const; void setSearchRoots(const QStringList &candidates); QStringList searchRoots() const; void setPackageStructure(KPackage::PackageStructure *structure); KPackage::PackageStructure *packageStructure() const; Q_SIGNALS: void foundPackage(const QString &packagePath, const QUuid &token); void foundFile(const QString &filePath, const QUuid &token); protected: void run() override; private: void visitFolder(const QString &filePath); void visitFile(const QString &filePath); bool checkPackage(const QString &filePath) const; KPackage::PackageStructure *m_packageStructure = nullptr; QStringList m_searchRoots; QUuid m_token; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine.cpp000066400000000000000000000016761455105060300271650ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperengine.h" /*! * Destructs the DynamicWallpaperEngine object. */ DynamicWallpaperEngine::~DynamicWallpaperEngine() { } /*! * Returns \c true if the engine has been expired and must be rebuilt; otherwise returns \c false. */ bool DynamicWallpaperEngine::isExpired() const { return false; } /*! * Returns the QUrl of the image that is currently being displayed in the top layer. */ QUrl DynamicWallpaperEngine::topLayer() const { return m_topLayer; } /*! * Returns the QUrl of the image that is currently beind displayed in the bottom layer. */ QUrl DynamicWallpaperEngine::bottomLayer() const { return m_bottomLayer; } /*! * Returns the blend factor between the bottom layer and the top layer. */ qreal DynamicWallpaperEngine::blendFactor() const { return m_blendFactor; } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine.h000066400000000000000000000010061455105060300266150ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include class DynamicWallpaperEngine { public: virtual ~DynamicWallpaperEngine(); virtual void update() = 0; virtual bool isExpired() const; QUrl bottomLayer() const; QUrl topLayer() const; qreal blendFactor() const; protected: QUrl m_topLayer; QUrl m_bottomLayer; qreal m_blendFactor; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine_daynight.cpp000066400000000000000000000043621455105060300310470ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperengine_daynight.h" #include "dynamicwallpaperimagehandle.h" #include DayNightDynamicWallpaperEngine *DayNightDynamicWallpaperEngine::create(const QList &metadata, const QUrl &source, const QGeoCoordinate &location) { return new DayNightDynamicWallpaperEngine(metadata, source, location); } DayNightDynamicWallpaperEngine::DayNightDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const QGeoCoordinate &location) : m_location(location) { for (const KDynamicWallpaperMetaData &md : metadata) { const auto &dayNight = std::get(md); if (dayNight.timeOfDay() == KDayNightDynamicWallpaperMetaData::TimeOfDay::Day) { m_topLayer = DynamicWallpaperImageHandle(source.toLocalFile(), dayNight.index()).toUrl(); } else if (dayNight.timeOfDay() == KDayNightDynamicWallpaperMetaData::TimeOfDay::Night) { m_bottomLayer = DynamicWallpaperImageHandle(source.toLocalFile(), dayNight.index()).toUrl(); } } } void DayNightDynamicWallpaperEngine::update() { if (m_location.isValid()) { const KSunPosition sunPosition(QDateTime::currentDateTime(), m_location); if (sunPosition.isValid()) { m_blendFactor = (qBound(-6.0, sunPosition.elevation(), 6.0) + 6.0) / 12.0; return; } } const QTime currentTime = QTime::currentTime(); if (currentTime < QTime(6, 0)) { m_blendFactor = 0; } else if (currentTime < QTime(7, 0)) { m_blendFactor = QTime(6, 0).secsTo(currentTime) / 3600.0; } else if (currentTime < QTime(18, 0)) { m_blendFactor = 1; } else if (currentTime < QTime(19, 0)) { m_blendFactor = currentTime.secsTo(QTime(19, 0)) / 3600.0; } else { m_blendFactor = 0; } } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine_daynight.h000066400000000000000000000015341455105060300305120ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include "dynamicwallpaperengine.h" #include #include class DayNightDynamicWallpaperEngine : public DynamicWallpaperEngine { public: void update() override; static DayNightDynamicWallpaperEngine *create(const QList &metadata, const QUrl &source, const QGeoCoordinate &location); private: DayNightDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const QGeoCoordinate &location); QGeoCoordinate m_location; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine_solar.cpp000066400000000000000000000144751455105060300303660ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperengine_solar.h" #include "dynamicwallpaperimagehandle.h" #include SolarDynamicWallpaperEngine::SolarDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const KSunPath &sunPath, const KSunPosition &midnight, const QGeoCoordinate &location, const QDateTime &dateTime) : m_mode(Mode::Normal) , m_source(source) , m_sunPath(sunPath) , m_midnight(midnight) , m_location(location) , m_dateTime(dateTime) { for (const KDynamicWallpaperMetaData &md : metadata) { const auto &solar = std::get(md); m_progressToMetaData.insert(progressForMetaData(solar), solar); } } SolarDynamicWallpaperEngine::SolarDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const QDateTime &dateTime) : m_mode(Mode::Fallback) , m_source(source) , m_dateTime(dateTime) { for (const KDynamicWallpaperMetaData &md : metadata) { const auto &solar = std::get(md); m_progressToMetaData.insert(progressForMetaData(solar), solar); } } bool SolarDynamicWallpaperEngine::isExpired() const { return m_dateTime.date() != QDate::currentDate(); } static bool checkSolarMetadata(const QList &metadata) { return std::all_of(metadata.begin(), metadata.end(), [](auto md) { const auto &solar = std::get(md); return solar.fields() & (KSolarDynamicWallpaperMetaData::SolarAzimuthField | KSolarDynamicWallpaperMetaData::SolarElevationField); }); } SolarDynamicWallpaperEngine *SolarDynamicWallpaperEngine::create(const QList &metadata, const QUrl &source, const QGeoCoordinate &location) { const QDateTime dateTime = QDateTime::currentDateTime(); if (location.isValid() && checkSolarMetadata(metadata)) { const KSunPosition midnight = KSunPosition::midnight(dateTime, location); if (midnight.isValid()) { const KSunPath path = KSunPath::create(dateTime, location); if (path.isValid()) return new SolarDynamicWallpaperEngine(metadata, source, path, midnight, location, dateTime); } } return new SolarDynamicWallpaperEngine(metadata, source, dateTime); } qreal SolarDynamicWallpaperEngine::progressForMetaData(const KSolarDynamicWallpaperMetaData &metaData) const { if (m_mode == Mode::Fallback) { return metaData.time(); } else { const KSunPosition position(metaData.solarElevation(), metaData.solarAzimuth()); return progressForPosition(position); } } qreal SolarDynamicWallpaperEngine::progressForDateTime(const QDateTime &dateTime) const { if (m_mode == Mode::Fallback) { QDateTime midnight = dateTime; midnight.setTime(QTime()); return midnight.secsTo(dateTime) / 86400.0; } else { const KSunPosition position(dateTime, m_location); return progressForPosition(position); } } qreal SolarDynamicWallpaperEngine::progressForPosition(const KSunPosition &position) const { const QVector3D projectedMidnight = m_sunPath.project(m_midnight); const QVector3D projectedPosition = m_sunPath.project(position); const QVector3D v1 = (projectedMidnight - m_sunPath.center()).normalized(); const QVector3D v2 = (projectedPosition - m_sunPath.center()).normalized(); const QVector3D cross = QVector3D::crossProduct(v1, v2); const float dot = QVector3D::dotProduct(v1, v2); const float det = QVector3D::dotProduct(m_sunPath.normal(), cross); qreal angle = std::atan2(det, dot); if (angle < 0) angle += 2 * M_PI; return angle / (2 * M_PI); } static qreal computeTimeSpan(qreal from, qreal to) { if (to < from) return (1 - from) + to; return to - from; } static qreal computeBlendFactor(qreal from, qreal to, qreal now) { const qreal reflectedFrom = 1 - from; const qreal reflectedTo = 1 - to; const qreal totalDuration = computeTimeSpan(from, to); const qreal totalElapsed = computeTimeSpan(from, now); if ((reflectedFrom < from) ^ (reflectedTo < to)) { if (reflectedFrom < to) { const qreal threshold = computeTimeSpan(from, reflectedFrom); if (totalElapsed < threshold) return 0; return (totalElapsed - threshold) / (totalDuration - threshold); } if (from < reflectedTo) { const qreal threshold = computeTimeSpan(from, reflectedTo); if (threshold < totalElapsed) return 1; return totalElapsed / threshold; } } return totalElapsed / totalDuration; } void SolarDynamicWallpaperEngine::update() { const qreal progress = progressForDateTime(QDateTime::currentDateTime()); QMap::iterator nextImage; QMap::iterator currentImage; nextImage = m_progressToMetaData.upperBound(progress); if (nextImage == m_progressToMetaData.end()) nextImage = m_progressToMetaData.begin(); if (nextImage == m_progressToMetaData.begin()) currentImage = std::prev(m_progressToMetaData.end()); else currentImage = std::prev(nextImage); if (currentImage->crossFadeMode() == KSolarDynamicWallpaperMetaData::CrossFade) { m_blendFactor = computeBlendFactor(currentImage.key(), nextImage.key(), progress); } else { m_blendFactor = 0; } m_topLayer = DynamicWallpaperImageHandle(m_source.toLocalFile(), nextImage->index()).toUrl(); m_bottomLayer = DynamicWallpaperImageHandle(m_source.toLocalFile(), currentImage->index()).toUrl(); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperengine_solar.h000066400000000000000000000031431455105060300300210ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include "dynamicwallpaperengine.h" #include #include #include class SolarDynamicWallpaperEngine : public DynamicWallpaperEngine { public: bool isExpired() const override; void update() override; static SolarDynamicWallpaperEngine *create(const QList &metadata, const QUrl &source, const QGeoCoordinate &location); private: SolarDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const KSunPath &sunPath, const KSunPosition &midnight, const QGeoCoordinate &location, const QDateTime &dateTime); SolarDynamicWallpaperEngine(const QList &metadata, const QUrl &source, const QDateTime &dateTime); qreal progressForPosition(const KSunPosition &position) const; qreal progressForMetaData(const KSolarDynamicWallpaperMetaData &metaData) const; qreal progressForDateTime(const QDateTime &dateTime) const; enum class Mode { Normal, Fallback, }; Mode m_mode; QUrl m_source; QMap m_progressToMetaData; KSunPath m_sunPath; KSunPosition m_midnight; QGeoCoordinate m_location; QDateTime m_dateTime; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperextensionplugin.cpp000066400000000000000000000017611455105060300311460ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperextensionplugin.h" #include "dynamicwallpaperhandler.h" #include "dynamicwallpaperimageprovider.h" #include "dynamicwallpapermodel.h" #include "dynamicwallpaperpreviewprovider.h" #include #include void DynamicWallpaperExtensionPlugin::registerTypes(const char *uri) { qmlRegisterType(uri, 1, 0, "DynamicWallpaperHandler"); qmlRegisterType(uri, 1, 0, "DynamicWallpaperModel"); qmlRegisterType(uri, 1, 0, "SystemClockMonitor"); } void DynamicWallpaperExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri) engine->addImageProvider(QLatin1String("dynamic"), new DynamicWallpaperImageProvider); engine->addImageProvider(QLatin1String("dynamicpreview"), new DynamicWallpaperPreviewProvider); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperextensionplugin.h000066400000000000000000000007171455105060300306130ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include class DynamicWallpaperExtensionPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void registerTypes(const char *uri) override; void initializeEngine(QQmlEngine *engine, const char *uri) override; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperglobals.h000066400000000000000000000007341455105060300270020ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include class DynamicWallpaperImageAsyncResult { public: DynamicWallpaperImageAsyncResult() {} explicit DynamicWallpaperImageAsyncResult(const QImage &image) : image(image) {} explicit DynamicWallpaperImageAsyncResult(const QString &text) : errorString(text) {} QImage image; QString errorString; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperhandler.cpp000066400000000000000000000151201455105060300273220ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "config-dynamicwallpaper.h" #include "dynamicwallpaperengine_daynight.h" #include "dynamicwallpaperengine_solar.h" #include "dynamicwallpaperhandler.h" #include #include #include #include #include DynamicWallpaperHandler::DynamicWallpaperHandler(QObject *parent) : QObject(parent) , m_updateTimer(new QTimer(this)) { m_updateTimer->setInterval(0); m_updateTimer->setSingleShot(true); connect(m_updateTimer, &QTimer::timeout, this, &DynamicWallpaperHandler::update); } DynamicWallpaperHandler::~DynamicWallpaperHandler() { delete m_engine; } void DynamicWallpaperHandler::setLocation(const QGeoCoordinate &coordinate) { if (m_location == coordinate) return; m_location = coordinate; reloadEngine(); scheduleUpdate(); Q_EMIT locationChanged(); } QGeoCoordinate DynamicWallpaperHandler::location() const { return m_location; } static QUrl locateWallpaper(const QString &name) { const QString packagePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("wallpapers/") + name, QStandardPaths::LocateDirectory); KPackage::PackageLoader *packageLoader = KPackage::PackageLoader::self(); KPackage::Package package = packageLoader->loadPackage(QStringLiteral("Wallpaper/Dynamic")); package.setPath(packagePath); if (package.isValid()) return package.fileUrl(QByteArrayLiteral("dynamic")); const QString filePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("wallpapers/") + name, QStandardPaths::LocateFile); return QUrl::fromLocalFile(filePath); } static QUrl defaultLookAndFeelWallpaper() { KConfigGroup kdeConfigGroup(KSharedConfig::openConfig(QStringLiteral("kdeglobals")), "KDE"); const QString lookAndFeelPackageName = kdeConfigGroup.readEntry("LookAndFeelPackage"); KPackage::PackageLoader *packageLoader = KPackage::PackageLoader::self(); KPackage::Package lookAndFeelPackage = packageLoader->loadPackage(QStringLiteral("Plasma/LookAndFeel")); if (!lookAndFeelPackageName.isEmpty()) lookAndFeelPackage.setPath(lookAndFeelPackageName); KSharedConfigPtr lookAndFeelConfig = KSharedConfig::openConfig(lookAndFeelPackage.filePath("defaults")); KConfigGroup wallpaperConfigGroup = KConfigGroup(lookAndFeelConfig, "Dynamic Wallpaper"); const QString wallpaperName = wallpaperConfigGroup.readEntry("Image"); if (wallpaperName.isEmpty()) return QUrl(); return locateWallpaper(wallpaperName); } static QUrl defaultFallbackWallpaper() { return locateWallpaper(QStringLiteral(FALLBACK_WALLPAPER)); } static QUrl defaultWallpaper() { QUrl fileUrl = defaultLookAndFeelWallpaper(); if (fileUrl.isValid()) return fileUrl; return defaultFallbackWallpaper(); } void DynamicWallpaperHandler::setSource(const QUrl &url) { const QUrl source = url.isValid() ? url : defaultWallpaper(); if (m_source == source) return; m_source = source; reloadDescription(); reloadEngine(); scheduleUpdate(); Q_EMIT sourceChanged(); } QUrl DynamicWallpaperHandler::source() const { return m_source; } void DynamicWallpaperHandler::setTopLayer(const QUrl &url) { if (m_topLayer == url) return; m_topLayer = url; Q_EMIT topLayerChanged(); } QUrl DynamicWallpaperHandler::topLayer() const { return m_topLayer; } void DynamicWallpaperHandler::setBottomLayer(const QUrl &url) { if (m_bottomLayer == url) return; m_bottomLayer = url; Q_EMIT bottomLayerChanged(); } QUrl DynamicWallpaperHandler::bottomLayer() const { return m_bottomLayer; } void DynamicWallpaperHandler::setBlendFactor(qreal blendFactor) { if (m_blendFactor == blendFactor) return; m_blendFactor = blendFactor; Q_EMIT blendFactorChanged(); } qreal DynamicWallpaperHandler::blendFactor() const { return m_blendFactor; } void DynamicWallpaperHandler::setStatus(Status status) { if (m_status == status) return; m_status = status; Q_EMIT statusChanged(); } DynamicWallpaperHandler::Status DynamicWallpaperHandler::status() const { return m_status; } void DynamicWallpaperHandler::setErrorString(const QString &text) { if (m_errorString == text) return; m_errorString = text; Q_EMIT errorStringChanged(); } QString DynamicWallpaperHandler::errorString() const { return m_errorString; } void DynamicWallpaperHandler::scheduleUpdate() { m_updateTimer->start(); } void DynamicWallpaperHandler::update() { if (m_status != Ready) return; if (!m_engine || m_engine->isExpired()) reloadEngine(); m_engine->update(); QUrl topLayer = m_engine->topLayer(); if (m_engine->blendFactor() == 0) topLayer = QUrl(); QUrl bottomLayer = m_engine->bottomLayer(); if (m_engine->blendFactor() == 1) bottomLayer = QUrl(); setTopLayer(topLayer); setBottomLayer(bottomLayer); setBlendFactor(m_engine->blendFactor()); } void DynamicWallpaperHandler::reloadDescription() { const QString fileName = m_source.toLocalFile(); m_metadata = KDynamicWallpaperReader(fileName).metaData(); if (!m_metadata.isEmpty()) { setStatus(Ready); } else { setErrorString(i18n("%1 is not a dynamic wallpaper", fileName)); setStatus(Error); } } static bool isSolar(const QList &metadata) { return std::all_of(metadata.constBegin(), metadata.constEnd(), [](const auto md) { return std::holds_alternative(md); }); } static bool isDayNight(const QList &metadata) { return std::all_of(metadata.constBegin(), metadata.constEnd(), [](const auto md) { return std::holds_alternative(md); }); } void DynamicWallpaperHandler::reloadEngine() { delete m_engine; m_engine = nullptr; if (m_metadata.isEmpty()) return; if (isSolar(m_metadata)) { m_engine = SolarDynamicWallpaperEngine::create(m_metadata, m_source, m_location); } else if (isDayNight(m_metadata)) { m_engine = DayNightDynamicWallpaperEngine::create(m_metadata, m_source, m_location); } } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperhandler.h000066400000000000000000000043351455105060300267750ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include #include class DynamicWallpaperEngine; class DynamicWallpaperHandler : public QObject { Q_OBJECT Q_PROPERTY(QGeoCoordinate location READ location WRITE setLocation NOTIFY locationChanged) Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) Q_PROPERTY(QUrl topLayer READ topLayer WRITE setTopLayer NOTIFY topLayerChanged) Q_PROPERTY(QUrl bottomLayer READ bottomLayer WRITE setBottomLayer NOTIFY bottomLayerChanged) Q_PROPERTY(qreal blendFactor READ blendFactor WRITE setBlendFactor NOTIFY blendFactorChanged) Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) public: enum Status { Null, Ready, Error }; Q_ENUM(Status) explicit DynamicWallpaperHandler(QObject *parent = nullptr); ~DynamicWallpaperHandler() override; void setLocation(const QGeoCoordinate &coordinate); QGeoCoordinate location() const; void setSource(const QUrl &url); QUrl source() const; void setTopLayer(const QUrl &url); QUrl topLayer() const; void setBottomLayer(const QUrl &url); QUrl bottomLayer() const; void setBlendFactor(qreal blendFactor); qreal blendFactor() const; void setStatus(Status status); Status status() const; void setErrorString(const QString &text); QString errorString() const; public Q_SLOTS: void scheduleUpdate(); void update(); Q_SIGNALS: void locationChanged(); void sourceChanged(); void topLayerChanged(); void bottomLayerChanged(); void blendFactorChanged(); void statusChanged(); void errorStringChanged(); private: void reloadDescription(); void reloadEngine(); DynamicWallpaperEngine *m_engine = nullptr; QList m_metadata; QTimer *m_updateTimer; QGeoCoordinate m_location; QString m_errorString; QUrl m_source; QUrl m_topLayer; QUrl m_bottomLayer; qreal m_blendFactor = 0; Status m_status = Null; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperimagehandle.cpp000066400000000000000000000062221455105060300301460ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperimagehandle.h" #include /*! * Constructs an invalid DynamicWallpaperImageHandle object. */ DynamicWallpaperImageHandle::DynamicWallpaperImageHandle() : m_imageIndex(-1) { } /*! * Constructs a DynamicWallpaperImageHandle object with the given \p fileName and image \p index. */ DynamicWallpaperImageHandle::DynamicWallpaperImageHandle(const QString &fileName, int index) : m_fileName(fileName) , m_imageIndex(index) { } /*! * Returns \c true if the image handle is valid; otherwise returns \c false. */ bool DynamicWallpaperImageHandle::isValid() const { return !m_fileName.isEmpty() && m_imageIndex != -1; } /*! * Sets the file name of the image handle to \p fileName. */ void DynamicWallpaperImageHandle::setFileName(const QString &fileName) { m_fileName = fileName; } /*! * Returns the file name of the image handle. */ QString DynamicWallpaperImageHandle::fileName() const { return m_fileName; } /*! * Sets the image index of the image handle to \p index. */ void DynamicWallpaperImageHandle::setImageIndex(int index) { m_imageIndex = index; } /*! * Returns the image index of the image handle. */ int DynamicWallpaperImageHandle::imageIndex() const { return m_imageIndex; } static QString fileNameFromBase64(const QStringRef &base64) { return QByteArray::fromBase64(base64.toUtf8()); } static QString base64FromFileName(const QString &fileName) { return fileName.toUtf8().toBase64(); } static int imageIndexFromString(const QStringRef &string) { bool ok; const int imageIndex = string.toInt(&ok); if (ok) return imageIndex; return -1; } static QString stringFromImageIndex(int imageIndex) { return QString::number(imageIndex); } /*! * Converts the value of the image handle to a QString and returns it. */ QString DynamicWallpaperImageHandle::toString() const { const QString fileName = base64FromFileName(m_fileName); const QString imageIndex = stringFromImageIndex(m_imageIndex); return fileName + '#' + imageIndex; } /*! * Converts the value of the image handle to a QUrl which can be passed to the Image QML component. */ QUrl DynamicWallpaperImageHandle::toUrl() const { return QLatin1String("image://dynamic/") + toString(); } /*! * Creates a DynamicWallpaperImageHandle from the specified string \p string. */ DynamicWallpaperImageHandle DynamicWallpaperImageHandle::fromString(const QString &string) { DynamicWallpaperImageHandle handle; #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) const QVector parts = string.splitRef('#', Qt::SkipEmptyParts); #else const QVector parts = string.splitRef('#', QString::SkipEmptyParts); #endif if (parts.count() != 2) return handle; // Encoding and decoding a file name to/from base64 is definitely an overkill, but I don't // want to deal with os-specific file path conventions. Sue me. :/ handle.setFileName(fileNameFromBase64(parts[0])); handle.setImageIndex(imageIndexFromString(parts[1])); return handle; } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperimagehandle.h000066400000000000000000000012561455105060300276150ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include class DynamicWallpaperImageHandle { public: DynamicWallpaperImageHandle(); DynamicWallpaperImageHandle(const QString &fileName, int index); bool isValid() const; void setFileName(const QString &fileName); QString fileName() const; void setImageIndex(int index); int imageIndex() const; QString toString() const; QUrl toUrl() const; static DynamicWallpaperImageHandle fromString(const QString &string); private: QString m_fileName; int m_imageIndex; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperimageprovider.cpp000066400000000000000000000073661455105060300305570ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperimageprovider.h" #include "dynamicwallpaperglobals.h" #include "dynamicwallpaperimagehandle.h" #include #include #include static DynamicWallpaperImageAsyncResult load(const QString &fileName, int index, const QSize &requestedSize, const QQuickImageProviderOptions &options) { const KDynamicWallpaperReader reader(fileName); if (reader.error() != KDynamicWallpaperReader::NoError) return DynamicWallpaperImageAsyncResult(reader.errorString()); const QImage image = reader.image(index); const QSize effectiveSize = QQuickImageProviderWithOptions::loadSize(image.size(), requestedSize, QByteArrayLiteral("avif"), options); return DynamicWallpaperImageAsyncResult(image.scaled(effectiveSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } class DynamicWallpaperAsyncImageResponse : public QQuickImageResponse { public: DynamicWallpaperAsyncImageResponse(const QString &fileName, int index, const QSize &requestedSize, const QQuickImageProviderOptions &options); QQuickTextureFactory *textureFactory() const override; QString errorString() const override; private Q_SLOTS: void handleFinished(); private: QFutureWatcher *m_watcher; QImage m_image; QString m_errorString; }; DynamicWallpaperAsyncImageResponse::DynamicWallpaperAsyncImageResponse(const QString &fileName, int index, const QSize &requestedSize, const QQuickImageProviderOptions &options) { m_watcher = new QFutureWatcher(this); connect(m_watcher, &QFutureWatcher::finished, this, &DynamicWallpaperAsyncImageResponse::handleFinished); m_watcher->setFuture(QtConcurrent::run(load, fileName, index, requestedSize, options)); } void DynamicWallpaperAsyncImageResponse::handleFinished() { const DynamicWallpaperImageAsyncResult result = m_watcher->result(); if (result.errorString.isEmpty()) m_image = result.image; else m_errorString = result.errorString; Q_EMIT finished(); } QQuickTextureFactory *DynamicWallpaperAsyncImageResponse::textureFactory() const { return QQuickTextureFactory::textureFactoryForImage(m_image); } QString DynamicWallpaperAsyncImageResponse::errorString() const { return m_errorString; } DynamicWallpaperImageProvider::DynamicWallpaperImageProvider() : QQuickImageProviderWithOptions(ImageType::ImageResponse) { } QQuickImageResponse *DynamicWallpaperImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) { const DynamicWallpaperImageHandle handle = DynamicWallpaperImageHandle::fromString(id); return new DynamicWallpaperAsyncImageResponse(handle.fileName(), handle.imageIndex(), requestedSize, options); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperimageprovider.h000066400000000000000000000010411455105060300302040ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include // TODO: Use public API in Qt 6 class DynamicWallpaperImageProvider : public QQuickImageProviderWithOptions { public: DynamicWallpaperImageProvider(); QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) override; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpapermodel.cpp000066400000000000000000000414071455105060300270140ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpapermodel.h" #include "dynamicwallpapercrawler.h" #include "dynamicwallpaperprober.h" #include #include #include #include #include #include #include // TODO: The model can be implemented better. class DynamicWallpaper { public: static DynamicWallpaper *fromFile(const QUrl &fileUrl); static DynamicWallpaper *fromPackage(const QUrl &packageUrl); QUrl imageUrl; QUrl folderUrl; QUrl previewUrl; QString name; QString packageName; QString license; QString author; bool isPackage = false; bool isCustom = false; bool isRemovable = false; bool isZombie = false; }; static QUrl folderUrlForImageUrl(const QUrl &url) { const QString fileName = url.toLocalFile(); const QFileInfo fileInfo(fileName); return QUrl::fromLocalFile(fileInfo.path()); } static QUrl previewUrlForImageUrl(const QUrl &url) { const QString fileName = url.toLocalFile(); const QString base64 = fileName.toUtf8().toBase64(); return QLatin1String("image://dynamicpreview/") + base64; } static bool checkRemovable(const QUrl &url) { const QString fileName = url.toLocalFile(); const QString dataDirectory = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); return fileName.startsWith(dataDirectory); } DynamicWallpaper *DynamicWallpaper::fromFile(const QUrl &fileUrl) { DynamicWallpaper *wallpaper = new DynamicWallpaper; wallpaper->imageUrl = fileUrl; wallpaper->folderUrl = folderUrlForImageUrl(fileUrl); wallpaper->previewUrl = previewUrlForImageUrl(fileUrl); wallpaper->name = fileUrl.fileName(QUrl::PrettyDecoded); return wallpaper; } DynamicWallpaper *DynamicWallpaper::fromPackage(const QUrl &packageUrl) { KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Wallpaper/Dynamic")); package.setPath(packageUrl.toLocalFile()); const QUrl fileUrl = package.fileUrl(QByteArrayLiteral("dynamic")); const KPluginMetaData metaData = package.metadata(); DynamicWallpaper *wallpaper = new DynamicWallpaper; wallpaper->imageUrl = fileUrl; wallpaper->folderUrl = folderUrlForImageUrl(fileUrl); wallpaper->previewUrl = previewUrlForImageUrl(fileUrl); wallpaper->name = metaData.name(); wallpaper->packageName = metaData.pluginId(); wallpaper->license = metaData.license(); wallpaper->isPackage = true; if (!metaData.authors().isEmpty()) wallpaper->author = metaData.authors().first().name(); return wallpaper; } class DynamicWallpaperModelPrivate : public QObject { Q_OBJECT public: DynamicWallpaperModelPrivate(DynamicWallpaperModel *model); DynamicWallpaper *wallpaperForIndex(const QModelIndex &index) const; void internalAppend(DynamicWallpaper *wallpaper); void internalPrepend(DynamicWallpaper *wallpaper); void internalScheduleRemove(const QModelIndex &index, bool set); void internalRemove(const QModelIndex &index); void internalReset(); bool contains(const QUrl &fileUrl) const; QModelIndex find(const QUrl &fileUrl) const; bool registerFileName(const QString &fileName); void unregisterFileName(const QString &fileName); void addCustomWallpaper(const QUrl &fileUrl); void addFileWallpaper(const QUrl &fileUrl); void addPackageWallpaper(const QUrl &folderUrl); void removeCustomWallpaper(const QModelIndex &index); void removeFileWallpaper(const QModelIndex &index); void removePackageWallpaper(const QModelIndex &index); void loadCustomWallpapers(); void loadGenericWallpapers(); void handleFoundPackage(const QString &packagePath, const QUuid &token); void handleFoundFile(const QString &filePath, const QUuid &token); DynamicWallpaperModel *q; QVector wallpapers; KSharedConfigPtr config; QPointer crawler; QUuid lastToken; }; DynamicWallpaperModelPrivate::DynamicWallpaperModelPrivate(DynamicWallpaperModel *model) : q(model) , config(KSharedConfig::openConfig(QStringLiteral("kdynamicwallpaperrc"))) { } DynamicWallpaper *DynamicWallpaperModelPrivate::wallpaperForIndex(const QModelIndex &index) const { if (!index.isValid()) return nullptr; return wallpapers.value(index.row()); } void DynamicWallpaperModelPrivate::internalAppend(DynamicWallpaper *wallpaper) { const int row = wallpapers.count(); q->beginInsertRows(QModelIndex(), row, row); wallpapers.append(wallpaper); q->endInsertRows(); } void DynamicWallpaperModelPrivate::internalPrepend(DynamicWallpaper *wallpaper) { q->beginInsertRows(QModelIndex(), 0, 0); wallpapers.prepend(wallpaper); q->endInsertRows(); } void DynamicWallpaperModelPrivate::internalScheduleRemove(const QModelIndex &index, bool set) { const int row = index.row(); if (wallpapers[row]->isZombie == set) return; wallpapers[row]->isZombie = set; Q_EMIT q->dataChanged(index, index, { DynamicWallpaperModel::WallpaperIsZombieRole }); } void DynamicWallpaperModelPrivate::internalRemove(const QModelIndex &index) { const int row = index.row(); q->beginRemoveRows(QModelIndex(), row, row); delete wallpapers.takeAt(row); q->endRemoveRows(); } void DynamicWallpaperModelPrivate::internalReset() { q->beginResetModel(); qDeleteAll(wallpapers); wallpapers.clear(); q->endResetModel(); } bool DynamicWallpaperModelPrivate::contains(const QUrl &fileUrl) const { return find(fileUrl).isValid(); } QModelIndex DynamicWallpaperModelPrivate::find(const QUrl &fileUrl) const { for (int i = 0; i < wallpapers.count(); ++i) { if (wallpapers[i]->imageUrl == fileUrl) return q->createIndex(i, 0); } return QModelIndex(); } bool DynamicWallpaperModelPrivate::registerFileName(const QString &fileName) { KConfigGroup group(config, QStringLiteral("General")); QStringList wallpapers = group.readEntry(QStringLiteral("Wallpapers"), QStringList()); if (wallpapers.contains(fileName)) return false; wallpapers.prepend(fileName); group.writeEntry(QStringLiteral("Wallpapers"), wallpapers); group.sync(); return true; } void DynamicWallpaperModelPrivate::unregisterFileName(const QString &fileName) { KConfigGroup group(config, QStringLiteral("General")); QStringList wallpapers = group.readEntry(QStringLiteral("Wallpapers"), QStringList()); wallpapers.removeOne(fileName); group.writeEntry(QStringLiteral("Wallpapers"), wallpapers); group.sync(); } void DynamicWallpaperModelPrivate::addCustomWallpaper(const QUrl &fileUrl) { const QString fileName = fileUrl.toLocalFile(); if (fileName.isEmpty()) return; if (!registerFileName(fileName)) return; DynamicWallpaper *wallpaper = DynamicWallpaper::fromFile(fileUrl); wallpaper->isRemovable = true; wallpaper->isCustom = true; internalPrepend(wallpaper); } void DynamicWallpaperModelPrivate::addFileWallpaper(const QUrl &fileUrl) { DynamicWallpaper *wallpaper = DynamicWallpaper::fromFile(fileUrl); wallpaper->isRemovable = checkRemovable(fileUrl); internalAppend(wallpaper); } void DynamicWallpaperModelPrivate::addPackageWallpaper(const QUrl &folderUrl) { DynamicWallpaper *wallpaper = DynamicWallpaper::fromPackage(folderUrl); wallpaper->isRemovable = checkRemovable(folderUrl); internalAppend(wallpaper); } void DynamicWallpaperModelPrivate::removeCustomWallpaper(const QModelIndex &index) { const DynamicWallpaper *wallpaper = wallpaperForIndex(index); unregisterFileName(wallpaper->imageUrl.toLocalFile()); internalRemove(index); } void DynamicWallpaperModelPrivate::removeFileWallpaper(const QModelIndex &index) { const DynamicWallpaper *wallpaper = wallpaperForIndex(index); if (!QFile::remove(wallpaper->imageUrl.toLocalFile())) return; internalRemove(index); } void DynamicWallpaperModelPrivate::removePackageWallpaper(const QModelIndex &index) { const DynamicWallpaper *wallpaper = wallpaperForIndex(index); const QUrl imageUrl = wallpaper->imageUrl; const QString dataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); const QString wallpaperPackageRoot = dataLocation + QStringLiteral("/wallpapers/"); KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Wallpaper/Dynamic")); KJob *uninstallJob = package.uninstall(wallpaper->packageName, wallpaperPackageRoot); connect(uninstallJob, &KJob::finished, this, [this, imageUrl](KJob *job) { if (job->error() != KJob::NoError) return; const QModelIndex index = find(imageUrl); if (!index.isValid()) return; internalRemove(index); }); } void DynamicWallpaperModelPrivate::loadCustomWallpapers() { KConfigGroup group(config, QStringLiteral("General")); const QStringList wallpaperFileNames = group.readEntry("Wallpapers", QStringList()); for (const QString &wallpaperFileName : wallpaperFileNames) { const QUrl wallpaperUrl = QUrl::fromUserInput(wallpaperFileName); if (contains(wallpaperUrl)) continue; DynamicWallpaper *wallpaper = DynamicWallpaper::fromFile(wallpaperUrl); wallpaper->isRemovable = true; wallpaper->isCustom = true; internalAppend(wallpaper); } } void DynamicWallpaperModelPrivate::loadGenericWallpapers() { QStringList candidates = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("wallpapers"), QStandardPaths::LocateDirectory); // Load the package structure in the main thread because it seems like the PackageLoader // class is not thread-safe. Notice that system wallpapers are discovered in another thread // since we may need to read file contents in order to determine whether a given file is // actually a dynamic wallpaper and not just some random avif file. KPackage::PackageStructure *packageStructure = KPackage::PackageLoader::self()->loadPackageStructure(QStringLiteral("Wallpaper/Dynamic")); DynamicWallpaperCrawler *crawler = new DynamicWallpaperCrawler(this); connect(crawler, &DynamicWallpaperCrawler::foundFile, this, &DynamicWallpaperModelPrivate::handleFoundFile); connect(crawler, &DynamicWallpaperCrawler::foundPackage, this, &DynamicWallpaperModelPrivate::handleFoundPackage); crawler->setSearchRoots(candidates); crawler->setPackageStructure(packageStructure); crawler->start(QThread::LowPriority); // Queued events are delivered no matter what, except the case where the receiver object // is destroyed. So each crawler has a token that uniquely identifies it. We use the token // to filter out dynamic wallpapers that are discovered by the previous crawler, if there // is any. lastToken = crawler->token(); } void DynamicWallpaperModelPrivate::handleFoundFile(const QString &packagePath, const QUuid &token) { if (lastToken == token) addFileWallpaper(QUrl::fromLocalFile(packagePath)); } void DynamicWallpaperModelPrivate::handleFoundPackage(const QString &filePath, const QUuid &token) { if (lastToken == token) addPackageWallpaper(QUrl::fromLocalFile(filePath)); } /*! * Constructs an empty DynamicWallpaperModel object. */ DynamicWallpaperModel::DynamicWallpaperModel(QObject *parent) : QAbstractListModel(parent) , d(new DynamicWallpaperModelPrivate(this)) { } /*! * Destructs the DynamicWallpaperModel object. */ DynamicWallpaperModel::~DynamicWallpaperModel() { qDeleteAll(d->wallpapers); } QHash DynamicWallpaperModel::roleNames() const { QHash roleNames = QAbstractListModel::roleNames(); roleNames.insert(WallpaperNameRole, QByteArrayLiteral("name")); roleNames.insert(WallpaperFolderRole, QByteArrayLiteral("folder")); roleNames.insert(WallpaperLicenseRole, QByteArrayLiteral("license")); roleNames.insert(WallpaperAuthorRole, QByteArrayLiteral("author")); roleNames.insert(WallpaperIsPackageRole, QByteArrayLiteral("package")); roleNames.insert(WallpaperIsCustomRole, QByteArrayLiteral("custom")); roleNames.insert(WallpaperIsRemovableRole, QByteArrayLiteral("removable")); roleNames.insert(WallpaperIsZombieRole, QByteArrayLiteral("zombie")); roleNames.insert(WallpaperImageRole, QByteArrayLiteral("image")); roleNames.insert(WallpaperPreviewRole, QByteArrayLiteral("preview")); return roleNames; } /*! * Reimplemented to return the total number of dynamic wallpapers in the model. */ int DynamicWallpaperModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) return 0; return d->wallpapers.count(); } QVariant DynamicWallpaperModel::data(const QModelIndex &index, int role) const { const DynamicWallpaper *wallpaper = d->wallpaperForIndex(index); if (!wallpaper) return QVariant(); switch (role) { case Qt::DisplayRole: case WallpaperNameRole: return wallpaper->name; case WallpaperFolderRole: return wallpaper->folderUrl; case WallpaperLicenseRole: return wallpaper->license; case WallpaperAuthorRole: return wallpaper->author; case WallpaperIsPackageRole: return wallpaper->isPackage; case WallpaperIsCustomRole: return wallpaper->isCustom; case WallpaperIsRemovableRole: return wallpaper->isRemovable; case WallpaperIsZombieRole: return wallpaper->isZombie; case WallpaperImageRole: return wallpaper->imageUrl; case WallpaperPreviewRole: return wallpaper->previewUrl; } return QVariant(); } /*! * Returns the index of the dynamic wallpaper identified by the specified image url \p fileUrl. * * This method will return -1 if dynamic wallpaper with the given image url doesn't exist. */ int DynamicWallpaperModel::find(const QUrl &fileUrl) const { const QModelIndex index = d->find(fileUrl); return index.isValid() ? index.row() : -1; } /*! * Returns a QModelIndex for the specified \p index. */ QModelIndex DynamicWallpaperModel::modelIndex(int index) const { return createIndex(index, 0); } /*! * Reloads the dynamic wallpaper model. */ void DynamicWallpaperModel::reload() { d->config->markAsClean(); d->config->reparseConfiguration(); d->internalReset(); d->loadCustomWallpapers(); d->loadGenericWallpapers(); } /*! * Removes all dynamic wallpapers that are scheduled to be removed. */ void DynamicWallpaperModel::purge() { for (int i = rowCount() - 1; i >= 0; --i) { const QModelIndex wallpaperIndex = createIndex(i, 0); if (!wallpaperIndex.data(WallpaperIsZombieRole).toBool()) continue; remove(wallpaperIndex); } } /*! * Adds the dynamic wallpaper with the given url \p fileUrl to the model. */ void DynamicWallpaperModel::add(const QUrl &fileUrl) { DynamicWallpaperProber *prober = new DynamicWallpaperProber(fileUrl, this); connect(prober, &DynamicWallpaperProber::finished, this, &DynamicWallpaperModel::handleProberFinished); connect(prober, &DynamicWallpaperProber::failed, this, &DynamicWallpaperModel::handleProberFailed); prober->start(QThread::LowestPriority); } void DynamicWallpaperModel::handleProberFinished(const QUrl &fileUrl) { d->addCustomWallpaper(fileUrl); } void DynamicWallpaperModel::handleProberFailed(const QUrl &fileUrl) { Q_EMIT errorOccurred(i18n("%1 is not a dynamic wallpaper", fileUrl.toLocalFile())); } /*! * Schedules a dynamic wallpaper with the specified model index \p index for removal. * * The dynamic wallpaper will be removed from the model when purge() is called. */ void DynamicWallpaperModel::scheduleRemove(const QModelIndex &index) { if (!index.isValid()) return; d->internalScheduleRemove(index, true); } /*! * Unschedules a dynamic wallpaper with the specified model index \p index for removal. */ void DynamicWallpaperModel::unscheduleRemove(const QModelIndex &index) { if (!index.isValid()) return; d->internalScheduleRemove(index, false); } /*! * Removes the dynamic wallpaper with the specified model index \p index. */ void DynamicWallpaperModel::remove(const QModelIndex &index) { const DynamicWallpaper *wallpaper = d->wallpaperForIndex(index); if (!wallpaper) return; if (wallpaper->isCustom) d->removeCustomWallpaper(index); else if (wallpaper->isPackage) d->removePackageWallpaper(index); else d->removeFileWallpaper(index); } #include "dynamicwallpapermodel.moc" plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpapermodel.h000066400000000000000000000033641455105060300264610ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include class DynamicWallpaperModelPrivate; class DynamicWallpaperModel : public QAbstractListModel { Q_OBJECT public: enum Roles { WallpaperNameRole = Qt::UserRole + 1, WallpaperFolderRole = Qt::UserRole + 2, WallpaperLicenseRole = Qt::UserRole + 3, WallpaperAuthorRole = Qt::UserRole + 4, WallpaperIsPackageRole = Qt::UserRole + 5, WallpaperIsCustomRole = Qt::UserRole + 6, WallpaperIsRemovableRole = Qt::UserRole + 7, WallpaperIsZombieRole = Qt::UserRole + 8, WallpaperImageRole = Qt::UserRole + 9, WallpaperPreviewRole = Qt::UserRole + 10, }; explicit DynamicWallpaperModel(QObject *parent = nullptr); ~DynamicWallpaperModel() override; QHash roleNames() const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE int find(const QUrl &url) const; Q_INVOKABLE QModelIndex modelIndex(int index) const; public Q_SLOTS: void reload(); void purge(); void add(const QUrl &fileUrl); void scheduleRemove(const QModelIndex &index); void unscheduleRemove(const QModelIndex &index); void remove(const QModelIndex &index); private Q_SLOTS: void handleProberFinished(const QUrl &fileUrl); void handleProberFailed(const QUrl &fileUrl); Q_SIGNALS: void errorOccurred(const QString &text); private: friend class DynamicWallpaperModelPrivate; QScopedPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewcache.cpp000066400000000000000000000043251455105060300303570ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperpreviewcache.h" #include #include #include #include #include static QString cacheKey(const QString &fileName) { QCryptographicHash hash(QCryptographicHash::Sha1); hash.addData(QFile::encodeName(fileName.toUtf8())); return QString::fromLatin1(hash.result().toHex()) + QStringLiteral(".png"); } static QString cacheRoot() { QString cache = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation); return cache + QLatin1String("/kdynamicwallpaper/"); } static QString cacheFileName(const QString &fileName) { return cacheRoot() + cacheKey(fileName); } /*! * Loads the preview for a wallpaper with the specified \a fileName from the cache. * * If the cache has no preview for a wallpaper with the given \a fileName or the cached preview * image is outdated, this method will return a null QImage object. * * This function can be called from multiple threads simultaneously. */ QImage DynamicWallpaperPreviewCache::load(const QString &fileName) { QImage image(cacheFileName(fileName)); if (image.isNull()) return QImage(); const qint64 lastCreated = image.text(QStringLiteral("Preview:Timestamp")).toLongLong(); const qint64 lastModified = QFileInfo(fileName).lastModified().toSecsSinceEpoch(); if (lastModified > lastCreated) return QImage(); return image; } /*! * Stores the preview \a image for a wallpaper with the specified \a fileName in the cache. * * This function can be called from multiple threads simultaneously. */ void DynamicWallpaperPreviewCache::store(const QImage &image, const QString &fileName) { const QDir cache(cacheRoot()); if (!cache.exists()) cache.mkpath(QStringLiteral(".")); const qint64 modifiedTimestamp = QFileInfo(fileName).lastModified().toSecsSinceEpoch(); QImage scaled = image.scaled(512, 512, Qt::KeepAspectRatio, Qt::SmoothTransformation); scaled.setText(QStringLiteral("Preview:Timestamp"), QString::number(modifiedTimestamp)); scaled.save(cacheFileName(fileName)); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewcache.h000066400000000000000000000005111455105060300300150ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include class DynamicWallpaperPreviewCache { public: static QImage load(const QString &fileName); static void store(const QImage &image, const QString &fileName); }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewjob.cpp000066400000000000000000000177211455105060300300720ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperpreviewjob.h" #include "dynamicwallpaperglobals.h" #include "dynamicwallpaperpreviewcache.h" #include #include #include #include #include #include /*! * \class DynamicWallpaperPreviewJob * \brief The DynamicWallpaperPreviewJob provides a convenient way for getting dynamic * wallpaper thumbnail images. * * The DynamicWallpaperPreviewJob allows to load or generate preview images for wallpapers * asynchronously. After a preview image has been generated, the finished() signal will be * emitted. * * If for whatever reason, the preview job wasn't able to successfully get a preview image, * the failed() signal will be emitted. * * After the finished() or the failed() signal has been emitted, the preview job object will * be destroyed automatically. */ class DynamicWallpaperPreviewJobPrivate { public: QFutureWatcher *watcher; }; static QRgb blend(QRgb a, QRgb b, qreal blendFactor) { const int alpha = qAlpha(a) * (1 - blendFactor) + qAlpha(b) * blendFactor; const int red = qRed(a) * (1 - blendFactor) + qRed(b) * blendFactor; const int blue = qBlue(a) * (1 - blendFactor) + qBlue(b) * blendFactor; const int green = qGreen(a) * (1 - blendFactor) + qGreen(b) * blendFactor; return qRgba(red, green, blue, alpha); } static QImage ensureArgb32(const QImage &image) { return image.convertToFormat(QImage::Format_ARGB32_Premultiplied); } static QImage blend(const QImage &dark, const QImage &light, qreal delta) { // Note that the dark and the light images may have different dimensions. const int width = std::max(dark.width(), light.width()); const int height = std::max(dark.height(), light.height()); const QImage a = ensureArgb32(dark.scaled(width, height)); const QImage b = ensureArgb32(light.scaled(width, height)); const QEasingCurve blendCurve(QEasingCurve::InOutQuad); const int blendFrom = std::floor(width * (1 - delta) / 2); const int blendTo = std::ceil(width * (1 + delta) / 2); QVector blendFactorTable(width); for (int i = 0; i < width; ++i) { const qreal progress = qreal(i - blendFrom) / (blendTo - blendFrom); blendFactorTable[i] = blendCurve.valueForProgress(progress); } QImage result(width, height, QImage::Format_ARGB32_Premultiplied); for (int i = 0; i < height; ++i) { const uint32_t *in0 = reinterpret_cast(a.scanLine(i)); const uint32_t *in1 = reinterpret_cast(b.scanLine(i)); uint32_t *out = reinterpret_cast(result.scanLine(i)); for (int j = 0; j < width; ++j) *(out++) = blend(*(in0++), *(in1++), blendFactorTable[j]); } return result; } /*! * \internal * * Returns the approximate solar elevation for the specified wallpaper \a metadata. */ static qreal scoreForMetaData(const KDynamicWallpaperMetaData &metadata) { const auto &solar = std::get(metadata); if (solar.fields() & KSolarDynamicWallpaperMetaData::SolarElevationField) return solar.solarElevation() / 90; return std::cos(M_PI * (2 * solar.time() + 1)); } static bool score_compare(const KDynamicWallpaperMetaData &a, const KDynamicWallpaperMetaData &b) { return scoreForMetaData(a) < scoreForMetaData(b); } static bool isSolar(const QList &metadata) { return std::all_of(metadata.constBegin(), metadata.constEnd(), [](auto md) { return std::holds_alternative(md); }); } static bool isDayNight(const QList &metadata) { return std::all_of(metadata.constBegin(), metadata.constEnd(), [](auto md) { return std::holds_alternative(md); }); } /*! * \internal * * Creates a preview image for the given wallpaper \a fileName with the specified \a size. * * Note that this function runs off the main thread. */ static DynamicWallpaperImageAsyncResult makePreview(const QString &fileName, const QSize &size) { QImage preview = DynamicWallpaperPreviewCache::load(fileName); if (preview.isNull()) { // The cache has no preview for the specified wallpaper yet, so generate one... KDynamicWallpaperReader reader(fileName); if (reader.error() != KDynamicWallpaperReader::NoError) return DynamicWallpaperImageAsyncResult(reader.errorString()); const QList metadata = reader.metaData(); if (metadata.isEmpty()) return DynamicWallpaperImageAsyncResult(i18n("Not a dynamic wallpaper")); int darkIndex = 0; int lightIndex = 0; if (isSolar(metadata)) { auto dark = std::min_element(metadata.begin(), metadata.end(), score_compare); auto light = std::max_element(metadata.begin(), metadata.end(), score_compare); darkIndex = std::get(*dark).index(); lightIndex = std::get(*light).index(); } else if (isDayNight(metadata)) { for (const KDynamicWallpaperMetaData &md : metadata) { const auto &dayNight = std::get(md); switch (dayNight.timeOfDay()) { case KDayNightDynamicWallpaperMetaData::TimeOfDay::Day: lightIndex = dayNight.index(); break; case KDayNightDynamicWallpaperMetaData::TimeOfDay::Night: darkIndex = dayNight.index(); break; } } } const QImage darkImage = reader.image(darkIndex); if (darkImage.isNull()) return DynamicWallpaperImageAsyncResult(reader.errorString()); const QImage lightImage = reader.image(lightIndex); if (lightImage.isNull()) return DynamicWallpaperImageAsyncResult(reader.errorString()); preview = blend(darkImage, lightImage, 0.5); DynamicWallpaperPreviewCache::store(preview, fileName); } return DynamicWallpaperImageAsyncResult(preview.scaled(size, Qt::KeepAspectRatio)); } /*! * Constructs a DynamicWallpaperPreviewJob with the specified \a fileName and \a requestedSize. */ DynamicWallpaperPreviewJob::DynamicWallpaperPreviewJob(const QString &fileName, const QSize &requestedSize) : d(new DynamicWallpaperPreviewJobPrivate) { d->watcher = new QFutureWatcher(this); connect(d->watcher, &QFutureWatcher::finished, this, &DynamicWallpaperPreviewJob::handleFinished); d->watcher->setFuture(QtConcurrent::run(makePreview, fileName, requestedSize)); } /*! * Destructs the DynamicWallpaperPreviewJob object. */ DynamicWallpaperPreviewJob::~DynamicWallpaperPreviewJob() { } /*! * \fn void DynamicWallpaperPreviewJob::finished(const QImage &image) * * This signal is emitted when the preview job has successfully created a preview \a image. * * The DynamicWallpaperPreviewJob object will be destroyed after the finished() signal has * been emitted. */ /*! * \fn void DynamicWallpaperPreviewJob::failed(const QString &errorString) * * This signal is emitted to indicate that the preview job has failed to generate a preview * image. The specified \a errorString is the description of the error that occurred. * * The DynamicWallpaperPreviewJob object will be destroyed after the failed() signal has been * emitted. */ void DynamicWallpaperPreviewJob::handleFinished() { const DynamicWallpaperImageAsyncResult response = d->watcher->result(); if (response.errorString.isNull()) Q_EMIT finished(response.image); else Q_EMIT failed(response.errorString); deleteLater(); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewjob.h000066400000000000000000000012071455105060300275270ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include class DynamicWallpaperPreviewJobPrivate; class DynamicWallpaperPreviewJob : public QObject { Q_OBJECT public: DynamicWallpaperPreviewJob(const QString &fileName, const QSize &size); ~DynamicWallpaperPreviewJob() override; Q_SIGNALS: void finished(const QImage &image); void failed(const QString &errorString); private Q_SLOTS: void handleFinished(); private: QScopedPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewprovider.cpp000066400000000000000000000036411455105060300311460ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperpreviewprovider.h" #include "dynamicwallpaperpreviewjob.h" #include class AsyncImageResponse : public QQuickImageResponse { public: AsyncImageResponse(const QString &fileName, const QSize &requestedSize); QString errorString() const override; QQuickTextureFactory *textureFactory() const override; private Q_SLOTS: void handleFinished(const QImage &image); void handleFailed(const QString &errorString); private: QString m_errorString; QImage m_image; }; AsyncImageResponse::AsyncImageResponse(const QString &fileName, const QSize &requestedSize) { QSize desiredSize = requestedSize; if (desiredSize.isEmpty()) desiredSize = QSize(400, 250) * qApp->devicePixelRatio(); DynamicWallpaperPreviewJob *job = new DynamicWallpaperPreviewJob(fileName, desiredSize); connect(job, &DynamicWallpaperPreviewJob::finished, this, &AsyncImageResponse::handleFinished); connect(job, &DynamicWallpaperPreviewJob::failed, this, &AsyncImageResponse::handleFailed); } QString AsyncImageResponse::errorString() const { return m_errorString; } QQuickTextureFactory *AsyncImageResponse::textureFactory() const { return QQuickTextureFactory::textureFactoryForImage(m_image); } void AsyncImageResponse::handleFinished(const QImage &image) { m_image = image; Q_EMIT finished(); } void AsyncImageResponse::handleFailed(const QString &errorString) { m_errorString = errorString; Q_EMIT finished(); } static QString fileNameFromBase64(const QString &base64) { return QByteArray::fromBase64(base64.toUtf8()); } QQuickImageResponse *DynamicWallpaperPreviewProvider::requestImageResponse(const QString &id, const QSize &requestedSize) { return new AsyncImageResponse(fileNameFromBase64(id), requestedSize); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperpreviewprovider.h000066400000000000000000000005611455105060300306110ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include class DynamicWallpaperPreviewProvider : public QQuickAsyncImageProvider { public: QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperprober.cpp000066400000000000000000000024171455105060300272030ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperprober.h" #include /*! * \class DynamicWallpaperProber * \brief The DynamicWallpaperProper class provides a convenient way to asynchronously * check whether the specified file url corresponds to a dynamic wallpaper. * * If the specified file url is not a dynamic wallpaper, the failed() signal is emitted; * otherwise the finished() signal is emitted. * * After either the failed() or the finished() signal has been emitted, the prober object * will be destroyed automatically. */ /*! * Constructs a dynamic wallpaper prober with the specified \a fileUrl and \a parent. */ DynamicWallpaperProber::DynamicWallpaperProber(const QUrl &fileUrl, QObject *parent) : QThread(parent) , m_fileUrl(fileUrl) { } /*! * Destructs the DynamicWallpaperProber object. */ DynamicWallpaperProber::~DynamicWallpaperProber() { wait(); } void DynamicWallpaperProber::run() { const KDynamicWallpaperReader reader(m_fileUrl.toLocalFile()); if (reader.error() == KDynamicWallpaperReader::NoError) Q_EMIT finished(m_fileUrl); else Q_EMIT failed(m_fileUrl); deleteLater(); } plasma5-wallpapers-dynamic-4.4.1/src/declarative/dynamicwallpaperprober.h000066400000000000000000000010271455105060300266440ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include class DynamicWallpaperProber : public QThread { Q_OBJECT public: explicit DynamicWallpaperProber(const QUrl &fileUrl, QObject *parent = nullptr); ~DynamicWallpaperProber() override; protected: void run() override; Q_SIGNALS: void finished(const QUrl &fileUrl); void failed(const QUrl &fileUrl); private: QUrl m_fileUrl; }; plasma5-wallpapers-dynamic-4.4.1/src/declarative/qmldir000066400000000000000000000003061455105060300231370ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 module com.github.zzag.plasma.wallpapers.dynamic plugin plasma_wallpaper_dynamicplugin plasma5-wallpapers-dynamic-4.4.1/src/lib/000077500000000000000000000000001455105060300202105ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/lib/CMakeLists.txt000066400000000000000000000057521455105060300227610ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_com.github.zzag.dynamic\") set(dynamicwallpaperlib_SOURCES kdaynightdynamicwallpapermetadata.cpp kdynamicwallpapermetadata.cpp kdynamicwallpaperreader.cpp kdynamicwallpaperwriter.cpp ksolardynamicwallpapermetadata.cpp ksunpath.cpp ksunposition.cpp ksystemclockmonitor.cpp ksystemclockmonitorengine.cpp ) if (CMAKE_SYSTEM_NAME MATCHES "Linux") set(dynamicwallpaperlib_SOURCES ksystemclockmonitorengine_linux.cpp ${dynamicwallpaperlib_SOURCES} ) endif() ecm_generate_headers(dynamicwallpaperlib_HEADERS HEADER_NAMES KDayNightDynamicWallpaperMetaData KDynamicWallpaperMetaData KDynamicWallpaperReader KDynamicWallpaperWriter KSolarDynamicWallpaperMetaData KSunPath KSunPosition KSystemClockMonitor REQUIRED_HEADERS dynamicwallpaperlib_HEADERS ) qt5_add_resources(dynamicwallpaperlib_SOURCES resources.qrc) add_library(kdynamicwallpaper ${dynamicwallpaperlib_SOURCES}) add_library(KDynamicWallpaper::KDynamicWallpaper ALIAS kdynamicwallpaper) generate_export_header(kdynamicwallpaper BASE_NAME KDynamicWallpaper EXPORT_MACRO_NAME KDYNAMICWALLPAPER_EXPORT ) set_target_properties(kdynamicwallpaper PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} EXPORT_NAME KDynamicWallpaper ) target_include_directories(kdynamicwallpaper PUBLIC "$" "$" ) target_link_libraries(kdynamicwallpaper PUBLIC Qt5::Core Qt5::Gui Qt5::Positioning PRIVATE Qt5::Xml KF5::I18n avif ) set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/KDynamicWallpaper) write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/KDynamicWallpaperConfigVersion.cmake VERSION "${PROJECT_VERSION}" COMPATIBILITY AnyNewerVersion) configure_package_config_file(KDynamicWallpaperConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/KDynamicWallpaperConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}) install(TARGETS kdynamicwallpaper EXPORT KDynamicWallpaperTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KDynamicWallpaperConfig.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR} COMPONENT Devel) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KDynamicWallpaperConfigVersion.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR} COMPONENT Devel) install(EXPORT KDynamicWallpaperTargets NAMESPACE KDynamicWallpaper:: DESTINATION ${CMAKECONFIG_INSTALL_DIR} FILE KDynamicWallpaperTargets.cmake COMPONENT Devel) install(FILES ${dynamicwallpaperlib_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/kdynamicwallpaper_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KDynamicWallpaper COMPONENT Devel) plasma5-wallpapers-dynamic-4.4.1/src/lib/KDynamicWallpaperConfig.cmake.in000066400000000000000000000005571455105060300263230ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause @PACKAGE_INIT@ include(CMakeFindDependencyMacro) find_dependency(Qt5Core @QT_MIN_VERSION@) find_dependency(Qt5Gui @QT_MIN_VERSION@) find_dependency(Qt5Positioning @QT_MIN_VERSION@) include("${CMAKE_CURRENT_LIST_DIR}/KDynamicWallpaperTargets.cmake") plasma5-wallpapers-dynamic-4.4.1/src/lib/kdaynightdynamicwallpapermetadata.cpp000066400000000000000000000116111455105060300276540ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "kdaynightdynamicwallpapermetadata.h" #include /*! * \class KDayNightDynamicWallpaperMetaData * \brief The KDayNightDynamicWallpaperMetaData class represents metadata associated with images * in the dynamic wallpaper. */ static QJsonValue timeOfDayToJson(KDayNightDynamicWallpaperMetaData::TimeOfDay tod) { switch (tod) { case KDayNightDynamicWallpaperMetaData::TimeOfDay::Day: return QJsonValue(QStringLiteral("day")); case KDayNightDynamicWallpaperMetaData::TimeOfDay::Night: return QJsonValue(QStringLiteral("night")); default: Q_UNREACHABLE(); } } static KDayNightDynamicWallpaperMetaData::TimeOfDay timeOfDayFromJson(const QJsonValue &value) { static QHash lookup = { { QStringLiteral("day"), KDayNightDynamicWallpaperMetaData::TimeOfDay::Day }, { QStringLiteral("night"), KDayNightDynamicWallpaperMetaData::TimeOfDay::Night }, }; return lookup.value(value.toString()); } class KDayNightDynamicWallpaperMetaDataPrivate : public QSharedData { public: KDayNightDynamicWallpaperMetaDataPrivate(); KDayNightDynamicWallpaperMetaData::MetaDataFields presentFields; KDayNightDynamicWallpaperMetaData::TimeOfDay timeOfDay; int index; }; KDayNightDynamicWallpaperMetaDataPrivate::KDayNightDynamicWallpaperMetaDataPrivate() : timeOfDay(KDayNightDynamicWallpaperMetaData::TimeOfDay::Day) , index(-1) { } /*! * Constructs an empty KDayNightDynamicWallpaperMetaData object. */ KDayNightDynamicWallpaperMetaData::KDayNightDynamicWallpaperMetaData() : d(new KDayNightDynamicWallpaperMetaDataPrivate) { } /*! * Constructs a KDayNightDynamicWallpaperMetaData object with the given \a timeOfDay and image \a index. */ KDayNightDynamicWallpaperMetaData::KDayNightDynamicWallpaperMetaData(TimeOfDay timeOfDay, int index) : KDayNightDynamicWallpaperMetaData() { setTimeOfDay(timeOfDay); setIndex(index); } /*! * Constructs a copy of the KDayNightDynamicWallpaperMetaData object. */ KDayNightDynamicWallpaperMetaData::KDayNightDynamicWallpaperMetaData(const KDayNightDynamicWallpaperMetaData &other) : d(other.d) { } /*! * Destructs the KDayNightDynamicWallpaperMetaData object. */ KDayNightDynamicWallpaperMetaData::~KDayNightDynamicWallpaperMetaData() { } /*! * Assigns the value of \p other to a dynamic wallpaper metadata object. */ KDayNightDynamicWallpaperMetaData &KDayNightDynamicWallpaperMetaData::operator=(const KDayNightDynamicWallpaperMetaData &other) { d = other.d; return *this; } /*! * Returns a bitmask that indicates which fields are present in the metadata. */ KDayNightDynamicWallpaperMetaData::MetaDataFields KDayNightDynamicWallpaperMetaData::fields() const { return d->presentFields; } /*! * Returns \c true if the KDayNightDynamicWallpaperMetaData contains valid metadata; otherwise \c false. */ bool KDayNightDynamicWallpaperMetaData::isValid() const { const MetaDataFields requiredFields = TimeOfDayField | IndexField; return (d->presentFields & requiredFields) == requiredFields; } /*! * Sets the time of day to \p tod. */ void KDayNightDynamicWallpaperMetaData::setTimeOfDay(TimeOfDay tod) { d->timeOfDay = tod; d->presentFields |= TimeOfDayField; } /*! * Returns the value of the time of day field in the dynamic wallpaper metadata. */ KDayNightDynamicWallpaperMetaData::TimeOfDay KDayNightDynamicWallpaperMetaData::timeOfDay() const { return d->timeOfDay; } /*! * Sets the index of the associated wallpaper image to \p index. */ void KDayNightDynamicWallpaperMetaData::setIndex(int index) { d->index = index; d->presentFields |= IndexField; } /*! * Returns the index of the associated wallpaper image. */ int KDayNightDynamicWallpaperMetaData::index() const { return d->index; } /*! * Converts the KDayNightDynamicWallpaperMetaData to a UTF-8 encoded JSON document. * * This method returns an empty QJsonObject if the metadata is invalid. */ QJsonObject KDayNightDynamicWallpaperMetaData::toJson() const { if (!isValid()) return QJsonObject(); QJsonObject object; object[QLatin1String("TimeOfDay")] = timeOfDayToJson(d->timeOfDay); object[QLatin1String("Index")] = d->index; return object; } /*! * Decodes a JSON-encoded KDayNightDynamicWallpaperMetaData object. */ KDayNightDynamicWallpaperMetaData KDayNightDynamicWallpaperMetaData::fromJson(const QJsonObject &object) { KDayNightDynamicWallpaperMetaData metaData; const QJsonValue index = object[QLatin1String("Index")]; if (index.isDouble()) metaData.setIndex(index.toInt()); const QJsonValue timeOfDay = object[QLatin1String("TimeOfDay")]; if (timeOfDay.isString()) metaData.setTimeOfDay(timeOfDayFromJson(timeOfDay)); return metaData; } plasma5-wallpapers-dynamic-4.4.1/src/lib/kdaynightdynamicwallpapermetadata.h000066400000000000000000000026001455105060300273170ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include #include #include class KDayNightDynamicWallpaperMetaDataPrivate; class KDYNAMICWALLPAPER_EXPORT KDayNightDynamicWallpaperMetaData { public: enum class TimeOfDay { Day = 1, Night = 2, }; enum MetaDataField { TimeOfDayField = 1 << 0, IndexField = 1 << 1, }; Q_DECLARE_FLAGS(MetaDataFields, MetaDataField) KDayNightDynamicWallpaperMetaData(); KDayNightDynamicWallpaperMetaData(TimeOfDay timeOfDay, int index); KDayNightDynamicWallpaperMetaData(const KDayNightDynamicWallpaperMetaData &other); ~KDayNightDynamicWallpaperMetaData(); KDayNightDynamicWallpaperMetaData &operator=(const KDayNightDynamicWallpaperMetaData &other); MetaDataFields fields() const; bool isValid() const; void setTimeOfDay(TimeOfDay tod); TimeOfDay timeOfDay() const; void setIndex(int index); int index() const; QJsonObject toJson() const; static KDayNightDynamicWallpaperMetaData fromJson(const QJsonObject &object); private: QSharedDataPointer d; }; Q_DECLARE_OPERATORS_FOR_FLAGS(KDayNightDynamicWallpaperMetaData::MetaDataFields) plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpapermetadata.cpp000066400000000000000000000006261455105060300261300ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "kdynamicwallpapermetadata.h" /*! * \class KDynamicWallpaperMetaData * * The KDynamicWallpaperMetaData type provides a generic representation of dynamic wallpaper * representation. * * \sa KSolarDynamicWallpaperMetaData, KDayNightDynamicWallpaperMetaData */ plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpapermetadata.h000066400000000000000000000006431455105060300255740ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2022 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdaynightdynamicwallpapermetadata.h" #include "ksolardynamicwallpapermetadata.h" #include using KDynamicWallpaperMetaData = std::variant; plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpaperreader.cpp000066400000000000000000000261521455105060300256140ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "kdynamicwallpaperreader.h" #include #include #include #include #include #include #include #include #include /*! * \class KDynamicWallpaperReader * \brief The KDynamicWallpaperReader class provides a convenient way for reading dynamic * wallpapers. * * If any error occurs when reading an image or metadata, imageAt() or metaDataAt() will * return a null QImage or an invalid KDynamicWallpaperMetaData, respectively. You can * then call error() to find out the type of the error that occurred, or errorString() to * get a human readable description of what went wrong. */ class KDynamicWallpaperReaderPrivate { public: KDynamicWallpaperReaderPrivate(); bool open(); void close(); QImage fetch(int imageIndex); QIODevice *device; QByteArray buffer; avifDecoder *decoder; KDynamicWallpaperReader::WallpaperReaderError wallpaperReaderError; QString errorString; QList metaData; bool isDeviceForeign; }; KDynamicWallpaperReaderPrivate::KDynamicWallpaperReaderPrivate() : device(nullptr) , decoder(nullptr) , wallpaperReaderError(KDynamicWallpaperReader::NoError) , isDeviceForeign(false) { } static QList parseSolarMetaData(const QByteArray &xmp) { QDomDocument xmpDocument; xmpDocument.setContent(xmp); if (xmpDocument.isNull()) return QList(); const QString attributeName = QStringLiteral("plasma:dynamic-wallpaper-solar"); const QDomNodeList descriptionNodes = xmpDocument.elementsByTagName(QStringLiteral("rdf:Description")); for (int i = 0; i < descriptionNodes.count(); ++i) { QDomElement descriptionNode = descriptionNodes.at(i).toElement(); const QByteArray base64 = descriptionNode.attribute(attributeName).toUtf8(); if (base64.isEmpty()) continue; const QJsonArray array = QJsonDocument::fromJson(QByteArray::fromBase64(base64)).array(); QList result; for (int i = 0; i < array.size(); ++i) { KSolarDynamicWallpaperMetaData metaData = KSolarDynamicWallpaperMetaData::fromJson(array[i].toObject()); if (metaData.isValid()) result.append(metaData); } return result; } return QList(); } static QList parseDayNightMetaData(const QByteArray &xmp) { QDomDocument xmpDocument; xmpDocument.setContent(xmp); if (xmpDocument.isNull()) return QList(); const QString attributeName = QStringLiteral("plasma:dynamic-wallpaper-day-night"); const QDomNodeList descriptionNodes = xmpDocument.elementsByTagName(QStringLiteral("rdf:Description")); for (int i = 0; i < descriptionNodes.count(); ++i) { QDomElement descriptionNode = descriptionNodes.at(i).toElement(); const QByteArray base64 = descriptionNode.attribute(attributeName).toUtf8(); if (base64.isEmpty()) continue; const QJsonArray array = QJsonDocument::fromJson(QByteArray::fromBase64(base64)).array(); QList result; for (int i = 0; i < array.size(); ++i) { KDayNightDynamicWallpaperMetaData metaData = KDayNightDynamicWallpaperMetaData::fromJson(array[i].toObject()); if (metaData.isValid()) result.append(metaData); } return result; } return QList(); } bool KDynamicWallpaperReaderPrivate::open() { if (!device) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QStringLiteral("No assigned device"); return false; } if (device->isOpen()) { if (!(device->openMode() & QIODevice::ReadOnly)) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QStringLiteral("The device is not open for reading"); return false; } } else { if (!device->open(QIODevice::ReadOnly)) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = device->errorString(); return false; } } decoder = avifDecoderCreate(); decoder->maxThreads = QThread::idealThreadCount(); auto cleanup = qScopeGuard([this]() { avifDecoderDestroy(decoder); decoder = nullptr; }); buffer = device->readAll(); avifResult result = avifDecoderSetIOMemory(decoder, reinterpret_cast(buffer.constData()), buffer.size()); if (result != AVIF_RESULT_OK) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QString::fromUtf8(avifResultToString(result)); return false; } result = avifDecoderParse(decoder); if (result != AVIF_RESULT_OK) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QString::fromUtf8(avifResultToString(result)); return false; } if (!decoder->image->xmp.size) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QStringLiteral("No metadata"); return false; } const QByteArray rawMetaData = QByteArray::fromRawData(reinterpret_cast(decoder->image->xmp.data), decoder->image->xmp.size); metaData = parseSolarMetaData(rawMetaData); if (metaData.isEmpty()) metaData = parseDayNightMetaData(rawMetaData); if (metaData.isEmpty()) { wallpaperReaderError = KDynamicWallpaperReader::OpenError; errorString = QStringLiteral("No metadata"); return false; } cleanup.dismiss(); return true; } void KDynamicWallpaperReaderPrivate::close() { if (decoder) avifDecoderDestroy(decoder); if (!isDeviceForeign) device->deleteLater(); decoder = nullptr; device = nullptr; isDeviceForeign = false; buffer.clear(); } QImage KDynamicWallpaperReaderPrivate::fetch(int index) { avifResult result = avifDecoderNthImage(decoder, index); if (result != AVIF_RESULT_OK) { wallpaperReaderError = KDynamicWallpaperReader::ReadError; errorString = QString::fromUtf8(avifResultToString(result)); return QImage(); } const QImage::Format qtFormat = QImage::Format_RGB32; #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN const avifRGBFormat avifFormat = AVIF_RGB_FORMAT_BGRA; #else const avifRGBFormat avifFormat = AVIF_RGB_FORMAT_ARGB; #endif QImage image(decoder->image->width, decoder->image->height, qtFormat); avifRGBImage rgb; avifRGBImageSetDefaults(&rgb, decoder->image); rgb.format = avifFormat; rgb.rowBytes = image.bytesPerLine(); rgb.pixels = image.bits(); result = avifImageYUVToRGB(decoder->image, &rgb); if (result != AVIF_RESULT_OK) { wallpaperReaderError = KDynamicWallpaperReader::ReadError; errorString = QString::fromUtf8(avifResultToString(result)); return QImage(); } // TODO: color space return image; } /*! * Constructs an empty KDynamicWallpaperReader object. */ KDynamicWallpaperReader::KDynamicWallpaperReader() : d(new KDynamicWallpaperReaderPrivate) { } /*! * Constructs the KDynamicWallpaperReader with the device \p device. */ KDynamicWallpaperReader::KDynamicWallpaperReader(QIODevice *device) : d(new KDynamicWallpaperReaderPrivate) { setDevice(device); } /*! * Constructs the KDynamicWallpaperReader with the file name \p fileName. */ KDynamicWallpaperReader::KDynamicWallpaperReader(const QString &fileName) : d(new KDynamicWallpaperReaderPrivate) { setFileName(fileName); } /*! * Destructs the KDynamicWallpaperReader object. */ KDynamicWallpaperReader::~KDynamicWallpaperReader() { if (d->device) d->close(); } /*! * Sets the device of the reader to the specified \p device. * * If the device is not already open, KDynamicWallpaperReader will attempt to open the device * in QIODevice::ReadOnly mode by calling open(). */ void KDynamicWallpaperReader::setDevice(QIODevice *device) { if (d->device) d->close(); d->device = device; d->isDeviceForeign = true; d->open(); } /*! * Returns the device assigned to the reader, or \c nullptr if no device has been assigned. */ QIODevice *KDynamicWallpaperReader::device() const { return d->device; } /*! * Sets the file name of the file to be read to \p fileName. Internally, KDynamicWallpaperReader * will create a QFile object and open it in QIODevice::ReadOnly mode, and use it when reading * dynamic wallpapers. */ void KDynamicWallpaperReader::setFileName(const QString &fileName) { if (d->device) d->close(); d->device = new QFile(fileName); d->isDeviceForeign = false; d->open(); } /*! * If the currently assigned device is a QFile, or if setFileName() has been called, this * function returns the name of the file KDynamicWallpaperReader reads from; otherwise an empty * QString object is returned. */ QString KDynamicWallpaperReader::fileName() const { const QFile *file = qobject_cast(d->device); return file ? file->fileName() : QString(); } /*! * Returns the total number of images in the dynamic wallpaper. */ int KDynamicWallpaperReader::imageCount() const { return d->decoder->imageCount; } /*! * Returns the KDynamicWallpaperMetaData objects for the current wallpaper. */ QList KDynamicWallpaperReader::metaData() const { return d->metaData; } /*! * Returns the image with the specified index \p imageIndex. * * This method will return a null QImage object if \p imageIndex is outside of the valid range. */ QImage KDynamicWallpaperReader::image(int imageIndex) const { if (!d->decoder) return QImage(); return d->fetch(imageIndex); } /*! * Returns the type of the last error that occurred. */ KDynamicWallpaperReader::WallpaperReaderError KDynamicWallpaperReader::error() const { return d->wallpaperReaderError; } /*! * Returns the human readable description of the last error that occurred. */ QString KDynamicWallpaperReader::errorString() const { if (d->wallpaperReaderError == NoError) return QStringLiteral("No error"); return d->errorString; } /*! * Returns \c true if a dynamic wallpaper can be read for the device; otherwise \c false. */ bool KDynamicWallpaperReader::canRead(QIODevice *device) { if (device->isSequential()) return false; QByteArray header = device->peek(144); if (header.size() < 12) return false; avifROData input; input.data = reinterpret_cast(header.constData()); input.size = header.size(); return avifPeekCompatibleFileType(&input); } /*! * Returns \c true if a dynamic wallpaper can be read for the file name; otherwise \c false. */ bool KDynamicWallpaperReader::canRead(const QString &fileName) { QFile file(fileName); if (!file.open(QFile::ReadOnly)) return false; return canRead(&file); } plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpaperreader.h000066400000000000000000000021611455105060300252530ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include "kdynamicwallpapermetadata.h" #include class KDynamicWallpaperReaderPrivate; class KDYNAMICWALLPAPER_EXPORT KDynamicWallpaperReader { public: enum WallpaperReaderError { NoError, OpenError, ReadError, }; KDynamicWallpaperReader(); explicit KDynamicWallpaperReader(QIODevice *device); explicit KDynamicWallpaperReader(const QString &fileName); ~KDynamicWallpaperReader(); void setDevice(QIODevice *device); QIODevice *device() const; void setFileName(const QString &fileName); QString fileName() const; QList metaData() const; int imageCount() const; QImage image(int imageIndex) const; WallpaperReaderError error() const; QString errorString() const; static bool canRead(QIODevice *device); static bool canRead(const QString &fileName); private: QScopedPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpaperwriter.cpp000066400000000000000000000246661455105060300256760ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "kdynamicwallpaperwriter.h" #include #include #include #include #include #include #include /*! * \class KDynamicWallpaperWriter * \brief The KDynamicWallpaperWriter class provides a convenient way for writing dynamic * wallpapers. * * If any error occurs when writing an image, write() will return false. You can then call * error() to find the type of the error that occurred, or errorString() to get a human * readable description of what went wrong. */ class KDynamicWallpaperWriterPrivate { public: KDynamicWallpaperWriterPrivate(); bool flush(QIODevice *device); KDynamicWallpaperWriter::WallpaperWriterError wallpaperWriterError; QString errorString; QList images; QList metaData; std::optional speed; std::optional maxThreadCount; avifCodecChoice codecChoice = AVIF_CODEC_CHOICE_AUTO; }; KDynamicWallpaperWriterPrivate::KDynamicWallpaperWriterPrivate() : wallpaperWriterError(KDynamicWallpaperWriter::NoError) { } static QByteArray serializeMetaData(const QList &metaData) { QJsonArray array; QByteArray type; for (const KDynamicWallpaperMetaData &md : metaData) { if (auto solar = std::get_if(&md)) { type = QByteArrayLiteral("solar"); array.append(solar->toJson()); } else if (auto dayNight = std::get_if(&md)) { type = QByteArrayLiteral("day-night"); array.append(dayNight->toJson()); } else { Q_UNREACHABLE(); } } QJsonDocument document; document.setArray(array); const QByteArray base64 = document.toJson(QJsonDocument::Compact).toBase64(); QFile templateFile(QStringLiteral(":/kdynamicwallpaper/xmp/metadata.xml")); templateFile.open(QFile::ReadOnly); QByteArray xmp = templateFile.readAll(); xmp.replace(QByteArrayLiteral("{{type}}"), type); xmp.replace(QByteArrayLiteral("{{base64}}"), base64); return xmp; } bool KDynamicWallpaperWriterPrivate::flush(QIODevice *device) { if (metaData.isEmpty()) { wallpaperWriterError = KDynamicWallpaperWriter::UnknownError; errorString = QStringLiteral("No metadata have been specified"); return false; } if (images.isEmpty()) { wallpaperWriterError = KDynamicWallpaperWriter::UnknownError; errorString = QStringLiteral("No images have been specified"); return false; } const QByteArray xmp = serializeMetaData(metaData); avifEncoder *encoder = avifEncoderCreate(); encoder->codecChoice = codecChoice; encoder->speed = speed.value_or(AVIF_SPEED_DEFAULT); encoder->maxThreads = maxThreadCount.value_or(QThread::idealThreadCount()); auto encoderCleanup = qScopeGuard([&encoder]() { avifEncoderDestroy(encoder); }); for (const auto &view : images) { const QImage image = view.data().convertToFormat(QImage::Format_RGB888); if (image.isNull()) { wallpaperWriterError = KDynamicWallpaperWriter::UnknownError; errorString = QStringLiteral("Failed to read: %1").arg(view.key()); return false; } avifImage *avif = avifImageCreate(image.width(), image.height(), 8, AVIF_PIXEL_FORMAT_YUV444); avifImageSetMetadataXMP(avif, reinterpret_cast(xmp.constData()), xmp.size()); avifRGBImage rgb; avifRGBImageSetDefaults(&rgb, avif); rgb.format = AVIF_RGB_FORMAT_RGB; rgb.depth = 8; rgb.rowBytes = image.bytesPerLine(); rgb.pixels = const_cast(image.constBits()); // TODO: color space avifResult result = avifImageRGBToYUV(avif, &rgb); if (result != AVIF_RESULT_OK) { wallpaperWriterError = KDynamicWallpaperWriter::UnknownError; errorString = QStringLiteral("Failed to encode %1: %2") .arg(view.key()) .arg(avifResultToString(result)); return false; } result = avifEncoderAddImage(encoder, avif, 0, AVIF_ADD_IMAGE_FLAG_NONE); if (result != AVIF_RESULT_OK) { wallpaperWriterError = KDynamicWallpaperWriter::UnknownError; errorString = QStringLiteral("Failed to encode %1: %2") .arg(view.key()) .arg(avifResultToString(result)); return false; } avifImageDestroy(avif); } avifRWData output = AVIF_DATA_EMPTY; avifResult result = avifEncoderFinish(encoder, &output); if (result == AVIF_RESULT_OK) { device->write(reinterpret_cast(output.data), output.size); } else { wallpaperWriterError = KDynamicWallpaperWriter::EncoderError; errorString = avifResultToString(result); } avifRWDataFree(&output); return true; } /*! * Constructs an empty KDynamicWallpaperWriter object. */ KDynamicWallpaperWriter::KDynamicWallpaperWriter() : d(new KDynamicWallpaperWriterPrivate) { } /*! * Destructs the KDynamicWallpaperWriter object. */ KDynamicWallpaperWriter::~KDynamicWallpaperWriter() { } /*! * Sets the encoding speed to \a speed. The speed value must be between 0 and 10, where * 0 is the slowest speed, and 10 is the fastest speed. Encoding speed can affect encoding * quality or file size. */ void KDynamicWallpaperWriter::setSpeed(int speed) { d->speed = qBound(0, speed, 10); } /*! * Returns the encoding speed, between 0-10. If the encoding speed is not set, the encoder * will choose the most optimal encoding speed. */ std::optional KDynamicWallpaperWriter::speed() const { return d->speed; } void KDynamicWallpaperWriter::setMetaData(const QList &metaData) { d->metaData = metaData; } QList KDynamicWallpaperWriter::metaData() const { return d->metaData; } void KDynamicWallpaperWriter::setImages(const QList &images) { d->images = images; } QList KDynamicWallpaperWriter::images() const { return d->images; } /*! * Sets the codec that will be used to encode the wallpaper images. Returns \c true if successful; * otherwise returns \c false. */ bool KDynamicWallpaperWriter::setCodecName(const QString &codecName) { if (const avifCodecChoice choice = avifCodecChoiceFromName(codecName.toLatin1().constData()); choice != AVIF_CODEC_CHOICE_AUTO) { if (avifCodecName(choice, AVIF_CODEC_FLAG_CAN_ENCODE)) { d->codecChoice = choice; return true; } else { d->wallpaperWriterError = KDynamicWallpaperWriter::EncoderError; d->errorString = QStringLiteral("Codec cannot encode"); } } else { d->wallpaperWriterError = KDynamicWallpaperWriter::EncoderError; d->errorString = QStringLiteral("Unrecognized codec: ") + codecName; } return false; } /*! * Returns the codec that will be used to encode wallpaper images. */ QString KDynamicWallpaperWriter::codecName() const { if (d->codecChoice != AVIF_CODEC_CHOICE_AUTO) { return QString::fromLatin1(avifCodecName(d->codecChoice, AVIF_CODEC_FLAG_CAN_ENCODE)); } return QString(); } /*! * Sets the desired maximum number of threads that can be used during the encoding step. * If not set, QThread::idealThreadCount() will be used. */ void KDynamicWallpaperWriter::setMaxThreadCount(int max) { d->maxThreadCount = max; } /*! * Returns the maximum number of threads that can be used during encoding. If nullopt is * returned, the writer is free to choose the optimal number of threads at its will. */ std::optional KDynamicWallpaperWriter::maxThreadCount() const { return d->maxThreadCount; } /*! * Begins a write sequence to the device and returns \c true if successful; otherwise \c false is * returned. You must call this method before calling write() method. * * If the device is not already open, KDynamicWallpaperWriter will attempt to open the device * in QIODevice::WriteOnly mode by calling open(). */ bool KDynamicWallpaperWriter::flush(QIODevice *device) { if (device->isOpen()) { if (!(device->openMode() & QIODevice::WriteOnly)) { d->wallpaperWriterError = KDynamicWallpaperWriter::DeviceError; d->errorString = QStringLiteral("The device is not open for writing"); return false; } } else { if (!device->open(QIODevice::WriteOnly)) { d->wallpaperWriterError = KDynamicWallpaperWriter::DeviceError; d->errorString = device->errorString(); return false; } } return d->flush(device); } /*! * Begins a write sequence to the file \p fileName and returns \c true if successful; otherwise * \c false is returned. Internally, KDynamicWallpaperWriter will create a QFile object and open * it in QIODevice::WriteOnly mode, and use it when writing dynamic wallpapers. * * You must call this method before calling write() method. */ bool KDynamicWallpaperWriter::flush(const QString &fileName) { QFile file(fileName); if (!file.open(QIODevice::WriteOnly)) { d->wallpaperWriterError = KDynamicWallpaperWriter::DeviceError; d->errorString = file.errorString(); return false; } return d->flush(&file); } /*! * Returns the type of the last error that occurred. */ KDynamicWallpaperWriter::WallpaperWriterError KDynamicWallpaperWriter::error() const { return d->wallpaperWriterError; } /*! * Returns the human readable description of the last error that occurred. */ QString KDynamicWallpaperWriter::errorString() const { if (d->wallpaperWriterError == NoError) return QStringLiteral("No error"); return d->errorString; } /*! * Returns \c true if a dynamic wallpaper can be written to the specified @device; otherwise \c false * is returned. */ bool KDynamicWallpaperWriter::canWrite(QIODevice *device) { return device->isWritable(); } /*! * Returns \c true if a dynamic wallpaper can be written to a file with the specified file name * \p fileName; otherwise \c false is returned. */ bool KDynamicWallpaperWriter::canWrite(const QString &fileName) { QFile file(fileName); return file.isWritable(); } plasma5-wallpapers-dynamic-4.4.1/src/lib/kdynamicwallpaperwriter.h000066400000000000000000000032471455105060300253330ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include "kdynamicwallpapermetadata.h" #include #include #include class KDynamicWallpaperWriterPrivate; class KDYNAMICWALLPAPER_EXPORT KDynamicWallpaperWriter { public: enum WallpaperWriterError { NoError, DeviceError, EncoderError, UnknownError, }; class ImageView { public: explicit ImageView(const QString &fileName) : m_fileName(fileName) { } QImage data() const { return QImage(m_fileName); } QString key() const { return m_fileName; } private: QString m_fileName; }; KDynamicWallpaperWriter(); ~KDynamicWallpaperWriter(); void setSpeed(int speed); std::optional speed() const; void setMetaData(const QList &metaData); QList metaData() const; void setImages(const QList &views); QList images() const; bool setCodecName(const QString &codecName); QString codecName() const; bool flush(QIODevice *device); bool flush(const QString &fileName); void setMaxThreadCount(int max); std::optional maxThreadCount() const; WallpaperWriterError error() const; QString errorString() const; static bool canWrite(QIODevice *device); static bool canWrite(const QString &fileName); private: QScopedPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/ksolardynamicwallpapermetadata.cpp000066400000000000000000000157601455105060300271760ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksolardynamicwallpapermetadata.h" #include /*! * \class KSolarDynamicWallpaperMetaData * \brief The KSolarDynamicWallpaperMetaData class represents metadata associated with images * in the dynamic wallpaper. * * KSolarDynamicWallpaperMetaData provides information about images in the dynamic wallpaper, * for example, solar position, etc. Some fields may not be specified. In order to check * whether the given field is set, test the corresponding bit in fields(). */ static QJsonValue crossFadeModeToJson(KSolarDynamicWallpaperMetaData::CrossFadeMode crossFadeMode) { switch (crossFadeMode) { case KSolarDynamicWallpaperMetaData::NoCrossFade: return QJsonValue(false); case KSolarDynamicWallpaperMetaData::CrossFade: return QJsonValue(true); default: Q_UNREACHABLE(); } } static KSolarDynamicWallpaperMetaData::CrossFadeMode crossFadeModeFromJson(const QJsonValue &value) { return value.toBool() ? KSolarDynamicWallpaperMetaData::CrossFade : KSolarDynamicWallpaperMetaData::NoCrossFade; } class KSolarDynamicWallpaperMetaDataPrivate : public QSharedData { public: KSolarDynamicWallpaperMetaDataPrivate(); KSolarDynamicWallpaperMetaData::MetaDataFields presentFields; KSolarDynamicWallpaperMetaData::CrossFadeMode crossFadeMode; qreal solarAzimuth; qreal solarElevation; qreal time; int index; }; KSolarDynamicWallpaperMetaDataPrivate::KSolarDynamicWallpaperMetaDataPrivate() : crossFadeMode(KSolarDynamicWallpaperMetaData::NoCrossFade) , solarAzimuth(0.0) , solarElevation(0.0) , time(0.0) , index(-1) { } /*! * Constructs an empty KSolarDynamicWallpaperMetaData object. */ KSolarDynamicWallpaperMetaData::KSolarDynamicWallpaperMetaData() : d(new KSolarDynamicWallpaperMetaDataPrivate) { } /*! * Constructs a copy of the KSolarDynamicWallpaperMetaData object. */ KSolarDynamicWallpaperMetaData::KSolarDynamicWallpaperMetaData(const KSolarDynamicWallpaperMetaData &other) : d(other.d) { } /*! * Destructs the KSolarDynamicWallpaperMetaData object. */ KSolarDynamicWallpaperMetaData::~KSolarDynamicWallpaperMetaData() { } /*! * Assigns the value of \p other to a dynamic wallpaper metadata object. */ KSolarDynamicWallpaperMetaData &KSolarDynamicWallpaperMetaData::operator=(const KSolarDynamicWallpaperMetaData &other) { d = other.d; return *this; } /*! * Returns a bitmask that indicates which fields are present in the metadata. */ KSolarDynamicWallpaperMetaData::MetaDataFields KSolarDynamicWallpaperMetaData::fields() const { return d->presentFields; } /*! * Returns \c true if the KSolarDynamicWallpaperMetaData contains valid metadata; otherwise \c false. */ bool KSolarDynamicWallpaperMetaData::isValid() const { const MetaDataFields requiredFields = TimeField | IndexField; if ((d->presentFields & requiredFields) != requiredFields) return false; if (bool(d->presentFields & SolarAzimuthField) ^ bool(d->presentFields & SolarElevationField)) return false; if (d->time < 0 || d->time > 1) return false; return true; } /*! * Sets the value of the cross-fade mode field to \p mode. */ void KSolarDynamicWallpaperMetaData::setCrossFadeMode(CrossFadeMode mode) { d->crossFadeMode = mode; d->presentFields |= CrossFadeField; } /*! * Returns the value of the cross-fade mode field in the dynamic wallpaper metadata. */ KSolarDynamicWallpaperMetaData::CrossFadeMode KSolarDynamicWallpaperMetaData::crossFadeMode() const { return d->crossFadeMode; } /*! * Sets the value of the time field to \p time. */ void KSolarDynamicWallpaperMetaData::setTime(qreal time) { d->time = time; d->presentFields |= TimeField; } /*! * Returns the value of the time field in the dynamic wallpaper metadata. */ qreal KSolarDynamicWallpaperMetaData::time() const { return d->time; } /*! * Sets the value of the solar elevation field to \p elevation. */ void KSolarDynamicWallpaperMetaData::setSolarElevation(qreal elevation) { d->solarElevation = elevation; d->presentFields |= SolarElevationField; } /*! * Returns the value of solar elevation stored in the dynamic wallpaper metadata. * * Note that this method will return \c 0 if SolarElevationField is not set in fields(). */ qreal KSolarDynamicWallpaperMetaData::solarElevation() const { return d->solarElevation; } /*! * Sets the value of the solar azimuth field to \p azimuth. */ void KSolarDynamicWallpaperMetaData::setSolarAzimuth(qreal azimuth) { d->solarAzimuth = azimuth; d->presentFields |= SolarAzimuthField; } /*! * Returns the value of solar azimuth stored in the dynamic wallpaper metadata. * * Note that this method will return \c 0 if SolarAzimuthField is not set in fields(). */ qreal KSolarDynamicWallpaperMetaData::solarAzimuth() const { return d->solarAzimuth; } /*! * Sets the index of the associated wallpaper image to \p index. */ void KSolarDynamicWallpaperMetaData::setIndex(int index) { d->index = index; d->presentFields |= IndexField; } /*! * Returns the index of the associated wallpaper image. */ int KSolarDynamicWallpaperMetaData::index() const { return d->index; } /*! * Converts the KSolarDynamicWallpaperMetaData to a UTF-8 encoded JSON document. * * This method returns an empty QJsonObject if the metadata is invalid. */ QJsonObject KSolarDynamicWallpaperMetaData::toJson() const { if (!isValid()) return QJsonObject(); QJsonObject object; if (d->presentFields & CrossFadeField) object[QLatin1String("CrossFade")] = crossFadeModeToJson(d->crossFadeMode); if (d->presentFields & SolarElevationField) object[QLatin1String("Elevation")] = d->solarElevation; if (d->presentFields & SolarAzimuthField) object[QLatin1String("Azimuth")] = d->solarAzimuth; object[QLatin1String("Time")] = d->time; object[QLatin1String("Index")] = d->index; return object; } /*! * Decodes a JSON-encoded KSolarDynamicWallpaperMetaData object. */ KSolarDynamicWallpaperMetaData KSolarDynamicWallpaperMetaData::fromJson(const QJsonObject &object) { KSolarDynamicWallpaperMetaData metaData; const QJsonValue index = object[QLatin1String("Index")]; if (index.isDouble()) metaData.setIndex(index.toInt()); const QJsonValue crossFadeMode = object[QLatin1String("CrossFade")]; if (crossFadeMode.isBool()) metaData.setCrossFadeMode(crossFadeModeFromJson(crossFadeMode)); const QJsonValue time = object[QLatin1String("Time")]; if (time.isDouble()) metaData.setTime(time.toDouble()); const QJsonValue solarElevation = object[QLatin1String("Elevation")]; if (solarElevation.isDouble()) metaData.setSolarElevation(solarElevation.toDouble()); const QJsonValue solarAzimuth = object[QLatin1String("Azimuth")]; if (solarAzimuth.isDouble()) metaData.setSolarAzimuth(solarAzimuth.toDouble()); return metaData; } plasma5-wallpapers-dynamic-4.4.1/src/lib/ksolardynamicwallpapermetadata.h000066400000000000000000000031421455105060300266320ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include #include #include class KSolarDynamicWallpaperMetaDataPrivate; class KDYNAMICWALLPAPER_EXPORT KSolarDynamicWallpaperMetaData { public: enum CrossFadeMode { NoCrossFade, CrossFade, }; enum MetaDataField { CrossFadeField = 1 << 0, TimeField = 1 << 1, SolarAzimuthField = 1 << 2, SolarElevationField = 1 << 3, IndexField = 1 << 4, }; Q_DECLARE_FLAGS(MetaDataFields, MetaDataField) KSolarDynamicWallpaperMetaData(); KSolarDynamicWallpaperMetaData(const KSolarDynamicWallpaperMetaData &other); ~KSolarDynamicWallpaperMetaData(); KSolarDynamicWallpaperMetaData &operator=(const KSolarDynamicWallpaperMetaData &other); MetaDataFields fields() const; bool isValid() const; void setCrossFadeMode(CrossFadeMode mode); CrossFadeMode crossFadeMode() const; void setTime(qreal time); qreal time() const; void setSolarElevation(qreal elevation); qreal solarElevation() const; void setSolarAzimuth(qreal azimuth); qreal solarAzimuth() const; void setIndex(int index); int index() const; QJsonObject toJson() const; static KSolarDynamicWallpaperMetaData fromJson(const QJsonObject &object); private: QSharedDataPointer d; }; Q_DECLARE_OPERATORS_FOR_FLAGS(KSolarDynamicWallpaperMetaData::MetaDataFields) plasma5-wallpapers-dynamic-4.4.1/src/lib/ksunpath.cpp000066400000000000000000000106321455105060300225530ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksunpath.h" #include "ksunposition.h" #include #include /*! * \class KSunPath * \brief The KSunPath class represents a path of the Sun at the given time and location. */ static QVector3D computeNormal(const QVector3D ¢er, const QVector3D &v1, const QVector3D &v2) { const QVector3D cross = QVector3D::crossProduct(v1 - center, v2 - center); return cross.normalized(); } static QVector3D positionToVector(const KSunPosition &position) { return position.toVector(); } /*! * Creates a path of the Sun at the specified date and location. */ KSunPath KSunPath::create(const QDateTime &dateTime, const QGeoCoordinate &location) { // I bet there is a nice formula to determine the normal and the center of // the sun path. Sampling the position of the Sun is not that bad, however // having the computed results as accurate as possible is still something we // have to strive for. const int sampleCount = 24; const QDateTime utcDateTime = dateTime.toUTC(); const QDate utcDate = utcDateTime.date(); QVector positions; positions.reserve(sampleCount); for (int i = 0; i < sampleCount; ++i) { const QTime utcTime(i, 0); const QDateTime sampleDataTime(utcDate, utcTime, Qt::UTC); const KSunPosition position(sampleDataTime, location); if (!position.isValid()) return KSunPath(); positions << position; } QVector samples; samples.reserve(sampleCount); std::transform(positions.constBegin(), positions.constEnd(), std::back_inserter(samples), positionToVector); QVector3D center = std::accumulate(samples.constBegin(), samples.constEnd(), QVector3D()); center /= sampleCount; float radius = 0; for (const QVector3D &sample : samples) radius += (sample - center).length(); radius /= sampleCount; QVector3D normal; for (int i = 1; i < samples.count(); ++i) { const QVector3D v1 = samples.at(i - 1); const QVector3D v2 = samples.at(i); normal += computeNormal(center, v1, v2); } normal.normalize(); return KSunPath(center, normal, radius); } /*! * Constructs a KSunPath with \p center, \p normal, and \p radius. */ KSunPath::KSunPath(const QVector3D ¢er, const QVector3D &normal, float radius) : m_center(center) , m_normal(normal) , m_radius(radius) { } /*! * Returns \c true if the path of the Sun is valid; otherwise returns \c false. */ bool KSunPath::isValid() const { return !qFuzzyIsNull(m_normal.x()); } /*! * Returns the coordinates of the center of this path of the Sun. */ QVector3D KSunPath::center() const { return m_center; } /*! * Returns the normal of the plane that contains this path of the Sun. */ QVector3D KSunPath::normal() const { return m_normal; } /*! * Projects the specified KSunPosition onto this KSunPath. */ QVector3D KSunPath::project(const KSunPosition &position) const { if (!isValid()) return QVector3D(); const QVector3D axis = QVector3D(1, 0, 0); const QVector3D origin = QVector3D(0, 0, 0); const QVector3D normal = computeNormal(origin, axis, position.toVector()); if (normal.isNull()) return QVector3D(); const QVector3D direction = QVector3D::crossProduct(m_normal, normal).normalized(); const QVector3D point = QVector3D::crossProduct(normal, direction) * QVector3D::dotProduct(m_normal, m_center) + QVector3D::crossProduct(direction, m_normal) * QVector3D::dotProduct(normal, origin); const QVector3D delta = point - m_center; const float dot = QVector3D::dotProduct(direction, delta); const float discriminator = dot * dot - delta.lengthSquared() + m_radius * m_radius; if (discriminator < 0) return QVector3D(); if (qFuzzyIsNull(discriminator)) return point - dot * direction; const QVector3D a = point + direction * (-dot - std::sqrt(discriminator)); const QVector3D b = point + direction * (-dot + std::sqrt(discriminator)); if (qFuzzyIsNull(position.elevation())) { if (position.azimuth() < 180) return (a.y() < b.y()) ? b : a; return (a.y() < b.y()) ? a : b; } if (position.elevation() < 0) return (a.z() < b.z()) ? a : b; return (a.z() < b.z()) ? b : a; } plasma5-wallpapers-dynamic-4.4.1/src/lib/ksunpath.h000066400000000000000000000013511455105060300222160ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include #include #include class KSunPosition; class KDYNAMICWALLPAPER_EXPORT KSunPath { public: KSunPath() = default; bool isValid() const; QVector3D center() const; QVector3D normal() const; QVector3D project(const KSunPosition &position) const; static KSunPath create(const QDateTime &dateTime, const QGeoCoordinate &location); private: KSunPath(const QVector3D ¢er, const QVector3D &normal, float radius); QVector3D m_center; QVector3D m_normal; float m_radius; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/ksunposition.cpp000066400000000000000000000205001455105060300234560ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksunposition.h" #include /*! * \class KSunPosition * \brief The KSunPosition class provides a convenient way for determining the position of the * Sun at the specified time and location. */ const static qreal s_midnightHourAngle = -180; static qreal julianCenturiesToJulianDay(qreal jcent) { return 36525.0 * jcent + 2451545.0; } static qreal julianDayToJulianCenturies(qreal jd) { return (jd - 2451545.0) / 36525.0; } static qreal dateTimeToJulianDay(const QDateTime &dateTime) { return dateTime.toSecsSinceEpoch() / 86400.0 + 2440587.5; } static qreal sind(qreal value) { return std::sin(qDegreesToRadians(value)); } static qreal cosd(qreal value) { return std::cos(qDegreesToRadians(value)); } static qreal eccentricityEarthOrbit(qreal jcent) { return 0.016708634 - jcent * (0.000042037 + 0.0000001267 * jcent); } static qreal solarGeometricMeanAnomaly(qreal jcent) { return qDegreesToRadians(357.52911 + jcent * (35999.05029 - 0.0001537 * jcent)); } static qreal solarMeanEclipticObliquity(const qreal jcent) { const qreal seconds = 21.448 - jcent * (46.815 + jcent * (0.00059 - jcent * 0.001813)); return 23.0 + (26.0 + seconds / 60.0) / 60.0; } static qreal obliquityCorrection(qreal jcent) { const qreal meanEclipticObliquity = solarMeanEclipticObliquity(jcent); const qreal omega = qDegreesToRadians(125.04 - jcent * 1934.136); return qDegreesToRadians(meanEclipticObliquity + 0.00256 * std::cos(omega)); } static qreal solarEquationOfCenter(qreal jcent) { const qreal anomaly = solarGeometricMeanAnomaly(jcent); const qreal equation = std::sin(2 * anomaly) * (0.019993 - jcent * 0.000101) + std::sin(anomaly) * (1.914602 - jcent * (0.004817 + jcent * 0.000014)) + std::sin(3 * anomaly) * 0.000289; return qDegreesToRadians(equation); } static qreal solarGeometricMeanLongitude(qreal jcent) { qreal l = std::fmod(280.46646 + jcent * (36000.76983 + jcent * 0.0003032), 360); if (l < 0) l += 360; return qDegreesToRadians(l); } static qreal solarTrueLongitude(qreal jcent) { return solarGeometricMeanLongitude(jcent) + solarEquationOfCenter(jcent); } static qreal solarApparentLongitude(qreal jcent) { const qreal omega = qDegreesToRadians(125.04 - jcent * 1934.136); const qreal correction = qDegreesToRadians(-0.00569 - 0.00478 * std::sin(omega)); return solarTrueLongitude(jcent) + correction; } static qreal solarDeclination(qreal jcent) { return std::asin(std::sin(obliquityCorrection(jcent)) * std::sin(solarApparentLongitude(jcent))); } static qreal equationOfTime(qreal jcent) { const qreal e = eccentricityEarthOrbit(jcent); const qreal m = solarGeometricMeanAnomaly(jcent); const qreal l = solarGeometricMeanLongitude(jcent); const qreal y = std::pow(std::tan(0.5 * obliquityCorrection(jcent)), 2); const qreal equation = y * std::sin(2 * l) - 2 * e * std::sin(m) + 4 * e * y * std::sin(m) * std::cos(2 * l) - 0.5 * y * y * std::sin(4 * l) - 1.25 * e * e * std::sin(2 * m); return 4 * qRadiansToDegrees(equation); } static qreal julianCenturiesToMinutesFromMidnight(qreal jcent) { const qreal jd = julianCenturiesToJulianDay(jcent); const qreal minutes = jd - std::round(jd) - 0.5; return minutes * 1440.0; } static qreal solarHourAngle(qreal jcent, const QGeoCoordinate &location) { const qreal minutes = julianCenturiesToMinutesFromMidnight(jcent); const qreal angle = std::fmod(location.longitude() + (equationOfTime(jcent) + minutes - 720) / 4, 360); if (angle < -180.0) return angle + 360.0; if (angle > 180.0) return angle - 360.0; return angle; } static qreal solarZenith(qreal jcent, const QGeoCoordinate &location, qreal hourAngle) { const qreal declination = solarDeclination(jcent); const qreal zenith = std::acos(sind(location.latitude()) * std::sin(declination) + cosd(location.latitude()) * std::cos(declination) * cosd(hourAngle)); return qRadiansToDegrees(zenith); } static qreal solarAzimuth(qreal jcent, const QGeoCoordinate &location, qreal hourAngle) { const qreal zenith = solarZenith(jcent, location, hourAngle); const qreal denominator = cosd(location.latitude()) * sind(zenith); if (qFuzzyIsNull(denominator)) return std::nan(""); const qreal declination = solarDeclination(jcent); const qreal numerator = sind(location.latitude()) * cosd(zenith) - std::sin(declination); qreal azimuth = std::acos(qBound(-1.0, numerator / denominator, 1.0)); if (hourAngle < 0) azimuth = M_PI - azimuth; else azimuth = azimuth + M_PI; return qRadiansToDegrees(azimuth); } static qreal atmosphericRefractionCorrection(qreal e) { if (e > 85) return 0; const qreal te = std::tan(qDegreesToRadians(e)); qreal correction = 0; if (e > 5) correction = 58.1 / te - 0.07 / (te * te * te) + 0.000086 / (te * te * te * te * te); else if (e > -0.575) correction = 1735 + e * (-518.2 + e * (103.4 + e * (-12.79 + e * 0.711))); else correction = -20.774 / te; return correction / 3600.0; } /*! * Constructs a null KSunPosition object. */ KSunPosition::KSunPosition() : KSunPosition(0, 0) { } /*! * Constructs a KSunPosition with the given elevation \p elevation and azimuth \p azimuth. */ KSunPosition::KSunPosition(qreal elevation, qreal azimuth) : m_elevation(elevation) , m_azimuth(azimuth) { } /*! * Constructs a KSunPosition with the position of the Sun at the specified date \p dateTime * and location \p location. */ KSunPosition::KSunPosition(const QDateTime &dateTime, const QGeoCoordinate &location) { const qreal jd = dateTimeToJulianDay(dateTime); const qreal jcent = julianDayToJulianCenturies(jd); const qreal hourAngle = solarHourAngle(jcent, location); init(jcent, location, hourAngle); } /*! * Returns \c true if the position of the Sun is valid; otherwise returns \c false. */ bool KSunPosition::isValid() const { return !(std::isnan(m_azimuth) || std::isnan(m_elevation)); } /*! * Returns the elevation angle of the Sun, in decimal degrees. */ qreal KSunPosition::elevation() const { return m_elevation; } /*! * Returns the azimuth angle of the Sun, in decimal degrees. * * The azimuth angle specifies the Sun's relative direction along the local horizon, where 0 * degrees corresponds to north, 90 degrees corresponds to east, 180 degrees corresponds to * south, and 270 degrees corresponds to west. */ qreal KSunPosition::azimuth() const { return m_azimuth; } /*! * Converts the position of the Sun (elevation, azimuth) to the Cartesian coordinates. * * The returned value is a unit vector, i.e. it has a magnitude of 1. */ QVector3D KSunPosition::toVector() const { const float x = static_cast(cosd(m_elevation) * cosd(m_azimuth)); const float y = static_cast(cosd(m_elevation) * sind(m_azimuth)); const float z = static_cast(sind(m_elevation)); return QVector3D(x, y, z); } static qreal solarNoonCorrection(qreal jcent, const QGeoCoordinate &location) { return (720 - 4 * location.longitude() - equationOfTime(jcent)) / 1440; } /*! * Determines the position of the Sun (elevation, azimuth) at midnight. * * The returned value is the lowest position of the Sun in the sky at the specified time and location. */ KSunPosition KSunPosition::midnight(const QDateTime &dateTime, const QGeoCoordinate &location) { qreal jdNoon = std::round(dateTimeToJulianDay(dateTime)); qreal jcentNoon = julianDayToJulianCenturies(jdNoon); const qreal correction = solarNoonCorrection(jcentNoon, location); jdNoon += correction - 0.5; jcentNoon = julianDayToJulianCenturies(jdNoon); const qreal jdMidnight = jdNoon + 0.5; const qreal jcentMidnight = julianDayToJulianCenturies(jdMidnight); KSunPosition position; position.init(jcentMidnight, location, s_midnightHourAngle); return position; } void KSunPosition::init(qreal jcent, const QGeoCoordinate &location, qreal hourAngle) { const qreal zenith = solarZenith(jcent, location, hourAngle); m_elevation = 90 - zenith; m_elevation += atmosphericRefractionCorrection(m_elevation); m_azimuth = solarAzimuth(jcent, location, hourAngle); } plasma5-wallpapers-dynamic-4.4.1/src/lib/ksunposition.h000066400000000000000000000014361455105060300231320ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include #include #include class KDYNAMICWALLPAPER_EXPORT KSunPosition { public: KSunPosition(); KSunPosition(qreal elevation, qreal azimuth); KSunPosition(const QDateTime &dateTime, const QGeoCoordinate &location); bool isValid() const; qreal elevation() const; qreal azimuth() const; QVector3D toVector() const; static KSunPosition midnight(const QDateTime &dateTime, const QGeoCoordinate &location); private: void init(qreal jcent, const QGeoCoordinate &location, qreal hourAngle); qreal m_elevation; qreal m_azimuth; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitor.cpp000066400000000000000000000051121455105060300250360ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksystemclockmonitor.h" #include "ksystemclockmonitorengine_p.h" /*! * \class KSystemClockMonitor * \brief The KSystemClockMonitor class provides a way for monitoring system clock changes. * * The KSystemClockMonitor class makes it possible to detect discontinuous changes to the system * clock. Such changes are usually initiated by the user adjusting values in the Date and Time * KCM or calls made to functions like settimeofday(). */ class KSystemClockMonitor::Private { public: void loadMonitorEngine(); void unloadMonitorEngine(); KSystemClockMonitor *monitor = nullptr; KSystemClockMonitorEngine *engine = nullptr; bool isActive = false; }; void KSystemClockMonitor::Private::loadMonitorEngine() { engine = KSystemClockMonitorEngine::create(monitor); if (engine) { QObject::connect(engine, &KSystemClockMonitorEngine::systemClockChanged, monitor, &KSystemClockMonitor::systemClockChanged); } } void KSystemClockMonitor::Private::unloadMonitorEngine() { if (!engine) return; QObject::disconnect(engine, &KSystemClockMonitorEngine::systemClockChanged, monitor, &KSystemClockMonitor::systemClockChanged); engine->deleteLater(); engine = nullptr; } /*! * Constructs an inactive KSystemClockMonitor object with the given \p parent. */ KSystemClockMonitor::KSystemClockMonitor(QObject *parent) : QObject(parent) , d(new Private) { d->monitor = this; } /*! * Destructs the KSystemClockMonitor object. */ KSystemClockMonitor::~KSystemClockMonitor() { } /*! * Returns \c true if the KSystemClockMonitor is active; otherwise returns \c false. */ bool KSystemClockMonitor::isActive() const { return d->isActive; } /*! * Sets the active status of the KSystemClockMonitor to \p active. * * systemClockChanged() signal won't be emitted while the monitor is inactive. * * The monitor is inactive by default. * * @see activeChanged */ void KSystemClockMonitor::setActive(bool set) { if (d->isActive == set) return; d->isActive = set; if (d->isActive) d->loadMonitorEngine(); else d->unloadMonitorEngine(); Q_EMIT activeChanged(); } /*! * @fn void KSystemClockMonitor::activeChanged() * * This signal is emitted when the active property has been changed. */ /*! * @fn void KSystemClockMonitor::systemClockChanged() * * This signal is emitted when the system clock has been changed. */ plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitor.h000066400000000000000000000012301455105060300245000ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "kdynamicwallpaper_export.h" #include class KDYNAMICWALLPAPER_EXPORT KSystemClockMonitor : public QObject { Q_OBJECT Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged) public: explicit KSystemClockMonitor(QObject *parent = nullptr); ~KSystemClockMonitor() override; bool isActive() const; void setActive(bool active); signals: void activeChanged(); void systemClockChanged(); private: class Private; QScopedPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitorengine.cpp000066400000000000000000000010421455105060300262220ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksystemclockmonitorengine_p.h" #if defined(Q_OS_LINUX) #include "ksystemclockmonitorengine_linux_p.h" #endif KSystemClockMonitorEngine *KSystemClockMonitorEngine::create(QObject *parent) { #if defined(Q_OS_LINUX) return KLinuxSystemClockMonitorEngine::create(parent); #else return nullptr; #endif } KSystemClockMonitorEngine::KSystemClockMonitorEngine(QObject *parent) : QObject(parent) { } plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitorengine_linux.cpp000066400000000000000000000033171455105060300274500ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #include "ksystemclockmonitorengine_linux_p.h" #include #include #include #include #ifndef TFD_TIMER_CANCEL_ON_SET #define TFD_TIMER_CANCEL_ON_SET (1 << 1) #endif KLinuxSystemClockMonitorEngine *KLinuxSystemClockMonitorEngine::create(QObject *parent) { const int fd = timerfd_create(CLOCK_REALTIME, O_CLOEXEC | O_NONBLOCK); if (fd == -1) { qWarning("Couldn't create clock skew notifier engine: %s", strerror(errno)); return nullptr; } const itimerspec spec = {}; const int ret = timerfd_settime(fd, TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET, &spec, nullptr); if (ret == -1) { qWarning("Couldn't create clock skew notifier engine: %s", strerror(errno)); close(fd); return nullptr; } return new KLinuxSystemClockMonitorEngine(fd, parent); } KLinuxSystemClockMonitorEngine::KLinuxSystemClockMonitorEngine(int fd, QObject *parent) : KSystemClockMonitorEngine(parent) , m_fd(fd) { const QSocketNotifier *notifier = new QSocketNotifier(fd, QSocketNotifier::Read, this); connect(notifier, &QSocketNotifier::activated, this, &KLinuxSystemClockMonitorEngine::handleTimerCancelled); } KLinuxSystemClockMonitorEngine::~KLinuxSystemClockMonitorEngine() { close(m_fd); } void KLinuxSystemClockMonitorEngine::handleTimerCancelled() { uint64_t expirationCount; const ssize_t readCount = read(m_fd, &expirationCount, sizeof(expirationCount)); if (readCount != -1 || errno != ECANCELED) { return; } Q_EMIT systemClockChanged(); } plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitorengine_linux_p.h000066400000000000000000000010341455105060300274260ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include "ksystemclockmonitorengine_p.h" class KLinuxSystemClockMonitorEngine : public KSystemClockMonitorEngine { Q_OBJECT public: ~KLinuxSystemClockMonitorEngine() override; static KLinuxSystemClockMonitorEngine *create(QObject *parent); private Q_SLOTS: void handleTimerCancelled(); private: KLinuxSystemClockMonitorEngine(int fd, QObject *parent); int m_fd; }; plasma5-wallpapers-dynamic-4.4.1/src/lib/ksystemclockmonitorengine_p.h000066400000000000000000000006401455105060300262110ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: LGPL-3.0-or-later */ #pragma once #include class KSystemClockMonitorEngine : public QObject { Q_OBJECT public: static KSystemClockMonitorEngine *create(QObject *parent); protected: explicit KSystemClockMonitorEngine(QObject *parent); Q_SIGNALS: void systemClockChanged(); }; plasma5-wallpapers-dynamic-4.4.1/src/lib/metadata.xml000066400000000000000000000007101455105060300225100ustar00rootroot00000000000000 plasma5-wallpapers-dynamic-4.4.1/src/lib/resources.qrc000066400000000000000000000003431455105060300227310ustar00rootroot00000000000000 metadata.xml plasma5-wallpapers-dynamic-4.4.1/src/package/000077500000000000000000000000001455105060300210355ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/package/contents/000077500000000000000000000000001455105060300226725ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/package/contents/config/000077500000000000000000000000001455105060300241375ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/package/contents/config/main.xml000066400000000000000000000024041455105060300256050ustar00rootroot00000000000000 2 true 0 -90 90 0 -180 180 300000 330 100 1000 true plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/000077500000000000000000000000001455105060300233075ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/DecimalSpinBox.qml000066400000000000000000000034031455105060300266630ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2021 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ import QtQuick 2.5 import QtQuick.Controls 2.3 as QtControls2 Item { // QtControls 2 doen't provide a decimal spinbox out of the box. So we wrap the integer // based spinbox and perform integer <-> decimal conversions internally. id: container implicitWidth: control.implicitWidth implicitHeight: control.implicitHeight function __integerToDecimal(integer) { return integer / 100; } function __decimalToInteger(decimal) { return Math.round(decimal * 100); } property real from: 0 property real to: 99 property int decimals: 2 property real value: 0 property real stepSize: 1 QtControls2.SpinBox { id: control anchors.fill: parent from: __decimalToInteger(container.from) to: __decimalToInteger(container.to) stepSize: __decimalToInteger(container.stepSize) value: __decimalToInteger(container.value) validator: DoubleValidator { bottom: Math.min(control.from, control.to) top: Math.max(control.from, control.to) } textFromValue: function(value, locale) { return __integerToDecimal(value).toLocaleString(locale, 'f', container.decimals); } valueFromText: function(text, locale) { return __decimalToInteger(Number.fromLocaleString(locale, text)); } onValueModified: { // Update the outer decimal value, this will be called when user has modified the // spinbox value, so it should not be possible to have a binding loop. container.value = __integerToDecimal(control.value); } } } plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/WallpaperImage.qml000066400000000000000000000041531455105060300267170ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ import QtQuick 2.5 Item { id: root /*! * The image being displayed in the bottom layer. */ property url bottomLayer /*! * The image being displayed in the top layer. */ property url topLayer /*! * The scaled width and height of the full-frame image. */ property size sourceSize /*! * The blend factor between the bottom layer and the top layer. * * The blend factor varies between 0 and 1. 0 means that only the bottom * layer is visible; 1 means that only the top layer is visible. * * The default value is 0. */ property real blendFactor: 0 /*! * Set this property to define what happens when the source image has a * different size than the item. * * Defaults to \c Image.Stretch. */ property int fillMode: Image.Stretch /*! * This property holds the status of image loading. */ readonly property int status: { if (bottom.status == Image.Error || top.status == Image.Error) return Image.Error; if (bottom.status == Image.Loading || top.status == Image.Loading) return Image.Loading; if (bottom.status == Image.Ready || top.status == Image.Ready) return Image.Ready; return Image.Null; } Image { id: bottom anchors.fill: parent asynchronous: true autoTransform: true cache: wallpaper.configuration.Cache fillMode: root.fillMode source: root.bottomLayer sourceSize: root.sourceSize } Image { id: top anchors.fill: parent asynchronous: true autoTransform: true cache: wallpaper.configuration.Cache fillMode: root.fillMode opacity: root.blendFactor source: root.topLayer sourceSize: root.sourceSize } Behavior on blendFactor { NumberAnimation { duration: wallpaper.configuration.TransitionDuration } } } plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/WallpaperView.qml000066400000000000000000000067041455105060300266130ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ import QtQuick 2.5 import QtQuick.Controls 2.0 StackView { id: root /*! * The image being displayed in the bottom layer. */ property url bottomLayer /*! * The image being displayed in the top layer. */ property url topLayer /*! * The blend factor between the bottom layer and the top layer. * * The blend factor varies between 0 and 1. 0 means that only the bottom * layer is visible; 1 means that only the top layer is visible. */ property real blendFactor /*! * Set this property to define what happens when the source image has a * different size than the item. */ property int fillMode /*! * The scaled width and height of the full-frame image. */ property size sourceSize /*! * This property holds the wallpaper image about to be presented. */ property WallpaperImage __nextItem: null /*! * This property holds the status of image loading. */ readonly property int status: __nextItem ? __nextItem.status : Image.Null onBottomLayerChanged: Qt.callLater(reload) onTopLayerChanged: Qt.callLater(reload) onBlendFactorChanged: Qt.callLater(reblend) onFillModeChanged: Qt.callLater(reload) Component { id: baseImage WallpaperImage { layer.enabled: root.replaceEnter.running StackView.onRemoved: destroy() } } replaceEnter: Transition { OpacityAnimator { duration: wallpaper.configuration.TransitionDuration from: 0 to: 1 } } replaceExit: Transition { PauseAnimation { duration: wallpaper.configuration.TransitionDuration } } function __swap() { if (root.__nextItem.status == Image.Loading) return; root.__nextItem.statusChanged.disconnect(root.__swap); if (root.__nextItem.status == Image.Error) return; var operation; if (!root.currentItem) operation = StackView.Immediate; else if (root.currentItem.bottomLayer !== bottomLayer) operation = StackView.Transition; else if (root.currentItem.topLayer !== topLayer) operation = StackView.Transition; else operation = StackView.Immediate; if (operation === StackView.Transition) root.__nextItem.opacity = 0; else root.__nextItem.opacity = 1; root.replace(root.__nextItem, {}, operation); } function reload() { if (root.status == Image.Loading) root.__nextItem.statusChanged.disconnect(root.__swap); root.__nextItem = baseImage.createObject(root, { bottomLayer: bottomLayer, topLayer: topLayer, blendFactor: blendFactor, fillMode: fillMode, sourceSize: sourceSize }); if (root.__nextItem.status == Image.Loading) root.__nextItem.statusChanged.connect(root.__swap); else root.__swap(); } function reblend() { if (!root.currentItem) return; if (root.currentItem.bottomLayer !== bottomLayer) return; if (root.currentItem.topLayer !== topLayer) return; root.currentItem.blendFactor = blendFactor; } } plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/config.qml000066400000000000000000000215251455105060300252740ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ import QtQuick 2.5 import QtQuick.Dialogs 1.3 import QtQuick.Layouts 1.0 import QtQuick.Controls 2.3 as QtControls2 import QtPositioning 5.12 import org.kde.kcm 1.1 as KCM import org.kde.kirigami 2.10 as Kirigami import com.github.zzag.plasma.wallpapers.dynamic 1.0 ColumnLayout { id: root property int cfg_FillMode property string cfg_Image property alias cfg_UpdateInterval: updateIntervalSpinBox.value property alias cfg_AutoDetectLocation: autoDetectLocationCheckBox.checked property alias cfg_ManualLatitude: latitudeSpinBox.value property alias cfg_ManualLongitude: longitudeSpinBox.value function saveConfig() { wallpapersModel.purge(); } Kirigami.FormLayout { twinFormLayouts: parentLayout QtControls2.ComboBox { id: positioningComboBox Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Fill Mode:") textRole: "text" model: [ { "text": i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Scaled and Cropped"), "value": Image.PreserveAspectCrop }, { "text": i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Scaled"), "value": Image.Stretch }, { "text": i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Scaled, Keep Proportions"), "value": Image.PreserveAspectFit }, { "text": i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Centered"), "value": Image.Pad }, { "text": i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Tiled"), "value": Image.Tile } ] onActivated: cfg_FillMode = model[currentIndex]["value"] Component.onCompleted: { for (var i = 0; i < model.length; i++) { if (model[i]["value"] === wallpaper.configuration.FillMode) { positioningComboBox.currentIndex = i; break; } } } } QtControls2.CheckBox { id: autoDetectLocationCheckBox text: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Automatically detect location") } DecimalSpinBox { Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Latitude:") enabled: !autoDetectLocationCheckBox.checked visible: autoDetectLocationCheckBox.checked decimals: 2 from: -90 to: 90 value: automaticLocationProvider.position.coordinate.latitude } DecimalSpinBox { Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Longitude:") enabled: !autoDetectLocationCheckBox.checked visible: autoDetectLocationCheckBox.checked decimals: 2 from: -180 to: 180 value: automaticLocationProvider.position.coordinate.longitude } DecimalSpinBox { id: latitudeSpinBox Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Latitude:") decimals: 2 from: -90 to: 90 visible: !autoDetectLocationCheckBox.checked } DecimalSpinBox { id: longitudeSpinBox Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Longitude:") decimals: 2 from: -180 to: 180 visible: !autoDetectLocationCheckBox.checked } QtControls2.SpinBox { id: updateIntervalSpinBox Kirigami.FormData.label: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Update Every:") to: minutesToMilliseconds(360) from: minutesToMilliseconds(1) stepSize: minutesToMilliseconds(1) function millisecondsToMinutes(milliseconds) { return milliseconds / 60000; } function minutesToMilliseconds(minutes) { return minutes * 60000; } valueFromText: function(text, locale) { return minutesToMilliseconds(Number.fromLocaleString(locale, text)); } textFromValue: function(value, locale) { const minutes = millisecondsToMinutes(value); return minutes.toLocaleString(locale, 'f', 0) + i18ndp("plasma_wallpaper_com.github.zzag.dynamic", " minute", " minutes", minutes); } } } Kirigami.InlineMessage { id: errorContainer Layout.fillWidth: true showCloseButton: true type: Kirigami.MessageType.Error visible: false } KCM.GridView { id: wallpapersGrid Layout.fillWidth: true Layout.fillHeight: true function resetCurrentIndex() { view.currentIndex = wallpapersModel.find(cfg_Image); } view.model: wallpapersModel view.delegate: KCM.GridDelegate { hoverEnabled: true opacity: model.zombie ? 0.5 : 1 text: model.name toolTip: { if (model.author && model.license) return i18ndc("plasma_wallpaper_com.github.zzag.dynamic", " by ()", "By %1 (%2)", model.author, model.license); if (model.license) return i18ndc("plasma_wallpaper_com.github.zzag.dynamic", " ()", "%1 (%2)", model.name, model.license); return model.name; } actions: [ Kirigami.Action { icon.name: "document-open-folder" tooltip: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Open Containing Folder") onTriggered: Qt.openUrlExternally(model.folder) }, Kirigami.Action { icon.name: "edit-undo" tooltip: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Restore Wallpaper") visible: model.zombie onTriggered: wallpapersModel.unscheduleRemove(wallpapersModel.modelIndex(index)) }, Kirigami.Action { icon.name: "edit-delete" tooltip: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Remove Wallpaper") visible: !model.zombie && model.removable onTriggered: wallpapersModel.scheduleRemove(wallpapersModel.modelIndex(index)) } ] thumbnail: Image { anchors.fill: parent fillMode: cfg_FillMode source: model.preview } onClicked: { cfg_Image = model.image; wallpapersGrid.forceActiveFocus(); } } Connections { target: wallpapersModel onRowsInserted: Qt.callLater(wallpapersGrid.resetCurrentIndex) onRowsRemoved: Qt.callLater(wallpapersGrid.resetCurrentIndex) } Connections { target: root onCfg_ImageChanged: Qt.callLater(wallpapersGrid.resetCurrentIndex) } } Loader { id: wallpaperDialogLoader active: false sourceComponent: FileDialog { title: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Open Wallpaper") folder: shortcuts.home nameFilters: [i18nd("plasma_wallpaper_com.github.zzag.dynamic", "AVIF Image Files (*.avif)")] onAccepted: { wallpapersModel.add(fileUrl); wallpaperDialogLoader.active = false; } onRejected: { wallpaperDialogLoader.active = false; } Component.onCompleted: open() } } RowLayout { Layout.alignment: Qt.AlignRight QtControls2.Button { icon.name: "list-add" text: i18nd("plasma_wallpaper_com.github.zzag.dynamic", "Add Wallpaper...") onClicked: wallpaperDialogLoader.active = true } } PositionSource { id: automaticLocationProvider active: autoDetectLocationCheckBox.checked } DynamicWallpaperModel { id: wallpapersModel } function showErrorMessage(message) { errorContainer.text = message; errorContainer.visible = true; } Component.onCompleted: { wallpapersModel.errorOccurred.connect(showErrorMessage); wallpapersModel.reload() } } plasma5-wallpapers-dynamic-4.4.1/src/package/contents/ui/main.qml000066400000000000000000000050001455105060300247410ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ import QtQuick 2.5 import QtQuick.Window 2.2 import QtPositioning 5.12 import org.kde.kirigami 2.10 as Kirigami import com.github.zzag.plasma.wallpapers.dynamic 1.0 Item { id: root PositionSource { id: automaticLocationProvider active: wallpaper.configuration.AutoDetectLocation } Location { id: manualLocationProvider coordinate { latitude: wallpaper.configuration.ManualLatitude longitude: wallpaper.configuration.ManualLongitude } } WallpaperView { id: view anchors.fill: parent blendFactor: handler.blendFactor bottomLayer: handler.bottomLayer fillMode: wallpaper.configuration.FillMode sourceSize: Qt.size(root.width, root.height) topLayer: handler.topLayer visible: handler.status == DynamicWallpaperHandler.Ready onStatusChanged: if (status != Image.Loading) { wallpaper.loading = false; } } Rectangle { anchors.fill: parent Kirigami.Theme.colorSet: Kirigami.Theme.View color: Kirigami.Theme.backgroundColor visible: handler.status == DynamicWallpaperHandler.Error Text { anchors.left: parent.left anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter font.pointSize: 24 horizontalAlignment: Text.AlignHCenter text: handler.errorString wrapMode: Text.Wrap } } DynamicWallpaperHandler { id: handler location: { if (wallpaper.configuration.AutoDetectLocation) return automaticLocationProvider.position.coordinate; return manualLocationProvider.coordinate; } source: wallpaper.configuration.Image onStatusChanged: if (status == DynamicWallpaperHandler.Error) { wallpaper.loading = false; } } SystemClockMonitor { active: handler.status == DynamicWallpaperHandler.Ready onSystemClockChanged: handler.scheduleUpdate() } Timer { interval: wallpaper.configuration.UpdateInterval repeat: true running: handler.status == DynamicWallpaperHandler.Ready onTriggered: handler.scheduleUpdate() } Component.onCompleted: { wallpaper.loading = handler.status == DynamicWallpaperHandler.Ready; } } plasma5-wallpapers-dynamic-4.4.1/src/package/metadata.desktop000066400000000000000000000015031455105060300242070ustar00rootroot00000000000000[Desktop Entry] Icon=preferences-desktop-wallpaper Name=Dynamic Name[de]=Dynamisch Name[fr]=Dynamique Name[it]=Dinamico Name[nl]=Dynamisch Name[pt]=Dinâmico Name[ru]=Динамический Name[uk]=Динамічний Name[zh]=动态 Comment=Dynamic wallpaper Comment[de]=Dynamischer Hintergrund Comment[pt]=Papel de parede dinâmico Comment[ru]=Динамические обои Comment[uk]=Динамічні шпалери Comment[zh]=动态壁纸 Type=Service X-KDE-ServiceTypes=Plasma/Wallpaper X-KDE-ParentApp=org.kde.plasmashell X-KDE-PluginInfo-Author=Vlad Zahorodnii X-KDE-PluginInfo-Category= X-KDE-PluginInfo-Email=vlad.zahorodnii@kde.org X-KDE-PluginInfo-License=GPLv3+ X-KDE-PluginInfo-Name=com.github.zzag.dynamic X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://github.com/zzag/plasma5-wallpapers-dynamic plasma5-wallpapers-dynamic-4.4.1/src/package/metadata.desktop.license000066400000000000000000000001511455105060300256260ustar00rootroot00000000000000SPDX-FileCopyrightText: 2020 Vlad Zahorodnii SPDX-License-Identifier: CC0-1.0 plasma5-wallpapers-dynamic-4.4.1/src/plugins/000077500000000000000000000000001455105060300211235ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/plugins/CMakeLists.txt000066400000000000000000000002331455105060300236610ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_subdirectory(kpackage-integration) plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integration/000077500000000000000000000000001455105060300252125ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integration/CMakeLists.txt000066400000000000000000000010771455105060300277570ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_com.github.zzag.dynamic\") set(packagestructure_SOURCES dynamicwallpaperpackagestructure.cpp ) add_library(packagestructure_dynamicwallpaper MODULE ${packagestructure_SOURCES}) target_link_libraries(packagestructure_dynamicwallpaper Qt5::Core KF5::I18n KF5::Package ) install(TARGETS packagestructure_dynamicwallpaper DESTINATION ${KDE_INSTALL_PLUGINDIR}/kpackage/packagestructure) dynamicwallpaperpackagestructure.cpp000066400000000000000000000031221455105060300344660ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integration/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperpackagestructure.h" #include #include DynamicWallpaperPackageStructure::DynamicWallpaperPackageStructure(QObject *parent, const QVariantList &args) : KPackage::PackageStructure(parent, args) { } void DynamicWallpaperPackageStructure::initPackage(KPackage::Package *package) { package->addDirectoryDefinition(QByteArrayLiteral("images"), QStringLiteral("images/"), i18n("Dynamic wallpaper files")); package->setRequired(QByteArrayLiteral("images"), true); } void DynamicWallpaperPackageStructure::pathChanged(KPackage::Package *package) { package->removeDefinition(QByteArrayLiteral("dynamic")); const QStringList fileFormats { QStringLiteral(".avif") }; for (const QString &fileFormat : fileFormats) { const QFileInfo fileInfo(package->path() + QLatin1String("contents/images/dynamic") + fileFormat); if (!fileInfo.exists()) continue; package->addFileDefinition(QByteArrayLiteral("dynamic"), QStringLiteral("images/dynamic") + fileFormat, i18n("Dynamic wallpaper file")); package->setRequired(QByteArrayLiteral("dynamic"), true); break; } } K_EXPORT_KPACKAGE_PACKAGE_WITH_JSON(DynamicWallpaperPackageStructure, "dynamicwallpaperpackagestructure.json") #include "dynamicwallpaperpackagestructure.moc" plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integration/dynamicwallpaperpackagestructure.h000066400000000000000000000010161455105060300342120ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include class DynamicWallpaperPackageStructure final : public KPackage::PackageStructure { Q_OBJECT public: explicit DynamicWallpaperPackageStructure(QObject *parent = nullptr, const QVariantList &args = QVariantList()); void initPackage(KPackage::Package *package) override; void pathChanged(KPackage::Package *package) override; }; dynamicwallpaperpackagestructure.json000066400000000000000000000005411455105060300346570ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integration{ "KPlugin": { "Authors": [ { "Email": "vlad.zahorodnii@kde.org", "Name": "Vlad Zahorodnii" } ], "Id": "Wallpaper/Dynamic", "Name": "Dynamic Wallpaper", "ServiceTypes": [ "KPackage/PackageStructure" ], "Version": "1" } } dynamicwallpaperpackagestructure.json.license000066400000000000000000000001511455105060300362750ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/plugins/kpackage-integrationSPDX-FileCopyrightText: 2020 Vlad Zahorodnii SPDX-License-Identifier: CC0-1.0 plasma5-wallpapers-dynamic-4.4.1/src/tools/000077500000000000000000000000001455105060300206025ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/CMakeLists.txt000066400000000000000000000002161455105060300233410ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_subdirectory(builder) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/000077500000000000000000000000001455105060300222305ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/CMakeLists.txt000066400000000000000000000012021455105060300247630ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_com.github.zzag.dynamic\") add_subdirectory(completions) set(builder_SOURCES dynamicwallpaperexifmetadata.cpp dynamicwallpapermanifest.cpp main.cpp ) set(builder_LIBRARIES KF5::I18n libexif::libexif KDynamicWallpaper::KDynamicWallpaper ) add_executable(kdynamicwallpaperbuilder ${builder_SOURCES}) target_link_libraries(kdynamicwallpaperbuilder ${builder_LIBRARIES}) install(TARGETS kdynamicwallpaperbuilder ${INSTALL_TARGETS_DEFAULT_ARGS}) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/000077500000000000000000000000001455105060300245645ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/CMakeLists.txt000066400000000000000000000002701455105060300273230ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause add_subdirectory(bash) add_subdirectory(fish) add_subdirectory(zsh) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/bash/000077500000000000000000000000001455105060300255015ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/bash/CMakeLists.txt000066400000000000000000000003341455105060300302410ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause install(FILES kdynamicwallpaperbuilder DESTINATION ${KDE_INSTALL_DATADIR}/bash-completion/completions/) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/bash/kdynamicwallpaperbuilder000066400000000000000000000011671455105060300325070ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 _kdynamicwallpaperbuilder_module() { local cur prev OPTS _init_completion || return case $prev in '-h'|'--help'|'--help-all'|'-v'|'--version') return ;; esac case $cur in -*) OPTS=" --output --max-threads " COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return ;; esac } complete -F _kdynamicwallpaperbuilder_module kdynamicwallpaperbuilder # ex: filetype=sh plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/fish/000077500000000000000000000000001455105060300255155ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/fish/CMakeLists.txt000066400000000000000000000003251455105060300302550ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause install(FILES kdynamicwallpaperbuilder.fish DESTINATION ${KDE_INSTALL_DATADIR}/fish/completions) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/fish/kdynamicwallpaperbuilder.fish000066400000000000000000000013161455105060300334470ustar00rootroot00000000000000# kdynamicwallpaperbuilder(1) completion # SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 complete -f -c kdynamicwallpaperbuilder complete -c kdynamicwallpaperbuilder -s v -l version -d "Print the version information and quit" complete -c kdynamicwallpaperbuilder -s h -l help -d "Show help message and quit" complete -c kdynamicwallpaperbuilder -l help-all -d "Show help message including Qt specific options and quit" complete -c kdynamicwallpaperbuilder -l output -d "Specify the file where the output will be written" -r complete -c kdynamicwallpaperbuilder -l max-threads -d "Maximum number of threads that can be used when encoding a wallpaper" -r plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/zsh/000077500000000000000000000000001455105060300253705ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/zsh/CMakeLists.txt000066400000000000000000000003241455105060300301270ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause install(FILES _kdynamicwallpaperbuilder DESTINATION ${KDE_INSTALL_DATADIR}/zsh/site-functions/) plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/completions/zsh/_kdynamicwallpaperbuilder000066400000000000000000000010101455105060300325200ustar00rootroot00000000000000#compdef kdynamicwallpaperbuilder # SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 _arguments -s \ {-v,--version}'[Show the version information and quit]' \ {-h,--help}'[Show help message and quit]' \ '--help-all[Show help message including Qt specific options and quit]' \ '--output[Specify the file where the output will be written]:files:_files' \ '--max-threads[Maximum number of threads that can be used when encoding a wallpaper]' plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/dynamicwallpaperexifmetadata.cpp000066400000000000000000000217771455105060300306630ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpaperexifmetadata.h" #include #include #include #include /*! * \class DynamicWallpaperExifMetaData * \brief The DynamicWallpaperExifMetaData class provides a convenient way for computing the position * of the Sun from the Exif metadata in an image. */ class DynamicWallpaperExifMetaDataPrivate : public QSharedData { public: void initialize(const QString &fileName); DynamicWallpaperExifMetaData::MetaDataFields fields; QDateTime birthDateTime; KSunPosition solarCoordinates; }; static ExifEntry *readEntry(ExifData *data, ExifIfd ifd, ExifTag tag) { return exif_content_get_entry(data->ifd[ifd], tag); } static QByteArray readAscii(ExifData *data, ExifIfd ifd, ExifTag tag) { ExifEntry *entry = readEntry(data, ifd, tag); if (!entry) return QByteArray(); QByteArray buffer(1024, 0); exif_entry_get_value(entry, buffer.data(), buffer.size()); return buffer; } /*! * \internal * * Converts \a degrees, \a minutes, and \a seconds to the decimal degrees. */ static qreal degreesMinutesSecondsToDecimalDegrees(const ExifRational °rees, const ExifRational &minutes, const ExifRational &seconds) { const qreal decimalDegrees = qreal(degrees.numerator) / degrees.denominator; const qreal decimalMinutes = qreal(minutes.numerator) / minutes.denominator / 60; const qreal decimalSeconds = qreal(seconds.numerator) / seconds.denominator / 3600; return decimalDegrees + decimalMinutes + decimalSeconds; } static bool readGpsLatitude(ExifData *data, qreal *result) { const ExifEntry *latitude = readEntry(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_LATITUDE)); if (!latitude) return false; const QByteArray reference = readAscii(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_LATITUDE_REF)); if (reference.isNull()) return false; const ExifByteOrder byteOrder = exif_data_get_byte_order(data); const uint stride = exif_format_get_size(latitude->format); const ExifRational degrees = exif_get_rational(latitude->data + stride * 0, byteOrder); const ExifRational minutes = exif_get_rational(latitude->data + stride * 1, byteOrder); const ExifRational seconds = exif_get_rational(latitude->data + stride * 2, byteOrder); *result = degreesMinutesSecondsToDecimalDegrees(degrees, minutes, seconds); if (reference[0] == 'S') *result *= -1; return true; } static bool readGpsLongitude(ExifData *data, qreal *result) { const ExifEntry *longitude = readEntry(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_LONGITUDE)); if (!longitude) return false; const QByteArray reference = readAscii(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_LONGITUDE_REF)); if (reference.isNull()) return false; const ExifByteOrder byteOrder = exif_data_get_byte_order(data); const uint stride = exif_format_get_size(longitude->format); const ExifRational degrees = exif_get_rational(longitude->data + stride * 0, byteOrder); const ExifRational minutes = exif_get_rational(longitude->data + stride * 1, byteOrder); const ExifRational seconds = exif_get_rational(longitude->data + stride * 2, byteOrder); *result = degreesMinutesSecondsToDecimalDegrees(degrees, minutes, seconds); if (reference[0] == 'W') *result *= -1; return true; } static bool readGpsCoordinates(ExifData *data, QGeoCoordinate *coordinates) { qreal latitude, longitude; if (!readGpsLatitude(data, &latitude)) return false; if (!readGpsLongitude(data, &longitude)) return false; *coordinates = QGeoCoordinate(latitude, longitude); return true; } /*! * \internal * * Determines the date and the time when the picture was taken. Note that the TimeZoneOffset tag * is required because the position of the Sun is computed based on time and location. */ static bool readExifDateTime(ExifData *data, QDateTime *result) { QByteArray dateTimeAscii = readAscii(data, EXIF_IFD_EXIF, EXIF_TAG_DATE_TIME_ORIGINAL); if (dateTimeAscii.isNull()) dateTimeAscii = readAscii(data, EXIF_IFD_EXIF, EXIF_TAG_DATE_TIME); if (dateTimeAscii.isNull()) return false; const ExifEntry *timeZoneOffset = readEntry(data, EXIF_IFD_EXIF, EXIF_TAG_TIME_ZONE_OFFSET); if (!timeZoneOffset) return false; const QDateTime localDateTime = QDateTime::fromString(dateTimeAscii, QStringLiteral("yyyy:MM:dd hh:mm:ss")); if (!localDateTime.isValid()) return false; const ExifByteOrder byteOrder = exif_data_get_byte_order(data); const QTimeZone timeZone(exif_get_sshort(timeZoneOffset->data, byteOrder) * 86400); *result = QDateTime(localDateTime.date(), localDateTime.time(), timeZone); return true; } /*! * \internal * * Determines the date and the time when the picture was taken based on the GPS timestamp. */ static bool readGpsDateTime(ExifData *data, QDateTime *result) { const QByteArray dateAscii = readAscii(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_DATE_STAMP)); if (dateAscii.isNull()) return false; const ExifEntry *timeEntry = readEntry(data, EXIF_IFD_GPS, ExifTag(EXIF_TAG_GPS_TIME_STAMP)); if (!timeEntry) return false; const ExifByteOrder byteOrder = exif_data_get_byte_order(data); const uint stride = exif_format_get_size(timeEntry->format); const ExifRational hoursRational = exif_get_rational(timeEntry->data + stride * 0, byteOrder); const ExifRational minutesRational = exif_get_rational(timeEntry->data + stride * 1, byteOrder); const ExifRational secondsRational = exif_get_rational(timeEntry->data + stride * 2, byteOrder); const QTime time = QTime(hoursRational.numerator / hoursRational.denominator, minutesRational.numerator / minutesRational.denominator, secondsRational.numerator / secondsRational.denominator); const QDate date = QDate::fromString(dateAscii, QStringLiteral("yyyy:MM:dd")); *result = QDateTime(date, time, QTimeZone::utc()); return true; } static bool readDateTimeOriginal(ExifData *data, QDateTime *result) { return readExifDateTime(data, result) || readGpsDateTime(data, result); } void DynamicWallpaperExifMetaDataPrivate::initialize(const QString &fileName) { QGeoCoordinate coordinates; ExifData *data = exif_data_new_from_file(fileName.toUtf8()); if (!data) return; if (readDateTimeOriginal(data, &birthDateTime)) fields |= DynamicWallpaperExifMetaData::BirthDateTimeField; if (birthDateTime.isValid() && readGpsCoordinates(data, &coordinates)) { solarCoordinates = KSunPosition(birthDateTime, coordinates); if (solarCoordinates.isValid()) fields |= DynamicWallpaperExifMetaData::SolarCoordinatesField; } exif_data_unref(data); } /*! * Constructs a DynamicWallpaperExifMetaData for an image with the specified \a fileName. */ DynamicWallpaperExifMetaData::DynamicWallpaperExifMetaData(const QString &fileName) : d(new DynamicWallpaperExifMetaDataPrivate) { d->initialize(fileName); } /*! * Constructs a copy of the DynamicWallpaperExifMetaData object. */ DynamicWallpaperExifMetaData::DynamicWallpaperExifMetaData(const DynamicWallpaperExifMetaData &other) : d(other.d) { } /*! * Destructs the DynamicWallpaperExifMetaData object. */ DynamicWallpaperExifMetaData::~DynamicWallpaperExifMetaData() { } /*! * Assigns the value of \p other to a dynamic wallpaper exif metadata object. */ DynamicWallpaperExifMetaData &DynamicWallpaperExifMetaData::operator=(const DynamicWallpaperExifMetaData &other) { d = other.d; return *this; } /*! * Returns the date and the time when the picture was taken or created. */ QDateTime DynamicWallpaperExifMetaData::birthDateTime() const { return d->birthDateTime; } /*! * Returns the Sun's azimuth angle when the picture was taken or created, in decimal degrees. * * If the picture comes with no geo-coordinates metadata, this method will return \c 0. */ qreal DynamicWallpaperExifMetaData::solarAzimuth() const { return d->solarCoordinates.azimuth(); } /*! * Returns the Sun's elevation angle when the picture was taken or created, in decimal degrees. * * If the pictures with with no geo-coordinates metadata, this method will return \c 0. */ qreal DynamicWallpaperExifMetaData::solarElevation() const { return d->solarCoordinates.elevation(); } /*! * Returns a bitmask that indicates which fields are present in the metadata. */ DynamicWallpaperExifMetaData::MetaDataFields DynamicWallpaperExifMetaData::fields() const { return d->fields; } /*! * Returns \c true if the DynamicWallpaperExifMetaData is valid; otherwise returns \c false. */ bool DynamicWallpaperExifMetaData::isValid() const { return d->fields & BirthDateTimeField; } plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/dynamicwallpaperexifmetadata.h000066400000000000000000000017141455105060300303150ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include class DynamicWallpaperExifMetaDataPrivate; class DynamicWallpaperExifMetaData { public: enum MetaDataField { BirthDateTimeField = 0x1, SolarCoordinatesField = 0x2, }; Q_DECLARE_FLAGS(MetaDataFields, MetaDataField) explicit DynamicWallpaperExifMetaData(const QString &fileName); DynamicWallpaperExifMetaData(const DynamicWallpaperExifMetaData &other); ~DynamicWallpaperExifMetaData(); DynamicWallpaperExifMetaData &operator=(const DynamicWallpaperExifMetaData &other); QDateTime birthDateTime() const; qreal solarAzimuth() const; qreal solarElevation() const; MetaDataFields fields() const; bool isValid() const; private: QSharedDataPointer d; }; plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/dynamicwallpapermanifest.cpp000066400000000000000000000270101455105060300300170ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "dynamicwallpapermanifest.h" #include "dynamicwallpaperexifmetadata.h" #include #include #include #include #include #include /*! * \internal * * Returns \c true if the specified value is a placeholder; otherwise returns \c false. * * A placeholder indicates that the correponding value must be computed by the builder. */ static bool isPlaceholderValue(const QJsonValue &value) { return value.toString().trimmed() == QStringLiteral("*"); } /*! * \internal * * Returns a real number between 0 and 1, where 0 and 1 correspond to midnight, and 0.5 * corresponds to noon. */ static qreal timeToReal(const QTime &time) { return time.msecsSinceStartOfDay() / 86400000.0; } QString DynamicWallpaperManifest::resolveFileName(const QString &fileName) const { const QFileInfo manifestFileInfo(m_manifestFileName); const QDir descriptionDirectory = manifestFileInfo.dir(); return descriptionDirectory.absoluteFilePath(fileName); } void DynamicWallpaperManifest::init() { QFile file(m_manifestFileName); if (!file.open(QFile::ReadOnly)) { setError(QStringLiteral("Failed to open ") + file.fileName() + QStringLiteral(": ") + file.errorString()); return; } QJsonDocument document = QJsonDocument::fromJson(file.readAll()); if (document.isNull()) { setError(QStringLiteral("Not JSON file")); return; } if (document.isObject()) { const QJsonObject rootObject = document.object(); const QString type = rootObject["Type"].toString(); if (type == QLatin1String("solar")) { parseSolar(rootObject["Meta"].toArray()); } else if (type == QLatin1String("day-night")) { parseDayNight(rootObject["Meta"].toArray()); } else { setError(QStringLiteral("Unknown manifest type. Available types: solar")); } } else { parseSolar(document.array()); // Fallback to legacy v3 manifest file format. } } void DynamicWallpaperManifest::parseSolar(const QJsonArray &entries) { if (entries.isEmpty()) { setError(QStringLiteral("No manifest image entries")); return; } QMap indexToFileName; QList metaDataList; QList imageList; for (int i = 0; i < entries.size(); ++i) { const QJsonObject descriptor = entries[i].toObject(); const QJsonValue solarElevation = descriptor[QLatin1String("SolarElevation")]; const QJsonValue solarAzimuth = descriptor[QLatin1String("SolarAzimuth")]; const QJsonValue crossFadeMode = descriptor[QLatin1String("CrossFade")]; const QJsonValue time = descriptor[QLatin1String("Time")]; const QJsonValue fileName = descriptor[QLatin1String("FileName")]; QString absoluteFileName = fileName.toString(); if (absoluteFileName.isEmpty()) { setError(QStringLiteral("FileName value was not specified for one or more of the images. Check your json file!")); return; } if (!QFileInfo(fileName.toString()).isAbsolute()) { absoluteFileName = resolveFileName(fileName.toString()); } int index = indexToFileName.key(absoluteFileName, -1); if (index == -1) { if (!QFile::exists(absoluteFileName)) { setError(QStringLiteral("%1 does not exist").arg(absoluteFileName)); return; } if (indexToFileName.isEmpty()) { index = 0; } else { index = indexToFileName.lastKey() + 1; } indexToFileName.insert(index, absoluteFileName); } KSolarDynamicWallpaperMetaData::MetaDataFields placeholderFields; KSolarDynamicWallpaperMetaData metaData; metaData.setIndex(index); if (solarAzimuth.isUndefined() ^ solarElevation.isUndefined()) { if (solarAzimuth.isUndefined()) setError(QStringLiteral("SolarElevation was specified but SolarAzimuth was not")); else setError(QStringLiteral("SolarAzimuth was specified but SolarElevation was not")); return; } if (!solarElevation.isUndefined()) { if (isPlaceholderValue(solarElevation)) { placeholderFields |= KSolarDynamicWallpaperMetaData::SolarElevationField; } else if (solarElevation.isDouble()) { metaData.setSolarElevation(solarElevation.toDouble()); } else { setError(QStringLiteral("Invalid solar elevation value has been specified for ") + absoluteFileName); return; } } if (!solarAzimuth.isUndefined()) { if (isPlaceholderValue(solarAzimuth)) { placeholderFields |= KSolarDynamicWallpaperMetaData::SolarAzimuthField; } else if (solarAzimuth.isDouble()) { metaData.setSolarAzimuth(solarAzimuth.toDouble()); } else { setError(QStringLiteral("Invalid solar azimuth value has been specified for ") + absoluteFileName); return; } } if (!crossFadeMode.isUndefined()) { if (crossFadeMode.toBool()) metaData.setCrossFadeMode(KSolarDynamicWallpaperMetaData::CrossFade); else metaData.setCrossFadeMode(KSolarDynamicWallpaperMetaData::NoCrossFade); } if (!time.isUndefined()) { if (isPlaceholderValue(time)) { placeholderFields |= KSolarDynamicWallpaperMetaData::TimeField; } else { const QTime parsedTime = QTime::fromString(time.toString()); if (parsedTime.isValid()) { metaData.setTime(timeToReal(parsedTime)); } else { setError(QStringLiteral("Failed to parse time for image ") + absoluteFileName); return; } } } else { setError(QStringLiteral("No time has been provided for ") + absoluteFileName); return; } if (placeholderFields) { DynamicWallpaperExifMetaData exifMetaData(absoluteFileName); if (placeholderFields & KSolarDynamicWallpaperMetaData::SolarAzimuthField) { if (exifMetaData.fields() & DynamicWallpaperExifMetaData::SolarCoordinatesField) { metaData.setSolarAzimuth(exifMetaData.solarAzimuth()); } else { setError(QStringLiteral("%1: Failed to compute the position of the Sun based on GPS " "coordinates and the time when the photo was taken. Please check " "that the specified image actually has GPS coordinates in its " "Exif metadata. You can do that with a tool such as exiftool.") .arg(absoluteFileName)); return; } } if (placeholderFields & KSolarDynamicWallpaperMetaData::SolarElevationField) { if (exifMetaData.fields() & DynamicWallpaperExifMetaData::SolarCoordinatesField) { metaData.setSolarElevation((exifMetaData.solarElevation())); } else { setError(QStringLiteral("%1: Failed to compute the position of the Sun based on GPS " "coordinates and the time when the photo was taken. Please check " "that the specified image actually has GPS coordinates in its " "Exif metadata. You can do that with a tool such as exiftool.") .arg(absoluteFileName)); return; } } if (placeholderFields & KSolarDynamicWallpaperMetaData::TimeField) { if (exifMetaData.fields() & DynamicWallpaperExifMetaData::BirthDateTimeField) { metaData.setTime(timeToReal(exifMetaData.birthDateTime().time())); } else { setError(QStringLiteral("Failed to determine the time when %1 was taken from its Exif metadata").arg(absoluteFileName)); return; } } } metaDataList.append(metaData); } for (const QString &fileName : indexToFileName) imageList.append(KDynamicWallpaperWriter::ImageView(fileName)); m_metaDataList = metaDataList; m_imageList = imageList; } void DynamicWallpaperManifest::parseDayNight(const QJsonArray &entries) { if (entries.isEmpty()) { setError(QStringLiteral("No manifest image entries")); return; } QString dayFileName; QString nightFileName; for (int i = 0; i < entries.size(); ++i) { const QJsonObject descriptor = entries[i].toObject(); QString *fileName; const QString timeOfDay = descriptor["TimeOfDay"].toString(); if (timeOfDay == QLatin1String("day")) { fileName = &dayFileName; } else if (timeOfDay == QLatin1String("night")) { fileName = &nightFileName; } else { setError(QStringLiteral("Unknown TimeOfDay value. Possible values: day, night")); return; } *fileName = descriptor["FileName"].toString(); if (fileName->isEmpty()) { setError(QStringLiteral("No image file name has been specified")); return; } if (!QFileInfo(*fileName).isAbsolute()) { *fileName = resolveFileName(*fileName); } if (!QFile::exists(*fileName)) { setError(QStringLiteral("%1 does not exist").arg(*fileName)); return; } } if (dayFileName.isEmpty()) { setError(QStringLiteral("No day picture has been specified")); return; } if (nightFileName.isEmpty()) { setError(QStringLiteral("No night picture has been specified")); return; } m_imageList = { KDynamicWallpaperWriter::ImageView(dayFileName), KDynamicWallpaperWriter::ImageView(nightFileName), }; m_metaDataList = { KDayNightDynamicWallpaperMetaData(KDayNightDynamicWallpaperMetaData::TimeOfDay::Day, 0), KDayNightDynamicWallpaperMetaData(KDayNightDynamicWallpaperMetaData::TimeOfDay::Night, 1), }; } void DynamicWallpaperManifest::setError(const QString &text) { m_errorString = text; m_hasError = true; } /*! * Constructs the DynamicWallpaperDescriptionReader with the file name \p fileName. */ DynamicWallpaperManifest::DynamicWallpaperManifest(const QString &fileName) : m_manifestFileName(fileName) { init(); } /*! * Destructs the DynamicWallpaperDescriptionReader object. */ DynamicWallpaperManifest::~DynamicWallpaperManifest() { } QList DynamicWallpaperManifest::metaData() const { return m_metaDataList; } QList DynamicWallpaperManifest::images() const { return m_imageList; } /*! * Returns \c true if an error occurred; otherwise returns \c false. */ bool DynamicWallpaperManifest::hasError() const { return m_hasError; } /*! * Returns the human readable description of the last error that occurred. */ QString DynamicWallpaperManifest::errorString() const { return m_errorString; } plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/dynamicwallpapermanifest.h000066400000000000000000000020061455105060300274620ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include #include #include #include #include class DynamicWallpaperManifest { public: explicit DynamicWallpaperManifest(const QString &fileName); ~DynamicWallpaperManifest(); QList metaData() const; QList images() const; bool hasError() const; QString errorString() const; private: QString resolveFileName(const QString &fileName) const; void init(); void setError(const QString &text); void parseSolar(const QJsonArray &entries); void parseDayNight(const QJsonArray &entries); QString m_manifestFileName; QList m_metaDataList; QList m_imageList; QString m_errorString; bool m_hasError = false; }; plasma5-wallpapers-dynamic-4.4.1/src/tools/builder/main.cpp000066400000000000000000000062001455105060300236560ustar00rootroot00000000000000/* * SPDX-FileCopyrightText: 2020 Vlad Zahorodnii * * SPDX-License-Identifier: GPL-3.0-or-later */ #include #include #include #include #include #include #include #include #include "dynamicwallpapermanifest.h" int main(int argc, char **argv) { QCoreApplication app(argc, argv); QCoreApplication::setApplicationName("kdynamicwallpaperbuilder"); QCoreApplication::setApplicationVersion("1.0"); QCommandLineOption outputOption(QStringLiteral("output")); outputOption.setDescription(i18n("Write output to ")); outputOption.setValueName(QStringLiteral("file")); QCommandLineOption speedOption(QStringLiteral("speed")); speedOption.setDescription(i18n("Encoding speed, 0 - slowest, 10 - fastest")); speedOption.setValueName(QStringLiteral("speed")); QCommandLineOption maxThreadsOption(QStringLiteral("max-threads")); maxThreadsOption.setDescription(i18n("Maximum number of threads that can be used when encoding a wallpaper")); maxThreadsOption.setValueName(QStringLiteral("max-threads")); QCommandLineOption codecOption(QStringLiteral("codec")); codecOption.setDescription(i18n("Codec to use (aom|rav1e|svt)")); codecOption.setValueName(QStringLiteral("codec")); QCommandLineParser parser; parser.addHelpOption(); parser.addVersionOption(); parser.addPositionalArgument("json", i18n("Manifest file to use")); parser.addOption(outputOption); parser.addOption(maxThreadsOption); parser.addOption(speedOption); parser.addOption(codecOption); parser.process(app); if (parser.positionalArguments().count() != 1) parser.showHelp(-1); DynamicWallpaperManifest manifest(parser.positionalArguments().first()); if (manifest.hasError()) { if (manifest.hasError()) qWarning() << qPrintable(manifest.errorString()); return -1; } KDynamicWallpaperWriter writer; writer.setImages(manifest.images()); writer.setMetaData(manifest.metaData()); if (parser.isSet(maxThreadsOption)) { bool ok; if (const int threadCount = parser.value(maxThreadsOption).toInt(&ok); ok) { writer.setMaxThreadCount(threadCount); } else { parser.showHelp(-1); } } if (parser.isSet(speedOption)) { bool ok; if (const int speed = parser.value(speedOption).toInt(&ok); ok) { writer.setSpeed(speed); } else { parser.showHelp(-1); } } if (parser.isSet(codecOption)) { if (!writer.setCodecName(parser.value(codecOption))) { qWarning() << qPrintable(writer.errorString()); return -1; } } QString targetFileName = parser.value(outputOption); if (targetFileName.isEmpty()) targetFileName = QStringLiteral("wallpaper.avif"); if (!writer.flush(targetFileName)) { qWarning() << writer.errorString(); QFile::remove(targetFileName); return -1; } return 0; } plasma5-wallpapers-dynamic-4.4.1/src/translations/000077500000000000000000000000001455105060300221635ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/translations/CMakeLists.txt000066400000000000000000000022211455105060300247200ustar00rootroot00000000000000# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: BSD-3-Clause find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt) if (NOT GETTEXT_MSGFMT_EXECUTABLE) message(WARNING "-- msgfmt: not found. Translations will not be installed") else () set(catalogname plasma_wallpaper_com.github.zzag.dynamic) add_custom_target(translations ALL) file(GLOB PO_FILES po/*.po) foreach (_po ${PO_FILES}) get_filename_component(_filename ${_po} NAME) string(REGEX REPLACE "^${catalogname}_?" "" _langCode ${_filename}) string(REGEX REPLACE "\\.po$" "" _langCode ${_langCode}) if (_langCode) get_filename_component(_lang ${_po} NAME_WE) set(_gmo ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) add_custom_command(TARGET translations COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmo} ${_po} DEPENDS ${_po}) install(FILES ${_gmo} DESTINATION ${LOCALE_INSTALL_DIR}/${KF5_LOCALE_PREFIX}${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo) endif() endforeach() endif() plasma5-wallpapers-dynamic-4.4.1/src/translations/extract-messages.sh000066400000000000000000000031401455105060300257740ustar00rootroot00000000000000#!/usr/bin/bash # SPDX-FileCopyrightText: 2020 Vlad Zahorodnii # # SPDX-License-Identifier: CC0-1.0 cd "$(dirname $0)" BASEDIR="$(pwd)" SRCDIR="$(dirname $BASEDIR)" function xgettext_wrapper { xgettext --copyright-holder="This file is copyright:" \ --package-name=plasma5-wallpapers-dynamic \ --msgid-bugs-address=https://github.com/zzag/plasma5-wallpapers-dynamic/issues \ --from-code=UTF-8 \ -C --kde \ -ci18n \ -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 \ -ki18nd:2 -ki18ndc:2c,3 -ki18ndp:2,3 -ki18ndcp:2c,3,4 \ -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \ -kki18nd:2 -kki18ndc:2c,3 -kki18ndp:2,3 -kki18ndcp:2c,3,4 \ -kxi18n:1 -kxi18nc:1c,2 -kxi18np:1,2 -kxi18ncp:1c,2,3 \ -kxi18nd:2 -kxi18ndc:2c,3 -kxi18ndp:2,3 -kxi18ndcp:2c,3,4 \ -kkxi18n:1 -kkxi18nc:1c,2 -kkxi18np:1,2 -kkxi18ncp:1c,2,3 \ -kkxi18nd:2 -kkxi18ndc:2c,3 -kkxi18ndp:2,3 -kkxi18ndcp:2c,3,4 \ -kI18N_NOOP:1 -kI18NC_NOOP:1c,2 \ -kI18N_NOOP2:1c,2 -kI18N_NOOP2_NOSTRIP:1c,2 \ -ktr2i18n:1 -ktr2xi18n:1 \ "$@" } export -f xgettext_wrapper podir=$BASEDIR/po files=`find $SRCDIR -name Messages.sh` dirs=`for i in $files; do echo \`dirname $i\`; done | sort -u` for subdir in $dirs; do cd $subdir if test -f Messages.sh; then podir=$podir srcdir=. XGETTEXT="xgettext_wrapper" bash Messages.sh fi done pofiles=`find $podir -name \*.po` for po in $pofiles; do msgmerge -o $po.new $po $podir/plasma_wallpaper_com.github.zzag.dynamic.pot mv $po.new $po done plasma5-wallpapers-dynamic-4.4.1/src/translations/po/000077500000000000000000000000001455105060300226015ustar00rootroot00000000000000plasma5-wallpapers-dynamic-4.4.1/src/translations/po/de.po000066400000000000000000000075721455105060300235440ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2021 Lorenz Hoffmann # #, fuzzy msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Language: de_DE\n" "X-Source-Language: en_GB\n" #: tools/builder/main.cpp:26 #, fuzzy, kde-format msgid "Write output to " msgstr "Speichere nach " #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "" #: tools/builder/main.cpp:36 #, fuzzy, kde-format msgid "Manifest file to use" msgstr "zu verwendende Beschreibungsdatei" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Füllmodus:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Skaliert und zugeschnitten" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "Skaliert" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "Skaliert, Seitenverhältnis beibehalten" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "Zentriert" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Gekachelt" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "Position automatisch ermitteln" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Breitengrad:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Längengrad:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Aktualisiere jede:" #: package/contents/ui/config.qml:136 #, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " Minute" msgstr[1] " Minuten" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "von %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" # Assuming this is used to open the folder where the wallpaper is located #: package/contents/ui/config.qml:173 #, fuzzy, kde-format msgid "Open Containing Folder" msgstr "Speicherort öffnen" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Hintergrundbild wiederherstellen" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Hintergrundbild löschen" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Hintergrundbild öffnen" #: package/contents/ui/config.qml:217 #, fuzzy, kde-format msgid "AVIF Image Files (*.avif)" msgstr "HEIF Bild Dateien (*.heic *.heif)" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Hintergrundbild hinzufügen..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "Dynamische Hintergrundbilder" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "Dynamischer Hintergrund" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "%1 ist kein dynamischer Hintergrund" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, fuzzy, kde-format msgid "Not a dynamic wallpaper" msgstr "%1 ist kein dynamischer Hintergrund" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/it.po000066400000000000000000000070331455105060300235600ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2019 Federico Robin msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: 2019-10-26 15:00+0200\n" "Last-Translator: Federico Robin \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "" #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "" #: tools/builder/main.cpp:36 #, kde-format msgid "Manifest file to use" msgstr "" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Modalità di riempimento" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Scalato e Tagliato" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "Scalato" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "Scalato, Mantieni Proporzioni" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "Centrato" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Affiancato" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Latitudine:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Longitudine:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Aggiorna Ogni:" #: package/contents/ui/config.qml:136 #, fuzzy, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " minuto" msgstr[1] " minuti" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "Da %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "Mostra nel Gestore File" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Ripristina Wallpaper" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Rimuovi Wallpaper" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Apri Wallpaper" #: package/contents/ui/config.qml:217 #, kde-format msgid "AVIF Image Files (*.avif)" msgstr "" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Aggiungi Wallpaper..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, fuzzy, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "Non è stato possibile inizializzare il wallpaper dinamico: %1" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, fuzzy, kde-format msgid "Not a dynamic wallpaper" msgstr "Non è stato possibile inizializzare il wallpaper dinamico: %1" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/pl.po000066400000000000000000000077131455105060300235640ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2022 Piotr Lange # #, fuzzy msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-15 07:20+0200\n" "PO-Revision-Date: 2022-04-15 07:27+0200\n" "Last-Translator: Piotr Lange \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n" "%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n" "%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" "X-Language: pl_PL\n" "X-Source-Language: en_GB\n" #: declarative/dynamicwallpaperhandler.cpp:220 #: declarative/dynamicwallpapermodel.cpp:509 #, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "%1 nie jest tapetą dynamiczną" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, kde-format msgid "Not a dynamic wallpaper" msgstr "Nie jest tapetą dynamiczną" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Tryb wypełnienia:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Przeskalowane i ucięte" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "Przeskalowane" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "Przeskalowane, z zachowanymi proporcjami" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "Wyśrodkowane" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Wykafelkowany" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "Automatycznie wykryj lokalizację" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Szerokość geograficzna:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Długość geograficzna:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Aktualizuj co:" #: package/contents/ui/config.qml:136 #, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " minuta" msgstr[1] " minuty" msgstr[2] " minut" msgstr[3] " minut" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "Autor %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "Otwórz folder" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Przywróć tapetę" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Usuń tapetę" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Otwórz tapetę" #: package/contents/ui/config.qml:217 #, kde-format msgid "AVIF Image Files (*.avif)" msgstr "Pliki grafiki AVIF (*.avif)" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Dodaj tapetę..." #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "Zapisz do " #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "Maksymalna liczba wątków, która może zostać użyta do enkodowania tapety" #: tools/builder/main.cpp:36 #, kde-format msgid "Manifest file to use" msgstr "Plik z opisem do użycia" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "Pliki tapety dynamicznej" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "Plik tapety dynamicznej" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/pt.po000066400000000000000000000071061455105060300235700ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2019 DMMLeal msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: 2019-10-26 15:00+0000\n" "Last-Translator: DMMleal \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "" #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "" #: tools/builder/main.cpp:36 #, kde-format msgid "Manifest file to use" msgstr "" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Modo de preenchimento:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Escalado e Recortado" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "Escalado" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "Escalado, proporcionalmente" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "Centrado" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Mosaico" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "Detetar localização automaticamente" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Latitude:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Longitude:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Atualizar a cada:" #: package/contents/ui/config.qml:136 #, fuzzy, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " minuto" msgstr[1] " minutos" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Restaurar papel de parede" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Remover papel de parede" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Abrir papel de parede" #: package/contents/ui/config.qml:217 #, kde-format msgid "AVIF Image Files (*.avif)" msgstr "" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Adicionar papel de parede ..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "Arquivos de papel de parede dinâmico" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "Arquivo de papel de parede dinâmico" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, fuzzy, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "%1 não é um papel de parede dinâmico" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, fuzzy, kde-format msgid "Not a dynamic wallpaper" msgstr "%1 não é um papel de parede dinâmico" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/ru.po000066400000000000000000000100661455105060300235720ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2019, 2020 Vlad Zahorodnii msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: 2020-02-16 19:45+0200\n" "Last-Translator: Vlad Zahorodnii \n" "Language-Team: Vlad Zahorodnii \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Lokalize 19.12.2\n" #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "" #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "" #: tools/builder/main.cpp:36 #, kde-format msgid "Manifest file to use" msgstr "" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Расположение:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Масштабирование с кадрированием" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "На весь рабочий стол" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "По центру пропорционально" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "По центру" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Черепицей" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "Автоматически определить местоположение" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Широта:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Долгота:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Обновлять каждые:" #: package/contents/ui/config.qml:136 #, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " минуту" msgstr[1] " минуты" msgstr[2] " минут" msgstr[3] " минуту" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "От %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "Открыть содержащую объект папку" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Вернуть обои в этот список" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Удалить обои" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Открытие обоев" #: package/contents/ui/config.qml:217 #, kde-format msgid "AVIF Image Files (*.avif)" msgstr "" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Добавить обои..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, fuzzy, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "Невозможно инициализировать обои" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, fuzzy, kde-format msgid "Not a dynamic wallpaper" msgstr "Невозможно инициализировать обои" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/uk.po000066400000000000000000000105611455105060300235630ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2019, 2020 Vlad Zahorodnii msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/issue" "s\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: 2022-04-17 20:28+0300\n" "Last-Translator: Vlad Zahorodnii \n" "Language-Team: Vlad Zahorodnii \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Lokalize 22.07.70\n" #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "Записати результат в <файл>" #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "Максимальна кількість потік процесора, які можуть бути використані під час кодування шпалер" #: tools/builder/main.cpp:36 #, kde-format msgid "Manifest file to use" msgstr "Маніфест файл" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "Розташування:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "Масштабоване та обрізане" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "Масштабоване" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "Масштабоване, зі збереженням пропорцій" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "За центром" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "Плиткою" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "Визначити місцезнаходження автоматично" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "Широта:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "Довгота:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "Обновлювати кожні:" #: package/contents/ui/config.qml:136 #, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] " хвилину" msgstr[1] " хвилини" msgstr[2] " хвилин" msgstr[3] " хвилину" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "Автор - %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "Відкрити теку об'єкта" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "Відновити початкові шпалери" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "Вилучити шпалери" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "Відкрити шпалери" #: package/contents/ui/config.qml:217 #, kde-format msgid "AVIF Image Files (*.avif)" msgstr "AVIF файли зображень (*.avif)" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "Додати шпалери..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "Динамічні шпалери" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "Динамічні шпалери" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "%1 не є динамічними шпалерами" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, kde-format msgid "Not a dynamic wallpaper" msgstr "Не динамічні шпалери" plasma5-wallpapers-dynamic-4.4.1/src/translations/po/zh.po000066400000000000000000000072401455105060300235650ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-3.0-or-later # # SPDX-FileCopyrightText: 2021 wbs msgid "" msgstr "" "Project-Id-Version: plasma5-wallpapers-dynamic\n" "Report-Msgid-Bugs-To: https://github.com/zzag/plasma5-wallpapers-dynamic/" "issues\n" "POT-Creation-Date: 2022-04-09 19:59+0300\n" "PO-Revision-Date: 2021-01-28 18:34+0800\n" "Last-Translator: wbs \n" "Language: zh\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Lokalize 20.12.1\n" #: tools/builder/main.cpp:26 #, kde-format msgid "Write output to " msgstr "输出文件为 " #: tools/builder/main.cpp:30 #, kde-format msgid "Maximum number of threads that can be used when encoding a wallpaper" msgstr "" #: tools/builder/main.cpp:36 #, fuzzy, kde-format msgid "Manifest file to use" msgstr "要构建的描述文件" #: package/contents/ui/config.qml:36 #, kde-format msgid "Fill Mode:" msgstr "填充模式:" #: package/contents/ui/config.qml:40 #, kde-format msgid "Scaled and Cropped" msgstr "缩放并裁剪" #: package/contents/ui/config.qml:44 #, kde-format msgid "Scaled" msgstr "缩放" #: package/contents/ui/config.qml:48 #, kde-format msgid "Scaled, Keep Proportions" msgstr "缩放, 保持宽高比" #: package/contents/ui/config.qml:52 #, kde-format msgid "Centered" msgstr "中央" #: package/contents/ui/config.qml:56 #, kde-format msgid "Tiled" msgstr "平铺" #: package/contents/ui/config.qml:75 #, kde-format msgid "Automatically detect location" msgstr "自动设置位置" #: package/contents/ui/config.qml:79 package/contents/ui/config.qml:100 #, kde-format msgid "Latitude:" msgstr "纬度:" #: package/contents/ui/config.qml:89 package/contents/ui/config.qml:109 #, kde-format msgid "Longitude:" msgstr "经度:" #: package/contents/ui/config.qml:118 #, kde-format msgid "Update Every:" msgstr "壁纸更换频率:" #: package/contents/ui/config.qml:136 #, kde-format msgid " minute" msgid_plural " minutes" msgstr[0] "分钟" msgstr[1] "分钟" msgstr[2] "分钟" msgstr[3] "分钟" #: package/contents/ui/config.qml:165 #, kde-format msgctxt " by ()" msgid "By %1 (%2)" msgstr "作者 - %1 (%2)" #: package/contents/ui/config.qml:167 #, kde-format msgctxt " ()" msgid "%1 (%2)" msgstr "%1 (%2)" #: package/contents/ui/config.qml:173 #, kde-format msgid "Open Containing Folder" msgstr "打开所在文件夹" #: package/contents/ui/config.qml:178 #, kde-format msgid "Restore Wallpaper" msgstr "恢复壁纸" #: package/contents/ui/config.qml:184 #, kde-format msgid "Remove Wallpaper" msgstr "移除壁纸" #: package/contents/ui/config.qml:215 #, kde-format msgid "Open Wallpaper" msgstr "打开壁纸" #: package/contents/ui/config.qml:217 #, fuzzy, kde-format msgid "AVIF Image Files (*.avif)" msgstr "HEIF 图片文件 (*.heic *.heif)" #: package/contents/ui/config.qml:234 #, kde-format msgid "Add Wallpaper..." msgstr "添加壁纸..." #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:22 #, kde-format msgid "Dynamic wallpaper files" msgstr "动态壁纸文件" #: plugins/kpackage-integration/dynamicwallpaperpackagestructure.cpp:38 #, kde-format msgid "Dynamic wallpaper file" msgstr "动态壁纸文件" #: declarative/dynamicwallpapermodel.cpp:509 #: declarative/dynamicwallpaperhandler.cpp:210 #, kde-format msgid "%1 is not a dynamic wallpaper" msgstr "%1 不是动态壁纸" #: declarative/dynamicwallpaperpreviewjob.cpp:140 #, fuzzy, kde-format msgid "Not a dynamic wallpaper" msgstr "%1 不是动态壁纸"