ukui-notification/0000775000175000017500000000000015160526142013143 5ustar fengfengukui-notification/dbus/0000775000175000017500000000000015160523734014104 5ustar fengfengukui-notification/dbus/org.ukui.NotificationClient.xml0000664000175000017500000000150115160523734022152 0ustar fengfeng ukui-notification/dbus/org.ukui.NotificationServer.xml0000664000175000017500000000221415160523734022204 0ustar fengfeng ukui-notification/dbus/org.freedesktop.Notifications.xml0000664000175000017500000000331515160523734022541 0ustar fengfeng ukui-notification/dbus/org.ukui.NotificationSettings.xml0000664000175000017500000000125515160523734022542 0ustar fengfeng ukui-notification/LICENSE0000664000175000017500000010575515160523734014171 0ustar fengfeng GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU 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 . ukui-notification/README.md0000664000175000017500000000501515160523746014432 0ustar fengfeng# ukui-notification ## 介ç»� ukui-notificaton包å�«UKUI桌é�¢çŽ¯å¢ƒçš„é€šçŸ¥æœ�务ã€�通知开å�‘接å�£å’Œé€šçŸ¥æŽ§åˆ¶æ�’件。 - ukui-notification-server: 通知æœ�务 - libukui-notification: 通知开å�‘接å�£ - notification-ukcc-plugin: 通知控制æ�’ä»¶ ## 目录 - [通知æœ�务](#通知æœ�务) - [通知开å�‘接å�£](#通知开å�‘接å�£) - [通知控制æ�’ä»¶](#通知控制æ�’ä»¶) - [贡献指å�—](#贡献指å�—) ## 通知æœ�务 ukui-notifiaction-serveræ��供了é�µå¾ªfreedesktop[通知å��è®®](https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html)的通知æœ�务接å�£ã€‚ ### 支æŒ�çš„Capabilities | 能力 | æ��è¿° | |------|------| | actions | 支æŒ�通知æ“�作按钮 | | body | 支æŒ�富文本内容 | | body-hyperlinks | 支æŒ�内容中的超链接 | | persistence | 支æŒ�æŒ�久化通知 | | sound | 支æŒ�通知声音æ��示 | ### 扩展hints | Hintå��ç§° | æ��è¿° | |---------|------| | x-ukui-display | 标识通知弹窗应该显示在哪个DISPLAY上 | ### 扩展接å�£ | 接å�£å��ç§° | å�‚æ•° | 返回值 | æ��è¿° | |---------|------|--------|------| | org.ukui.NotificationServer.UpdateUnreadMessagesNumber | String desktop_entry, UInt32 number | void | 更新应用的未读消æ�¯æ•°é‡� | | org.ukui.NotificationServer.RegisterNotificationControl | String desktop_entry | void | 注册应用的通知控制 | ## 通知开å�‘接å�£ ### 使用cmake: ```cmake find_package(ukui-notification) target_link_libraries(yourapp ukui-notification) ``` ### 使用qmake: ```qmake CONFIG += link_pkgconfig PKGCONFIG += ukui-notification ``` ### 关键接å�£ï¼š | 头文件 | 功能æ��è¿° | 相关类 | |--------|----------|--------| | notification-client.h | 通知中心客户端注册ã€�消æ�¯å�Œæ­¥ä¸Žaction执行 | NotificationClient | | popup-notification.h | å�•æ�¡é€šçŸ¥çš„æ‰€æœ‰ä¿¡æ�¯ç®¡ç�† | PopupNotification | | notification-global-settings.h | 全局通知设置 | NotificationGlobalSettings | | applications-settings.h | 应用通知行为设置 | ApplicationSettings | | single-application-settings.h | å�•个应用的通知设置 | SingleApplicationSettings | ## 通知控制æ�’ä»¶ 控制é�¢æ�¿é€šçŸ¥æ�’件,方便用户设置应用通知的æ�ƒé™� ## 贡献指å�— ### ä¾�èµ– debhelper-compat (= 12), libkf5windowsystem-dev, libukui-search-dev(>=4.0.1.5-ok0), pkgconf, qtbase5-dev, qtchooser, qtdeclarative5-dev, qtscript5-dev, qttools5-dev, cmake, libkysdk-qtwidgets-dev, libukcc-dev, libgsettings-qt-dev, extra-cmake-modules, doxygen ### 编译: ``` mkdir build && cd build cmake .. make -j$(nproc) ```ukui-notification/man/0000775000175000017500000000000015160523746013725 5ustar fengfengukui-notification/man/ukui-notification-server.10000664000175000017500000000166015160523746020757 0ustar fengfeng.\" Hey, EMACS: -*- nroff -*- .TH ukui-notification-server 1 "2023" "ukui-notification" "UKUI Desktop Environment" .SH NAME ukui-notification-server \- UKUI desktop notification server .SH SYNOPSIS .B ukui-notification-server [\fIOPTIONS\fR] .SH DESCRIPTION .B ukui-notification-server is the notification server for the UKUI desktop environment. It implements the freedesktop.org notification specification. .PP This daemon runs in the background and handles notification requests from applications, displaying them to the user according to the system's notification settings. .SH OPTIONS This program does not typically accept command-line options as it is designed to run as a system service. .RE .SH AUTHOR launch ukui-notification was written by zhangpengfei . .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.ukui-notification/CMakeLists.txt0000664000175000017500000000161115160523746015711 0ustar fengfengcmake_minimum_required(VERSION 3.14) project(ukui-notification LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) if (BUILD_TEST) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage") endif () set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) include(GNUInstallDirs) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Widgets LinguistTools DBus Network Gui Qml REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets LinguistTools DBus Network Gui Qml REQUIRED) find_package(ukui-quick COMPONENTS platform REQUIRED) set(REQUIRED_QT_VERSION 5.12.8) add_subdirectory(notification-server) add_subdirectory(libukui-notification) add_subdirectory(notification-ukcc-plugin) if(BUILD_TEST) add_subdirectory(test) endif() ukui-notification/NOTICE0000664000175000017500000000454315160523734014061 0ustar fengfengOPEN SOURCE SOFTWARE NOTICE Please note we provide an open source software notice for the third party open source software along with this software and/or this software component (in the following just “this SOFTWAREâ€�). The open source software licenses are granted by the respective right holders. Warranty Disclaimer THE OPEN SOURCE SOFTWARE IN THIS PRODUCT 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 APPLICABLE LICENSES FOR MORE DETAILS. Copyright Notice and License Texts ------------------------------------------------------------------------ Software: qt-solutions Files: 3rd-parties/qtsingleapplication/* Copyright: 2013, Digia Plc and/or its subsidiary(-ies). License: BSD-3-clause The BSD License . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * 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. . * 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. ------------------------------------------------------------------------ ukui-notification/libukui-notification/0000775000175000017500000000000015160523746017302 5ustar fengfengukui-notification/libukui-notification/notification-client.cpp0000664000175000017500000002310115160523734023742 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "notification-client.h" #include "notification-client-private.h" #include #include #include "notificationclientadaptor.h" using namespace UkuiNotification; NotificationClientPrivate::NotificationClientPrivate(NotificationClient *q) : QObject(q), q(q) { } NotificationClientPrivate::~NotificationClientPrivate() { unregisterClient(); } bool NotificationClientPrivate::init() { if(m_registered) { return false; } m_registered = true; new NotificationClientAdaptor(this); QDBusConnection conn = QDBusConnection::sessionBus(); if(!conn.registerObject(clientServicePath(), clientServiceInterface(), this)) { qWarning() << "Failed to register NotificationClient DBus object!" << conn.lastError(); return false; } m_watcher = new QDBusServiceWatcher(QStringLiteral("org.freedesktop.Notifications"), conn, QDBusServiceWatcher::WatchForOwnerChange, this); connect(m_watcher, &QDBusServiceWatcher::serviceOwnerChanged, this, &NotificationClientPrivate::serviceChange); return registerClient(); } bool NotificationClientPrivate::registerClient() { QDBusConnection conn = QDBusConnection::sessionBus(); if(!m_notificationsInterface) { m_notificationsInterface = new OrgFreedesktopNotificationsInterface(QStringLiteral("org.freedesktop.Notifications"), QStringLiteral("/org/freedesktop/Notifications"), conn); connect(m_notificationsInterface, &OrgFreedesktopNotificationsInterface::NotificationClosed, this, &NotificationClientPrivate::notificationClosed); } if(!m_serverInterface) { m_serverInterface = new QDBusInterface(QStringLiteral("org.freedesktop.Notifications"), QStringLiteral("/org/freedesktop/Notifications"), QStringLiteral("org.ukui.NotificationServer"), conn, this); if(!m_serverInterface->isValid()) { qWarning() << "Failed to create notification server interface! " << conn.lastError(); return false; } } QDBusMessage reply = m_serverInterface->call(QStringLiteral("RegisterClient")); if (reply.type() == QDBusMessage::ErrorMessage || reply.type() == QDBusMessage::InvalidMessage) { qWarning() << "Failed to call RegisterClient!" << conn.lastError() << reply.type(); return false; } return true; } void NotificationClientPrivate::unregisterClient() { if(m_notificationsInterface) { disconnect(m_notificationsInterface, &OrgFreedesktopNotificationsInterface::NotificationClosed, this, &NotificationClientPrivate::notificationClosed); delete m_notificationsInterface; m_notificationsInterface = nullptr; } QDBusConnection conn = QDBusConnection::sessionBus(); if(m_serverInterface) { QDBusMessage reply = m_serverInterface->call(QStringLiteral("UnRegisterClient")); if (reply.type() == QDBusMessage::ErrorMessage || reply.type() == QDBusMessage::InvalidMessage) { qWarning() << "Failed to call UnRegisterClient!" << conn.lastError() << reply.type(); return; } } conn.unregisterObject(clientServicePath(), QDBusConnection::UnregisterTree); m_registered = false; } QString NotificationClientPrivate::clientServicePath() { return QStringLiteral("/NotificationClient"); } QString NotificationClientPrivate::clientServiceInterface() { return QStringLiteral("org.ukui.NotificationClient"); } void NotificationClientPrivate::Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout) { PopupNotification notification(replaces_id); notification.setSummary(summary); notification.setBody(body); notification.setApplicationName(app_name); notification.setApplicationIconName(app_icon); notification.setActions(actions); notification.setTimeout(timeout); notification.setHints(hints); Q_EMIT q->newNotification(notification); } void NotificationClientPrivate::notificationClosed(uint id, uint reason) { auto closeReason = NotificationCloseReason::CloseReason::Undefined; switch (reason) { case 1: closeReason = NotificationCloseReason::CloseReason::Expired; break; case 2: closeReason = NotificationCloseReason::CloseReason::DismissedByUser; break; case 3: closeReason = NotificationCloseReason::CloseReason::Revoked; break; } Q_EMIT q->notificationClosed(id, closeReason); } bool NotificationClientPrivate::closeNotification(uint id, NotificationCloseReason::CloseReason reason) { if(!m_serverInterface) { return false; } QDBusMessage reply = m_serverInterface->callWithArgumentList(QDBus::BlockWithGui, QStringLiteral("CloseNotification"), {id, static_cast(reason)}); if (reply.type() == QDBusMessage::ErrorMessage) { qWarning() << "Failed to call CloseNotification!" << QDBusConnection::sessionBus().lastError(); return false; } return true; } void NotificationClientPrivate::serviceChange(const QString &service, const QString &oldOwner, const QString &newOwner) { qDebug() << "Notification Service" << service << "status change, old owner:" << oldOwner << "new:" << newOwner; if(oldOwner.isEmpty() && m_registered) { registerClient(); } } bool NotificationClientPrivate::invokeAction(uint id, const QString &action_key) { if(!m_serverInterface) { return false; } qDebug() << "invokeAction" << id << action_key; QDBusMessage reply = m_serverInterface->callWithArgumentList(QDBus::NoBlock, QStringLiteral("InvokeAction"), {id, action_key}); if (reply.type() == QDBusMessage::ErrorMessage) { qWarning() << "Failed to call InvokedAction!" << QDBusConnection::sessionBus().lastError(); return false; } return true; } /*! \class UkuiNotification::NotificationClient \inmodule UkuiNotification \inheaderfile notification-client.h \brief UKUI 通知系统客户端 这个类å°�装了与通知æœ�务交互的细节,并æ��供交互接å�£ã€‚ 通过 \l {registerClient()} å�‘通知æœ�务注册为客户端,å�³å�¯æŽ¥æ”¶é€šçŸ¥æœ�务å�‘é€�的消æ�¯ã€‚ */ /*! \fn void UkuiNotification::NotificationClient::newNotification(const UkuiNotification::PopupNotification ¬ification) 此信å�·åœ¨é€šçŸ¥æœ�务收到新通知时å�‘é€�. */ /*! \fn void UkuiNotification::NotificationClient::notificationClosed(uint id, UkuiNotification::NotificationCloseReason::CloseReason closeReason) 此信å�·åœ¨é€šçŸ¥è¢«å…³é—­æ—¶å�‘é€�. */ NotificationClient::NotificationClient(QObject *parent) : QObject(parent), d(new NotificationClientPrivate(this)) { qRegisterMetaType("PopupNotification"); qRegisterMetaType("const UkuiNotification::PopupNotification&"); qRegisterMetaType("ActionList"); qmlRegisterUncreatableType("org.ukui.notification.client", 1, 0, "NotificationCloseReason", ""); } NotificationClient::~NotificationClient() = default; /*! \brief 注册为通知æœ�务客户端. 通过å�‘ DBus总线注册为 DBus æœ�务,并调用通知æœ�务的 DBus 接å�£æ³¨å†Œä¸ºå®¢æˆ·ç«¯ã€‚通知æœ�务通过客户端的 DBus 接å�£ï¼Œå�‘客户端å�‘é€�通知消æ�¯ã€‚ */ bool NotificationClient::registerClient() { return d->init(); } /*! \brief 调用此接å�£å…³é—­é€šçŸ¥. \a id: 通知ID, \a reason:通知关闭的原因 */ bool NotificationClient::closeNotification(uint id, NotificationCloseReason::CloseReason reason) { return d->closeNotification(id, reason); } /*! \brief 调用通知对应的 Action \a id: 通知ID, \a action_key:Action对应的 key, 由通知å�‘é€�者定义。 */ bool NotificationClient::invokeAction(uint id, const QString &action_key) { return d->invokeAction(id, action_key); } /*! \brief 注销通知客户端 调用此接å�£æ³¨é”€å®¢æˆ·ç«¯ï¼Œæ³¨é”€ä¹‹å�Žä¸�在接收通知消æ�¯ */ void NotificationClient::unregisterClient() { d->unregisterClient(); } ukui-notification/libukui-notification/doc/0000775000175000017500000000000015160523734020044 5ustar fengfengukui-notification/libukui-notification/doc/images/0000775000175000017500000000000015160523734021311 5ustar fengfengukui-notification/libukui-notification/doc/images/plugin_ui.png0000664000175000017500000020650715160523734024024 0ustar fengfeng‰PNG  IHDR…É¥d×€IDATx^ì½÷{UÿÿÿŸ_¾×û}¿¯Ë�J/"$B i"(%ôÞ¤…BïB =½÷ͦmzBP@:ÒÄ‚ "EE� Hù>™C†É™MYv“ìfŸ�ë%×™3gÎÌ™�ì¾ÎìÙ¥¦¥3µié…Ef«’“ 5%„B!„ÔÿÒgÉ FÍ}Œ§âîÝ»7oÞ¼qãÆÏ„8¸\qÑâÒ•¯fB±ô1F­}Œ'áþýû·nÝ’S]B\À¸Œå+›Bl}ŒQkA#ÄI Œ‘:.cùÊ&„[@cÔZÐÇqîÞ½+'¶„8&|p‘RÐǵô1Bœ�›7oÊY-!Ž .fùú&„«¡�1j-èc„8œÀƒÔp1Ë×7!„XMå>–]pèÐé G/ýxä›kG¿¹&þÕÆW—~D4ÓoË`Tô1Bœ9¥%Ä‘‘¯oB±šŠ|,-ÓTðÕéĬüµ›6/öY2¯¼¼}Ð 1«�±‰¾ÃlXçcÆ4SA^aq®)íe¥ÑdÊ-Ê/<˜—ŸŸ™f|^cÈÌ.,Î×D™ö¥!ÿYBl‡œÏâÈÈ×7!„XME>–wäÄÎýÁ³gÏÞµ`Á‚ùóç£ð¹ XT+çÌ™p ›èûa0̆>–šžS”›“•‘]¤ñ«´Œ¼ƒÙ™i�0CZNn~^šAøX~zÊ‹­2rf§+žV6ä? Bˆí�óYBùú&„«)×Ç2²ó# ™3gΜS ÄlÖ¬YÓ¦MË=x8·ø0 X;»4˜1cF¤!#=;_߃¡k| [C¶Œ¦Â—>õ*PLi�‘[˜™ª´ÌÌL•ÆìÜüÜÒeBþ³ „Ø9Ÿ%åS\\£.¢·³gÏV°•h€å¤2äë›b$&&þûßÿþW9`ÈÛØš{÷îÉUåS®�¥~9}æÌÉ“'Oš4iùÊÕÙE_dÿêcÙŠ•“°IFáa}oR¬]·¾W/÷„„D±8fŒ'ELš4Ym6gîç}úô-/FŽ¥ï™á@Q->–‚‹Li:3d˜ò 3�r"ä? ›rùòeäX;`eü8'ΆœÏs@ÆÆŒƒ· ©þâÅ‹ܼy³T/ñù矟8qXYVVVXXj.]ºô�êáfW5@ÆÐàÌ™3ÚÊ ü�¨È×7!u…|÷ÝwçÊ«Ð@ÞÆ^�qʵ¥ddd �\ûJôíÛ÷È‘#rmI‰ÉdªW¯^Õ•¬\KÎ98nܸ‰'Ž;vü„ ©ÙùˆèÄ”)Óg|د,Šz4@34Æ&ÉÙõ½IשS'—“°øÁ®0±Y³gwssƒh©Í† Ú³gÏ 6â_w÷Þ(àßîÝ»£ðÑGƒ;vì¨ï™á@Q->fHI1¦ ²�Òóòò²St=ˆ�ÿ,l’äFb144´wïÞ?üðCÙV„Ôeä|–è(..îѣǷß~+¯P€Páó.??_^¡AøœÊÇÇgÛ¶mIII¨Ù±c‡—— W®\9þ¼øîw �Ü/Ñ!_ß„Ônܸ1räÈ®å€Uô{ÿú׿䪲TÚ Š@ÆÞ~ûíC‡i+!cÿó?ÿƒµ•S®�ŧçŒ3ÆÓÓó³Ï>[´Ø'Á˜ëÞ×£»wT�°_(ôêÓ•XµÐ˯cl¨ïMÑ1±ð±À `”Û´m»`ÁB<=ÇJ>Ö AƒvíÛ7P…wÞy…ÆMšÐÇ=ªÇÇÄ*õûc"Œé9s2ÌÌä!Bþ³°_}õU§N�’““µ•È“ºwï~ñâEm%!u9Ÿ%:¦N�zàÀ¹VÃæÍ›ÑF®UøòË/ãããaSAAAp6Ξ={úôi x¢»~ýúDýÉ“'µ•¼?Väë›�:Þ.–Ãõ¿’+Õ­JTÈØo¼¡ÞŽ{+©ÀÇ¢ #FŒ€Œ 2dûî½Ñ‰†±ã'¸Ž�ê8µøÿ«×�Q‰UÛwí:t(”ìÓO?�1dè{ÓFl\|xx".>!UyvÃÀ"Ê“&Mvuíê¿m{HhXdTôÌY³&Nœ$bÀ€�õê½6~µfÊ”©ñJ  k}Ì�’šU”kJ7¼p0u~Å”—ó+Š–)Y9yéæfò!ÿYØ‚¢¢¢Ž;fggË+JJ²²²ºvízêÔ)y!u9Ÿ%:Þÿý¯¿þZ®ÕPPP€6r­BqqqTTäjß¾}999(,Y²$88…ýû÷£,|ìèÑ£ó5ˆ©’µ5Y…Ü;Ñ!_ß„û£Rݪ´�E@ÆþóŸÿäææ¾šŒ•Tàcañ†¡ {CB¢b½ûôiûÑ�×þÛú½÷ÞkÕª XìÓ§oHd,bO`ˆh� õ½išWON5cæÌ7ß|sá¢EbÕ®]»‘Â6mÚtþü{öìõøðC5Þ{¯u“¦Mµ5aq  +|,Ý”_æWÅr2SŸ×M¦¼",¾üý1%Œ¦Â¼ìŠ:”ÿ,¬&##Wò_|!¯(y�««ëáÇå„Ô9ä|–èhÞ¼ùUÍlz.^¼ˆ6r­†Ï•çá]Ÿ+ß ;vì ØêäÉ“ÂÇŽ9âååuéÒ%T&''£2)) å´´´Ó§O£k¡vr¿D‡|}Bì�Ju«Ò–’““ó¿ÿû¿¯&c%øXPtüG}4`À€m{÷‡!ÜÝÝ»t¼Ó¨Q—víÚµmÛ¶qc—ŽwP‰U{ƒÂ¶ïÚ;pàÀÁƒGÇë{ÓF||BdTôûïw��mÙºZ5köl5fΚµvÝzµñÈ‘£Úµo¯}RQÄèÑcô=3+¬ð1‡üga÷îÝkݺõñãÇåeAƒÞ½{˵„Ô9ä|–èèÔ©SÅ÷Çòóó;wî,×j€_%$$dee-RX¸p!jð¯X„�AºöïßðàA¬JIIAö€òš5k oèkÅŒ ¤bäë›�ºÂ�7:tèðÿÊ«lõý±zõ꽜ë°,X%·~%þU™nUÚÀR aÂÇðÖ*¯«åúؾ°(øÕ‡~èêêêã»b瞟~6²_Û°�Zjÿž;,¢rÇžýËV®A34Æ&{C£ô½éÃÕµ+|,,,üí·ßnРa�Rêׯ?bĵl­cÇŽžžcµÑ¾}û~ýûëûd8VÔU'N_z”W”‚U�5òöö–WRç�óY¢cêÔ©r­??¿ò¾?Ñ ‡bÁ¬ ÅL‰gΜAÍwß}‡òO?ý¤6ŽŠŠÚ»wïÊ•+±vùòåÙÙÙ_}õÕÖ­[Ë›J„葯oBê·nÝú¥ë{*Õ­JXdìÿþïÿÄóŠ(T0µcy”ëcBúõëÅêÞ½ûÐaÃ7oX½nc׺�l²¨ñí…�n£€ETnÙðÙ¨Ñh†ÆØ$à@¨¾7}{¾£€]p01±ÇVÿm¯¿þFPpˆÚ >Ö¹sgõ;c"`hô±:uØÇû˜\EHEÎg‰Ž#Gޏ»»—'E/^ìСÄI^¡�““#|ìĉb– Ñò믿NKKÛ´i*ae�±ÌÌLƒÁ°dÉÚ¥K—ÊvLÌ#_ß„û£Rݪ´AÕ�ƒýç?ÿÑÎç�EiÆÅJ)×ÇüwíëÛ·¯‡‡G�=<Ç�_·i bÙÊ5ƒ?Ò¥‹ ,Šzw÷Þ½zõ‚�al¨ïMð± '.]êkH1Ž1¢M›¶[¶ú7kÖlòä)Úfð±¦M›¢±6š4mJ«á<>¶ÿþwP�VRç‘óYbŽU«V 6ìûï¿—ê¡IC‡�5k–T/ñ¹âcׯ_GNàíí}òäÉ+W®@á.\¨Š\``àêÕ«·nÝ  Ū¤¦¦BÌÂÂÂÖ®]ËŸ‡® òõMH]¡.ýþX¥ºUiƒ*ûzýõ×¥ùPùÚk¯™ý]²ò¨ÀÇöÀ…ÜÝÝÝÜÜxù,_½Îk‰/þ]±æyˆþ}^X½nmCcl²m×^}oúxÿý.�5~ç�wƒ‚¡dmÚ¶­W¯^777©:lÞ¼¹ú4£ÚF«á<>»£€‚´Š�:�œÏs@¥üüü\\\:1;xð Ü©cÇŽ�±víÚ¥¥¥ÉÛh>&Ê™™™P²èèh///¸–¶ÙÅ‹±8ÊK—.-..GͱcÇ*þQ‘¯oBê ué÷Çþýïgddȵ¥Úä÷ ïݻרQ££G�Ê+%ƒ¿ÈµåS®�ìÝ?dè'Ý»wwuuýÀÕµ¯Ç‡-[¾ÛÀ )Ófz/]Ž˜:};uêüa¿þï¿ÿ>´ ¦„Möì×÷&Åž={ß|óÍÎ�;oÙºuÁ‚…(@Ì X¯¿þöèíã²lÙr¬úàW털\—..X{ 0Hß9ÃQ¢Îû˜Ð°�}‰‚VÌ©óÈù,)Ÿüüü©S§â#äøøCYÜÝ‚Œµoß>==]ÞàçŸan§N�>vùòåÇÇÅÅÁÇ/^ìã㓘˜ˆ\m~üñÇ””TÆÇÇC½Î�;‡µ?x`VVÌ þVñ�D _ß„Ô!êÌï�á­Æõrž�²`ÈÛØš»wïÊUåS®�……EÌ�¿2æââ‚O…ö mÚ´iÑ¢ÅÌÙsgÎþ…Ö­[·mÛ¶cÇŽhƒ–°glVùô‘QŸ –lH;n\›¶m§L™‡ú}û 1¢QãÆ3fÎܸqÓÀ�ƒ*Ž5k×é;g8JÔy�)j'öe탋„Ôyä|–¼�±‰'ʵ?ÿ ³‚}mÙ²åÂ… P¬M›6ÅÆÆž>}¢ [¶lYvvöwß} sûY™J†MÔo¬¡“ˆˆ´)Ó51‡|}BˆÕ”ëcÿ#>ù~—.�K�zAÀZ*{_¡K—.øïÓÏFa}?„15M_™bL5[ϨcQç}ŒRB«A´S)’jB¾¾ !Äj*ò±„¤¤Í[·M™:½OŸ¾]\\:tèо}ûvíÚµnݺM›6(`J†Uh0eÚt4Æ&ú~ ³A#Ä�óYBùú&„«©ÈÇD Z¿qÓRße‹¼/Xäµ`á¢y "æ/\„Å…^‹—ø.[¿a¿ÊŰ4èc„8r>Kˆ##_ß„b5•ûƒQMA#ĸq㆜Òâ˜8Ðür„‚>ƨµ �â ܼySÎj qLp1Ë×7!„X }ŒQkA#ĸ{÷®œÕâ˜X4�5!„Tú£ÖÂ:3¦™ ò ‹sMi/+�&SnQ~áÁ¼üüÌ4ã‹Ê”L¥²8///C­,òŸ!ĦܺuKNl q4pËW6!„Øú£Ö KMÏ)ÊÍÉÊÈ.ÒøXZFÞÁìÌ4C²Á�–“›Ÿ—f@¥1#÷`Ž)Ý`HIIÏÍÍÏU*å�ÿ,!6åþýûT2âÐàÆe,_Ù„b ècŒZ k| [ûŒ¦Â—>fÈÌ.ö¼AFnaf* ¦ü‚ŒQ™nÊ/Ì0ê{£�Rܽ{÷æÍ›œÞƒ8¸\qÑò1EBHµBcÔZXác/¼�R+2=÷1cZvÑËûcyÙFÞ#„B!v}ŒQkQ->–‚‹Liª�=ÿþXV~q~aq~AAfZо“dú!„B©%ècŒZ‹jñ1CJŠ1Í`(õ1Cº)¿(+5)†Ô윗Ï.– ùÏ‚B!„��>ƨµ¨«J¿?fÌÎÍÏI}Ñ>%-ç`vº™[dòŸ!„B!5}ŒQka­�RR³ŠrŸ7LÔ¨ó+¦¼œ_Ñ�‘•_”•¡ÜKËÎ)“|È!ÿYB!„R#ÐǵVøXºI|%¬4r2SŸ×M¦<å§Æ4¿?fHÍÊÊ;˜÷¼²À”¡ù±2MÈ„B!„Ôô1F­…>fã�ÿ,!„B©ècŒZ ú!„BqrècŒZ ú!„BqrècŒZ ú!„BqrècŒZ‹šô±Ä¤äÐÐ0 úµòŸ!„B!5}ŒQkQ“>„@A¿Vþ³ „B!¤F �1j-jÒÇBBB…�¡ _+ÿYB!„R#Ðǵ5écAAÁÂÇPЯ•ÿ,!„B©ècŒZ‹šô1!c"ôkå? B!„Bjú£Ö‚>F!„Bœú£Ö‚>F!„Bœú£Ö‚>F!„Bœú£Ö‚>F!„Bœú£ÖÂ:3¦™ ò ‹sMi/+�&SnQ~áÁ¼üüÌ4cie&*ã’ãââ#ÂBèc„B!Ä~ �1j-¬ð±Ôôœ¢Üœ¬Œì"��¥eäÌÎL3$ i9¹ùyi†ç•™yEÙ™éA�ÁÁa11ññáÁô1B!„b/ÐÇµÖø¶†wM…/}Ì�™] ìyƒŒÜÂÌTC²1;7?ÇøâyEYRt8ŒB!„Ø ô1F­…>ö"Ìû˜!Eñ±"“9‹ £�B!„{�>ƨµ¨KÁ¿E¦´R3¤?^1# >Äç !„Bˆ½@cÔZT‹�RRŒiC©�%¿˜ä#6>!6>)&2ŒóyB!„�ãþýû×P�×)ÐǵÕãcbUé÷ÇJ[GFÇņq¾{B!„RsüòË/ß)  ¯S �1j-¬õ1CJjVQ®)ÝðÂÁÔùS4ó+Š0†Å$FG<ŸìÞž}ìÖ­[åý�•üÍÔÅŸþù÷ß׬Á?üð믿Š2þøúé'®+”iWôvûöí{÷îÉ+ª‡›7o>xð@®ÕñÛo¿Ý¸qC”ÿüóÏk×®a+QÐ6»{÷.Ž_[c 8iê ´ 8óÚWªÒÎ1œªœœåÿºÉUp–p®D§ñÎ�;e×Û˜*¾¦ZpIã%–kË‚1^¹r¥‚žm{zñ÷‚ê¢ö/NO¥ÇF!ÄÉÁ'�ð1äu ô1F­…>–nÊ/Î/|9™©Ïë�&S^ËüþX²Á�žl÷¿íéé¹sçN¹¶,&LHNNV{õê•��’ššªiUòñÇçåå!CE ¾mÛ6oooV* `VáÀäÉ“÷íÛ·bÅŠµk×jóѪ€n£££Qøâ‹/„!‹ ×%²[H‚¯¯ï¹sçÔþøã�»Ô÷È‘#»víe¼‘a,ØV´êxæÌqö°÷<G�U[V…ÀÀÀââb:X Amö}ùHIü† N�:%ʧOŸöññAÿ8TU5µ`€{÷îçS/w¢BFFÎt §ñÂ… Ø�j58-—Ο?�³„‰ÅíÛ·'$$ˆ²d³cÛ×ôvYÖ¬Yƒ#ÔÖÜ-½ö”¿Âe‰Q­yPÖluzï)àú?{ö, p-ô°dÉñ4´¨‡QÞ±AÍî‚Bˆ³�¬@ø ò:ú£Ö ³8„‰Ù³�}ýõ× 4ÈÊʺbõˆäcݺu+((@ÚݹsçÜÜ\µ^ø²ö-Z4RÐ óCž5kòÔ›7oN›6 æ&¯®£Ñ˜’’‚Lfˆt¾„¬ƒŠŒŒÄî K±±±pƒôôt1–‹/bÇ|Hé/ví­£=«>¬m ÀNE3ÕÇ�§ërUuTÃp¾-%??©¿ÚlÙ²eò•‚ó/Ú\¾|¹¤T0v Ò²VaÕªUh‰—Oí°D¹uºzõjdùÒ*§Š‰‰A¢�P—;vÀgÐùòåËÑ¡¸vçÎ�� X‹þ·lÙ"ÑfݺuèÖßßßd2I=—‡Í_Sm�YÄ©Còвÿ´áé…U.UÀV0: ½0X,Šzx¯hY•cÃÁàÌ‹Ã#„âÌÈëècŒZ ú˜–M›65(duÜ¿¯^½æÎ� [¸¡ Cʈ´))²@4ƒJuèÐaÒ¤IÈÚQƒ ÞËË qL܃lÌÑáââÒ·o_ÆŒãáá¡E¥üúë¯0“«W¯ŠE$èÈûÿøã¤ò°)2c¤³Ú;'HsýüüpÌh‰ü8;;¹;$á—_~ùᇼ•Ü^ñÕW_ÅÇÇãä ÀyÀ*äÍ¢!Á^îÝ»gC†�ökÚ_–òn êÁÞ3337nÜxàÀœ¨ˆHÍ(k}¬R0Œý‹/¾ÀV8*,â ÿT€aJ·P0jœ.äñ°â'N@-ðújk!B°_Xt ]aø8!8�ÇŽwfT°!Æþý÷ß‹ÝEDDlÛ¶---m÷îÝ?ƒ§ÇV¯i‰æÎ’â„Wª,QÄ &''£·_J9}ú4úÁ¿(£™ÍO/þ.ð¢C\ãââPÀÁ£ .<Ôã’ÀðE³ª[‰r_£vN!Ä9¡�1ì7èc*—.]jÕªò?hF“&M>üÓO?¡ ž4ƒ�!�ÄZ¤’nnnÓ¦MÛºu«ll H¸‘¬GFF6kÖ rRPPгgÏ6mÚt.{™1cöøÍ7ß$ë€Â�5J]Ôßœ)�C‡!óV‘Œ"ÿÆV+ˆÛΆů¿þ .Äž€½ÄÆÆŠ­ÐCQQQ‰bw"w¿vítBÜü�B qG«DÒ�ÂæÍ›Q�ÌåÄÄDTbì0”‘O_V8{ö,ÖVú…"ävýúõÂ%àcP ÑÈÍÍ>†1þV"}Ç+(n¹œ:u §ÙP®Ã@ØTTT”šâÃ-qäheÂ1ü¬€MPƒ—n#†€kàäÉ“kÖ¬Á{:NŽ8±Z„hA&/^¼ˆ åե༽s°ÕkZ¢Æ°ß � �¸:töìÙ(‡„„Œ=…ãÇ�é°êÛo¿…h©Y ú¼âÍ›7¡X…| îMñúáZ¨Ÿ7oÊð±€€€ÌR|}}…�™%88²'×V�èèhñÜ ²Þs HyaSHFR@Ab ‘€1"ÎÊÊ*QRØŠs÷E-� Cº�y‹Îá$III¢Œn…��8qbçÎ�èAø¶*PÀ޼-ñ1�ú¼byß©vÅÄÇÇ‹Þpl8²¼@>Î3‚�]ˆÃ)ÂK³iÓ&\r/ÞÞ………ðC¬*Q| ƒ‚�àîÞ½û£ñm1‘ýCÕ.\¸‹Àñ—‚3³råJ¼FÇŽ«ú ±ùkzïÞ=| ©�€Jü¨|×ý¯(EœQæ&Êê½/[�^ô°LÁ[y@\EøKÄë󇪡‡gѱ¡|úôiQ&„âœØ¯�SÓÂÃ#ôõ ç ú˜ñÁ\½zéu·nÝÄ{BCC§L™‚ÂÙ³g!Wê#Uð1äˆ0«_~ùE|ålÒ¤IÚãââÄí2¤¤ð±%K–ì)º¥úØ'Ÿ|òqY�Dzxxh»ª"�$µ(À�¹®Zµ 9±ÈÝ}DAdºÈ˜/^¼(n³ )¬(oذAŸ»ß¹sG¤¼È­‘î£4Y¯(9rDïcÈ€³Ê¢Þ'©"ð.ôsøðaåÛg2â«Jâ‹ÊÚµkñÚik´“âh<ˆÃÆ«€^k1L¡*"¦')óÜžB‰2…¸ÄóŠ999111$ñÅ0�˜¸Eõ±;vÀàX…­à¸lÐf+«xVF-6MΕzOÌ[s ár*S¶TŒöV•MN/Î þÜò4àªÃñãïkãÆ�Ð`t˜––fѱáäcÃÒÃ$„âŒÔ„�RŒ³çÌUã@`>£ÇŒñk÷í?°rå*ýV»º¹¹EÇÄêW1œ$èc‚Û·o# ,Q¾¢ãææ&¦¡X¸S±©’²¹»˜82…‡T Ÿ€€£Ñˆ‚¿¿¿ÞÇÐ&T‡¸ÙU®_¿ÛÁq `5P,h F„ÅÄÄD‘¦Ã„Ecì:,,L*”@웈TåèÑ£Ø#EZ¿½¼·òÈeBBÚ@hã+DLÊ$| {„öàß Ž?®úXFF^MÈ6„ü`8~~~(£N#\N{xUÁ†¯)À&ê³iÓ&µ¬½·pÍ‹™9ôh¯RžÞ”””]»vAàq�asœFÔà2À jÔ_U<¶ÈÈHt¢.BqBjÂÇ’’ ®®].\äµxq¿þý7mòóöYòé§ŸŠUš?�Ú8$4,8$Ò«—û”)SÅ"^§ïœQ‡ƒ>¦‹Wžp;yò$ìåG³³³{÷î]¢<¸bÅŠ>}úˆ6Æ3‘| y'Ú 0Þ¸qãܹsÈ•‘‚»¸¸œQøæ›oÔÆiúúõëEI3öû �W!¥ÖN(¯ÍÝ×(ˆÂZ宎A4»ÿ>*·lÙ"î#éŸmC^‹M0p¤È3$ÄpŒeõêÕÛ¶mC’¦÷1ôƒ½@™p¢PF>&ò¬Ê]2 ?((™½8˜/¾ø'…¥K—>|øŠ‚ÚmÄ,%+((Àa«"¹_¾|9ô �q–àoØN‚xþ •—•)ø0ñL)2xaM(C¹!¢þGåVL‡ßÃñã<£€£ .ûÅ�7+`zÀy€5ÁÖ°¯µ·2ç„:¼ ¢çбÕk*Ú`H¯˜y=à‰2NŽÖÇpÌ8`ñ»y*⼩ÎcÛÓ ûÂñ«7oÞ¼‰cÆZœv›·æ†[UŽ­Dy/“ºH!Ä ©9[µzõ„‰¡aª�A¯&Mšvá¤�»wïNJJóÝ#IU§ñhÔ¨‘:«GzzºÚ¡ÖÇÀÌ™3ÕŸ»xñ¢Z_1Ø)ÒkuQ›»ßU@Aè%’o5w‡+.[¶ ™1„mô¹;rèýû÷«óÝ#óÆŽ°ˆt?** œ%­�á_¨Θðt'AÉ4NÚï¿ÿŽÅ*Þ¬P¿?†³�+Q| »ó÷÷G¦.Ú¨“û‰EÕÇð""¡·e0 ä÷Hå7(²cœñ›ô@�çýctâ9º˜˜œÉ?KйDñ1(ÌÁ™„{ 1ñ¢…žqÌhà­Ì>]ÁyFô†mñŠkV„- Ù—_~©Ö˜ÅV¯i‰òÕG”q&Åc–ZðòI>†kXUMzV�Çæ§>†ƒÇÉ„ÚasüMmÚ´IÌ$‰W_Ûa¥Ç&ÀµZõ{³„Bê$5çcË—¯3ÆSõ±¡Ÿ|2zô�?”, >¶ný©´¡�9aÐÇüñlðàÁׯ_/Q~ðª]»v?+?¿[¢øÒºuëÔÆª�!Gœ3g ª�EFF¢%6D‡ÂÇPFÂzìØ±–-[.Y²ÄÍÍ þ†õÖM‰’LO�:©$z÷Rp$È×á!ÈtÕfc0Ô»vО��˜’ZmŸ/¦:CÃA"UÍÌÌD6 Ý Â¿°/ÔˆGÅ®(óÝ#ýU}ìüùó8Bdíh¥Ü³g ÈÅq´ÈÅ¡";vì@{Ôø(? ÷@ °qÒÐV‰rÅñ‰AðdäâN‹ íïï�ó¦º�êc%ʯÉaGâg[C‰ò#]x- ÓzaÀ‰³ó C_Qƒ@®Ô½ˆçKÁÉÄ©Æ �3S=|ø0j„#A*p0+”ù<Ð!Î^ ƒâåÆÕrïÞ½¼Ò3Àg^¬ÄÄÄa¾¦%ʆ8 ³_`Ã@ÔgAKçAK1›ˆ vªuÛž^øþˆpº„Yý¦üÄdULœˆ#5%U;6X.éŽ4!„g£| …Ï?Ÿ›2eêö;ÃÃ#‰‰I¢q�=èc ô1$ÇÈøK”¯K5kÖ Ö�„ÉßÑ£G{öì)¾H†<ûÂ… Æ CÊ[èСåK—J”ïn-\¸Ž1wî\(™è>–››‹N�g÷êÕKd“0™�feeݾ}ÛzyyuëÖ­Aƒƒ Z¿~}ZZÚO?ý‚¶íÛ·Ï××Wúí¦ €!lܸI-6‡0à0ŠŠŠ�¦ã81" ªÀ¸222 RHj± ù½Èn14é;XüʰúX êcHµ1(Ö­[· ]8$Aè‡8†�ÊïAcÃò| ÀNÑy��A*ÐÒñbeBB ’€}¡OdÛâ›Z¨Á¹…Øàø‘|ûí·x‡…¹a°¢$â8 ¨W»U…¡D™›‹çßÔmƒ?À½Q³UA�PÞ[™îB=`ÕÇð’ÅÅÅázÀŃcób¤8$ ,g.�±ää䈯?ጡg ö%:Ä«†Ó‹Ó"õØö5w)qlònÌçÁ_ÎÊ¢ ºÒÞƒ*±ÝéÅÉLW~ÞúÆ�X…±ß¼yžâ/HKUŽM8sUž’%„R‡©ëææ¦Ñ×wZ¦S]»v6|ø¤I“µáé9–>æ„AÓ…Ø¿‰ò§ YúàƒæÍ›}*Qn¹ôèÑÃÓÓ«Ä�ÿŠM`V°©E‹!Wå>†´räÈ‘¨×¦Ú¼©S§"k„Ò w‡rh'© ¯í£ nïTä¯HvÏž=‹ü5**JÜm@2=@ Æ{AAüÌ.reH‚´kä9åÇ…‘¿¢�uI©�ÁmÄzb–¼åvG|||PP�xöLò±T âyÅ»QÅT3JtbíÚµè sžŒÑ^1W„x‚Q€ÃX¾|¹HôÕ»šz´Âp_ù’Y¾:Œ'Çd2ÁvÐ/+\'�a€8]"­W}ìôéÓx�„£â€qIÀ%D Ú'+ˆß&C0�pª?ÿü"÷ÇÄ�,Ø‘8‡f±íkŠEH²öÁ Î#¾ß¥]±�Ysz…� iß½{76GW¾¾¾¸ðÔ} ªrl0Õ̪™'!„�:LÍùŒkÜøñð±uë7,òò>bÄVÿmîî½Ñ&†–1±qh [°`¡6fÌœIs �UÈ#•©¼Í'ÙåÕ«T°my M‡ɵ¶G"dÀì!©Oš¡ ²|4«bº_)fŸ©Óƒff�M‹xEÔŪl¢EmŒ¡Uå¨D{©¥Ú‰v×ÂÖj’ª¿:êkª¯Z–Š­N/úÛª»(ïlWzlpWx/ šBHå>–››oeddf¹¹u_ìí3÷óy£G�Ù¶}Çò+QÈÉÉ0`àŽj˨¨´LHH’zHOÏܼy þÕwΨ3�ë!+;¢E«“ 7ÕNyOˆ“óÛo¿½ÂT¥„Bê5ác¦¬œ‰'�7~þü°²�Ð0ácXµdÉROϱjË­[·õéÓWßÃy"'7OU2ë|̘f*È+,Î5¥URi4™r‹â’âââ"ÂBèc„B!¤Æ¨ CÄÆ%ôîÝgäÈQ3g΢ð±ŒLÓ¶í;ÜÝ{oÞ¼U4›f¦Ò�™]�—fÏ+†FÄ&D„ÐÇ!„BH Q>¶zõ¯ÅÞ¢ Ý 4è£Ù³ç@ÀDåú ƒ!lžžcsròô=0œ-¬ö±QÖÇÌU–ñ±�ðØÄHú!„B©)jÂÇô‘‘™¥¯¬ žálQÓ>–’ŸJ#„B!5IíøƒQqÔ´�R‚CBƒxŒB!„Ô,ô1†=F�û¿?F!„BjúÃÃ6>fHIÍ*Ê5¥ TjæW ãüŠ„B!¤F¡�1ì1¬ö±tS~q~áËÈÉL-§Rùý±¼¢¸„dþþ!„B©aèc { «}ÌâPžW|úµòŸ!„B!¶€>ưÇp{ôèÑ“'OžB!„�:R;$xrÎW>ô1†=†3øØÃ‡ib„B!u¤yHöäüÏô1†=†3øeŒB!¤ƒdOÎÿÌAcØcÔy{ôèÑ3B!„R§©Êƒ‹ô1†=F�÷1Þ#„B©óTå}Œa�Qç}ì!„Bqä,P}Œa�A#„B!u9 ÔAcØcÐÇ!„BH@ÎuÐÇöô1B!„R�³@ô1†ÝENn}ŒB!„Ôä,P}Œaw‘•�C#„B!u9 ÔAcØWääæÁµèc„B!¤ g�:èc {‰œœ¼¬ìUƬö1cš© ¯°8×”V•ʸ„äØÈPú!„T<¸}ûöÏ?ÿ|ÝŽÁáá q¨òÑ[‡3�ÝRœù\9óØëWÎF!Ž�ONP18xy<–àÌc·g>WÎÆÓs÷ž½°X}JfLM Ö׫‘��¨–cãâÑ^ßF�ÄĤ-[·â_ý*Fu}ŒB9}s4äñX‚Ü—£!�§:‘÷íhÈã±¹/GCO�ðËŸOcO=™“üÏ��ºî|Ôa«-¢[tŽ]`Gò¾_ 9 ÔQÓ>æááÓÖ`ÑÃãC}K) )ÆÏ>©F@À®™³fõêå.Önß±óóÏçé·òóÛüúëoDDDêW!¢¢cêׯ�®DÿMš6]ºÔWßL _ßeo¾ùfHh˜~£:ÂZ3¤¤fåšÒ †Ê+CžÏ¯F#„"çnކ<K�ûr4äñT'ò¾ y<– ÷åhÈã©fnÝ{º*ûq'Y¢ª)°£ÕÙ�oß·ÖÊä,PG�úØsçiÒd÷ž½ÚJ,6mÚ´Òï’%&&Õ«Woü„ “'OiѢŲe˧N�æêÚU¬zï½ÖžcǪ�÷í?°wß>Äž½{4hðÑGƒÅ"B»£)S¦¶iÓ›‹@mÚ¾\T[:R‡¨Wï5ƒ(#þXœ †>–nÊ/Î/|9™©WÆ'$‹ˆ‰ÕõF#„�WAÎÝ y<– ÷åhÈã©Nä};òx,AîËÑ�ÇS�}÷¤[€¬L5ØéÁïžÈGc r¨ÃÁ|lþüýú÷‡†©>†  غu›¤dƒÚø­·ÞªWƒD´oÒ´©§çX¹E)è_´2dhïÞ}¶ïØ©�=z@óôÇɰaXác‡¸3Æûc„bCäÜÍÑ�Çc r_ކ<žêDÞ·£!�Çä¾ y<ÕFì©'5v[LØ5@>¦*#g�:jÔÇR­x^QøØÜ¹Ÿ÷êå®úX§N�zöìÕ¬Y3Õ²DÀǼ}|¤ЦžÆÇFŽ…Å�7EFEûoÛ.E`PðóÛ”–ð±wÞy§M›¶Úxûí·écÕô1BqhäÜÍÑ�Çc r_ކ<žêDÞ·£!�Çä¾ y<ÕCÑwO:êɆ1"üŸ˜“O®üö´äÑ3 XD¥¶ ”ì•ï’ÉY Žšö±WžÏCò1F�4è£ 6‡ bãâEãúõëWìcëÖonÚä·wß¾&M›J¡ý6|ÌÅå¯Å‹µñþûïÓǪ;èc„âÐȹ›£!�Çä¾ y<Õ‰¼oGC�%È}9òxª�[÷žVßcŠ]¶?J8ýÄì÷ÃP‰Uh 6Æa¼ÚwÉä,PGMûXê‹ùî?lª€BUd,µÔÇæ”ú˜òm.™Y³g£eŠ1®Õ¥‹ËÀ�ƒ´áîÞ»^©��5úÓO?{ë­·àcqñ +V¬”B{à >öî»­`_ÚhÑ¢}¬ºƒ>Výõ×�;wž>}•7køóÏ?å*B)9ws4äñX‚Ü—£!�§:‘÷íhÈã±¹/GCO5°*û±Þ£lp­c×*I¥Ð@«d«³Ë-ª€œê¨aéïA ›1s¦Ç‡ÂǼ}|&NœäâòÁê5k6l¯ÎÀ…– 7~¼6>6Lõ1´O6¤ é¡Ã×w™ºkøX›6mµ³;"Þ{¯5}¬ºƒ>V………­Zµºÿ¾¼âÙ³_Ëò÷ߣróæÍûöíÓ6;Z�=Ò¶§N�êҥ˽{÷¤zB)9ws4äñX‚Ü—£!�§|ô*C|ôTyߎ†<K�ûr4äñØš_þ|Z}_K8]¥çãO?Q7ÁÁ¼Â$ør¨£†| ¦4cÆŒŽ;6,¬Bƒ Mø˜çرÐ*í|Ø Y³fË—¯P[îÙ³-õ³ÒÇÅ'x-^ŒÕácûÎ�û¹~~›ÕfP>ì ѦmÛÿþ÷¿S¦L‹ZgcTGÐÇ´„�-]ê+æÄW£U«÷FŒ!Úxûø 1âÃ~ý aAÁ!p¿ '¢>&6[­[¿Aß-ÃVAÓòÏ?ÿÀ¯FŽ9£,“'OFý… D³'eÁçµk× Q~~~×´{?zôh»víÔE|ˆîÞ½[]0.t>lذ1:Z·n�ššªmL!rî¦é;>jM&“��O¿~ý®^½ŠJ¼«4oÞ|ÿþý(Lœ8~"oV³Èã±¹/ ucìÉÉÉ®®®øXAÿÂ$‘JÊ�ª†¼o èÙ³g£F�Ö¯_/jŽ;†O®}ûö¥¥¥M�:µK—.ß~ûmÙ�jy<– ÷¥a„ ãÇ�*åâÅ‹×˹xjy<¶fNr™I5l1'-Ъè“/µ‡$¯® 9 ÔQC>Ö¶mÛˆÈ(}½6Ð`úz5½ýöÛ.. ô…�%&&-[¶¼~ýú^‹‹f~èîÞ[¿¹>TëØ±£¶þ“aÄ�RŒ-[¶„‰Á÷<=Ÿÿ¾Ù–­þ|à�w‡!C‡¶hÑ¢‚{z +ƒ>¦EøØ×_-Õÿù矪�AÀþ)K```™ûe âM\ݶŠ>fö>”Œ>F©9w+oYȰ Pþá‡à!™™™Èé „<[´ùé§ŸÊlc9+V¬5jºÕV^¹råÃ?ܳg�¶²<äñhøûï¿+þ¯ÜW)u`ì ##—.]‹�?ŽŠŠjÓ¦ÍáÇË6¬ò¾u :Tõ1  XQQr9ü«®zªõ\½òu>þøcéÌ^<Ú–R­c· CBªËÇ®üVÑë"�Æê†CCœØÇÂÃ#:tè0yò4kР$jÔ¨ÑÐ3˜ØG ^¸hÑo¼áí³dûŽ�¯½öúÊU«ô=èCõ±F�£75Úµo/|lÁ‚…hß«—{Ïž½Ð±d©ïĉ“Þ|óͰ°pÀæ-[ô=3lô1-ÂÇüüü¢ËÔ°ÔÇðYV¾âý’6}úô¤¤$†ž——§öyäÈ‘ªøØÆ�wëèÚµ+}ŒR1rîVŠÉdÂÇ+J±èéé¹}ûö'N ÿ"#±ÉÓzèoqC† Qï! Ñì­€BÙ¶æ‘ÇSÊ_ýÕ«W¯]»vÉ+4È}•âècéééâ#¦ÿþø,hÙ²¥ú¡Ó´iÓWP2yß:$S …“ˆG¯Lõ�+k®€sëï’R\\,ÝìÅSf ©¾±ÛŠ®;e�²U”È_“¯4V7ì`É– r¨£†|ÌúçgÌœ9fÌ‹.[µzµÿ¶í-Z´øøã!;vˆÊyóæûmÞ;EôéÓ-Eù‹/¾@ûü�„šC}H’BÌ"çn¥DGG#‰WçÌ™³lÙ²ììl|.ãý§Y³f(Ì�;WÍ;_‘n8ïf–&š×ËÏ5Ÿ¦EøØ¬Y³ÔÛY¼k}ìðáÃxK}òäÉÕ«WÛ´i=ƒ}5mÚô¯¿þzúô) çÏŸWû Àæê¢þyE|¸»»‡††"9P§a¸¸¸`ïÚÆ„"!çn¥¤§?DE}Dj„ [·nßÂ[–¨D®9gΜ—ÛXÒÍ:ôéÓÇ¢Dóºu¹¦ÜW)u`ì§N�jYJóæÍñ„Õš‚‚yƒÊ�÷­Cïc‚‹/¶jÕ*::Z^ñJTǹª¹¯røè£�Ö­[göâ)Ûð©•±WÎç! �1j-ècZ„�mß¾]ú™—¨¨(­�ùúú®\¹2''gÇŽø€ÌÏÏ ›1cV=|ø-ñ>.Zþý÷ßnnnÚé=ô>?}útø˜^½vîÜ©¯$„-rîVÊéÓ§‘V>|e¼)µk×.11a³fÍð®%ÚL›6ÍËË«Ìf5Ž<K�û*¥ŒŸb?–rôèQ|²?~\­y…Ÿ©”÷­Cëcb/¢|íÚµ.]ºøûû¿lZÈã±¹¯Rpm¨ÓlüôÓO®®®ø€6{ñ”٬ƑÇckìe¾û°:1ß=ƒñ a��ÓLy…ʦ´J*�™¦Ü¢¸„丸øˆ°;÷±ŠŸWÄ»3Ê­Zµš;wnDDÄæÍ›/^ܵk×ÂÂÂg¥O•¨Ÿ”xgwww×þJŒÞÇ c‘‘‘ð±+Vh§Ñ0Cú!¤bäÜM”ïTgϞݵkW‡Ä×¥Ö¬Y3nܸ3gÎ:t¨yóæÉÉÉòf5‹<žRðèëë›��-¯Ð ÷¥Á¡Ç.QÝÏ+á#ÌÃÃcÞ¼y(à¤íܹÓÓÓ3''çĉ(ÃOlò2k�ÇSŠ5× ††�`(:. èú±cÇ®—sñÔ"òxl Z@cÔZXác©é9E¹9YÙEõ2[™–‘W”�™d×>†Ï¤OÊ2xð`ÕÇ?~Œ�®¿ÿþ[l‚Á£ÐZG�ݳgOÿþýE³   Æ�Ÿ:uJ» ÉÇà~â~|¬¡9èc„�Š‘s7 çÏŸ>|8’iu¾òï¿ÿ~áÂ…ï¼óÞa¶mÛfý´ïV"�§”¿þú«{÷î;vì�Wh�ûÒàÐc?}ú´vN)|pà€ñY£­<~ü¸¼Y…ÈûÖФI“·4àƒìÛo¿…ä@E°Ø®]»ˆˆy›GO)Ö\'/^\¼xqÛ¶m1L777u^{³O-"�§X•ýX¯R6‰.Û»V‰\}uõ)𩛬Î~,·¨r¨ƒ>ư߰ÆÇ°µ!Ù`4j}ÌL¥!=#Ëd|ñ¼bXd|BDˆ]ûXllìñ²àíX�®CâÞ½{ãÇ�ÿᇠðö=uêT!`—/_îÛ·¯$cÏt>–••åçç‡>í–.]z»,[·nݸqãË� !D‡œ»éÀ{—^<�pCN¤ÊZA�†‡¾òïJ tìø)û«+f°tö]yßUàÚµkçÎ�“~8«¶�Ç£ÁÊëD S�˜½xjy<ÕÀíûO»È*e«€kÅŸ~bözªÜÓÊ#·«r¨ƒ>ư߰ÂÇ^DY«¨ò¹�GÅÄÇÙíý±gÊ7¾ž<©Ò½u•òÚÃîä*e&F©þñãWùÿ@„"�s7GC�%È}9òxªyߎ†<K�ûr4äñTEß=©¾§;(ß%‹>ùäÊoOK=ŸÚ,¢RÛpð;ó9U¥ÈY úÃ~£f},4<&)&"Ôn¿?F!‡œ»9òx,AîËÑ�ÇS�Èûv4äñX‚Ü—£!�§Úˆ=U½JVq`×±–Oã¡"g�:èc û�ô±Ô°èÄØèˆ ;ž_‘B9ws4äñX‚Ü—£!�§:‘÷íhÈã±¹/GCOurð»'Õ÷àb��¾ò�1�œê �1ì7jÊÇŒiÙ…±1‘Áö=ß=!„8rîæhÈã±¹/GCOu"ïÛÑ�Çc r_ކ<žjæöý§«³ר�2ìhuÎãWûΘ9 ÔAcØoXëc†”Ô¬¢\SºÁPAeÊs=ËÍ ²÷ß#„‡CÎÝ y<– ÷åhÈã©Nä};òx,AîËÑ�ÇS#üòçÓ¸SOæ$ÿ34ä›ß1C‡è�c¯0µ½Yä,P}Œa¿a…�¥›ò‹ó _FNfj9•YÏËñ É"¢Âèc„b~þùg9}spðòx,Á™Çn)Î|®œyì΃œê �1ì7¬ð1‹C½9Æûc„b+nß¾-gpŽ^�%8óØ-řϕ3�Ýy�³@ô1†ý}ŒBšÈœã€ƒ—Çc ÎF!„B9 ÔAcØoÐÇ!„BˆC#g�:èc û ú!„Bqhä,P}Œa¿A#„B!�œê �1ì7èc„B!Ä¡‘³@ô1†ý}ŒB!„84r¨ƒ>ưߠ�B!„‡FÎuÐÇöô1B!„âÐÈY úÃ~Ã:3¦™ ò ‹sMiV¦›ò‹ó ‹ã’ŸG|L}ŒB!„Ø9 ÔAcØoXác©é9E¹9YÙEõ2[ù"CÃc£#ÂxŒB!„Ø 9 ÔáØ>Ÿ€SŒ©ÆÔ4ýZK#11)(8D_Ϩ­°ÆÇ°µ!Ù`4j}Ì\å‹UaÑ 1‘aA|^‘B!„Ø9 ÔáH>6bĈ>}úŠè׿ÿèÑc:uêdH10`È�¡j³]»vϘ9SÓ¦OŸ?�h9|Ĉ¨è±è³déÈ‘£V¯Yóúëoè÷+"$4 {ч×âÅúÆ ›„>ö"Ì©—™JCF~\BbtddH}ŒB!„Ø 9 ÔQs>¶i“_�=[´háææ¶jõj}ƒJN5köløOÏž=›4m ›jܤɻï¾ÛÍÍ ~µpÑ"¸š­[¿AÕ6m´jõ^‡DW ‰]»u{ï½ÖÑ1±Xìܹ³‹ËŸ~úÙk¯½ŽþE ÞÛgÉÀ�ƒDôéÛwÜøñ¨`½zõ ‡bqåÊUúCeØ$jÌÇ’SÒBB#£âb£‚kÄÇ~&„B!N€œê¨!ƒŒµk×nó–-IIÉþ۶Ö/_¡oVqŒ7®Y³fð®ÿþ÷¿Â—V¬X 5Z¹jU÷îÝÑgDd*ádÞ>>úèÙ³¤Kí-11©}ûö£G�A'¯¿þz€­Õ«÷Z4F›ÕkÖzzŽ­_¿~¯^îS¦L…éa¿}=<4h°ÈË åµëÖë�“a«¨9{1¿bDT||XpMø˜üN!„BH]DÎuÔ��ApÖ¬]«.îØ±³K}³JÃsìXØo¼1rä¨Q£F#ÞyçÔtíÖ-)Ù Ú¤S;›­Òö�Æ~8qâ¤ÔçöeþyÅF�CçRŸ�¢„ÐÕµ«”»¹¹éÛ3l5ác†ô SfÊ  ‡�…ÓÇ!„Bˆ��³@5äc-Z´ �ÐÖ44G›6mõÛŠ€8-X°°~ýú£G� Š;nÜ”)SáQ0´¨è˜è˜Ø 6š —\»vE!,,-v!P4è£~ôÑ`ÈU½z¯¡ bÙ²åb×Zóô ‹ƒŒ£L«Ö°ÖÇ )©YE¹¦tƒ¡üJCº)¿(+=50088<.–óÝB!„Û!g�:jÈÇzôè¹bÅJuqûöâþLÔ¨…òbÈС͛7‡&õëß_Ó¦MoÓ¶í°á÷lõï½Ö­Z½‡ðÀzõêá_uÿ._¾bþüP8¬š;÷óÉ“§ Pÿþûï0àÍ7ß5›6ù‰]K>† wïÞC«î°ÂÇ^üª˜9™©åT iÙÙyã’ãââ"B‚9Ÿ!„B±r¨£†|ÌÏo3 iãÆMɆÈXÇŽÅ÷ÇÚ¶}qCL-”±qñ‰‰I³fÏnÒ´é¼yóÕ˜5{ìhõš5)ÆT1ŸÇÞ}ûÚµo/ú?„µ ,Dyó–-ØG¢ö‰fð1Q~÷Ýw?ÿ|¤ñ­·ÞJUnÇ©ÍècµVø˜Å¡<¯ø"ôkå? «‘ÿR !„BH]DÎuÔ��¥*:ÔËݽE‹®®®Ú{e| =lß±S ¿Í›…�©màd .ª_¿þð#öÄÚÿþ÷¿“'OyóÍ7=ÇŽÕþR™êc¾¾ËÐ>*:Fõ1´S†Àñ4h &ctuí }‡ÐǪ;èc„B!Ä¡‘³@5çc6‰…‹5kÖ :Ô²”áK7n’ZnÙºµwï>0.4èÓ§/þŶR¬�4i2ª¶ÈË 56lD&æÚµ+”lì¸qo) ôÑê5kÝÜÜà`‹½½4h˜”l€ÝuïÞ]ê“aà�B!„‡FÎu8˜�¥*sÜCÀ“R•‡ß~ûmŸ%Kµ vì ødØ0HT›6mÅ|ŒûŽ1-¡dϧsPšRŒï¾ÛÊÅåƒN�:­Y»NT&%%üñ�Î�;C´BCÖ-[¾|ù TеÆÔ´]»v7oÞ|ü„ ØvÚôéÚÇ6ú!„Bqhä,P‡ÃøX`P°ø™f8 Ö„òàÁׯ_Á‚…b¼+"2 &Ö»wŸµëÖÃÙv¡ñ�À ¨´í½÷ZÃå`t!¡a:thÑ¢¼ ~5fŒ'Ö¢±t©/ºš9k–·Ïí “qãÇcwp¼Tåþ6ïææ&~QšQA#„B!�œêpÛ°a£ø¥æ ·¹ââR•Ÿ{~ûí·!cíÚ·ó|¤*³t@·°jãÆM]º¸ˆ–è^×¹sçwßm%&`lÛ®çÏ_ îöìÙ«gϞꤋ˜˜‹ËâkfŒêú!„Bqhä,P‡ÃøØ+¼K}ÔP6yÔÐ&�0Ê ú!„Bqhä,PG]ö1†£}ŒB!„84r¨ƒ>ưߠ�B!„‡FÎuÐÇöô1B!„âÐÈY úÃ~ƒ>F!„B9 ÔAcØoÐÇ!„BˆC#g�:èc û ú!„Bqhä,P}Œa¿a��ÓLy…ʦ´Ê*ŸG`hLl|Lh}ŒB!„Ø 9 ÔAcØoXác©é9E¹9YÙEõ2[©„!=".)*<„÷Ç!„Bì™Ç�ß¿ÿ×_½uëÖ�7~¶)èÝ¢sì;’÷ýJÈY úÃ~ÃÃÖÐ,£©Pëcæ*ŸGJfA\LdŸW$„B±W HwïÞ•ª:Á29 ÔAcØoXác/B¯^f*SLÙù…!0±@#„B±7>|hó»aU;Ů壱9 ÔAcØoÔˆ�ÓrŠr³ÒŸß ‰Ž�‹¦�B!„Ø÷ïß—=©fÁÈÇTeä,P}Œa¿Q>fÌÊ)ÈK3(ó+ÒÇ!„B쌇JvtëÖ-Ò?ÿüóT,¢Rjf[^ù.™œê �1ì7jÆÇr ‹ó ÆÅ'ÅÅ'ÇÓÇ!„Bì†Ç�kSDùÁƒr£R°ªúžiDϯö]29 ÔAcØoXëc†”Ô¬¢\SºÁPAeŠ!ň  ‹q”ûcýõןþ)×ZÂÓ§Oµ‹8¤G�ikOž<¹víÚ?ÿü£Ö`C³-Í‚·­_ýUÚ—C¸sçŽÙUÕŠ•ç�B!5‰vÑßÿ-·( TŸ’á`äýU9 ÔAcØoXácé¦üâü—‘“™ZNå‹MèyE¼Ñxyy 6ì÷ßGWÒÝóï¿ÿ>´|L&Ó3Ųf̘QXX¨n3räÈ—½”rÿþý† þòË/jMPPÐòåË5MžÚŸ´ò†ƒÁæf{oÕª•Ù§±-‹xçݼyó¾}û´ÍŽV†ÞO�:Õ¥K—{÷îIõ„B±C?~¬Õ¡ îŒiA3íV¶ån‘ÉY úÃ~à ³8ÄL÷ö?ßýÍ›7§M›Ö°,çÏŸWuèÐ!ÂS¦L™3gŽhöÕW_A‡._¾Ì/eÞ¼y£F�RôR4Óö¾üòKT®[·Nò±O<<<7n,Ê cÇŽ®®®¢üÇưߠ�iÁ[RLLL»víV¬Xu�ä\¿~}Ĉ;vìÐ6ƒ�uéÒ¥ÈðÕÇÀþýû¾þúëèèh¸Ùáǃ‚‚Š‹‹Ï(@cŽ9‚mß¾ýĉXÕ´iÓ/¾økàp¨ÄX„�]¹rå®]»bÕ¾R Qbó‚‚ìñŸþÁâÈ‘#g”eòäɨ¿pá‚8°'eÁ`¯]»†ƒ÷ó󻦠=�G�Å9Q—-[¶{÷nuÀ¸Ðù°aô¶)hݺujjª¶1!„Bì‡_ýU!³ÏÔ”GõÍLjC’wVR¨‡>ưߠ�iÉÎΞ7oôcÀ€6l8yòä�!CÖ®]«}>ð™âc�+OOOˆ™O)p�~ýúÁ¸Ô–ê wooï�;w⨴R<¸mÛ6TnܸñìÙ³¨ñòòBOŸ>…D©] 7šÜÜÜP¿­___¬ÂÑfee=+õ1 º mb×°Ê(n”©ˆ§.Uô1³÷Á dô1B!ÄnÑÞæ’žŠAc�CÙ‹nÓ ä,P}Œa¿AÓ:räHóæÍ;vìñ€«H_--,,twwGÍàcâ!À¿ÿþÛÃÃ#))I´�ÏÌQ8uê¤ º2wîÜ•+W¢ðùçŸÃñ"""DKõyÅääd´wQ˜2e *Ç��X¢°)£ÑX\\Œ£:}ú4éöíÛÏtÏ+ óóó‹. ®a©�edd¨Þ%سg$múôé8~†ž——':|¦ ³*>¥Ü­£k×®ô1B!ÄnÑÎÌaÑ`h¬q([‚C’wVr¨ƒ>ưߠ�©@¨ û÷ïÿä“OÜÜÜà0P©¾ !HEZZš˜¦‚4lذ͛7/Z´�ñòòµP†A“ŠŠŠúôéƒÏŸ?ž��€>*Ï&&&ªS};tèö~üøñcÇŽ ·Q¿uýúuácØô ¢xæÌöw2ëc8°ÍeY³fMÃRÃÉ�ËM˜0áÀ�(ܼySŒkðàÁPG ñƒò­R€6mÚT”…–¢üÅ_ ý�?þˆÎä¹M´÷ !„bWÐÇô1F­}LåñãÇ ,عs'<›gddtèÐaÉ’%kFŒáêê*nI%%%Íš5ëĉ_~ùeÿþý·mÛ†Œ Òò¥‚:Qì§Ÿ~ SwQ¢{^ñܹsÐ3T¶k×ÎÛÛ;..BˆÅÝ»wÇ•røðaéyEøjzõê…ƒ4ëc?¯øL™ ^wéÒ%H&Ž5�=jÙ²åÅ‹QîÚµ+<ðòåˉ >>>Ý»we€AM›6M”E{Œ�ãHNšõš!„BˆÁçô1F­}L*UPP0zôèAƒEFFŠÿQtõêUxšhE3ÅÃÓâããQ€wÁpD¥ºw¨‹ÉdjY À[ mb; 1þôÓOÉÉÉP£Æ�/]º>¶xñb´ßµkWNNŽÞÇPÀæÐ$(–ÞÇ ‹êí,Xëcp<�'Ož`hmÚ´�žÁ¾p`ýõ†Œ‚v>É€€l®.êŸW#�>}:|L¯^;wîÔWB!ÄNà|÷ú£Ö‚>Vx/HHHh¨Lã~éÒ%µäîî^\\ŒòñãÇ›6m*b„#µlÙRmΟ?¹Ú¶m›:Ëb‰îyÅge} úùùµk×¾MRg,>Ü©—S77ëc?¯×B¹U«VsçÎ�ˆˆØ¼yóâÅ‹»ví*¾Ò†÷A¬UÐê…ñjßõ>‹ŒŒ„�­X±¢Ì<úOžÀ éc„BˆÝÂ߃Ðǵô1•G�]¾|¹¨¨j?�\Mž<9##㯿þÒ6ûꫯ°ê÷߇;õìÙ3::ZÔK>&šÅÅÅÁU ^ Ð¡C‡}ûö%&&†……á_h�¸iõºsçÎÙ³g±÷þýû{zzöêÕküøñâV†³qãFišG¬Â^’““7nüðáCQ)|ÌÃÃ㓲 Gò1¸Ÿ¸Ÿkhú!„bÏ ÁP]èÆ�j†Ph �ĶHÙN‘³@ô1†ý}LE<˜7|øðuëÖ%%%]¿~]n¡»k×.¬…óÀÖÔzÉÇ ^{÷î}¦XÍ‘#GÖ¬Y3mÚ4áEØÅرcáiF£ñܹs­Zµš={6lpêÔ©“&M‚­Ápž>}Š!ÀÍúõë÷Ûo¿©Ýj�ãÁôÆŒ£V ÃAªÓ3 `-K§ë�€Bü~øá3Ž ‡! ¢Ø·o_IÆžé|,++ËÏÏ…ˆˆˆ¥K—Þ.ËÖ­[a’/7&„Bˆ��\EëW(Wp— «ªOÆÐó+Ü{Fc8tÐÇ´Tñ-@4{ò䉶‹ÒÿOªbo*f'™µ´“gŠXJÇV)åµ7;ÏÔQª…ƒ$„BˆýððáCI�nݺuÿþ}|â?U@‹Õ÷�1�ú¼�¥ÈY úÃ~ƒ>F!„Bªo¾Ä*bÑìŽr¨ƒ>ư߰ÎÇŒi¦‚¼Ââ\SZ…•©yÅù…Åñ ÉÏ#.:˜>F!„bg<|ø°úžE¬ìô•ïŒ ä,P}Œa¿a…�¥¦çåædediÕËleFnafj ï�B!„Ø3�?ÖNïQ`wÖñAÎuÐÇöÖø¶6$Œ¦B­z™­ÌÈ-ÊLåóŠ„B!éÁƒ¿þúë­[·l~Ç ¢[tŽ]Xob9 ÔAcØoXác/¢¬z™­TžW,8ŸL#„B!¶BÎuÐÇö5âcƒÁhH1‡†FÄÇÅÇ„ÒÇ!„Bˆ��³@ô1†ýFÍø˜åIÅðÈø„ˆú!„B± r¨ƒ>ưߨ 3¤gdg ô1B!„b{ä,P}Œa¿a­�RR³ŠrMéC•i™yEÙiA�ÁÁá±±ñ±¡Aô1B!„bä,P}Œa¿a…�¥›òŸÿª˜9™©åT’�¦¬¼ƒq Éqqq¡œÏƒB!„Ø 9 ÔQû>fH1J‹ññ ê"ÖEEÇè·b8CXácç»'„B!6GÎuÔ��%&&…‡GìÛ¿ßÛöuë7,]ê;köìÑ£ÇôéÛ·¯‡GLlœÚrÍÚu={öJHH‹»víîþÿ³÷&nUU‹÷Ÿñ>ÏÛ­_Û™©™åÕJ/"©9k*æŒ9ÏCfÎZâ<–óŒÀ™€†#ei™•f™C^ Ìᢌd»Y äpÚà÷ó|žµ×^{í}¸-îú¸÷^Ç×W߀yzB#„B!Íy¨à!›4i²——·ŸŸ_¯^½Q4hð¼yó×­Û³ç‹ÝÝ0»¦M›ŽÂÎ]»·lݶyËV´ÿè£I(#‘jçLK }ŒB!„4käY ‚‡|Ìd¶X¬¶ƒ“Æ�ŸœbÂæòå+`eúf›·lñõõ…t¡0fÌØ�AáPƒ‚ÈêÕkÔΙ–ú!„BiÖȳ@ù²mûŽ÷ûö6|ø®]»Q†•õîÓgë¶íZƒää”~ýú}²x1¤ Ñ£G�µAëvïÞ3uê4(œÚ-Ó‚C#„B!Íy¨à!ƒJùû¿ççׯååå-AŒŠŽ�›imfÌœ‰zü\µjuRRòÀ�ƒÐ …½ûöCÌV¬X©öÌ´àÐÇ!„BH³Fž*xÈǬ®Û_{ö|1|Ĉ!C†nß±5ûö€¤­ Z'@º6nÜ4xð�?…ÆØ1óîÞ?!c9üŒŽ‰U{fZjèc„B!¤Y#Ï<äcëÖ6løpqglìØq#Ô«wïî>>p®M›7‹fK–.óõõ Þ¸zõšõŸ}>nÜø‘#?„ƒ¡qhXø¼y󄄪�3-5ô1B!„Ò¬‘g� ò±¥Ë–Oš4yÚôé0®µAA°²+VîÝ·?""ÞÕ«W襤äÕkÖa{ï½^qÔ¬Ù³§L™š˜x•û„¨Ý2-;ô1B!„Ò¬‘g� ò1$&6®o¿~³fÏ1™-ð«í;vBÏú÷&¾z÷î=«W¯+ÚÇ'$âç¨Q£?]²Dó1QÉ<=¡�B!„�f�< Tð��Aº �b2k>f¶Xg̜٣Gñ:™ÅjÛ»oß'‹0l˜��LüÔ|lÁ‚…Ð3µs¦¥†>F!„Bš5ò,PÁ>ŸàïÿÞ„ÀÀ¤¤ä�›6o„_í¬ZY–åëëýñ¢EÝ}|ÆŒ»6h]кõýúõ›6½ò‹¡“SLÞÝ»/Yº »ðSíŸi©¡�B!„�f�< Tð„�!Ñ1±âÛÃ'N„hÁÍ’“S´½‘‘QV—¶AØP0[¬£G��§™Pr5€†�€�ÅÄÆ©�3-5-ØÇþK!„BžäY ‚‡|Œaž �ó1‹Íž›�—ï°ÛWYY›î1“ÿå„B!„´DäY }Œ1nácÖÔ,§#+#-Ó©S¯+]±fÅ%Ćzðþ˜†£M)&‹=Oïc5UVÖ§9ò¢ÃC=ù¼¢ö0ŠzÕPiJÍÎÎuÆ%$Å'$DE„ÑÇ!„Bˆ»�g� ô1Ƹñˆ�YÓ²�™i6hXHxl\bbd(}ŒB!„¸y¨@cŒOø˜%#+'Ëòp}ÅЈ¸äØÈPµyX4y¤B!„�–ˆ< T �1Æ�G|,ËA#„B!Mƒ< T �1ÆMc}Ìd¶f8öT“©öJSª=çPfzjÈ�Ð�ˆ¸¸ÄÄ>¯H!„BÜ„< T �1ÆM#| –•Ÿ“÷(YéÖZ*M)»ÝáL8˜’��Îõ<!„BˆÛ�g� ô1Ƹi„�58Úb÷ô1B!„â.äY }Œ1nèc„B!¤Y#ÏècŒqC#„B!Íy¨@cŒú!„BiÖȳ@úcÜÐÇ!„BH³Fž*ÐÇã†>F!„Bš5ò,P�>Æ7ô1B!„Ò¬‘g� ô1Ƹ¡�B!„�f�< T �1Æ }ŒB!„4käY }Œ1nèc„B!DOiiéÝ»woܸQPPpõêÕÿºtˆnÑ9N�Éç~"äY }Œ1nèc„B!DAºuë–¬PM N×x+“g� ô1Ƹ¡�B!„PTTäö»aõ'Å©å«iò,P�>Æ7ô1B!„r÷î]Ù“< .@¾¦z#ÏècŒqÓ8³Øì¹Ùyù»­®JSzf^~N^~âÁ‘øè¥+ú!„BÈ?CQQ‘dG¤’’’r(`•R3÷òÄwÉäY }Œ1nácÖÔ,§#+#-Ó©ó±š*+},'Õ,î�…GÆ'ÇD†*½ÑÇ!„BþJKKõ�)¢|ïÞ=¹QØÕtÏ4¢ç'{—Lž*xÈÇvîÞÝÀÀ~=ë ™z,óÔ¦1>†£![{žÞÇj®LO7›\>—Ò<žW¼råŠ\Õ@ôÑnݺuýúunº¨Ö®:Ø{çÎ�'û{¤çþýû8cyy¹¼£‰¹}û¶\E!„£¢_ÀS—È-ªƒM§d¸ù|õ@ž*xÈÇàZ!¡¡j½>_|¹ÍÔz}&Ž=¦ÆhmLÚºm{mIH<(š­[ÿÙ°áÃEÐ-j´š•+W©gg<œFøØÃTW¯º*áca1Iñ1‘Íâý±S§NµnÝ:++KÞQQqþüùðÚ±ÛíZËaÆåççË wïÞ½|ùrÖ»@õº^1}úô°°°   àà`ñ7›~}èPê'//¯C‡5>�}£:â,›6mÚ»w¯¾Ù‘ÇQ\\¬oNž<ÙµkWø¤TO!„RZZª×¡:îŒéA3ýQîå þIZž*xÈÇzøõT+Õ<¶ÙË/¿Ü·_¿É“§è3`ÀÀgžyFk³}ÇÎgj'8x£h6uê´×_ïðÑG“Þ{¯×otDÍóÏ??xðÔ´oß~ܸñêÙdz>�x0*¬¬çqáŸ%K–têÔéøñãÒ^§ÓÙ¹s稚˜2eÊœ9s´–ÂǬV+þƒoíB_HKKÓõúˆyóæ…„„ܾ}{Ö¬YëÖ­C ¯ÕãÀY⬬,§Šùóç�=ZÛš³IÇ>|•°DÉÇFºèÓ§.X”A—.]¼¼¼Dùï¿ÿ®p݈;VÅÑ£G±wñâÅZÍŸþ©ï“B!ÆA¿ŒGAA�¼»všî]²z:¡y¨Ðü| Ê4wî<}>6ì��Õ3ð±ž=ýQødñbÍÇ6mÞŒB�=ècFˆ'},$"!!>&Ôðë+þðÃݺuƒ\¡üÍ7ß@?:¤oëÚµ«³&à!ÂÇŽ9•±ӦMKNN.**Ú³gÏÒ¥Kqaâþ˜¸9{Y ŸéÛ·/ &LèׯßW_}U^^^¦###ÃÛÛ[_Äs‰%%%ð«Q£FͨÎäÉ“QÿóÏ?‹�  O»|ù2.~ãÆ�—]è�ø,ðRmsÅŠø,Ú&€q¡óáÇ�UèØ±£EB!„�7nh"Tã35µÑtë1â’ä“=y¨Ðü| ²P?¿žš�¥˜Ìqñ u'9ÅduùسÏ>‡_xá…víÚ%%%?ï5¨§�!ô1Kd\rlTØûØíÛ··lÙÒ¶m[”VyîÜ9???ˆŠ¸Táò±:,Y²dܸq³%UÀ=àQ!!!hsöìÙÄÄDttøða(M×*ÐRhÛ¥K—Ò pèYÛ<þ¼v1‚¬¬¬Î�;×øb˜ð±Ó§OKõøhš�AÀJªsàÀýí2 겞>Vã}0(}ŒB1,úÛ\˜È»k�uåNt›N ÏšŸ��=fÕªÕúŒ?^ó±O—,‘PTY¸ðc´ŒŽ‰Ý³ç dÇÎ]˜˜>|ë¶íØ‹©dкõQQÑêÙ§±>f2[3œ{ªÉô¸JsF\bBDˆq¿ –åãã¯Ø´i“t×+::õ^^^‡£Âõ^ü …o¿ýr%|ðàAŸ>}ô"×ÂQ‹-Bí÷îÝ«=7¸fÍýc�8ݬY³äZð1ô×�ˆ#²³³µ>ñ1ëãc6lØ£àííM#„B ‹~eŽÿ©·6ÐXçPî—$Ÿìqȳ@…fæc½ûôéÑ£‡� }ˆ‰‰÷Ѳþ³Ï¡X+V¬ÔWÆ'$.[¶\Þ~ûm´ÁO”»ví†r»víP^üé§ê0žL#|,ÕžSù­bZ²Ò­µTV¶·Øób+Wò0¬�=z4"""!!á0"8ÆÌ™3Åfxxxdddff&Zâçðáámp-´�Æ �x pÞ¼y(‹¡£Âv¾úê+øØªU«Bª@çš�U.rS�¤¤¤~ýúé¯M>öÎ;ïìß¿¿mÛ¶ü±~Hác¸°MÕ jUåcøå\»v :‡Pøë¯¿ÄòƒOföïß???ÿÈ‘#k\L™2¥M›6¢ zõê…–¢üõ×_£ýÅ‹Ñù®]»äµM\hIB!ÄhÐÇò±è˜Xñ~ׇŽêÛ¯_eû=ÄÒˆkƒÖ}¹w¯ÖrûŽ�þþï%¸Ü ~…͘Ø8&ìÚµ{áÂ�gÍžýüóÏc27oÞ|lNš4�;ýûß ,ÄæŽ�»Ôk`<™FøXƒ£É˜1}LBÜóÁyGEErr2„êøñ㇆8mÛ¶ Øþ;?ìâÁƒø#5fÌô ƒ¡ÁÇÆ�§½!6dÈÍÇà�0TÎ�;W,ZˆžÑU«ÍÂÇ|||P¸|ù2l°}ûöB+ê÷¼b…kY$¸ÜÙ³gm6®5ÅÅÅèçÌ™3({{{;vìܹsI.–,Yâëë+Ê`äȑӦMeÑþÇDççÏŸ?Qêó–„B1|^Q` Û°!ø¥—^ŠŒŒ’|,""òÅ_\µjõ£~zô€�¡ ù˜ÅjÃÑËÛԛ̖O—,}ã�ŽÏ=÷ܲeËÑ•[·mŸ>cÚ¿óÎ;¼(.>A½Æ“¡�I@0„iˆüöïß/6¡IZ›ˆˆ(ŠX)> 11§Ó Õ8û·ß~Û§OŸAƒ¡¾°°ƒòïååuÖÅ¥K—t§­€mÚ´I”5YÒ7УùX…k™Zt«9�ð1è¢v;K€ ÖûØ7ß|ƒË+++Ãe¼ùæ›8#ì xÿþ}˜$ ?ýô“h víڅõMõyE|Xgxxx—.]´eݺuÃÙõ� !„b¸ž‡À=>ÖÀÀ/¾|tÿªÆ„„†>öûÇüüzýà½��;λ{÷�im fÏ<ó¯]»*¿ZZó1Wÿa/¼ðD å‘#?D›çŸ¾}ûö­Z½"ÖW|ùå—_mÓ5¨Ç^ÌeÕ `<ú˜Äwß}·ÍÅÚµk!0p ±©_ßbýúõ&L¨|±L•_~}Àf³ s­w�N´e¶|ùòÕ«W£Ÿ;vÀýrrr ™3fÌÀ®¢¢"´ÔtñÁƒ8—þã«>#�>}:|LU¯�;wª•„B1\ï^àÛ¹{7\«‡_Ï:‚h¦«ÏîÝ{\ÿ®ý¡æcƒ>bDRR²h°uÛvH×GM›z³ºtl×®�ÉlA{´éîãƒÊ… ?Ö|ìóÏ7ˆnÇŒk¶XÕ `<úXmÔö¼byy¹¿¿?,«Â%KmÚ´¹víZ…ëû£Û·o¯5»yófqq±ð1”ÑÛ?üСC‡U«VùùùýôÓO¨Ñÿ¹ ž9sfttô‚ 233ÍfóСCËÊÊ’’’6lØ 5<ÖÇê~^Q,4‚‹�õEEEÁ/^ìíí�——‡½øÈØ«}¡3Ô ŸW©ª�AÆpåð1|ºjëè—•Á éc„Bˆaá÷A ÜãcjúõP÷Ó‰R&MšÜ­ÛD^mÓæå—[¡ðÒK/½öÚkZ=kÕªÕ04‹Õ¾yË–¥Ë–ÃÇĽ2•~~=##£¬Uß=cæÌ>￯ùØÐ>@ 6¹Þ½BÓ€�èo(………AKBBBô•0«£G�» !c0«ØØXq¸äcác6«ÕÚ«W/±þÞ½{ ù¹{÷îÅ‹—.]êëë‹s 2j»~ý:þÌ¡s\dJ&uûXëÓ§�n}�JpFÍÇðgÎétjï§áw�BƒãÇ�9rä‹/¾«‰ .¸uëÖ'OžÔŸBò1¸Ÿ¸ŸkUô1B!ÄÈܺuKs¡«W¯Öñ» ô«€¸\Œ|¾z Ïþ0p�þ¶ØÝ£†udÆàùóÔqwKk{öÙçºûø˜ÌµCøXëW_0``×®ÝÞêÔÉêò14FM»víÄ2!Ì?ú˜\kÃãÀŸ‰øøøÝ»w_¹rΓ––¦^›�9ޱcÇ.Y²ä‡~Ðê¿ÿþû™3g¦¤¤Ü¾};""Ž'Í×sæÌ™>.Ô§¨ëc¸ÈcÕ�€iËuH@Dÿý÷ÜÜÜ#FL�:Uعsçz÷î-ÉX…âc7nD!**jÙ²eת³eË– Êý=B!„‡ÒÒR½_¡\Ç]2ìj:CÏOps¬Â˜>æ±@ÃÄê5{ÅCkIJJæ3І }ì )ÊÊÊô•ØTÿ= -Ë]Hõ‚Úê5j;¶Ìõ…Îrm¸ éÚKmíkF!„Bšn½ÄzÒ Õ%äY }Œ1nèc„B!¤Âu—¬éžE¬œô‰ïŒ äY }Œ1nèc„B!DPZZª_ÞÃàt�ñAž*ÐÇã†>F!„Bô@�îÝ»wãÆ�‚‚·ß1C‡è�ã�71�< T �1Æ }ŒB!„4käY }Œ1nèc„B!¤Y#ÏècŒqÓ8³Øì¹Ùyù»í1•æt»Ã™p0%!!!*<”>F!„BÜ…< T �1ÆM#|Ìššåtde¤e:uêUc¥%Íq(Ëžr 442>>1>œ>F!„BÜ„< T �1ÆMc| G›RL{žÞÇjªL³ç䦙ÅóŠ‘Ñ‰£Béc„B!Ä=ȳ@úcÜ4ÂǦºzÕXi±e:+ï�…„†DÄÇ'Ćòþ!͇²²²¢¢¢’’ä}„Bˆ�g� ô1Ƹñˆ�U¾?–‘“Ÿx0%11‘ï�Ò¼øîäÏ�±¿ÿþVF%#„b@äY }Œ1n<ác¦T{Ž3#Õr 4$<&611’Ï+ÒöÕkäB*!„##ÏècŒqã ³d:r²¬×»�ˆKŽ� Uû‘‡E£‘G*!¤�h>æ7l•ŒBˆa‘g� ô1Ƹi¬�™ÌÖ §Ãžj2Õ^iJËÈqf¤i÷ÇF…ñþ!Íá]�1Ÿ!3�ÃG¾‡’]»v�JF!ÄPȳ@úcÜ4ÂÇRí9ù9y�’•n­¥Òd²fddªüþ±ÄÄèÈp¾?FH³@HL¬[ÿÉ"š’ݹs‡JF!Ä È³@úcÜ4ÂÇ×óŠ£î•‡E£‘G*!¤�ã&öÎû�]z�G d÷ïß¿rå •ŒBˆA�g� ô1Ƹ¡�BjCè–fb�üǼå÷!âüú;*!„ã ÏècŒqC#„Ô†p-h˜0±Ž=:úŽxÃgøëÞPÉ!„y¨@cŒú!¤6„hi& CÚþg0ÒæÝÙί¡d.\(,,¤’Bù‘g� ô1Ƹ¡�BjCX–¤aÈ+]ÞGþ¿N½ôJVRR"O!„xy¨@cŒú!¤6„�ÕhbÈKoú¿ØÑ/#Û %ûõ×_©d„Bþ)äY }Œ1nèc„�Ú>V£†½ðF�ÿ{Ýç¹×»ÿ«í„’ýüóÏ×®]£’Bñ<ò,P�>Æ7-ØÇþKiüñþON21h˜fbÿo›w‘ÿç•·-iY÷îÝËÏÏ?}úô¥K—äŽ!„�¦Dž*ÐÇã¦û˜ü/'„�"î�AÃý 1aboxõŸ4wÉŠõ[‘)ó—}û݉»wïž9s¦°°PîˆBiJäY }Œ1nèc„�Ú>&nˆ CÞñ–b˸q³°¼¼üþýû·nÝ‚€ÁÄJKKQ>rä}ŒBˆ‡‘g� ÿ˜�ùúúúøø¨õ £…>F© ácÚ ±ç^ïž‘í„wœ>}:¯&Μ9sçι#B!¤)‘g� žö±ƒIÉÑÑ1(´r�BhXXXx„Ú²î$%%¹w¯ÙbUwY¬6µ’iŽ¡�BjCø˜xC¬_À¤7 oÞ¼yäÈx~B½ÎŸ?éÒ¥?þøãjü.2B!žGž*xÔǶnÛÞ¹sç¹óæYu>´n]ûöí—.[®¶¯#Ÿ¾á™gž‰‹O�ê!c^^Þ#GŽLL<8wî¼Ñ£Ç¨ Z·^í�1`èc„�Úf%dìþýû°/˜ØñãÇá`×®]»sçNQQQIII™¹ B!¤é‘g� žó±-[·uìø&fuyv­\¹J=JŸ½ûö¯ ™4i2|lÉÒeZMhX¸h¶cç®7ÞèñëÖí?o¿ýv€‹W^i­•׬]«vÎ0�ó1‹Íž›�—ï°ÛSiI·;œ S£"Âèc„4 „_½áÕêâÅ‹âqD.jO!Ähȳ@ùXBâÁ7ß| J¦Õè} Ùµ{w»ví"£¢Õcµ|ôѤgŸ}f…¼ôÒKð±—_n%6Ÿyæ_óç/ÐZ&%%ïÚµÛËË{B`àþ!ûö@ËqãÇ£Œð�Ææ’Fø˜55ËéÈÊHËtêÔ«ÆJ[z¶33=5ä@hhD\\bbd(}Œ�f€ð±_~ý­   ##C¬�È›`„BŒ†< Tð��Í�;ïÃGék$C>ø`Ø”)SÕcµÀÇ:ýûߢ,=¯øj›6ÂÇBBÃV¯^#*ác8)šÁôÞx£#‚6akjçŒÓÃѦ“Åž§÷±*-™Žœ,ËÃçadɱ‘¡Joô1B ÔëÁƒp°¬¬¬ãÇ�_»v�2F!Āȳ@ù˜¯¯ïŽ;õ5>.ô5Û¶ïèÞ½»z¬øXëW_�:u2xð˜Õ„À@±ùâ‹/ [¾|Å /¼€žÃÂ#Þ}÷ÝQ£F£Ù‚ ×­ÿ ™7o>}¬¥>ö0Õ}¬¦JÅÇb"èc„4`_W¯^ÍËËËÏÏG��)B1&ò,PÁC>öúë¯Ç'$ªõúÄÆÅ·k×N­×{饗zõê�¼ûnW˜•Ÿ_O±ùÿ÷ÚóŠ¡aá ŒŽ‰}ã�Ž64ëîã#šyy{ÓÇšQ<ác¦ÔÊçÓlð±�ðظĄˆ>¯HH󠨨H,œˆ‚¼�B1ò,PÁX>Ö¾}{µ^K}žWIL<ˆŸ¯¼Òzöœ¹h†±zFk.ñ„�!»ÝáŒO<Ÿ˜Áõ<!„Bˆ»�g� ò1__ß­Û¶«õúlÜ´Éϯ§Z¯¥ž÷Ç�AƒO™2õÙgŸ[·þ³aÇ#mÛ¶ý÷¿ÿ�ÂÐ>H1™ÕÎÆC>æÊ�ÐèØ„øð®wO!„B܆< Tð��Í™3wäÈ‘j½>ÃGŒ˜¿à‘S©��½Òº5~"‚��3Vl"£G�٠͢¢cž{î¹9sçýë_ÏÆÅ'ÀÖ–-[Þ³§ÿ¸qãû÷ï?yòµgƘi¬�A¼3œ{ªÉô¸ÊKD\RlTåb÷ô1B!„â.äY ‚‡|,>!±cÇŽuÜ"[³fmçÎ�&©»´|¹wï† Á¢,žWŒ�‹×ööîÓ' …qãÇ¿ûî»S§N{÷Ý®+W®zñÅcbã„�­^½æ…^�P;g ˜FøXª='?'ïQ²Ò­µTV¶7¥fÇ'Ćòû  !„Bˆ[‘g� ò1«ëqÄ·ÞzKZeQdÓæÍ¯¿þúæ-[Ô]µn&î�Í�;™5{ö+¯´^üé§P/×'‹¿Ú¦Íô3Z¿úê¼yóaƒ¾¾¾ð1Ø­Û&Mš¬vÈ0�ð±G˜}ŒB!„¸y¨à9C‚ƒ7vêÔiìØq[·m‡#ÅÄÄÂÄúСC‡Í[¶ªíëΔ)S!W]\¼ýöÛ)&shXøû}ûîÞ½5Ø �Ø·ÿÌ ’¶nýgV×WE«]1Æ }ŒB!„4käY ‚G}ÌêZDqÞ¼ù=zø½îÂÇÇgîÜy�]zñ b±Ú´2ÄL¿É4—ÐÇ!„BH³Fž*xÚǦþ¡�B!„�f�< T �1Æ }ŒB!„è)--½{÷î�7 ®^½ú_·‚Ñ-:Ç)p"ùÜO„< T �1Æ }ŒB!„ H·nÝ’ª)Áéoeò,P�>Æ7ô1B!„ŠŠŠÜ~7¬>à¤8µ|5 Až*ÐÇã†>F!„BîÞ½+{’gÁÈ×ToäY }Œ1nèc„B!O9EEE’@�JJJÊ] €MTJÍÜËß%“g� ô1Ƹ¡�B!„<Í”––êSDùÞ½{r£*°«éžiDÏOö.™< T �1Æ }LåÎ�;eeermuþúë/4Ó6 ïß¿¯Ûÿý_´[·n]¿~…›.ªµ«ö¢ó'û{¤YÏNnܸQRR"׺xì¯B þáÆ§À¯Eª¼|ùòƒ¤JB!„üƒèðÀÔå±ÿO�M§d¸ù|õ@ž*ÐÇã†>¦¸wï^¹¶:S¦LIKKÓ6{õêåt:cbb233u­*† –ŸŸUƒ™ìÞ½{ùòå(¬wQ›Â�éÓ§‡……‹¿‰øÛôëã�ä‡xyy%&&ê+5Ξ=^^^^á2®nݺá:åF'Ož3fÌßÿ�?^ÖšÍ`��;w>wîœþØ 6ìܹS_ƒµjÕêüùó(oÙ²eAu<(šá×"6�ù_–B!¥¥¥zRÿ�µFÐL”{©ç¿&ë‘g� ô1Ƹ¡�I@*à yyyÖ„v³Hò1__߯¿þ¦ÑµkW½Øƒ·´oß¾µ }A߃žyóæ…„„ܾ}{Ö¬YëÖ­C�Ýnoõ84;|öÙg£F�*..Æ_LÉ+\·Î¼yóf($‡ãçmâ“âçš5kæÎ�‹O±dÉ’O>ùdIS§NÅQ¢·øøx”W®\‰Æ¹¹¹¢²n;vlttôÙ* Ÿ›6mÍРú'«ÆÏ?ÿ¬ï“B!�A¿ŒGAA�¼»všî]²z:¡y¨@cŒ›Æù˜ÅfÏÍÎËwØm�*-év‡3'/?;''Ýf©ª´£2á`rBBBTD˜‘}lëÖ­²è¸|ùò‘#GÂÃÃ{õêµpáÂÈÈÈBаììl N�œ¢¢"4ƒJuéÒeÚ´iÉÉɨٳgÏÒ¥Kqaâþ˜¸9vôèQé6ðòòêÛ·/ &LèׯßW_}k*Ó‘‘‘áíí­¯âf—ÝÂ÷ X(C#Ñ¡ÙlÖö ðgtèСØ%ÎV­ð×fee]¹r |¬M›6í«€ j>F!„�qãÆ M„´ÂaӭLjK’Oö8äY }Œ1nácÖÔ,§#+#-Ó©ó1[Z¶33Ýf2™Í©Gn6J®ÊC¨„†…„ÇÅ%&D„ÔÇ.^¼Ø±cGؼ ¶pâĉëׯ£½Á.¸ì%??fåçç7kÖ¬�;wJ#€vž={611±mÛ¶AAA‡ö÷÷ïÔ©S×*p–9sæàŒ—.]Æ¢ 7nÜ8mSÜPÒMêܹ³^ÀôàY·nÝô÷ÄŽ;†+9}ú´Ø¼sçε*à��F›Í†¿}h›ºá¢´´´Ìu;ëÔ©S§]@¨°‰nÅ&„³•ËÇ<otV‘žžþæ›oB&{öìÙ»wo`kø `×îÝ»q~!¹¹¹ð±ˆˆˆŸ«X³f�ð1±|SÝk�B!�A›«¶—Ék�)”[iÐm:�< T �1ÆMc| G›RL{Þ#3¥¦eØ-¤ÚsòÒ­¨LÏt‰™ëIÅð¨øƒQaFô12bĈùóç£3~üx~üñGXJQQÑü—ÐÞÑÒžW¼}û6ä »¾ýöÛ¿þúK<ì'î}ÁµP¿hÑ"”ác{÷îÍ©ú!|¬F¢££!{r­øzž8q"dIÚowšábÒ¤IØÄO±i6›…�=xð <<|È�!^^^èç6lX…îyž}ûÂÇ´ë~ º+®­ð Ô.’B!�A¿2GmÿÔ[#h¬s(w‚K’Oö8äY }Œ1nácSÍÇô1gd‰ûcÕ|,,2>)Ú�>_òöö.((€`øúúŠ÷ bccáUï•i+pÀÇ ÙÙÙb¥ ìš6mZBB‚¾C“É$ü᫯¾‚ ­Zµ*¤ è–æcê“””Ô¯_?}Wð±wÞygÿþýpÅ�?þøÊ•+Ú.œkàÀ�óæÍëÙ³'.’ƒþW¬XñÓO?Mž†O±†_Zrr²ö«ÐUƒúê_Øûá‡pÈ‘#Gô•Oð?.!„Bj„>&¨ËÇVF�¸çz÷í÷zî¼ÝyK1Ã0þ»nã?Ñ»¯- ?ñЯLÖ4Ç¡¬t—§ 3§Ç&&E‡‡ÖÇîܹ#Vt8~~~�ü¡:t¨Íf«p­4ùAÍ™3g8еk×Ö­[OŸ>z�™™ ùä“Oô>†–cÆŒ�K@ð >6nÜ8í^Ð�!C4;zô(|•sçÎ=ââøñãmÚ´©cµYø˜��O…kùx\}§>|8l…Ù³gCsrr¦N�ŠO„‚——| B(žWìܹóúõëqIÂíÛ·£×�àâ'®í÷ßÇï ÿ#â×ÛÊuK ÿë@ð®]»¦]?!„BŸWÔêcþ;nwÛv_�þ2Œ1Óuëÿznÿ»òQÆL§#3ÝüÐÍÄý1shXxˆ�ï� nÞ¼ «_@!à`ÿý7ÊN§³wïÞ.� êÓ§�¶BÌaïÞ½’�}ûí·huÁ�………ügÏž���‡œˆ5÷Àp´-îÝ»‡ó¢�¾�ÍÇ*\ËÔ¢[é3¨Àô*t>&!| Ÿ÷|8)>”(ãO¡ÞÇ¢¢¢ð)Z¹žØŒ��Õû” ׳fÍš#F °ÿþŽ;¡gøM¢»ƒ�………}öÙg¢CµvíÚÐÐPmiGœQÿ�aK–,ÁoUt.| ž¹xñâ… 6èŸî!„R7\ÏCP³�AÆÔù.Ã?þ;ïdgÙÍ•+yè}Ìèï��¢¢"ñ$¡X®púôé[¶l» *“'OÖZjï�Á[à�ÍÇ ·oß>pà€ÍfæZﮢ-ãѺukmU‡Ã¡u¨÷10wîÜäää ×ã.\Ðêz«‘S§NuêÔI,«÷1\³xt°¢ÊÇàWÚ[×ö¼bÝ>&ОW¼xñbLLL…îyEìº|ù²Ö¡�+__ß””ác#GŽÜ¾}»è ×€ßú©ÐùÊ×®]ëܹ³¶ž>!„B�^«tcªå¯w¿"êT·mEêL—aŒŸnÛ8‘b2W¹–n}Å㮯X\\ :tèÍ›7±™™™‰Ù¿(W¸|iãÆ�ZcÍÇ>ûì3á!š�%&&¢%D‡ÂÇP¯BuèÐaÕªU~~~?ýôjôn‚ƒƒgΜ)Þé©¡¸ ¬ b£5Ôíc8ÝèÑ£wïÞ-6õ>*^!¸Ú^½zy{{Ÿ8qBÔÔÇÇpÔ;ï¼ãt:%ƒ\M›6-555..NÔÔñýcøSˆ~9§OŸFA¬&"À.üÚµ;�z«p­D2dÈ�'øšHB!„Ô¿ZPƒ� Üs]�æ2LsÉ�½…9yùHFªK·,v{¶3á`ŠÁ¿ î$ÞPúî»ïÚ¶m /*((8uêÔ÷ßïïïÙÀ®[·nAFŽi·Û###»té"îäÀÁ–,YI[¸p!”Lt(| }Z­VÈ�ð¢½{÷<8//ïîÝ»8véÒ¥¾¾¾°˜Æ¦M›pÒëׯãÏ´-,,lÍš5P2í µùŽr8ýúõûôÓOµEáÑüyó2]Lœ8Qh$˜ÔñãǵÃkó1>µð1QÆß²ŒŒ è¥hY^^¾lÙ2ìEŸPMQ)ù˜xhmΞ= óÄ/æ†O�š£G�~ïâÌ™3¸#:Ä/á—_~‹ì‹ßp…ë¸åË—k«\B!¤ñàÿÙ5ºzõjo° Ð@¿ ˆ{ÁÅÈç«ò,PáI|¬ûö{ê—ašKð°j\®çFÝ+‹F#�Ô†UGáÊ•+�%ooïE‹‰‡ªÏ�;׳gÏÀÀ@삃i_êg€MAÉà!╳ —�A�ÆŽ‹ú~ø¡ªû ¸œ$%%åöíÛÕ1 '}\¨OQ׿cñññhŸœœ¬ÿ†.Øcpp°X¤íß½ÄXkÍ*j÷1±YRRòóÏ?ã'ô®8pà@\¹Ø…ß6:‡;é_î’|ìäÉ“ø½}òÉ'ß|óͤI“Äÿ@¨Äïpúôéc]h÷Ö*\/ïáì¸$üæŸàßÉ!„ROðÿ³z¿B¹Ž»dØÕt2†žŸìÿôåY Â“øWSdšuzW3ò1w�¿)å.ä.j«×¨íX˜R�+ ¡±þÙ¿†‚>¥Ó‰E&õ5õNXãEV¸®_®ª ñÛ“k !„ânŠŠŠ$5*((¸{÷®˜°ÙtïŒ pò•Õy¨ð$>¦Np¦yE5®§ÐÇ!„BšM·^b=iÐêŽò,P�>Æ<�Q�‹>F!„bXŠŠŠšîYÄ:ÀIŸøÎ˜@ž*Ðǘ§1ªqÑÇ!„BŒLii©~y€Ó=Ù;czäY }Œy£}ŒB!Äø@�îÝ»wãÆ�‚‚·ß1C‡è�ã�71�< T �1OcTã¢�B!„·#ÏZ �ym/þ0¤D­g-ªqÑÇ!„BˆÛ‘g� ò±þûKŽ\,/©}iìB4S�yoW±éXiïÝ•åÏSK~ü£\Ê¡3eݶUî]e.)¯¨ðå£cßßS-jçÌÓÕ¸èc„B!Äíȳ@ù\+úxY÷]r½ìBƒo/–«»DúQ|¡ üò�ò�_O/Ù™UŠM뉲]ŽÒ«…•ß´'»T´Lû¾ìÞýŠØÃ¥"«ÍÕ¾e¨¤´BíœyÚ¢}ŒB!„¸y¨à!+)«¨CÆD|vU6Sëµ¼·«øÂµÊ[a(ÃÊl'ÊîÞ¯(zPqë^ù¤È‡7Ö¼·߸S~åf9¼ë¯[åg®”‡8+_ÅÛ–Y ‹‹úº”>Æt¦�B!„� Ï<äc¸µRÍc› Þ[üQdIè¡Òÿ=¨@JªV=¹_R¹9t_qÌáRHZŸÝ•Vž_yÇÌWe·Ÿ&U ¬Œ>Æt¦�B!„� Ïš��ÍŠ- N+E&EVÞæºZX>&´d^éíÿU °ÆRùPâûŠÑà€³RÃècLQ�‹>F!„BÜŽ< Th6>f=QÅ‚M¥+…�•»Þ+u-¢àc¶“eâÖYyyEqie¡àïÊ·ËècŒ>Ù99é6K•nYlöÜ„ƒ)ñÑáô1B!„âFäY B³ñ1‘ßþ,>VÛý±�"KV™K‚¬•K,ŸWdÔ¤¤¤ÚsòÒ­•>fKµ™RLaÑéc„B!Ľȳ@ù˜XïÞ§v%óyÜz÷"š�ýq£²epZiá½ÊÂô˜‡÷ÇD³¬Óeÿ½Y~ívù7çÊzï¦�1rRÌYï�= }ŒB!„¸y¨à!ë¿¿ä[×÷A•T|èZ›?‹t_ †]ßÖù}ÐÈÔè’¿ï•ÿx¹<éh5;t¦¬¸´ò=±®®ïƒž[RZV±1½tJTÉýâ ÇéÊwËŽ�/Ëú¡ ÇÒÇ$Íq(+ݦ7.ú!„Bq;ò,PÁC>¦åÓÔÒ?n• -¹òwùbÛÃop®O–$—W¤ž,;üKÙƒ’J¿Šüªr)Ũ¯KÍÇËœgʲN—E.�[él§.•½½µò¨m™¥ûó*Åÿù�òo-ûíOúSGfº¹ºqÑÇ!„BˆÛ‘g� žö1$â»ÊÛYáß•©»êÈKIú÷™]b9^¿úñrùO”ÿp©üä…²£¿•íÌ*…’aÓ_÷`d÷ÅØ%¾0zFLIʱH ÓRcÖ=©(^µžGHH¨|¬¬Ìµ$(!„Bi¹`Ê'Ïþ{{kñž¯KÅý«¦HÓõÌ´˜¤˜ÌÕŒËdŽŠ7ÅGGÀÇÂÂÂ=àcÅÅ•¯5B!„� ¦|ò,Páð1†ùÇ““—�d¤š\ -V–mi‰SsR¼|ì¼EF!„Ò¢©ÏͱÿÑǘ§3ªq%%§„‡G (¨{åaáŠŠŠ¨d„B!-Ló0Ù“ç5AcžÆ¨ÆUwäaá>Š‹‹ie„B!-Líêó˜¢}Œy£WÝ‘‡!„B!îàI|¬çÎÛê—ašKzWÝ‘‡!„B!îàI|¬ûö{ê—ašKð°j\uG„B!„¸ƒ'ñ±�{®«s\†i.°ûšj\uG„B!„¸ƒ'ñ±•Q§ºm»¯NsÆøéºõKÃO¨ÆUwäaA!„Bˆ;xCüwð2¦Y¦çö¿UÝzläaA!„Bˆ;xBJÖm[‘:ßec¦ëÖ¢'“±ú!„BižÜÇ�Q§î¹Þ}û=®¸È5=wÜÆ¢v_[ÖðǵÈÂB!„wÐ(c˜&�-5-7ÏYc°Kµ¦¦‹<,!„Bqô1Ƹ¡�B!„�– }Œ1nèc„B!¤eCcŒ›Æù˜ÅfÏÍÎËwØm�*-év‡3'/?;''Ýf©«²zäaA!„Bˆ; �1Æ ¤«Ž¨Ö¤‹55ËéÈÊHËtê|Ì––íÌL·™LfsªÃ‘›�R-•räaA!„Bˆ; �1Í5ª5é‚ý6SŠÉbÏ{äc¦Ô´ »åaƒT{N^ºµ–J¹7ú!„BiècLs�jMjªù˜>æŒ,õVX�•®ÈÂB!„w@cškTkRS³�™¬iŽCYéÕëk¬¬Š<,!„Bqô1¦¹Fµ&55ù˜Õ–étd¦›_ù(ò° „B!ÄÐǘæÕšÔ(>f±eæegÙÍÕJ¬±²ZäaA!„Bˆ; �1Í5ª5É1™­N‡=ÕôP´Ì•zæÈ°˜ÌØUÕ¬ÆJ9ò° „B!ÄÐǘæÕštIµçäçä=JVº5%%-#·ZeFª©–J9ò° „B!ÄÐǘæÕšš.ò° „B!ÄxÚÇöíÛØ­ÛÚº@›¨T[2LÝQ­©é" B!„BÜ�ç|Ìl±N ìÔ©Ó¬Y³¿Ü»/))A›¨Ä.4P�b˜Ú¢ZSÓE„B!„¸ù\«OŸ÷‡S÷¢»Ð >J¦¶©±O¦ÅGµ¦¦‹<,!„Bqò± ��0.}M�~ˆ¾ Õcõ‰‰�{íµ×¶nÛ®ÕìÝ·ÿÿþïÿ6nÚ¤Õ ÞX[öQ»ešcTkjºÈÂB!„wà Û·o§N�¤»Xª�¡Á[o½õØwÉF�ýƵ»dzûí·-V›Ö`ÜøñÏ>ûœ–gžyæ_ÿzVÛ3f¬Ú'Ó£ZSÓE„B!„¸OøX``à¬Y³Õz5hVÇ-²]»vÏŸ¿`Ò¤ÉP¬�>š„ò”)SQúÁ(oT�ã¡ÁÚ  uÓÜ£ZSÓE„B!„¸OøX·nÿùrï>µ^ š¡±Z/òÉâÅ�þýo‘7ÞèÑjß¾½V3ñ£�ÔCèc-8ª55]äaA!„Bˆ;ð„�µmÛV]rÃÇÇç½÷Þ“*&%·k×NíAÍþ!­ï‰éCkÁQ­©é" B!„BÜÁ?æc­\H•uøXrrJHh˜–Ï?ßÑZ²t™¾g™;wÞ3�cÆÌ™jÿL³‹jMMyXB!„â<ác5>¯X£�Õñ¼bpðFÙ«V­Z½uÛv-6£~ÚôéúʈˆHµ¦ÙEµ¦¦‹<,!„Bqžð±×ó¨ÑÇêXÏÃd¶DÇÄjéׯDëõ×;@®´Ê“Y:ŠÏ+¶à¨ÖÔt‘‡!„B!îàüùóBÆP�÷¹pƒ�íÛ·ÿ­·Þ’YT}¬žëÝ#Ÿ¾á¹çž?aB›6mFè»—BkÁQ­©é" B!„BÜÁÅ‹…�¡ ïsá³Öô}Ðï½÷ž���¾fذáµÝÓb¶X§MŸþüóÏ0å-[·½øâ‹}Þ¿¶Géc-8ª5U�ÅfÏÍÎËwØm�*-év‡3'/?;''ÝfqU¦ÚsòQó09YV¹ŸÊÈÂB!„wðçŸ CAÞçÂ=>wêÓç}(™º°‡ÕeM�14оåYMtLì´iÓÛµk÷ /Ìš=G»'¶k×înÝþƒÊ¡|°uÛv­ý¦Í›×­[¹r|ìóÏ7¨2Í=ª5ébMÍr:²2Ò2�:³¥e;3Óm&“Ùœêpäf£ôè“--Ë™•®“7]äaA!„Bˆ;¸{÷îe(Èû\¸ÇǬ.% |ë­·fÍšýåÞ}“’°‰JìªCÆ�-[·½öÚk##£Ô½Ÿ}¾V¦_þ>pâDHÚË/·ò÷¯F dš{TkÒûmp,‹=ï‘�™RÓ2ì–‡ Rí9yéÖGíS³ò²ì©&¹Ÿ‡‘‡!„B!Ám>&²oß~¨Ü©� °YŸwÆ�:ÞcžÂ¨Ö¤¦š�écÎÈÒÝ3¥åää93ív‹þŽ™.ò° „B!Ä#¸ÙÇÆ]Q­IMÍ>f²¦9U{4Ñ ÕOKËÌËvd˜•NRš��ݹsç¿ÿý¯\K!„Bš-ô1Æ Q­IMM>fµe:™é5x—)=#7'Õ¬ÔÿÓ>VXXƒŸ(ûí·K¶oß.8>qâÄ+¯¼rýúuíØ›ÕÑê !„BH³€>Æ4ª5©Q|ÌbËÌËβ›µçM©ivÍÍÒ2rsÓŒçc7nܘ>}úG}tíÚµK—.åååa322277wìØ±/¿ürvv¶hæãã“Rôìeo¾ùfõŽ !„BˆÑ¡�1�jMrLfk†ÓaO5=´/s¥ž92,&ø—¹ªMª=Ç™‘j­\t1-Û‘“Uã+dò°ð8………Ó¦M[²d ʰ²ˆˆ??¿ÿüç?ýúõ»pá‚hsçÎ�!C†L˜0Þõá‡.Z´(==vèÐ!XœÅb¡�B!„4;ècŒA£Z“.Õ¿U,/?+ÝêºýU­2#µ²±É–™™}¨òKɲ³Ó¬Užf0/^„by»èر£¸ëõÎ;ï`{¡�=zô¸yó&¬,55‡Üºu NŸ>�2¬Œ>F!„Òì �1�jMMyXx–sçÎ}ãâÂ… ‹e̘1W®\ÉÈÈèÝ»7 ÇŽƒtýõ×_h`·ÛÑž>F!„Òb �1�jMMyXx–ÈÈH(VÇŽcccác¯¼ò ̪}ûöâ•°:‹ˆˆ·Î^}õÕN�:¡0bÄú!„BH³†>Æ4ª55]äañO0gÎácµÝ»xñâ‰'¾ûî;[BBÊb}ŒB!¤ùBc Õšš.ò°ø'Ð|ìµ×^óóó{÷Ýw_}õU¼½½…�‰f¿üò 6—/_~÷î]>¯H!„ÒÜ¡�1�jMMyXüh>6qâDl~óÍ7ýû÷Gá·ß~ÓûØÞ½{Ç�?lذ�7ÒÇ!„Bš5ô1Æ Q­©é" �sþüù¾}û.]º4>>^ïc;vìèÔ©Óˆ#Ä÷AŸ;w®}ûö‡þý÷ßß}÷]¸|lݺuûöíñô1B!„�f}Œ1hTkjºÈóüðÃݺu ß¼ys—.]Ö¯_oµZív»Åb‰ŽŽ†’Á»Ìfó¯¿þ g[±bŽ{÷þçº!–‘‘[¼xñÆ�çÌ™C#„BivÐǃFµ¦¦‹<,<˱cÇBCCEùüùóp°ààà¥K—~úé§Ë–-[½zõgŸ}–——%Ãæ­[·´oß¾�]â £ûí·ØØXm!„BiÐǃFµ¦¦‹<,ŒŠ¸3F!„BZ ô1Æ Q­©é" B!„B<}Œ1hTkjºÈÂB!„�@c Õšš.ò° „B!Ä#ÐǃFµ¦¦‹<,!„Bñô1Æ Q­©z,6{nv^¾Ãn{TiI·;œ9yùÙ99é6Kµö6‡#Ça5©ýTF„B!„xúcШ֤‹55ËéÈÊHËtê|Ì––íÌL·™LfsªÃ‘›mÓìË”šž}(3µº¡é" B!„B<}Œ1hTkÒûmÐ,‹=ï‘�™RÓ2ì–‡ Rí9yéÖ‡íÍé¹Ù»YîäQäaA!„BˆG �1�jMjªù˜>æŒ,íþ˜Ùž™“—f©Ô7 ·tE„B!„xúcШ֤¦f3YÓ‡²ÒE½Å–åtd¸z³d9²³ªn U‹<,!„Bñô1Æ Q­IMM>fµe:™éŸN´èn”ÑÇ!„BˆÁ �1�jMj³Ø2ó²³ìfm%K†#/?'÷Pveòsèc„B!ÄHÐǃFµ&9&³5Ãé°§šÚ—¹RÏ“»ªš™MfËÃØþ�ûcÅÅÅeee„B!¤E€©&xòœ¯ÐǃFµ&]Rí9ù9y�’•nMIIËÈ­V™‘Zý(Ï>¯XTTD#„Bi‘`š‡Éž<ÿ{"ècŒA£ZSÓEî€2F!„Ò‚ÁdOžÿ=ô1Æ Q­©é"‹FS\\,YB!„Ò²p˃‹ô1Æ Q­©é"‹FÛc„B!-·Ü"£�1�jMMyX4y°B!„�–ˆ< l8ô1Æ Q­©é"‹F#�TB!„Ò‘g� ‡>Æ4ª55]äaÑhä‘J!„BZ"ò,°áÐǃFµ¦¦‹<,�úh’—·7jRLfµ[æ)�jMºXS³œŽ¬Œ´L§ÎÇliÙÎÌt›Éd6§:¹Ù(Uú˜#/ÝjVz¨yX4y¤B!„�–ˆ< l8nð±Y³g‹g}òÉòå+|}}×­»„„úAï>}V¯YƒM³Å Û°!&gëóþûø9!0pmPPHh˜ »•Ι§6ª5é‚ý6SŠÉbÏ{äc¦Ô´ {Õí¯T{4¬²ešÃé*ÔyX4y¤B!„�zðçíòø“esRJ††•xï,î¼Å�A‡è�ã8‘|î'Bž67øXRRr\|°áÃác{ö|8q"¬LŸ­Û¶£ÙÇ‹AÀ m½z÷ž;w •¡aá ,8p�—··w÷î3fÎTûgžÎ¨Ö¤¦š�écÎÈÒî�eççäÊÎu:ÙiµÜ(“‡E£‘G*!„B©“‚;åk2KßÞ*KT'Z›Yzínc­Lž67ø˜ÈÈ‘#ác1±q~~~þþï�=F¤G�³f϶V¾<¶oýgŸÃ»àc½ûô‘ò~ß¾_|ñ%¼Ní™y:£Z“šš}ÌdMsÊJXo2YLfÄjMÏÉÎqX+%MŽ<,�>>P²={¾X„¼kâGu÷ñ�’­ÿìsíÅ0ÔO üdñâY³çÀÇfÏ™‹ò˜1cécŒÕštIµçè¾U,/?+Ýš’’–‘[­2#ÕÕØbÏÈ>Tù¥dÙÙi¿”LŽ<,�0mÚt}Ľ5µ[æiŽjMMyX4y¤>¸ÐŸ.:ÔªU«ÿþ÷¿bÓÇÇÇf³‰2º=yòdHu ™r_ èMô)ï¨N^^^‡îÞ½+ï¨$jøðá±±±ò×§8];—.]ÒZÂ3qI¿ÿþ»Ø ýøã�µ½®®<ˆŸ(ãS¯Pسg�йŸþ¹uëÖzkmäÿ„Bñ Þ.oº×Æ~_¯ç¿/ÓÁÅ<Á"øÒÄã p��i±Xm5VjõÉ)•_3VG†Q­©é"‹F#�ÔÇqäÈ‘V�#++ f2jÔ¨ñãÇÃĦM›6pàÀ &,ѱ|ùò7n Ã¤¤¤�UápüÔjÂÂÂÄy¡49UÌŸ?ôèÑÚ&Ðî;}ÿý÷ :æÌ™ãå奯9þ|E•øùúúúûûûùù¡ìíííï¢S§NkÖ¬½Ý¾}Ûjµ2äï¿ÿú7xðàˆˆˆkUàªàW³gÏž:u* æ›o¾Áf||üáÇñ‘ÑóW_}%z‹ŽŽÆ¹Òªøé§Ÿô¿4œW4#„BˆÑˆ?ùÈ…Ü›€È’zzšéß%KhøÂò,°á¸ÙÇÆ]Q­©é"‹F#�ÔzðàÁƒòòòŸþ¡=ÈçããÑ7Û´iÓž={Pˆ��ýä“O °�-[¶Àp imÚ´÷”l6 P¹yófô‰Ÿ(úé§“'OŽ‹‹½•””`oFuÐõ¸Ñ öêÕk]íœ:uª¢ÊÇ„£Pþõ×_µ„�á£ét©U``à¹sçô5@Ø>ȬY³V¬X!zÃ5ã“Bð`¡þù§è¶´´tذa“&M‚w�3F �Dð[XœÝn§�B!†eNJµE5ܘ¸ ЪØ�´—$ï~ò,°áÐǃFµ¦¦‹<,�Æ4ª55]äaÑhä‘ú8¾ÿþ{ÅôéÓÛ¶mûÍ7ßlsíiݺ5 âMªŸ~ú©ÂåcÁÁÁ×®]ƒ ƒeA{`_ýû÷oUÁ‹²\ÅÅÅAQðsÙ²eƒ»Ä*ŽÂÇ-Z´©:â•3ÍÇp®åË—ççç÷êÕ«´´499yèС¨/((håºÙ%š‰U:êó¼â¾}ûL&ÓºuëqÔüùóÅ!8{ ãããñ yóÍ7“’’àcø=À¬`n­\¯„Áî„�áC ߃gvîÜÙ§rA×Qô1B!¤Y@ÐǃFµ¦¦‹<,�|^Q@c Õšš.ò°h4òH­<w¥Är®»RØŒŽŽÖ7ÛT}=Q™��€–âaB tÒ¥K—V®¥µž5„�Íš5kMu„ j>†š/¾ø…¥K—¢CX_‡¾ýöÛ±cǦ¤¤h½;v¬Uíè}L{^Qø€pÂE¡dmÚ´ÑOó±¶mÛúûûwëÖ {Qðññiåò1ÑìÒ¥K¢tÎç !„�æ×óÐǃFµ¦¦‹<,�†JSubbbZé|læÌ™bÉ›Í%CáÌ™3yyyp<ý‡…8ÁиOâÔbóË/¿¬ÛÇŠŠŠpý'NœèÕ«—Ö¡æcS¦LÁ&ö4¨¢êÁHÍÇÂÂÂ&NœˆOºmÛ6ü®èc„BH³À(ëÝGp½{†©)ª55]äaÑhä‘ú8~ÿýw³Ù W�EDD”——¯_¿n§Z´hѾ}ûD³ÐÐÐV®;]sçÎçâüùó�“.]ºL˜0ÁßßÿæÍ›¢å�?þ8zôè#F\¿~][Ï£°°p´ ñ*ZEýžWÄ5¼ùæ›bE{ñF!„~´€>Æ4ª55]äaÑhä‘Z®]»öÇ 2$;;{óæÍ¾¾¾-ÔC3¼mÛ68Ò­[·4ãÏ+B™zöì‰ö°¦�?þ¸_¿~çÎ�ƒÚµnÝj$n¬é×»ðàÔ{…J ëӧϰêàŒš�Á‚Ú·oïp8´wÏ©•ëÛÃĦÕj…zµmÛV[_ø.õ�ÆÏ\TTùاŸ~ºÁäS|öÜÜÜüü|t(¾«zyyá3îØ±ã�wÞÙ¸qcFFÚØív\ù—_~‰f�7üÆàlk×®�8=zmÐÿ²eËð[°`}ŒB12k2KU•rKºn/þîòcäêè¥r4ÓY›Y*·¨ò,°áÐǃFµ¦¦‹<,�Æ4ª5é‚ý6SŠÉbÏ{äc¦Ô´ »åaƒT{N^ºõaã4GžÝfV:yyX4y¤B!„�:¹v·|mf©Çn”áDk³JŸì�1=ò,°áÐǃFµ&5Õ|LsFVÕý1Sjvv®Ó‘íÌÎήþã£ÈâÑÈ#•B!„Ôƒ?o—'œ,›“RòAX‰ÛCt‹ÎqŠ'XÚ¾FäY`á�1�jMjjö1“5Íq¨êm1kåCŒi•e“-++''Õ,wòÿ³w'PQ�{ÚèísúÜî^}×wû¬î>wåšhÌQTœ¢¢¨ bP£Aã,N'œ¢hÀYQpVÄ �ª¢ŠAQ“œ§Ä˜ƒ11ÑÄ$j¢"EÝ?lÝÿ¡6»6gSy~ëùX»Þz÷®êo­7ë}NUmSÑÇ Fø.P9ô1D§[“˜Êú˜)ÝR�kÉ4H�Ù9ù9O¿ÄhHÏ9eɨä#2¾,Tã+\ß*‡>†è4bk#ô1cºåd^N–A¾u‡1'×®�™©�™+ù!_ªñ• ®ˆï•CCt±5ñ¤LÙ¹Yæ´'íËPVÏr³�izêésVþ)K¦¹ü¦‹ø¾"8ß*‡>†è4bk² µ¬Óù'Ÿ%'Ó”šš‘}¢Â`¶¹|²1ëÉ?J†ûy€Sñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê9¹�õïßßM@ƒâL©:bkÒ.|Y¨ÆW*¸"¾ TÎÉ}ŒÚ—ƒƒ•æÐ¡Ãûöljã5˱cÉ;vîÇ‘:±5i¾,Tã+\ß*§¯>6v츾}ûÑAbÒ±ÃGŽ²Ð 4-%5mÍÚu9jTBbÒúõìc0š¤iá«W¿òÊ+O�×¼5gŽñ¥½ElMÚ…/ ÕøJWÄw�Ê9§�mÚ´ÙÃóâ·9š@ÓÄsí#÷1ú[_0Èߟž¢Ö¨Q£V­ZŽÝ±52ŠžjذáË/¿Léøøñéjö}ŒÎmÑ¢E/oïN�:Ññ¥½ElMÚ…/ ÕøJWÄw�Ê9§�Q×Ú¾£šoFFm£i⸔ÕkÖRóòò¢¢E!!‹öí�£ìÙ»�êÓܹóèøð‘£4³sçÎ4A>1j[4MHHL¢cªgR‹‰‰]¸0dôèÑÔÐè`ùòÔÇè!ÍY¿~úX�ˆØš´ _ªñ• ®ˆï•sNs{þ7ûôñ¡T;-4tåСè°¹»»Ó=”Æ FÕ'ù¡©¼�M›$?¬´�-^²¤K—.ÍÝÝ_|ñ%:ðõóC«s[“váËB5«ÕÊ+¸Úòñ] rzécRäï+Ê©´�yyy�5JŠÔ¯X“fz{{7jÔHú9úX�‹Øš´ _ªóõ ®…¶||¨œæ}LÑ4êcÝ»¿ºhñâ+B¥‘Jû !åy}ìÀ�øú娳ÑC_??é[Žècu%bkÒ.|Y8>"paNùpìwýô±­‘Q��c[´hAe©mÛv!‹Iã•ö±j¿¯HÇ&NtskJéšS§NëåíMMècu'bkÒ.|Y8ÃPÉ\móh³Ç÷5âœ>æááµ�F½þú³;*>EƒôÔö;«¸ŸÇüù z÷îÝ¥K—>}úØ�WÝÇŒ¦tz]±�íÚ½§aÆTÀ^yå• 6ÒhÕªÕòå+Lècu'bkÒ.|Y8Oqq1Z€Ë ­�S¾¦(sN³¿ß=u$ö¬4®è~÷rÄ>Ö®]û¡C‡Í~ë-_?¿&MÜÂW¯¡ {öî£ÞõÖœàúõ_LIM…¯^# ¦Œ!‹IßN”"ÿ~Œžb/-õ±={÷5jÔHþAÚ¦M›iþ¬Ù³å††è3bk²‹ÉœS�›“�a)°ëWéy–Ìô´4ƒÁœ›{"�ŽÊûX¾Ùð䬌ÜSsyO«¾,j…“ûX¿«:))©mÚ´õðð|',LY³võ¨&MÜ|||’Ž%‹§H±¿Ÿ‹ÔÇ–,]Ú¯_¹ª%&ëÑ£g«V­BBž44DŸ[“]èùt*[Ƭ“ÏúXš9#;Ëød‚9+ÿd¦©|ff¦!­|ÐhÉÍÏ-+iüjècðÏáä>öO‰ô/Œ‰¡–šf¨b¢çˆ­IL…>fCvŽôù˜ýä삼ìÊ/Ë—@­p…>†¸dÄÖ$¦ò>–Vö½ÄœÌŠãieŸ˜ù¤ðeP+ÐÇ�FlMb*ëc¦tKA®%ÓPqfš9//ÏÂåðeP+ÐÇ�FlMb„>fL·œÌËÉzòƒ1»qsΩœŒJîä!…/ €Z�>†è4bkâI3˜² r³ÌiOÚ—¡¬žåfÓ ôT…™å?'3ó’ö,|YÔ ô1D§[“]ÌYùþU±œLSjjFö‰ ƒÙæ'ó©§åY2„‹< _µ} ÑiÄÖ¤]ø²pžââb«Õj—@[;Úàñ=Ÿ ècˆN#¶&í—…3†è4èc s|¨ú¢Ó �€Îñ] rècˆNƒ>:Çw�Ê¡�!: úèß*‡>†è4èc s|¨ú¢ÓTÓÇL–“g?»vý«O?È3>4YÞ=÷É_Þ¸öÙ'ÿ8‘-�³Ï|xù‹k…7>ÿôòûyYòdûðe¡_©àŠø.P9ô1D§©ª�™rÎ|üŧ—þqæüµ+r3å¾¥ð£÷ò3Ò3³O]úìÚÇ'ÍfƒÑræòõËœ¤Á,üüÒ ³p5ô1¨¾ T} Ñiªìc¹'Nå›�朳v},ýÄ»çÞÏ1IN~øùçÿÈ1Lç>ÿô½,³4xîóÏÞË.?®¾,Tã+\ß*‡>†è4Uõ±'©ØÇìbÌþàòµËT½²N^¸vù'Ê>+¸tåÓs9é|²} j„ï•CCtšš÷±ôÜ3~ò�û¿çá»@åÐÇ�¦†}Ìd)¸xí³‹g2¥/.¦—Ýõãüé\szffÞÙ�¯^9ƒï+èUÑÝÒÄ‹ÖàÔÇq�{FwÚâÌÐé²tqz z!þÚ5Âw�Ê¡�!:M�úXÖ‰sŸ_ýèýì§_J4æ|xåê…\©›3 .}yét%‘ñe¡_©N5½Ðö[ ¨ÓnÝ+ ³”xmå%J£Ð …[JnßWÛÊø.P9'÷±Ä¤c“'OéÒ¥KË–-»ví:eÊÔ¤cÉâ4©6Uö1³Ñ”aJÏÈ={íÓ³ùééF“™êVîÙÏ®^>›“Qö”É”A½Ëh>}áÚµó§ó2¤ÏÇ®•ßäƒ_­nô1ïOm=¯Øº~dëxÞÖî[Ë3¶¦|@]TPhíÃ+S-„^ôT¡•¿%ø.P9gö±£ ‰^^^AAÓãrssÛ7iÒ$êfTÒÄÉUçøñqPΡÃGöîÛ/Ž#®”ªúXÙí¿ºþå³|ò~ŽÑtêüvƒ×o\8™AÍÍœ÷Á…+…eÿ(ÙÕOÏ�Ε~TVçú•1J÷˶Îmgm­ß·5?mk|ÂÖ0‡Ï¨[/Zkíc11ôÒôø{rß*çÌ>6rä¨yóæÓÁ[oÍ¡>¶tÙ2éøõÑ£ÅÉbˆŸ8i’߀ÍÝÝ©×Q‹?~‚œè˜Xy&MëÑ£'Œ¦˜˜XûìØ±S¼2RSUsvø²P�¯Tu¤2Öó[—�lΕ�üTls;ak”c{1Óöÿ¦óùuEA¡µ³Ð‘œ˜Ñ'\°Þ¸Sú{±�Bô�íçP%«ñ§d|¨œÓúí�;tè@é¸eË–GŽmݺ5Ó¦ÚÃÓöÖâ),ë×o¨_¿þ²·—ïÚ½‡®rüxÊ”)S¥4jÔHjwRä>vøÈÑ—^j`ŸV­Z‰WFêbÐÇdRëöo�m{Álû£íÿ9Οп[÷Jµûšb·¨âäKÖJFƒôM�'ÓÛ¨ÙoÉø.P9§õ±èèÿÁÒ±ÔÇÜÝÝ¥‡4#žÂ"õ1__¿²øùÑÈÈQ£ùûS6l(õ±­‘QsçÎëÝ»w›6mèÀþC3ÄÅ‚>öÌÛa_Î=äu‘“¿m¶Áoýg×Ú¯¿þúÛo¿ñÑyôèQaaáãÇ�ùàêÂ,%b�rJ¨k}x³š~Eì+Y¸¥&7Lã»@åœÖÇBB `0šLO¿¯8yò:6šÒF,Z´X<…Eêc¡¡+)+W®¢úK5ŒÒ¸qc©�-^²¤—·w£F�þþ÷¿ÓÁ‚ 9Êr wq‰ �I~·–õ1Û’Uü É�9¶�³mýfòqÇ¥UçÛo¿å§ÙlAAA±±±l°´´4¿:%%OþKwïÞ½ëåè%Z¶lùÑGI¿ûW×Tt·T»Ÿ�%_rèû‡Ç.YåSèÍÔà&ø|¨œÓúØë£G{zzöèÑcÉ’¥Ûwì¤>ðЪUïx{{Óøh~B&õ±>•‘?£$$&5hPöÕÄ̓üýë y-DÿA{†úØ¢•Twø¸­ìÃ1›ß,›Ï >î˜k×®-³3qâDZ¹‹/¶üôÓOi¦Édd§sçÎT¢ìG222¬V+�>f̘Y•7n=+ÿNAA]�&wéÒ…Öì˜r½{÷®ðÀE%^|Ö…œ›ÑW¶mªM³ÿ-Y’ò{ð] rNëcݺu�‰�ݲ52  k×n´Ó¢‘€€ÔšvïÙKÇâ),;wíêбcHÈ¢+B§OŸA¾·—¯ ]IéÙ«WÜ�xiÚüù ¤ÞÕ¬yó]»wKŸ‰¹»»Ï˜9Ÿ�¹RÐǼ.”ÝÚÞó¬Í¶ôÛÂP[ðr>ƒ šmë?ÓÖ{ú_Smÿ'Ùö«ûâ¢Á`ð÷÷ç£å’’’¨P}ôÑGÔ£¼½½OŸ>MÇçÎ�£c³ÙLÇ?üðƒÔÇèX:åèÑ£·oߦƒ[·nÑ•¿øâ ÖǨÅÑAXXØœ9sŠŠŠ¤WAøƒN­pS '&á‚‚Zuô³ZHo‰?]¾ TÎi}ÌÃÃóÈ‘£â¸©ü%kÓ¦�8βgï>jYã'Lèѳç¼yó›4iB[À#¤iNJJjÛ¶íÚ´iÛ£GÏ�ƒ­Y».0plÔ¶hªtÊèÑ£©¡‰WFêb¨�ÕZø²P�¯T…î•Øº]²ëc‹WÙæ¯°Í~Û´´Â¼×Þ² ˜eë;ÃÖ3è¯)OúØ$T˜âˆcÇŽí*G�kèСұDþY5%Z�ôwÏž=T«öíÛGLJ¦ãÈÈH:¾yó¦ÔÇöïߟ““sïÞ=:Ž‹‹»qãU¯I“&É}ŒFhBDDD�=èÀb±Ì˜1cöìÙt¼bÅŠ‘#GÒÁÕ«W+¾G¨U7n|á…è¯#k& N«>v㎃�•¡Éò‰#âêrëÔ©Óž={ÅqSù¿KæÈm¥>w >(h:5+êcTäFŽEéÞýUiΤɓ[·nýæ›ã©�Q7Ûw ~ý÷í�£>6þ‚ŽzýuñÊH]ŒØš´ _ªñ•ªP�ËewSôºhët¡¬�µû‡­ìñ™ËlS—Ø&,².°�šglóŸmó�ië3ý 6û>öá¬Ú˜1c‚ƒƒíkYµjÕ§G�Isýüü8Mã±±±t,u³ 6ÐñW_}%õ±„„„:PUëÛ·¯Éd2dýÇš:›ÜÇ>øàƒ°°00`€tVŽÞ‰··7äææV|�P«¨nÕ«W�þ:ò°fzFóå¬ü^Ì_« 4Y>±WŒ’3Ëñ] rNëcã'L˜6-H§„…‡ˆã,R<øµþý}/YÒ¸qcŸÀÀ±tLeOš0bDøê5òýî§L™*U5©�­_¿¡Q£FÉÉÇÅ‹#u.bkÒ.|Y¨ÆWª½®<ëc²MWÚ¦/µM^l{3Ä6f¾mÄÜò;y̲õ«ð˱÷±ŒŒ 6xùòeû>B·oߦñ¼¼¼sçνûî»t,–%_133“"""JKK¥^wúôiûï+Ò_jw‹…NY±bÅøñãoܸaÃ÷t£êÄœòùú˜Äi}lÏž½mÚ´Ù´y3?rähçÎ�·FF‰§ð+<ý|lìØqÔ¸š4iräh‚¯¯ß¬Ù³›6k¶?î@bÒ±ãÇSLOÿý±øøƒÔ¾V¯YkzÚÇ Fµ8éÞŒH]�Øš´ _ªñ•ª„Üǘ–gl¶‰‹lcÚ^ŸgüäN©�ýå0¯õ±ØØØ�*JII±ïc;vì µ•ßé>´"ùŒr+))éÞ½ûêÕ«må· ¡Á3gÎÈ}ìþýû“'O;vìÇ¥©ÝÅÅÅM˜0ÁÇÇ'**J׆ï+JœÖÇ(kÖ®kݺõ”)SwïÞ“šf &ööò;vœ¿`�8Y̪UïPëׯ›6m»wµaÆ>>}›4q£öÕÜÝ}ذá#¤™RÛ»oÿ¸qoîܵkÆ�TØ,X(=¾z�xq¤ÎElMÚ…/ ÕøJUâ¹}ì´­ù)›Û [ã|[£œ² ºR5ëc}ûö•îp(ó÷÷·ïc›7ofMLòÎ;ïH•Lîc¾¾¾ÞÞÞ.\ ³† 2|øð+W®H}¬´´4!!aîܹ*F‹|øðððð{÷îUxàŠp?‰3ûeïÞ}´“kÓ¦ m¼š5k6pà ˆ-[Åi•fÞ¼ùýûûΚ={ËÖÈ  éÔ¾–,]ºgï>zjÅŠÐöí=6GDH3åï+šÊÿÝ3jnôì¾ýqâ5‘º±5i¾,Tã+U êc¯VÙÇþ^ÞÇž§f}¬Úï+.X° 11ñ½÷Þ›>}:­¼¼<:>}úôСCƒ‚‚¤Û~H}ŒÊ5«ììl‹Å²zõê¶mÛÞ¼ysæÌ™111ò÷ïÞ½KÇ)))ëׯ5jT~~>]gÓ¦MÒ‡r?ýô“ý;—¤—ûÝÇ»ÊýîY’Ž%Méâ¸Sb0šÒèÿ ãˆ+ElMÚ…/ ÕøJUâI»ÄÇ[Øõ1IýLÛ éöSlÿ)ý~ì°mP~…ñªUÛǨhuéÒåã�?¦cY¶l�Bu‹š-¹>I}Œ,Z´ˆŽïܹӷo_jq¶òxúêÕ«¬�ݾ}›^WúÁ]*''GúqúÀþ=h‰V} ATFlMcLÏ:‘wòtnVú³AcfVnAþÉÓyùù™éFûAš™—g7X1|Y¨ÆWªÓ¾|ÒǤû+’NØZ¿÷¬�IYžô±¿ŸŒüŸäg}L*W­[·îPQÛ¶må>véÒ%�o¿ýöÊ•+¹¹¹‘‘‘îîî4B¢¢¢Îœ9óå—_þöÛoRKOO§ºEg•––¾ÿþûô—ZM8qâ„tÁO?ý”J:thÕªUÆ 3™Lþþþ«W¯¦?räµAþ.Àå„YJÄ*å”t‹*þðf5åêì×¥4M>%ÜRÂg8€ï•CCt±5ÙÅdÎ)ÈÍÉΰØõ±ôŒ¼KfzZšÁ`ÎÍ=‘GG4˜Y6h~:x"Ã(^M_}ŒØ÷1�òûÝË}ÌÞ“>f²ý÷ÓûÝK}L)êcqqq_Ud±Xä>F}iëÖ­f³ùõ×_ KNN¾q㵯Ï?ÿ|ÿþýsçÎíÞ½{vv6û÷ eçÏŸoÖ¬Y—.]bccéáéÓ§Ù/ÇDTÞØEÀõܾ_Ú+†W)g…ºÖ±KÖJ;Yiù'cöeŒÞ½>Ï|¨ú¢Óˆ­É.ô|zZjš1ëä³>–fÎÈÎ2>™`ÎÊ?™iJK5ZrósžÌ9§,•|DÆ—…j|¥*÷¤��¯ÐÇDb«*]%%ü¢r%ÿxLzh÷$WZúä¿_4M>¨VA¡U»o-v*ÿ-ÙÑ ÖwJ/.»µ=ÐC´ŸCoàTaU[�*ð] rècˆN#¶&1ú˜} Ù9ÒçcûX:õ1³�OÖe“yžå#¢f[ý§ßZ¨[/j[ɪ½t¢òÛxÈø.P9ô1D§[“˜ÊûXš)#÷TNfùxš¹ìûŠeÇié99ùÒ—yø²P�¯Tx¾S…Ví¾¸XEèEküɘ„ï•CCt±5‰©¬�™Ò-¹–LƒÝ-Mºh N}<"î±Ó?1£ Òeéâô5¸µ}¥ø.P9ô1D§[OšÁ”]�›eN{Ò² eõ,7Û˜f §*N6šs r*»“‡¾,Tã+\ß*‡>†è4bk²‹9+ÿtþÉgÉÉ4¥¦fdŸ¨0˜m~2?Íœ———c|·c©ècP#|¨ú¢Óˆ­I»ðe¡_©*ùLgyiƒÍ>ðOÁw�Ê¡�!:�Øš´ _ªñ•ªú€.ñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5UŒ1=ëDÞÉÓ¹YéOGÌYù§óO>M~ŽI7feåäŸ<•—ŸŸ™n®S¾,Tã+\ß*‡>†è4bk²‹ÉœS�›“�a)°ëcO“–ž‘S�“)�§gä�²d¦ÓhZzNn~^zšx5ô1¨ ¾ T} ÑiÄÖdz¾¬b³N }ŒªÚÉœ,sšô0-ÓrBî`¦ŒÜ“™&ñjècP|¨ú¢Óˆ­IŒØÇÒ2òóOX²²ŒR“ûXš¡¼�dÕJûþø.P9õ±”Ô´ƒ±AƒÑ´gï>q²”ãÇS¶FFÑV[| ©ë[“±�¥ÒMé–“y¹Ù†Ô§}Ì@ ²Òk¯�ñÿå\ß*çœ>¶~ýO·*Ñš&ž+gùòÍš77šÒ#¶l™;wÞŒ™3©kmŽˆ¨_¿þöí;vïÙ+Ï&%-3ûD¾Ù >f0ÓÓÒÐÇÀ™ø.P9çô1êZ[¶FŠãö¡ 4M—ããããæÖ´OŸ>^^^Ý»¿J5¬—·wûötЮ]û¦M›É3/YB5Œ5jÔ¶m;: 4iÒ„Î/‹Ôш­IL…>–fÎÈÊ,ûL¬,Ù'Nd<ëcÒ ~?ÎÄw�Ê9§�¹¹¹IÅña¥ _½ºAƒ³fÏž;wÞÖȨ•+Wyxz†,ZD#ÔÇ‚‚¦SõZ³v�4™úXsww:ðõõëÖ­»ôÑÙ”)SÑÇ\)bkâI3˜² r³ÌiO~*fÎÊ/È6›ÒÒ †Œ¼ÜüœòŸ�É÷W4àþŠà\|¨œ3ûXµ©bÚàÁ¯yxxRÑ¢ìØ±³GÏžTÆF�=dÈPêcþþþ 6 ž;/:&vþü4ø÷¿ÿ�æÍ›ïååÕµkW:öñéÛºuk:Ø!^©s[“]*þSc'OçdšRËîho±ä�¢‡yyy&Ã“ÉÆ¬¬¼‚²AüûcàT|¨œ3û˜ýç`Ï;Ï•r4!±G�žT½ºwõÕW{Е®ÀÀ±r“¾¯ºÒ×ׯE‹ÍÝÝ¥ƒ¾}ûÑEúÊ",X°P¼>Rç"¶&í—…j|¥€+â»@åœÙǪMÕÓ FU¯={÷……‡Ïœ5‹ÊÕŒ™3ßšLƒ!!‹Þ^¾Bš–t,¹YóæóæÍ§ù>>}=<=£cbMø¾¢ËElMÚ…/ ÕøJWÄw�Ê9³�±�ÂØ±<­Ò,]ö¶ô±˜——×°aÃW®\õÒK úõëïîîNƒ-Z´hÙ²e|üÁ„ĤŽ;¶k×þøñéÄ ŽõìСI7:Q¼2RG#¶&í—…j|¥€+â»@åœÙǪMÓbc·‡„,’nÝ1eÊT*cMš4Ù±sçšµëhpkdTÔ¶hê`FSú¤É“»wu�¿¿}Z•óõó;r4A¼8R#¶&í—…j|¥€+â»@åœÙÇØbì¡<íy‘¿¯˜’šææÖtÀÀ�ÔÊ(4(H? ;|ä¨TÛ¨†µiÓfáÂ�–-[ü�Ðø�ñâ•‘º±5i¾,Tã+\ß*çœ>æÈ¿?Sõ¿?–f0R¡¢f0bDëÖ­[µjPj_TÕäiÒȾýqoÍ™#ý`¬sçÎóç/ ô1WŠØš´ _ªñ• ®ˆï•sN[¿~u-û�ÅD4�¦‰çÊ _½¦~ùý}|úvéÒå�77nLݬAƒëÖoØ»qã¦ÉS¦Ð´ñã'ôëן:Û¬Ù³ÝÝÝ}ýüh„Æ'LœXõ« u%bkÒ.|Y¨ÆW*¸"¾ TÎ9}Ì)YºìíÀÀ±[¶´k×~Ü¡F#Ô»<<=i�ª×’¥KÙ/ÇÄ„„,/ŽÔ¹ˆ­I»ðe¡_©àŠø.P9õ19)©iâ òG‹Øš´ _ªñ• ®ˆï•ÓcCúèß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀEwK/ZƒSÄ=î]Üi‹3C¤ËÒÅé%è…øk×ß*‡>†è4bkÒ.|Y¨ÆW*TéÖ½Ò0K‰×V^¢4 ½P¸¥äö}µ­Œï•CCt±5i¾,Tã+µ¦"úªíõw«È[EŸªý¯À?[A¡µW ¯LµzÑS…Vþn”à»@åÐÇ�FlMÚ…/ ÕøJUaåí/ê]ɪ"á· ù9uGâEk­},&†^šÞOã»@åÐÇ�FlMÚ…/ ÕøJUg×Ï7ÿòi¶ØÄ¤üû§–ÏÝççÔ…ÖÎBGrbF|œpÁzãNéïÅ6 ÐC´ŸC•¬ÆŸ’ñ] rècˆN#¶&í—…j|¥ª–qÿ6õ.±ŒI øæ"?@÷nÝ+ÕîkŠÝ¢Š“/Y+ýe ÒS4AžLo£f¿%ã»@åÐÇ�FlMÚ…/ ÕøJu†c¿ýéJ埒ýÛ§–;%�ù šùùçŸïÞ½ËG ³”ˆ=Ê)¡®õáÍjúM°¯dá–>Ã|¨ú¢Óˆ­I»ðe¡_©J”>ÿ?~üR,cR"úê›î�¹ð]Á¹o¯~ù3?ó9îܹ“S™ .ð©vBCCwíÚ%[,–ìììÒ*Þ4@eŠî–j÷³±äK}ÿðØ%«| ½™ÜŸï•CCt±5i¾,Tã+U‰ÐC¶/‹ø lú÷WXû—óÿ±!ñ…!ûÿ»ÛN9­‡NÎù‚Ÿ,¸víÚAÏž=—,YBÏ>~üøòåËüœŠ}ìã�?0`ÀòåËïÝ»Wq@U/>ëBÎÍèƒ�ìU4Íþ·dIÊoìÁw�Ê¡�!:�Øš´ _ªñ•ªÄœ�¶>oÛ®|ÍÇ%÷¬%Í OÉeìÏù¦¿ÙkßĤ´~øç»ùÉŽIHH˜?¾Õj]»vm@@À¯¿þJƒƒ¡ßSmÛ¶íСƒü0**jÞ¼yŸ}ö¿Àó§V¸©†“pAA­:záY-¤·ÄŸ®ß*‡>†è4bkÒ.|Y¨ÆWªÔÇ<æØ¼æÛRßãOIÎ>øUú!ÙŸsMõÛ#–1ʉnòÓf2™&NœøÓO?IƒEEE=5cÆŒ•+WÊÇûöí«p>Ô}7n|á…è¯#k& N«>v㎃�•¡Éò‰#âÐÇäiÄÖ¤]ø²P�¯T%‚w—õ1)1æÊN¶°èje̦‘Ÿ Ä‰'ÜÜÜ&Mštÿ~å·Ñ·ÿ¾"£�¸ª[õêÕ£¿Ž<¬™žÑ¼G9+¿óתM–Oì£äÌr|¨ú¢Óˆ­I»ðe¡_©J̳ëc”×Âl7oó9ù—¿û«oåeŒrúüwü%Ξ=K}¬C‡±±±R%ûá‡òíL˜0aáÂ…òñâŋ頨èù?z€º¦êÄœòùú˜} ÑiÄÖ¤]ø²P�¯T%X“²ñ¸­èéMw»\¿w%¿“òÚlS…Ë)wýúuêcô7$$dðàÁß~ûí¥K—fÙéÑ£‡¯¯¯ýˆ»»;U2~!€çÃ÷%ècˆN#¶&í—…j|¥*Qi£ø†Ú" ÅCçå‰LÎÿ¼º÷³jÿe0zÿÍš5£>fµZM&ÓÇü¾ ößW´•Ý ¿”úØÅ‹ø7©@ÜÏC‚>†è4bkÒ.|Y¨ÆWªÏëcRÚÏ*núÆÕÿ¯_ªXÆþÖóÀúCßðËÕÈÔ©S�Ʋ¡|üñÇìYÖÇîÜ¹ãææöÝwª¾$ 4z¹ß}<îw� •ElMÚ…/ ÕøJU¢ê>&§MЯnc®¼8 ƒºÙ‹2�<¸ña¥7ÿ¨*c£G�~ôèQZZšx»©�Y­V³Ùœ““ãííMÙ4€*à߃– �!:�Øš´ _ªñ•ª„ƒ}Œåõõ¶ŸÔ~Qñ™Œ5jܸq���gΜaÏÊŸ�ÅÇÇ/\¸0<<ü“O>asªf)«”SÒ-ªøÃ›Õ”«³_—Ò4ù”pK Ÿá¾ T} ÑiÄÖ¤]ø²P�¯T%Ö$ñ®Um–²ÝÀ¯£Ò¯¿þzøðáC‡•”ðÿ6±ï+ÔÌíû¥½bx•rV¨k»d­´“•–2f_ÆèmЛáóÀw�Ê¡�!:�Øš´ _ªñ•ªÄoËî¦(–®JÓ÷m›ùC~­QC÷À) ­Ú}k±SùoÉŽ^°Þ¸Sú{qÙ­íé€Ò ýz§ k¸·á»@åÐÇ�FlMÚ…/ ÕøJUîÛŸlá‰6¿P^ÀäLØb;RPVÞê´Ä‹ÚV²ªC/�¨ü62¾ TÎ9}Œv´S¦Lõððt{zŠ&Ð4ñ\©4bkÒ.|Y¨ÆWª Ÿ|e3üÓnÛ�\ö¹Ù‹-ëœíGçýT àŸîT¡U»/.VzÑ2&á»@åœÓǨk ääÈQñ))ôM iâSöÙ¹kWbÒ1ùa|üÁ¸ñâ´íÛw?ž"?¤casRRÓ<Ä FÓž½ûØ ¢Ïˆ­I»ðe¡_©P¥Û÷KÃ-%µöA½PxNIÍ~3f�ï•sNóð𬢌I¡ žžžâ¸}š4i²|ù ùáÈQ£ (N{饛#"¨\¥¦(6l¬_¿¾tL¡qšC×iÖ¼¹Ñ”±eËܹófÌœ¹52ŠÎ¢™TÞvïÙ+^ÑUÄÖ¤]ø²P�¯Tp@ÑÝÒ¤‹ÖàÔÇ#â;ý3º ]–.N/Qƒ[ÛWŠï•sNsss“¦M jVŽª˜ö¼P[²tišÁxà@Ö¾½GïÞ½“Ž%S† Þ¿¿/Ð_©�Q9jõ1 Y0bÀÀ�=zô¤–E�:u¢‹Ð´Áƒ_óðð\¼d eÇŽ�=zö¤2FW2d(Íô÷÷oذapùÇhˆn#¶&í—…j|¥€+â»@åœÜÇfÌœIMŒZT1M µ#*TÔÇèÄ^ÞÞFS: Œ1pÐ : §¤>&Eú¾"õ1êfêfÔ²èàÕW{Ðf¿õÖÑ„D©¤uïþ* Ò5±ÀÀ±rÃ÷õ±5i¾,Tã+\ß*çä>fù·d³fͪbšj\óæÍ—îç»=j[4¥OŸ>>>>tгW/š ß„ƒúؘ1c¨ªÍš=›2êõשeÑÍiîî¾bE¨©üVŠ4¸gï¾°ðð™³fIMï­9Á4HEîm»»† úŒØš´ _ªñ• ®ˆï•Ó°�É¿%ëXþÂçM“’’š–œ|\êcíÚµò£±Šúöí·déRéæžK—-2d( víÚMzÖ³CéûŠK—½-},æåå5lØð•+WQ…ëׯ¿»»; ¶hÑ¢eË–ññÅ·�è'bkÒ.|Y¨ÆW*¸"¾ TNÃ>FµçÈ‘£v¤�I±¿ß=5´F�Q}Z´x±¶`ÁB7·¦TÀš6k–t,Ù~šôû±Ä¤ct@KúWÅ:—ëÞýUiŽü}Eêut�Òd Jt}ñ ú‰Øš´ _ªñ• ®ˆï•sNsú¿»�Ž. ‘¾î8dÈPé_y–"õ±•+WQ¹:t˜ÔÇ6nÜD‘>7£¤Œ48xðk#F´nݺU«Vññ9Jƒö—Bt±5i¾,Tã+\ß*çœ>6eÊÔAƒü«¨dôM iâSö¡ööòËÞ^N#G�’cbbéa�ž=#£¶%K>p žúØ;aa-[¶¤žFE«CÇŽÔ²¢¶Eoß¾ƒŠÜ®Ý{è¬ðÕkê—ß_Ñǧo—.]Þx#°qãÆÔÍ4h°nýªmtYñ ú‰Øš´ _ªñ• ®ˆï•sN£-u-OOO·ç §hMϵõ®  éîîî³fÏ–ny/eç®]]»v?aÂê5k©eµk×>xî<OOªgGŽ&Lš<Ù××�›6mF;vœ©ü–��c#¶l¡ñýqh„:�ôëןN¤Az ñ ú‰Øš´ _ªñ• ®ˆï•sNsVRÓ TÃÊÿð§hHŠümÔêÚ�¢iˆÞ"¶&í—…j|¥€+â»@åôÕÇDŽØš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…jßÀß*‡>†è4bkÒ.|Y¨Æÿ—pE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯Tå¬å=zôÀa4Y:‹_ ´Áw�Ê¡�!:�Øš´ _ªñ•ª�ÔÄ~8wîûmÑ¿,]ö08¸dæ¬*B~Y¶Œ&Ó)R+ãW ð] rècˆN#¶&í—…j|¥*Amêî�;T®Šƒfئ) �B'Òé¨dPÝ-M¼h N}÷¸gtq§-Î ]�.K§— â¯]#|¨ú¢Óˆ­I»ðe¡_©“ÊØí•«J'M•R2a’ƒ‘O¡ÓQÉ n¹u¯4ÌRⵕ—(�B/n)¹}_m+ã»@åÐÇ�FlMÚ…/ ÕøJuŒô5Åï""©SÙÆO¦<7áÞŽÝ¿úÙû÷=*)..‘þÊô—ž¢ 4�&KgÑét|qꊂBk¯^™j!ô¢§ Uí—ø.P9ô1D§[“váËB5¾RCõ釳g‹'N±��Hù}zð½ó—¨q9šL§HçÒEèRèc ‰­µö±˜zizü=9Œï•CCt±5i¾,Tã+Õ1eŽmÞ*ª¶þ|ëçŸ~þMQè”·–¾þ&]�.E䯠'…ÖÎBGrbF|œpÁzãNéïÅ6 ÐC´ŸC•¬ÆŸ’ñ] rècˆN#¶&í—…j|¥:æÁƒ¿Ì™OmêÑ¢·~¼ËòãO÷¤¿,òSrètº]Š.È_@7nÝ+ÕîkŠÝ¢Š“/Y+ý} ÒS4AžLo£f¿%ã»@åÐÇ�FlMÚ…/ ÕøJu Õ§‡ã¦Øï9^ôÃ/5�N¡K¡�€ž…YJÄå”P×úðf5ýŠ&ØW²pK Ÿá¾ T} ÑiÄÖ¤]ø²P�¯TÇP}*ûªa@à�£©ß~§Æ¡Óé"t)ûØ•+W.TæâÅ‹òœ3gΨ]Äî’Õ(º[ªÝÏÆ’/9ôýÃc—¬ò)ôfjp|¾ T} ÑiÄÖ¤]ø²P�¯TÇP}zv°WÑ4ûß’%)¿±ß*‡>†è4bkÒ.|Y¨ÆWªcžô±�#ï®XûåW?؇šØñT3…èáþ¸C“&M¹ôÑgô—ŽÙd:�.¢¨�edd°ÁÓ§O³>Fä‡aaa‡–(œZá¦NLµêè…gµ�Þº:|¨ú¢Óˆ­I»ðe¡_©Ž)ëcƒFQ•ú}zð׿·O«V­ìb·ï3&ðÃó—é/³Éew½§>6h”v}lîܹ‡’€‹Ù¸qã /¼@yX3qZõ±wüx¬ M–O‡>† O#¶&í—…j|¥:æIóú`øø�?¹nŸ&MšØäŸx·ÉStÌ&ÓéNïc›6m¢>FƒËuéÒeðàÁÒ1Ùµk—Ý©PçQݪW¯ýuäaÍôŒæ=ÊYù½˜¿Vh²|b¯%g–ã»@åj»�Œ&ŠüpÇÎ�))©â4[“váËB5¾RSÖÇú§>ö[/ÿÒR›”’+ýíÑ£‡|@çÏŸ¿mÛ¶Ÿ~ú‰þÒ±¶zõꨨ¨>ø ¿œ‡‡Gll¬t¼|ùòÅ‹Û]꼪?sÊçcèc'ô1£)=|õꪓF%¬|òê5k_{mˆTÉ:ÜËÛ{[tŒxM[“váËB5¾R#÷±û=>zTR\\ªaô×ÓÓ“(Òµ²ï‹nÓÁwßÿ@Çò4 �H§+íck֬ɩ(22Ò¾�-[¶Lþìþýûnnn_~ù¥ôp÷îÝtº<Àø¾¢Ä9}¬G�žƒ¿6rÔ(1C† ¥g�O‘&6�þ>¢µècC† )((�ŽW­Z-?µdÉ’¤¤$ù!€#ôr¿ûøº¿{©�Í�;ï�wÂ’Ž%KÇ»vï¡Æ5lØp¹�¥ŒC† ]¾|źõh„}ذa'Ož”8ÿ´Äi},$dQïÞ½,Xد_*]œ2ejPÐt¹�Í žKTÀèïÊ•«¢cbéÜw¤Áøøƒâ•‘?rÄÖ¤]ø²P�¯TÇP}zØg˜­£ïãŽý¾¾þÕ¯÷”åîïßÝþù—ß¾þ¦èÚµ/éøÖ�wéà›o Ðß~þ­èÖÏÒL �H§ÓEèRŽ÷1·ÊÈ}ìĉÞÞÞ><|øpûöíßÿ}üðà ÍüöÛo+\Àa–±J9%Ý¢Š?¼YM¹:ûu)M“O ·”ðà»@åœÖǶFF…†®¤ƒiÓ‚hdüø t¼vÝz¹�ÑÁ¦Í›GŒ9~špðà!ªpÔÄÆŒyƒÊÛÈQ£6nÜ”’š&^ùcFlMÚ…/ ÕøJu Õ§_†O¤*eõè{ëP2Õ-ªa”Ìì¼”ãÆMï½nÍÚõûãíÞgJÏ<|$‘žŠÝ¾‡š4“N¡étºÈ/ìc ,°X,�*:{öì´iÓ¤ ¹¹¹{öì¡ÒE#×®]“óòò&MšD#ø²"ÔÌíû¥½bx•rV¨k»d­´“•–2f_ÆèmЛáóÀw�Ê9³�¥Œ>>>'M¢ÁíÛwÐàºõì?¶|ù ooï5k×M�:�}}ý¨Â:|dßþ¸3fÒÈœà¹âõ‘?fÄÖ¤]ø²P�¯TÇP únIXY›jݧ¸Uï¢Â/¿þ¦èÇŸî}|ùê©Óÿ¸ôÑg9¹'äêfž¿|áâ'ô,Í¡Ðd:…N¤Óé"t)ù–ê•–Öä¿PU+(´j÷­ÅNå¿%;zÁzãNéïÅe·¶§zHƒösè œ*tèû�"¾ TΙ}ŒŠU¬¾}ûmÙI�kÀÀ�ƒüý£cb¥>¾zM�že?}úÌœ5‹>rôhB¢ülbÒ±þý}©¹EÇÄRæÏ�4y²xqä±5i¾,Tã+U!é‹‹?¼÷ÝüÐ_ú�~èá[Ò¼gyèéGÓh2�‚¯)Ô¾ TÎ }ÌT^É(â8‚Ô8bkÒ.|Y¨ÆWªrÖrT®8Ljb(cµ†ï•sNC§GlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�†j’9#«v—…j|¥€+â»@åÐÇ�FüK»ðe¡_©àŠø.P9ô1D§[“váËB5¾RÀñ] rècˆN#¶&í—…j|¥€+â»@åÐÇ�FlMÚ…/ ÕøJWÄw�Ê¡�!:�Øš´ _ªñ• ®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²Pí;øà»@åÐÇ�FlMÚ…/ Õøÿr®ˆï•CCt±5i¾,Tã+\ß*‡>†è4bkÒ.|Y¨ÆW*¸"¾ T} ÑiÄÖ¤]ø²P�¯TpE|¨ú¢Óˆ­I»ðe¡_©àŠø.P¹Úècžžžò_q0bkÒ.|Y¨ÆW*¸"¾ TNó>ÖªœýAµ1M‡�ÇåMéÇ�§Èˆß½g¯8ÍÁ¤ŒùáÖȨääãâ4¤–#¶&í—…j|¥€+â»@å4ïcnnn¦§ŽIÇÕfÓæÍõë¿P|JÊúõš5o.·¦ñ&øøø ò÷7îMi�ÚÕÂ…!UGî`‹/n×®==¢ã}ûã^z©Á† ÅEj9bkÒ.|Y¨ÆW*¸"¾ TÎ9}ì@üA__ßfÍš¹Ù±ï`Õö±]»÷L›$¥—·w“&Mä‡r¶oß!Möõó£ö%Ÿ;uê´Þ½{ï�;@'Nœ4ÉTþ [ýúõ©eu©LûöôlÒ±déô;ޕއFO5nܘÞýmÓ¦�ýqHmFlMÚ…/ ÕøJWÄw�Ê9§�Q£"”\Yu±ï`Uô±­‘Q¤P§¢Fäíí-=´Ï¦Í›MeÍm÷K/5ˆ�ݾný†cÇ’é€JTË–-é/u­¦ÍšMéR[³v�tqzoûöÇÑÁÞ}ûgÌœI¯%÷±ÕkÖ6jÔ(>þà–­‘‹—,¡ñ~ýúGm‹Þ¸qSÓ¦ÍF½þºøV‘ډؚ´ _ªñ• ®ˆï•sNkÖ¬Y¥eÌTþ³1ù3G~?6lØð6mÚ9š��˜$'1é˜<ÁǧïèÑ£©SQ+ 1¢aÆÔÁ7nF#ÿûßi�Hå�—.{Ûþ÷cTö6l¸xɺ 6kÞœ*\Ü�ø�»v @#cƼ!¾[¤"¶&í—…j|¥€+â»@åœÓǪøý˜”jûu$ªUÔ£<<FE«i³fMš4¡òöÚkCZ´hѪU+é[‘ÔÇB-ª_ÿE:nÓ¦íÈQ£¤Âf¯k×nö?]Cj3bkÒ.|Y¨ÆWª“?¶~ÿÝý¿ÿ"åÓo7Ÿz”l󉵵ÛXIÚo²mÈãç€Sñ] rÎécÒý�=ÿŸQ®¶�É¡>Ö±cÇAþþr:wî,÷±½ûöOŸ>#j[tšÁ˜B;é4ƒ4>dÈP*]-[¶”þah©�Q£ö5wî¼yóæûúù5hÐ`ûö^^^#FH},bË– J¥îøñ”ƒѸôó3ÊÔ©Ózôè)¾C¤v"¶&í—…j|¥*÷ ¤ôò�Ç©7l¸toJÁϽM?vÙQØ'ôüÄà‚w&eqìŒïþ¢.Ûx c•ìÑc~]p¾ TÎ9}ì@üA??¿æÍ›Ë·R”Uû/�±Póõõ{kÎ9´ÿ¾âÎ]»‚çÎëׯ£F�Ö¯ß`4¥/_¾‚šU©;wRU“¿¯Hzy{Óñ�ñnnM'O™b*ÿÚæˆ©�IW›<×ǧïË/¿LW£qéÎø”iÓ‚ÐÇþ‰[“váËB5¾R�}óÁòïæÝéf¸]ÿPÑŸv}[og…üwäu�ð�‡-zÁôœèÀ´Lÿƒ¿uˆàŒåÚ�üeÀyø.P9çô11¬€)êcÔÁ¤ã¸ñÛ·ï˜8iRûöÒȲ·—¿ôRªI3gÍÚ5}ú ªjMš4™5{vÇŽôúèÑ��c¥>Fƒ‡�¥³¤Î&ݱƒÚZù×ë?žBW®_ÿÅ®]»Í˜1“ŠM¦ñ-Z´.G—Eû'FlMÚ…/ ÕøJ­Ž_æO¬}‰ùóŽooøÌgù¹És VO4ùês¾©X¡�Ýâ¯ÎÃw�ÊÕ÷¦*ãáá!8FÇò 8³Ò´oßžº–tüÖ[s¨ ½òÊ+S§N“FŽ9zèÐaé8ùxÊ�!CçÌ ¦Az¸cÇÎ:6mÚlÛ¶hzŠN g ]Iã/¿üò°aÃéáÞ½ûââÈÏÆÇtskºdéÒµëÖQ¨Úùúù±+ .¾,Tã+µ:ÿ"|Viþwëõa�Xø^¶ÿ!^½* úÔ)EwK/ZƒSÄ=î]Üi‹3C¤ËÒÅé%è…øk×ß*§Õçc5NšÁh0šÄq¥¡‹Méâ8‚ˆáËB5¾R«#V¯Jó—í7›®ÿlí„tÞ»žô1¨#nÝ+ ³”xmå%J£Ð …[JnßWÛÊø.P9Ýõ1©ýðe¡_©Õ«W=ÐÇ n)(´öŠá•©B/zªÐÊß�|¨ú‚˜ù²P�¯Ôêð2æ¬>öÝ]þJ:“xÑZk‹‰¡—¦7Àß“Ãø.P9ô11óe¡_©ÕáeÌ®�ýùψ‰‰Y·n�ŸŸß¿ü˿Р§§gXXØüÇ<+avž”±›m�kþ€ZPPhí,t$'fôÁÇ ¬7î”þ^l£Ð=¤Aû9TÉjü)ß*‡>† f¾,Tã+µ:¼Œ=ícùË_L&M8þü»ï¾KüÓŸþ4iÒ$:þ¯ÿú¯ŠEì ©�•&]d¯ +·î•j÷5ÅnQÅÉ—¬•þ>Œé)š O¦·Q³ß’ñ] rècbæËB5¾R«ÃËØÓ>6{ölzväÈ‘ÒÀ€zèïï_m‹˜»­É¥„-E—~-yÄ^ @'Â,%b�rJ¨k}x³š~Eì+Y¸¥„Ïpß*‡>† f¾,Tã+µ:¼Œ=íc¹¹¹/^´ïZÿþïÿþ—¿ü¥ê>–6nëŸÞÛYïlL½ó‘ÿuy[Ö½/ùë9Àb±¤¦¦ÒAiiiaaaIIMþ ð…ÞL n‚Ïw�Ê¡�!ˆ™/ ÕøJ­/cOûØÙ³g333+¶­2U÷±ÿ,Ø!•±z—6Õûx]“/bùëUôË/¿lÛ¶m̘1o¾ùf||ü£Ge©­Y³&88˜>ÿüs77·3gÎðÓTH¼ø¬ 97£>v°WÑ4ûß’%)¿±ß*‡>† f¾,Tã+µ:¼Œ=íc»víúõ×_ÿ÷ÿWzø·¿ý�ŠS�=ªîcöe¬Þ•ðzWWò׳óý÷ß÷ë×oêÔ©&“É`0 >]ƒÿ£ªœZá¦NLµêè…gµ�Þº:|¨ú‚˜ù²P�¯Ôê¸'UÚÇ^yå•o¿ýöâÅ‹cÇŽ1bÄùóçïÞ½KõLêcT¢Þ(çååU¡�U,cõ®†ò׳³lÙ2ºNqq±ôðÞ½{�—ý—Hîcôιsçèu¥ ¥¥¥—.]JOO¿råÊÓkØ oÞ¼Is Nœ8!_ ê¨�7¾ð ôב‡5§U»qÇÁ�ÇÊÐdùÄqècòÏ_ªñ•Z�Ÿÿ^i#òwé²¹¹¹M›6¥Á7ß|ó¾�èèègeŒT,cUô±;wîÐõOŸ>ÍŸ°ëcT´hÎå˗阪ÚÒ¥K;uê4yòäöíÛoÚ´‰ê™4y„ >>>ǧÉË—/gW€º…êí)è¯#k¦g4ïQÎÊïJþ—aš,ŸØ+FÉ™åø.P9ô11óe¡_©”ù“\Æþ²óF…~U¯Þ¿ýÛ¿ýë¿þ+|®Še¬Š>öÉ'ŸP}ºqãâ9},%%¥[·n·oߦ㯾úªeË–§N�’&{{{_¿~�ŽOœ8Aó©éU¸Ô)U æ”ÏÇÐÇ$ècbæËB5¾RðÝo%�û¾¬�íþjÿèD^±©Xƪèc.\ îD�‹?ñœ>6cƌ͛7Ës-ZDÓì'ÛÊ¿»Hóé¯< @„ï+JÐÇÄÌ—…j|¥:¦ì[‹»¿Z6Ýlk·‘W,E*–±*úXQQu§óçÏó'žÓÇ ´oß>yÎúõë¥!;�]¿~�æñÅò4îç!AC3_ªñ•ê°õ›Þ/m¿Qu«PƪècV«500pÕªUö#÷ïß·=§�-Y²dÙ²eòä‰'FEEÙO¶¡�€côr¿ûxÜïAþÙáËB5¾RTbµv�¤2Vk}Œ|ôÑGÍš5‹ŒŒ¼zõ*•®åË—/Z´ˆÆ·lÙT\\lßÇ.\¸@“-Ë?üpüøqwwwé·gèc þ=h ú‚˜ù²P�¯Týø›TÆj³�ÙÊïê1fÌ*Q-[¶œ?þ­[·hðܹsíÛ·ÏÌÌ´ïc$''§[·n4Ò·oß>ø@D€³”ˆUÊ)éUüáÍjÊÕÙ¯Kiš|J¸¥„Ïpß*‡>† f¾,Tã+ÕA?Þg},4´ò*Eã £°�IîÝ»÷ðáCû‘û÷ï?zôÈ~DbµZïܹ#Ýé Ænß/í딳B]ëØ%k¥û•ÒòOÆì˽ z3|žø.P9ô11óe¡_©úXÏž=C+Cã S£>Pû ­Ú}k±SùoÉŽ^°Þ¸Sú{qÙ­íé€Ò ýz§ ú~£ˆï•CC3_ªñ•ê ¡�ÕúÔ‰µ­dU‡^:Qùm† f¾,Tã+UµU?œùëÕM5+cY¿}Á/ÎÀw�ÊÕÉ>f4¥?ž"?

žB¡zHƒôM`µ‡eä¨QÍÝÝ¥4nܸ~ý凟¾òL_??j_òéS§õîÝ{Ü�^ÞÞ'M’wîÚEEkÈ�¡£+–�˜Ô·ßÿßÞ™x5uìqÜÿCE±"(â[ðØÅ*ÕGëSPPÚâs�¶.¨¸£EÅö½j+ôI[—âV·‚¶!÷fa•‘M–ˆ–„›Àû+Þ/uiYî öIDATwB“\ôК÷ýœïÉIæN&“Iæœù0¹—ÈèµkɾÜ�²Ð!ªI•Ý�º'%åHHHˆ{9åÊÕ«Ó§ûýúkÖ™ôŒÜÜ{t'&&vþüùtKv¤ÕéuÃ>výÆM²)×de]rúÕüù—sôP#ˆaááN÷›5k–ŸŸ»¿'9™ùØ÷?œa å£féÎo×oìÚ½›µ{£ÃO ¯ág*ðEøU z&ÀÇ6nܸwï>vÿÆÍ[;w&-[¶lÁ‚$TK—.Müâ‹K—¯°£ÉÉ{©²{ îIJÚµdÉ÷rÊÊ•‹��' "+Û7cÆ r°Ù³gùÕWÇŽŸ8wþ‚«�)Á|ŒÚq–�Ý]ûí: 9Øûï “US'ïþQ…M›6:tøî²ûç/\ü:5•,>æá§…×ð3ø"ü*P=àcÌHZÈÄÂÂÂÈÍ®\½–——O¡;û÷ Â-[¶²3¬Xe÷�Õ�9³lùò… C]K(g33SRŽ�ü�Œ%$&jäF¿ùæÛ ¹séå~9wž*\“·é˜&ÑSœ–åš\YŸ²³sÒÒNRµ¬¬K[·&Ìœ93 `=Ü»oÿ¢Eo_¿qsêÔi7oÝf>F¾GèEçÌ ¤ÎGEEÅÄÄÂÇ| ü´ð~¦_„_ªg|Œe÷ž=QÑѵ$?_óÙgŸ9rÔý�3'ÒN.�ˆpÆßߟ$‡n] �=J*EµzÍò%°ÌŸ~¦×ýè£�¨ò´iÓgÏžM"—ùÓOÔà÷?œqì|y‚*33tž?¶mÛöÍ›·Pÿéáש©��AÛ·ï`{tÎß+îÛ`ª|N=72òcºŸzì|ÌÂO ¯ág*ðEøU z&ÌÇØÙYtçüù ±±±aaaï¼óκuëþ}Ö~]D¥�1÷üùŸ\??¿÷Þ{?,<Üý(yyÚw§N�:}::zí'«V%$&’ýp&]µ6Ä‘bédÁ#=»}ûwò%×PɱãÇ©}Öš«�ÅÆ®?á"=LOÏ Ûàààä½{u.>Fí¿õÖ[ôŠTH*H…ÇŽŸ€�ù@øiá5üL¾¿ TÏ„ùKFÆ�dbi'¿ù=;';çηßþsñâŤ7î5ÇYÐÜyóȲÜ}ŒìŽm�͘1ãÝwß%¹bå , 5Š��_¸0”]Ë~×®ÝË#"®ýv�*“DÐíTù ii'ƒØ™�Ñscbb�×ó¸yëöTywŽ]=ßécö}³  jŠTpíÚu$l!!!ô–ácozøiá5üL¾¿ TÏû©ËÝ?þt-ÉÏ×¼üΘN¾"ȬY³È|¶mÛîêcöËè_¿AIJÚE%ˆÚ|�àüWÎëÖÅ�&ÍŸ?ßù�¡W¬X±iÓfæcì²9wî2;|8%4t•äååïØ±“ IÏH«è!Ý~ñå—ò=:Äšb>F]"û:pààÁƒ‡>YµÊÏÏ/+ëÒ’%K6ÄÅÁÇÞôðÓÂkø™ |~¨ž ö1rªÐÐÐ… f]ºì~tŒ\º|988øï«W“Âq>E~¥“/œ¸ÿÀÁÈÈ�ýýýÓÓ3¨fZÚI21’"z:©%;;‡„êç_Î1[¿~C|||lìzæcÛ·ïøðÃeÔÔÖ­ db{’“é)|°”]ã>&&vút?ª™��H-ïÛ€ù±<"‚îߺu{Μ@ö¯¢©ý³™™ð±7=ü´ð~¦_„_ªgR|Œr8%%!1ñåwÆrîÜݲeëÌ™3££×²óÐR�  wÚ±c'ÝΛ7�JŽŸH#Y"›Ú½géVRÒ®ÐÐET�œ*<<|õš5ŸÇÇ“¶‘}-]ú¡Nö%»Y%&²FÖDE�¿p1"""îÓOÙ‹æååëäëÚïÜ™tñâ¯Ù9wHº¨ÍÇSÈ 7nüyó1z ª¯“Ï…#O£[R;¹#G�ÒQÖò††Ÿ^ÃÏTà‹ð«@õL–�©Íש©‹½}êôigɽ{y$W+W®\!³yó� ææÞsþGiÒ¤ØØõb¯'õZ¼xqÐܹYY—Τgddü¨“-y63“ …LŒÜ)$$„\ν”S§¿§W¼s÷�¼#G¦wåêUçùc\å}÷ÝÔ©Óüýý7ÄŹ7…¼Aá§…×ð3ø"ü*P=S4á/’¼|�{á„'÷^ž{á s//?ÿ•ty-á§…×ð3ø"ü*P=!C�×~Zx�üÀ¯ÕC�‰÷1þ/'ÀáW�ê��!| Œ~¨ž×âcÚò‹¹µZäËÄ›Œÿ{ÅO ¯ág*ðEøU z^ÒÇDCù£G5¥Z¾|\ÑV·Y,ÍeZ¾|¢¶Ÿjë«Íd·ï«׸yñ½â§…×ð3ø"ü*P=£|L¨2J¦†"�_­j4µ�ƒVsk™‡Cª£«í´ô6•xÑ”ê~ …ÕO{ÍÖ!Ûàmý-¥#G꫌êþLb :Ÿ×º•OnÊŸZícK±vÖhù£ê3žqsÿ^).|øiá5üL¾¿ TÏKú)�VE¾p<)|øÜÖ]_ìV®"jû)7𤮇…ZAÔ Â裞ê«�ÚþLf^��i‘ÆV,nè–&ÄÇÆ1n¾Wc}.£ÃO ¯ág*ðEøU z¦Ë«g݃çV¶¿1k×cƒ}©*V¶Ù%¦†B×¥­¾¢¾£Ïl²˜;›k‡„¢ºîÁΖƎ®Þ^ó@OÇãRnu^ô¤[ê~X0¼Ô£¾§öÇÓOZ——6÷´WŽ*T®¯+«kïí—†¬Ò@WÛãRÝp¹¡ò‰±Ïb’$KWë£W=n\„’zÓ`{5ûmžXÚd¶´V öû®>¦-mì³t?)f/¡ô¾”Ê=†õ³¹±ÍÑÏúQý´¸£}L±Ÿ‚Pôði·$Ymý]OÛ-ý-r¹Â¸½p|F¯Æø\ì}067t˜L}’¹Çø°ÄÞ7~Zx ?S€/¯Õ3¥ë1ÛR°ïoh«�ROc‰8zIÞúÐÕvJ£¼B_Õ.õ·?*ÖiECe£ÉÖUWä\7÷·Õ¨¦XZßmnŸE,iè·ê�%ŠõÚWÙO¡¼¥×bµHƒ¶Á!iÀj¡˜š¿WôT_£ÑU´˜ŸÕ—´¢¾¬®Sêo©”¯¡¯l“z[k DQÐW4ö ¾Úqs‹¢çŒø•šL�‹Y”Þ—R¹B\ûIFÕi5=)9ªÂÇ µÏl}mµ…4ž†ªæžA³ÃÇÆíããö½Rü\ì}�z[ÊìÚ©-iè•:ë ð10.øU z¦˜ŸV:ÖÁcþ¾K¬áÖÇe�}ÒÓ Ç·¨¾Wꨵ¯ãåusG­Þ¹öµ´Ž´¯Ë›û¥¶*v”µ£P_©}9jú©× *[ûŒµC�A¯é�‡ú¥OzlÃþ åUåEn~"Þo¶¼²qJšzlÃû&–5ôX»êK�Tz_J劯+÷³ÆÑÏâ'}R{ÍÈx¾¼� ¥ ½¶¶*Ç8Ðxï�9â6nŠãc�û÷JާÏE~nÛð]E›¹¯™üœŸ^ÃÏTà‹ð«@õL±ŒÓ+h<ÐRîXO>ìWó¯›m5º‘µïðïÓì�T¶›Ímå¢KËJõ•Ú—£¢Ÿ¬¾‡ß+*Ôî»x‚kÄ‚ªfc�¥ßléï·˜¥¡W9n¢ä9v²Ù†¬¶!›d¬vþøPé})•+et?™��øêäú˜âøxø^Éñô¹ðÏeá§…×ð3ø"ü*P=“±?¦´nÖWwX{›ÊF-…•ê+µ/GE?Y}>¦°_¤«í0·Tärñ~Ódì�y¥%�MƒÎú.ûuÎý1û�úzšÊƒ¦ô¾”Ê•"ïS‡÷©Š^¼?¦ÔÏZ£­�ýþÓPÙdrù½¢·qc|<}¯äxú\<�-?-¼†Ÿ©ÀáW�ê½?VÑf6·WF�%¸œÏS,—ËõíçAõµ?,²ŸUÑh²ºœ¥°n6äÉÇêŸO¥×ŠúûuφϧÒ?0Jæ§UTG,¨jì¶½ºqóûÿ>¶tÖ—èD±°¶µÏf|P —�œ?&×w ô7•1wRx_Šå ‘}¬ßXG¯+è˺m£Î3<ê´ö5Þ7ˆ#ã ÔOA(¬mî²X$kïs×ëy(ŒÛããñ{Åšòð¹x[~Zx ?S€/¯Õó?Üö `^…IEND®B`‚ukui-notification/libukui-notification/doc/ukui-notification.qdoc0000664000175000017500000001051115160523734024353 0ustar fengfeng/*! \module UkuiNotification \title Ukui Notification C++ Classes \brief æ��ä¾› Ukui Notification å¼€å�‘接å�£çš„C++类实现. */ /*! \namespace UkuiNotification \inmodule UkuiNotification \keyword UkuiNotification Namespace \cmakepackage ukui-notification \brief The UkuiNotification namespace . */ /*! \page ukui-notification.html \title Ukui Notification ukui-notificaton包å�«UKUI桌é�¢çŽ¯å¢ƒçš„é€šçŸ¥æœ�务ã€�通知开å�‘接å�£å’Œé€šçŸ¥æŽ§åˆ¶æ�’件。本文档é‡�点介ç»�通知开å�‘接å�£çš„使用。 \list \li ukui-notification-server: 通知æœ�务 \li libukui-notification: 通知开å�‘接å�£ \li notification-ukcc-plugin: 通知控制æ�’ä»¶ \endlist \section1 通知æœ�务 ukui-notifiaction-serveræ��供了é�µå¾ªfreedesktop \l{https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html}{通知å��è®®}的通知æœ�务接å�£ã€‚ \section2 支æŒ�çš„Capabilities \table 80% \header \li Capability \li æ��è¿° \row \li actions \li 支æŒ�通知æ“�作按钮 \row \li body \li 支æŒ�富文本内容 \row \li body-hyperlinks \li 支æŒ�内容中的超链接 \row \li persistence \li 支æŒ�æŒ�久化通知 \row \li sound \li 支æŒ�通知声音æ��示 \endtable \section2 扩展hints \table \header \li Hint \li æ��è¿° \row \li x-ukui-display \li 标识通知弹窗应该显示在哪个DISPLAY上 \endtable \section2 扩展接å�£ \table 80% \header \li 接å�£å��ç§° \li å�‚æ•° \li 返回值 \li æ��è¿° \row \li org.ukui.NotificationServer.UpdateUnreadMessagesNumber \li String desktop_entry, UInt32 number \li void \li 更新应用的未读消æ�¯æ•°é‡� \row \li org.ukui.NotificationServer.RegisterNotificationControl \li String desktop_entry \li void \li 注册应用的通知控制 \endtable \section1 通知开å�‘接å�£ 通知æ��供了接å�£æ–¹ä¾¿å…¶ä»–应用注册为通知客户端,接收通知æœ�务å�‘æ�¥çš„通知以å�Šä¸Žé€šçŸ¥æœ�务进行其他交互。 \section2 使用 CMake: \code find_package(ukui-notification target_link_libraries(yourapp ukui-notification)) \endcode QMake: \code CONFIG += link_pkgconfig PKGCONFIG += ukui-notification \endcode \section2 关键接å�£ \table 80% \header \li Class/NameSpace \li 功能æ��è¿° \row \li UkuiNotification \li 通知系统的全局命å��空间 \row \li UkuiNotification::NotificationClient \li 通知系统客户端接å�£ \row \li UkuiNotification::NotificationCloseReason \li 通知关闭原因的类,æ��供了枚举 CloseReason \row \li UkuiNotification::NotificationGlobalSettings \li æ��供通知系统的全局é…�置管ç�†åŠŸèƒ½ \row \li UkuiNotification::PopupNotification \li 表示一æ�¡é€šçŸ¥ï¼ŒåŒ…å�«ä¸€æ�¡é€šçŸ¥æ¶ˆæ�¯çš„全部 \row \li UkuiNotification::SettingsPropertiesInfo \li å°�装通知设置属性的元数æ�®ä¿¡æ�¯ \row \li UkuiNotification::SingleApplicationSettings \li 表示å�•个应用的通知设置 \row \li UkuiNotification::ApplicationsSettings \li æ��供应用程åº�通知设置的管ç�†åŠŸèƒ½ \endtable \section1 通知控制æ�’ä»¶ 控制é�¢æ�¿é€šçŸ¥æ�’件,方便用户设置应用通知的æ�ƒé™�。 \image plugin_ui.png */ ukui-notification/libukui-notification/doc/notification-close-reason.qdoc0000664000175000017500000000076115160523734025776 0ustar fengfeng/*! \class UkuiNotification::NotificationCloseReason \inmodule UkuiNotification \inheaderfile notification-close-reason.h \brief 表示通知关闭原因的类,æ��供了枚举 CloseReason */ /*! \enum NotificationCloseReason::CloseReason 表示通知关闭原因的枚举 \value Expired 通知已过期 \value DismissedByUser 通知被用户关闭 \value Revoked 通知被å�‘é€�者通过调用 CloseNotification 接å�£å…³é—­ \value Undefined 未定义 */ukui-notification/libukui-notification/doc/settings-properties.qdoc0000664000175000017500000000376715160523734024763 0ustar fengfeng/*! \namespace UkuiNotification::SettingsProperty \inmodule UkuiNotification \brief 包å�«é€šçŸ¥è®¾ç½®å±žæ€§çš„æžšä¸¾å’Œç±»åž‹å®šä¹‰. */ /*! \enum UkuiNotification::SettingsProperty::Property The Property enum contains all settings property types. \value Invalid = 0 无效值 \value ScheduleTurnOnDND 是å�¦åœ¨è®¡åˆ’时间范围内自动开å�¯å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false \value ScheduleTurnOnDNDTime 勿扰模å¼�å¼€å�¯æ—¶é—´ï¼ŒQTime类型,默认值00:00 \value ScheduleTurnOffDNDTime 勿扰模å¼�结æ�Ÿæ—¶é—´ï¼ŒQTime类型,默认值00:00 \value DNDWhileMultiScreen 是å�¦å¤šå±�å�¯åŠ¨æ—¶æ˜¯å�¦å�¯åŠ¨å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false \value DNDWhileFullScreen 是å�¦å…¨å±�状æ€�下是å�¦å�¯åŠ¨å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false \value NotifyAlarmWhileDND 是å�¦å‹¿æ‰°æ¨¡å¼�下是å�¦å…�许闹钟æ��示,bool类型,默认值false \value ReceiveNotificationsFromApps 是å�¦èŽ·å�–æ�¥è‡ªåº”用程åº�的通知,bool类型,默认值true \value AllowNotify 是å�¦æŽ¥æ”¶å½“å‰�应用通知,bool类型,默认值true \value AllowSound 是å�¦æ‰“开通知æ��示声,bool类型,默认值true \value ShowContentOnLockScreen 是å�¦é”�å±�界é�¢æ˜¯å�¦æ˜¾ç¤ºé€šçŸ¥å†…容信æ�¯ï¼Œbool类型,默认值false \value ShowNotificationOnLockScreen 是å�¦é”�å±�界é�¢æ˜¯å�¦æ˜¾ç¤ºé€šçŸ¥ï¼Œbool类型,默认值false \value ConfigurationSource = 100 用于标记é…�ç½®æ�¥æº� */ /*! \typedef PropertyMap \relates UkuiNotification::SettingsProperty å�Œ QMap, 用于存储应用的通知设置属性和值 . */ /*! \variable UkuiNotification::GLOBAL_SETTINGS \brief 包å�«é€šçŸ¥å…¨å±€é…�置属性的列表. */ /*! \variable UkuiNotification::SINGLE_APPLICATION_SETTINGS \brief 包å�«å�•个应用的通知é…�置属性的列表. */ukui-notification/libukui-notification/doc/utils.qdoc0000664000175000017500000000250515160523734022056 0ustar fengfeng /*! \namespace UkuiNotification::Utils \inmodule UkuiNotification \brief æ��供一些方便的接å�£. */ /*! \fn UkuiSearch::ApplicationInfo& UkuiNotification::Utils::applicationInfo() 获å�–全局 UkuiSearch::ApplicationInfo 实例. */ /*! \fn QString UkuiNotification::Utils::desktopEntryFromPid(uint pid, bool isFullPath = false) æ ¹æ�®è¿›ç¨‹å�· \a pid 获å�–应用的 desktop 文件,\a isFullPath 是å�¦èŽ·å�–全路径的标志ä½�。 */ /*! \fn QString UkuiNotification::Utils::displayFromPid(uint pid) æ ¹æ�®è¿›ç¨‹å�· \a pid 获å�–应用所在的 DISPLAY */ /*! \fn QString UkuiNotification::Utils::desktopEntryFromName(QString desktopFileName) æ ¹æ�® \a desktopFileName 文件å��(ä¸�带å�Žç¼€ï¼‰èŽ·å�– desktop 全路径。 */ /*! \fn inline QString UkuiNotification::Utils::desktopEntry2Name(const QString& desktopFileName) Returns desktop 文件å��(ä¸�å�«å�Žç¼€ï¼‰,从 \a desktopFileName 文件全路径截å�–。 */ /*! \fn QString UkuiNotification::Utils::appNameForDesktopEntry(const QString& desktopFileName) 通过 desktop 全路径获å�–应用å��称获å�–应用å��称。 */ /*! \macro StringListDiff \relates UkuiNotification::Utils 返回 a 中存在 b 中ä¸�存在的元素, 求差集 \code StringListDiff(a, b) \endcode */ ukui-notification/libukui-notification/ukui-notification-config.cmake.in0000664000175000017500000000012315160523734025606 0ustar fengfeng@PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/ukui-notification-targets.cmake")ukui-notification/libukui-notification/ukui-notification.pc.in0000664000175000017500000000046315160523734023674 0ustar fengfengprefix=/usr exec_prefix=${prefix} libdir=${prefix}/lib/@CMAKE_LIBRARY_ARCHITECTURE@ includedir=${prefix}/include/ukui-notification Name: ukui-notification Description: ukui-notification header files URL: https://www.ukui.org/ Version: @VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lukui-notificationukui-notification/libukui-notification/CMakeLists.txt0000664000175000017500000001440715160523746022050 0ustar fengfengset(VERSION_MAJOR 1) set(VERSION_MINOR 1) set(VERSION_MICRO 0) #changelog v1.0.0->v1.1.0:超时时间统一为å�•ä½�为ms set(UKUI_NOTIFICATION_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}) include(FeatureSummary) find_package(ECM) option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" TRUE) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMAddQch) find_package(PkgConfig REQUIRED) set(UKUI_NOTIFICATION_EXTERNAL_LIBS "") set(UKUI_NOTIFICATION_PC_PKGS ukui-search) foreach(PC_LIB IN ITEMS ${UKUI_NOTIFICATION_PC_PKGS}) pkg_check_modules(${PC_LIB} REQUIRED ${PC_LIB}) if(${${PC_LIB}_FOUND}) include_directories(${${PC_LIB}_INCLUDE_DIRS}) link_directories(${${PC_LIB}_LIBRARY_DIRS}) list(APPEND UKUI_NOTIFICATION_EXTERNAL_LIBS ${${PC_LIB}_LIBRARIES}) endif() endforeach() include_directories(notification-settings) set(ukui-notification_LIB_SRCS notification-client.cpp notification-client.h popup-notification.h popup-notification.cpp ukui-notification_global.h notification-client-private.h utils.h utils.cpp notification-close-reason.h security-control-config.h security-control-config.cpp notification-settings/settings-properties.h notification-settings/settings-properties-info.h notification-settings/settings-properties-info.cpp notification-settings/settings-manager-private.h notification-settings/settings-manager.h notification-settings/settings-manager.cpp notification-settings/notification-global-settings.cpp notification-settings/notification-global-settings.h notification-settings/single-application-settings.cpp notification-settings/single-application-settings.h notification-settings/applications-settings.cpp notification-settings/applications-settings.h) set(HEADERS notification-client.h popup-notification.h notification-close-reason.h notification-settings/settings-properties.h notification-settings/settings-properties-info.h notification-settings/notification-global-settings.h notification-settings/single-application-settings.h notification-settings/applications-settings.h ukui-notification_global.h utils.h) if(COMMAND qt_add_dbus_interface) qt_add_dbus_interface(ukui-notification_LIB_SRCS ../dbus/org.freedesktop.Notifications.xml notifications_interface) qt_add_dbus_adaptor(ukui-notification_LIB_SRCS ../dbus/org.ukui.NotificationClient.xml notification-client-private.h UkuiNotification::NotificationClientPrivate) else() qt5_add_dbus_interface(ukui-notification_LIB_SRCS ../dbus/org.freedesktop.Notifications.xml notifications_interface) qt5_add_dbus_adaptor(ukui-notification_LIB_SRCS ../dbus/org.ukui.NotificationClient.xml notification-client-private.h UkuiNotification::NotificationClientPrivate) endif() add_library(ukui-notification SHARED ${ukui-notification_LIB_SRCS}) target_link_libraries(ukui-notification PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::DBus Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Qml ${UKUI_NOTIFICATION_EXTERNAL_LIBS} ukui-quick::platform ) include(CMakePackageConfigHelpers) set(CMAKE_CONFIG_INSTALL_DIR "/usr/share/cmake/ukui-notification") set(HEADERS_INSTALL_DIR /usr/include/ukui-notification) set(PC_INSTALL_DIR "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig") target_include_directories(ukui-notification PUBLIC $) if (BUILD_QCH) if (QT_VERSION_MAJOR EQUAL 6) set(QCH_INSTALL_DIR "/usr/share/doc/qt6/") else() set(QCH_INSTALL_DIR "/usr/share/qt5/doc/") endif() ecm_add_qch( ukui-notification-qch NAME ukui-notification BASE_NAME ukui-notification VERSION "${UKUI_NOTIFICATION_VERSION}" ORG_DOMAIN org.ukui SOURCES ${HEADERS} MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" LINK_QCHS INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} TAGFILE_INSTALL_DESTINATION ${QCH_INSTALL_DIR} QCH_INSTALL_DESTINATION ${QCH_INSTALL_DIR} COMPONENT Devel ) ecm_install_qch_export( TARGETS ukui-notification-qch FILE ukui-notification-qch-targets.cmake DESTINATION "${CMAKE_CONFIG_INSTALL_DIR}" COMPONENT Devel ) set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/ukui-notification-qch-targets.cmake\")") endif() configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/ukui-notification-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ukui-notification-config.cmake" INSTALL_DESTINATION ${CMAKE_CONFIG_INSTALL_DIR}) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/ukui-notification-config-version.cmake VERSION ${UKUI_NOTIFICATION_VERSION} COMPATIBILITY SameMajorVersion ) configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/ukui-notification.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ukui-notification.pc" INSTALL_DESTINATION ${PC_INSTALL_DIR}) set_target_properties(ukui-notification PROPERTIES VERSION ${UKUI_NOTIFICATION_VERSION} SOVERSION ${VERSION_MAJOR} OUTPUT_NAME ukui-notification ) install(TARGETS ukui-notification EXPORT ukui-notification PUBLIC_HEADER DESTINATION ${HEADERS_INSTALL_DIR} LIBRARY DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ) install(EXPORT ukui-notification FILE ukui-notification-targets.cmake DESTINATION ${CMAKE_CONFIG_INSTALL_DIR}) install(FILES ${HEADERS} DESTINATION ${HEADERS_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ukui-notification.pc DESTINATION ${PC_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ukui-notification-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/ukui-notification-config-version.cmake DESTINATION ${CMAKE_CONFIG_INSTALL_DIR}) if(BUILD_TEST) add_subdirectory(autotest) endif () ukui-notification/libukui-notification/security-control-config.h0000664000175000017500000000260415160523746024245 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: maomao */ #ifndef UKUI_NOTIFICATION_SECURITYCONTROLCONFIG_H #define UKUI_NOTIFICATION_SECURITYCONTROLCONFIG_H #include #include namespace UkuiNotification { class SecurityControlConfig : public QObject { Q_OBJECT public: static SecurityControlConfig& instance(); bool isNotificationEnable() const; public Q_SLOTS: void onControlConfigChanged(const QString &name); void onControlExited(); Q_SIGNALS: void configChanged(); void exitControl(); private: explicit SecurityControlConfig(QObject *parent = nullptr); void initData(); QJsonObject m_config; }; } #endif //UKUI_NOTIFICATION_SECURITYCONTROLCONFIG_H ukui-notification/libukui-notification/autotest/0000775000175000017500000000000015160523734021147 5ustar fengfengukui-notification/libukui-notification/autotest/settings-properties-info-test.h0000664000175000017500000000175415160523734027267 0ustar fengfeng/* * * Copyright (C) 2024, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom * */ #ifndef SETTINGS_PROPERTIES_INFO_TEST_H #define SETTINGS_PROPERTIES_INFO_TEST_H #include class SettingsPropertiesInfoTest : public QObject { Q_OBJECT private Q_SLOTS: void testName(); }; #endif //SETTINGS_PROPERTIES_INFO_TEST_H ukui-notification/libukui-notification/autotest/CMakeLists.txt0000664000175000017500000000117315160523734023711 0ustar fengfengset(CMAKE_AUTOMOC on) find_package(QT NAMES Qt6 Qt5 COMPONENTS Test REQUIRED) find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test) remove_definitions(-DQT_NO_CAST_FROM_ASCII) include_directories(../) add_executable(settingsPropertiesInfoTest settings-properties-info-test.cpp ../notification-settings/settings-properties-info.cpp) target_link_libraries(settingsPropertiesInfoTest PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test ukui-notification ) add_test(settingsPropertiesInfoTest ${CMAKE_BINARY_DIR}/autotests/settingsPropertiesInfoTest) ukui-notification/libukui-notification/autotest/settings-properties-info-test.cpp0000664000175000017500000000546115160523734027621 0ustar fengfeng/* * * Copyright (C) 2024, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom * */ #include "settings-properties-info-test.h" #include "settings-properties-info.h" #include void SettingsPropertiesInfoTest::testName() { UkuiNotification::SettingsPropertiesInfo info(UkuiNotification::SettingsProperty::Invalid); QCOMPARE(info.name(), "Invalid"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ScheduleTurnOnDND); QCOMPARE(info.name(), "ScheduleTurnOnDND"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ScheduleTurnOnDNDTime); QCOMPARE(info.name(), "ScheduleTurnOnDNDTime"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ScheduleTurnOffDNDTime); QCOMPARE(info.name(), "ScheduleTurnOffDNDTime"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::DNDWhileMultiScreen); QCOMPARE(info.name(), "DNDWhileMultiScreen"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::DNDWhileFullScreen); QCOMPARE(info.name(), "DNDWhileFullScreen"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::NotifyAlarmWhileDND); QCOMPARE(info.name(), "NotifyAlarmWhileDND"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ReceiveNotificationsFromApps); QCOMPARE(info.name(), "ReceiveNotificationsFromApps"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::AllowNotify); QCOMPARE(info.name(), "AllowNotify"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::AllowSound); QCOMPARE(info.name(), "AllowSound"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ShowContentOnLockScreen); QCOMPARE(info.name(), "ShowContentOnLockScreen"); info = UkuiNotification::SettingsPropertiesInfo(UkuiNotification::SettingsProperty::ShowNotificationOnLockScreen); QCOMPARE(info.name(), "ShowNotificationOnLockScreen"); } QTEST_GUILESS_MAIN(SettingsPropertiesInfoTest) ukui-notification/libukui-notification/notification-client.h0000664000175000017500000000526315160523734023420 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_CLIENT_H #define UKUI_NOTIFICATION_NOTIFICATION_CLIENT_H #include "ukui-notification_global.h" #include #include "popup-notification.h" #include "notification-close-reason.h" namespace UkuiNotification { class NotificationClientPrivate; /** * @short 通知中心客户端接å�£. * @author iaom */ class UKUINOTIFICATION_EXPORT NotificationClient : public QObject { Q_OBJECT public: explicit NotificationClient(QObject *parent = nullptr); ~NotificationClient(); /** * @brief 客户端注册,注册å�Žå�¯ç›‘å�¬é€šçŸ¥å�‘é€�&关闭信å�·æˆ–调用通知动作执行以å�Šä¸»åŠ¨å…³é—­é€šçŸ¥çš„æŽ¥å�£ã€‚ * @return 是å�¦æˆ�功æ“�作 * @retval æˆ�功:true;失败:false */ bool registerClient(); /** * @brief 注销当å‰�客户端,注销å�Žå°†ä¸�能å†�接收到新通知或通知关闭信å�·ã€‚ * @return 是å�¦æˆ�功æ“�作 * @retval æˆ�功:true;失败:false */ void unregisterClient(); /** * @brief 关闭一æ�¡é€šçŸ¥ * @param id:通知id * @param reason:通知关闭原因 * @return 是å�¦æˆ�功æ“�作 * @retval æˆ�功:true;失败:false */ bool closeNotification(uint id, NotificationCloseReason::CloseReason reason); /** * @brief 执行动作 * @param id: 通知id * @param action_key: action的唯一标识 * @return 是å�¦æˆ�功æ“�作 * @retval æˆ�功:true;失败:false */ bool invokeAction(uint id, const QString &action_key); Q_SIGNALS: /** * 通知æœ�务收到新通知时å�‘é€�. */ void newNotification(const UkuiNotification::PopupNotification ¬ification); /** * 通知被关闭时å�‘é€�. */ void notificationClosed(uint id, UkuiNotification::NotificationCloseReason::CloseReason closeReason); private: NotificationClientPrivate *d = nullptr; }; } // UkuiNotification #endif //UKUI_NOTIFICATION_NOTIFICATION_CLIENT_H ukui-notification/libukui-notification/security-control-config.cpp0000664000175000017500000000447515160523746024610 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: maomao */ #include "security-control-config.h" #include #include using namespace UkuiNotification; using namespace UkuiQuick; static const QString CONFIG_NAME = "ukui-notification-v11"; static const QString NOTIFICATION_DISABLE_KEY = "disableAllNotifications"; SecurityControlConfig &SecurityControlConfig::instance() { static SecurityControlConfig instance; return instance; } SecurityControlConfig::SecurityControlConfig(QObject *parent) : QObject(parent) { initData(); connect(FunctionControl::instance(), &FunctionControl::functionControlChanged, this, &SecurityControlConfig::onControlConfigChanged); connect(FunctionControl::instance(), &FunctionControl::functionControlExit, this, &SecurityControlConfig::onControlExited); } void SecurityControlConfig::initData() { FunctionControl::instance()->addWatch(CONFIG_NAME); m_config = FunctionControl::instance()->functionControlObject(CONFIG_NAME).value(CONFIG_NAME).toObject(); qDebug() << "Init SecurityCtrl config data" << m_config; } void SecurityControlConfig::onControlExited() { m_config = {}; Q_EMIT exitControl(); } void SecurityControlConfig::onControlConfigChanged(const QString &name) { if (name == CONFIG_NAME) { m_config = FunctionControl::instance()->functionControlObject(CONFIG_NAME).value(CONFIG_NAME).toObject(); qDebug() << "Refresh SecurityCtrl config" << m_config; Q_EMIT configChanged(); } } bool SecurityControlConfig::isNotificationEnable() const { return m_config.isEmpty() || !m_config.value(NOTIFICATION_DISABLE_KEY).toBool(); }ukui-notification/libukui-notification/notification-client-private.h0000664000175000017500000000500115160523734025056 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_CLIENT_PRIVATE_H #define UKUI_NOTIFICATION_NOTIFICATION_CLIENT_PRIVATE_H #include #include #include #include "notifications_interface.h" #include "notification-client.h" namespace UkuiNotification { class NotificationClientPrivate : public QObject { Q_OBJECT public: explicit NotificationClientPrivate(NotificationClient *q); ~NotificationClientPrivate() override; /** * åˆ�始化客户端dbusæœ�务并注册æˆ�为客户端 * @return */ bool init(); /** * 注销 */ void unregisterClient(); static QString clientServicePath(); static QString clientServiceInterface(); void Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout); bool closeNotification(uint id, NotificationCloseReason::CloseReason reason); bool invokeAction(uint id, const QString &action_key); private Q_SLOTS: void notificationClosed(uint id, uint reason); void serviceChange(const QString &service, const QString &oldOwner, const QString &newOwner); /** * 用于注册客户端,或在æœ�务å�‘生å�˜åŒ–(é‡�å�¯ï¼‰å�Žé‡�新注册客户端 * @return true æˆ�功 false 失败 */ bool registerClient(); private: OrgFreedesktopNotificationsInterface* m_notificationsInterface = nullptr; QDBusInterface *m_serverInterface = nullptr; QDBusServiceWatcher *m_watcher = nullptr; bool m_registered = false; NotificationClient *q; }; } #endif //UKUI_NOTIFICATION_NOTIFICATION_CLIENT_PRIVATE_H ukui-notification/libukui-notification/notification-settings/0000775000175000017500000000000015160523746023626 5ustar fengfengukui-notification/libukui-notification/notification-settings/settings-manager.h0000664000175000017500000000471615160523746027257 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef SETTINGS_MANAGER_H #define SETTINGS_MANAGER_H #include #include "settings-properties.h" namespace UkuiNotification { class SettingsManagerPrivate; class SettingsManager : public QObject { Q_OBJECT public: static SettingsManager *self(); ~SettingsManager() = default; /** * 获å�–全局é…�ç½® */ QJsonObject getGlobalSettings(); /** * @brief getAllAppSettings * 获å�–当å‰�用户全部应用通知相关é…�置信æ�¯ã€‚ */ QJsonObject getAllAppSettings(); /** * @brief getAppSettings * 获å�–当å‰�用户æŸ�个应用通知相关é…�置信æ�¯ã€‚ * @param appDesktopName ä¼ "default"获å�–é…�置默认值 */ QJsonObject getAppSettings(const QString &appDesktopName); /** * 获å�–应用通知设置默认值 * @return */ QJsonObject getAppDefaultSettings(); /** * 获å�–默认应用列表 * @return */ void getAppList(QStringList &defaultAppList, QStringList &otherAppList); bool setGlobalSettings(SettingsProperty::Property key, const QVariant &value); bool setAppSettings(const QString &appDesktopName, SettingsProperty::Property key, const QVariant &value); bool addAppSettings(const QString &appDesktopName, const QString &configurationSource = "Default"); bool deleteAppSettings(const QString &appDesktopName); bool hasAppSettings(const QString &appDesktopName); bool isInAllowList(const QString &appDesktopName); Q_SIGNALS: void settingsDataChanged(); void newAppInstalled(const QString &desktopEntry); void appUninstalled(const QString &desktopEntry); private: SettingsManager(QObject *parent = nullptr); SettingsManagerPrivate * d = nullptr; }; } #endif ukui-notification/libukui-notification/notification-settings/notification-global-settings.h0000664000175000017500000000774015160523734031566 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_GLOBAL_SETTINGS_H #define UKUI_NOTIFICATION_NOTIFICATION_GLOBAL_SETTINGS_H #include #include #include "settings-properties.h" namespace UkuiNotification { class NotificationGlobalSettingsPrivate; /** * @short 通知的全局设置. * @author iaom */ class NotificationGlobalSettings : public QObject { Q_OBJECT Q_PROPERTY(bool scheduleTurnOnDND READ scheduleTurnOnDND WRITE setScheduleTurnOnDND NOTIFY scheduleTurnOnDNDChanged) Q_PROPERTY(QTime scheduleTurnOnDNDTime READ scheduleTurnOnDNDTime WRITE setScheduleTurnOnDNDTime NOTIFY scheduleTurnOnDNDTimeChanged) Q_PROPERTY(QTime scheduleTurnOffDNDTime READ scheduleTurnOffDNDTime WRITE setScheduleTurnOffDNDTime NOTIFY scheduleTurnOffDNDTimeChanged) Q_PROPERTY(bool DNDWhileMultiScreen READ DNDWhileMultiScreen WRITE setDNDWhileMultiScreen NOTIFY DNDWhileMultiScreenChanged) Q_PROPERTY(bool DNDWhileFullScreen READ DNDWhileFullScreen WRITE setDNDWhileFullScreen NOTIFY DNDWhileFullScreenChanged) Q_PROPERTY(bool notifyAlarmWhileDND READ notifyAlarmWhileDND WRITE setNotifyAlarmWhileDND NOTIFY notifyAlarmWhileDNDChanged) Q_PROPERTY(bool receiveNotificationsFromApps READ receiveNotificationsFromApps WRITE setReceiveNotificationsFromApps NOTIFY receiveNotificationsFromAppsChanged) Q_PROPERTY(bool DND READ isDND NOTIFY dndChanged) public: NotificationGlobalSettings(QObject *parent = nullptr); ~NotificationGlobalSettings(); /** * 自动开å�¯å‹¿æ‰°æ¨¡å¼� * @return true 自动开å�¯ false 关闭 */ bool scheduleTurnOnDND(); void setScheduleTurnOnDND(bool enable); /** * 自动开å�¯å‹¿æ‰°æ¨¡å¼�æ—¶é—´ * @return */ QTime scheduleTurnOnDNDTime(); void setScheduleTurnOnDNDTime(const QTime &time); /** * 自动关闭勿扰模å¼�æ—¶é—´ * @return */ QTime scheduleTurnOffDNDTime(); void setScheduleTurnOffDNDTime(const QTime &time); /** * 多å±�连接时自动开å�¯å‹¿æ‰°æ¨¡å¼� * @return */ bool DNDWhileMultiScreen(); void setDNDWhileMultiScreen(bool enable); /** * å…¨å±�模å¼�下自动开å�¯å‹¿æ‰°æ¨¡å¼� * @return */ bool DNDWhileFullScreen(); void setDNDWhileFullScreen(bool enable); /** * 勿扰模å¼�下å…�许闹钟æ��示 * @return */ bool notifyAlarmWhileDND(); void setNotifyAlarmWhileDND(bool enable); /** * 获å�–æ�¥è‡ªåº”用的通知 * @return */ bool receiveNotificationsFromApps(); void setReceiveNotificationsFromApps(bool enable); /** * 当å‰�是å�¦å¤„于勿扰模å¼� * @return */ bool isDND(); Q_SIGNALS: void scheduleTurnOnDNDChanged(bool); void scheduleTurnOnDNDTimeChanged(QTime); void scheduleTurnOffDNDTimeChanged(QTime); void DNDWhileMultiScreenChanged(bool); void DNDWhileFullScreenChanged(bool); void notifyAlarmWhileDNDChanged(bool); void receiveNotificationsFromAppsChanged(bool); void dndChanged(bool); private Q_SLOTS: void settingsDataChanged(); void screenModeChanged(int mode); void checkDNDMode(); void checkTimeForDND(); private: NotificationGlobalSettingsPrivate *d = nullptr; }; } // UkuiNotification #endif //UKUI_NOTIFICATION_NOTIFICATION_GLOBAL_SETTINGS_H ukui-notification/libukui-notification/notification-settings/single-application-settings.cpp0000664000175000017500000001707515160523746031764 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "single-application-settings.h" #include #include #include "settings-properties-info.h" #include "applications-settings.h" namespace UkuiNotification{ class SingleApplicationSettingsPrivate { friend class SingleApplicationSettings; public: SingleApplicationSettingsPrivate(); SingleApplicationSettingsPrivate(const SingleApplicationSettingsPrivate &other); ~SingleApplicationSettingsPrivate(); private: QJsonObject m_settings; QString m_desktopEntry; }; } using namespace UkuiNotification; SingleApplicationSettingsPrivate::SingleApplicationSettingsPrivate() { } SingleApplicationSettingsPrivate::SingleApplicationSettingsPrivate(const SingleApplicationSettingsPrivate &other) { m_settings = other.m_settings; m_desktopEntry = other.m_desktopEntry; } SingleApplicationSettingsPrivate::~SingleApplicationSettingsPrivate() { } /*! \class UkuiNotification::SingleApplicationSettings \inmodule UkuiNotification \inheaderfile notification-settings/single-application-settings.h \brief 表示å�•个应用的通知设置 */ /*! Constructor frome desktopEntry. */ SingleApplicationSettings::SingleApplicationSettings(const QString &desktopEntry, QObject *parent) : QObject(parent) , d(new SingleApplicationSettingsPrivate) { d->m_desktopEntry = desktopEntry; init(); } /*! Copy Constructor. */ SingleApplicationSettings::SingleApplicationSettings(const SingleApplicationSettings &other) : d(new SingleApplicationSettingsPrivate(*other.d)) { init(); } /*! Copy Assignment Operator. */ SingleApplicationSettings &SingleApplicationSettings::operator=(const SingleApplicationSettings &other) { *d = *other.d; init(); return *this; } /*! Move Assignment Operator. */ SingleApplicationSettings &SingleApplicationSettings::operator=(SingleApplicationSettings &&other) Q_DECL_NOEXCEPT { d = other.d; other.d = nullptr; init(); return *this; } /*! Destructor. */ SingleApplicationSettings::~SingleApplicationSettings() { if(d) { delete d; d = nullptr; } } void SingleApplicationSettings::init() { d->m_settings = ApplicationsSettings::self()->getAppSettings(d->m_desktopEntry); if(d->m_desktopEntry != QStringLiteral("default") && !d->m_desktopEntry.isEmpty()) { connect(ApplicationsSettings::self(), &ApplicationsSettings::applicationUninstalled, this, &SingleApplicationSettings::appUninstalled); connect(ApplicationsSettings::self(), &ApplicationsSettings::settingsUpdated, this, &SingleApplicationSettings::settingsDataChanged); } } /*! \property SingleApplicationSettings::allowNotify 此属性表示应用是å�¦å…�许å�‘é€�通知。 */ bool SingleApplicationSettings::allowNotify() const { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::AllowNotify).name()).toVariant().toBool(); } /*! \property SingleApplicationSettings::allowSound 此属性表示应用是å�¦æ’­æ”¾å£°éŸ³ã€‚ */ bool SingleApplicationSettings::allowSound() const { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::AllowSound).name()).toVariant().toBool(); } /*! \property SingleApplicationSettings::showContentOnLockScreen 此属性表示应用是å�¦åœ¨é”�å±�界é�¢æ˜¾ç¤ºé€šçŸ¥å†…容。 */ bool SingleApplicationSettings::showContentOnLockScreen() const { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::ShowContentOnLockScreen).name()).toVariant().toBool(); } /*! \property SingleApplicationSettings::showNotificationOnLockScreen 此属性表示应用是å�¦åœ¨é”�å±�界é�¢æ˜¾ç¤ºé€šçŸ¥ã€‚ */ bool SingleApplicationSettings::showNotificationOnLockScreen() const { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::ShowNotificationOnLockScreen).name()).toVariant().toBool(); } //SettingsProperty::Property UkuiNotification::SingleApplicationSettings::popupStyle() const //{ // return SettingsPropertiesInfo::fromName(d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::PopupStyle).name()).toString()).property(); //} void SingleApplicationSettings::settingsDataChanged(const QString& desktopEntry) { if (desktopEntry != d->m_desktopEntry) { return; } QJsonObject data = ApplicationsSettings::self()->getAppSettings(d->m_desktopEntry); if(data.isEmpty()) { return; } for(SettingsProperty::Property property : SINGLE_APPLICATION_SETTINGS) { QString name = SettingsPropertiesInfo(property).name(); QJsonValue value = data.value(name); if(d->m_settings.value(name) != value) { d->m_settings.insert(name, value); switch (property) { case SettingsProperty::AllowNotify: Q_EMIT allowNotifyChanged(value.toVariant().toBool()); break; case SettingsProperty::AllowSound: Q_EMIT allowSoundChanged(value.toVariant().toBool()); break; case SettingsProperty::ShowContentOnLockScreen: Q_EMIT showContentOnLockScreenChanged(value.toVariant().toBool()); break; case SettingsProperty::ShowNotificationOnLockScreen: Q_EMIT showNotificationOnLockScreenChanged(value.toVariant().toBool()); break; // case SettingsProperty::PopupStyle: // Q_EMIT popupStyleChanged(SettingsPropertiesInfo::fromName(value.toString()).property()); // break; default: break; } } } } void SingleApplicationSettings::appUninstalled(const QString &desktopEntry) { if(d->m_desktopEntry == desktopEntry) { Q_EMIT uninstalled(); } } void SingleApplicationSettings::setAllowNotify(bool enable) { qWarning() << d->m_desktopEntry << enable; ApplicationsSettings::self()->setAppSetting(d->m_desktopEntry, SettingsProperty::AllowNotify, enable); } void SingleApplicationSettings::setAllowSound(bool enable) { ApplicationsSettings::self()->setAppSetting(d->m_desktopEntry, SettingsProperty::AllowSound, enable); } void SingleApplicationSettings::setShowContentOnLockScreen(bool enable) { ApplicationsSettings::self()->setAppSetting(d->m_desktopEntry, SettingsProperty::ShowContentOnLockScreen, enable); } void SingleApplicationSettings::setShowNotificationOnLockScreen(bool enable) { ApplicationsSettings::self()->setAppSetting(d->m_desktopEntry, SettingsProperty::ShowNotificationOnLockScreen, enable); } //void SingleApplicationSettings::setPopupStyle(SettingsProperty::Property style) //{ // ApplicationsSettings::self()->setAppSetting(d->m_desktopEntry, SettingsProperty::PopupStyle, style); //} /*! 返回当å‰�应用的 desktop entry. */ QString SingleApplicationSettings::desktopEntry() const { return d->m_desktopEntry; } ukui-notification/libukui-notification/notification-settings/settings-manager.cpp0000664000175000017500000003722015160523746027606 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "settings-manager.h" #include "settings-manager-private.h" #include #include #include #include #include #include #include #include #include #include #include "settings-properties-info.h" #include "utils.h" using namespace UkuiNotification; static const QString SETTINGS_FILE_PATH = QDir::homePath() + QStringLiteral("/.config/org.ukui/ukui-notification"); static const QString SETTINGS_FILE_PATH_NAME = SETTINGS_FILE_PATH + QStringLiteral("/ukui-notification-settings.json"); static const QString SETTINGS_ALLOW_LIST_NAME = QStringLiteral("/etc/ukui/ukui-notification/notification-allowlist.json"); static const QString DEFAULT_APP_LIST_PATH = QStringLiteral("/etc/ukui/ukui-notification/default-app/"); static std::once_flag flag; static SettingsManager *s_self; SettingsManagerPrivate::SettingsManagerPrivate(QObject* parent) : QObject(parent) , m_applicationInfo(Utils::applicationInfo()) , m_allowListData(loadAllowListData()) { for(SettingsProperty::Property property : SINGLE_APPLICATION_SETTINGS) { SettingsPropertiesInfo info(property); m_applicationDefaultSettings.insert(info.name(), info.defaultValue()); } } SettingsManagerPrivate::~SettingsManagerPrivate() { } void SettingsManagerPrivate::init() { m_watcher = new QFileSystemWatcher(this); connect(m_watcher, &QFileSystemWatcher::fileChanged, this, &SettingsManagerPrivate::checkAndLoad); connect(&m_applicationInfo, &UkuiSearch::ApplicationInfo::appDBItems2BDelete, this, &SettingsManagerPrivate::desktopFileDelete); checkAndLoad(); } void SettingsManagerPrivate::checkAndLoad() { QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); QFile settingsFile(SETTINGS_FILE_PATH_NAME); if (!settingsFile.exists()) { qDebug() << SETTINGS_FILE_PATH_NAME << " is not exist, start create settings file."; createSettingsFile(); lockFile.unlock(); return; } if (!settingsFile.open(QFile::ReadOnly)) { qWarning() << "SettingsManagerPrivate: configuration file " << settingsFile.fileName() << "open failed !"; m_watcher->addPath(SETTINGS_FILE_PATH_NAME); lockFile.unlock(); return; } // 读å�–jsonæ•°æ�® QByteArray byteArray = settingsFile.readAll(); settingsFile.close(); QJsonParseError errRpt; QJsonDocument jsonDocument(QJsonDocument::fromJson(byteArray, &errRpt)); if (errRpt.error != QJsonParseError::NoError) { qWarning() << "SettingsManagerPrivate: Incorrect configuration files. JSON parse error"; createSettingsFile(); lockFile.unlock(); return; } // 读å�–é…�置文件 QJsonObject settingsData = jsonDocument.object(); QString version = settingsData.value("VERSION").toString(); updateSettingsFile(version, QStringLiteral(NOTIFICATION_SETTINGS_VERSION), settingsData); lockFile.unlock(); } void SettingsManagerPrivate::createSettingsFile() { initSettingsData(m_settingsData); save2SettingsFile(m_settingsData); Q_EMIT settingsUpdateFinished(); m_watcher->addPath(SETTINGS_FILE_PATH_NAME); } void SettingsManagerPrivate::updateSettingsFile(const QString& oldVersion, const QString& newVersion, QJsonObject& data) { if (oldVersion.toDouble() > newVersion.toDouble()) { qCritical() << "Notification configuration version has been updated to "<< oldVersion << ", current version is " << newVersion <<", please restart the application"; return; } bool needUpdateFileVersion = false; if (oldVersion == "2.0" && newVersion.toDouble() > 2.0) { needUpdateFileVersion = true; } //版本å�·ä¸�å�˜ï¼Œ 或者版本å�·2.0å�‡çº§åˆ°é«˜ç‰ˆæœ¬ï¼Œå�ªèŽ·å�–é…�置,其他ä¸�å�šå¤„ç�† if (oldVersion == newVersion || needUpdateFileVersion) { if(m_needCheckApplist) { checkApplicationList(data); m_needCheckApplist = false; } m_settingsData.swap(data); if (needUpdateFileVersion) { m_settingsData.insert("VERSION", newVersion); save2SettingsFile(m_settingsData); } Q_EMIT settingsUpdateFinished(); m_watcher->addPath(SETTINGS_FILE_PATH_NAME); return; } //版本å�·1.0å�‡çº§åˆ°é«˜ç‰ˆæœ¬ï¼Œé…�置清空 if (oldVersion == "1.0" && newVersion.toDouble() > 1.0) { m_watcher->removePath(SETTINGS_FILE_PATH_NAME); QJsonObject newData; //åˆ�始化当å‰�版本默认值 initSettingsData(newData); //写入数æ�® m_settingsData.swap(newData); save2SettingsFile(m_settingsData); m_watcher->addPath(SETTINGS_FILE_PATH_NAME); Q_EMIT settingsUpdateFinished(); qDebug() << "Notification settings version is different, need update! configFile:" << oldVersion << " new:" << newVersion; } } QStringList SettingsManagerPrivate::getAppInfo() { QStringList result; for (const QString& desktopPath : m_applicationInfo.getInfo(UkuiSearch::ApplicationProperties{}).keys()) { if (!result.contains(desktopPath)) { result << UkuiNotification::Utils::desktopEntry2Name(desktopPath); } } return result; } void SettingsManagerPrivate::initSettingsData(QJsonObject &data) { data.insert("VERSION", QString(NOTIFICATION_SETTINGS_VERSION)); //全局设置 QJsonObject globalSettings; for(SettingsProperty::Property property : GLOBAL_SETTINGS) { SettingsPropertiesInfo info(property); globalSettings.insert(info.name(), info.defaultValue()); } data.insert(QStringLiteral("Global"), globalSettings); } void SettingsManagerPrivate::desktopFileDelete(const QStringList &data) { if (data.isEmpty()) { return; } if (qApp->property("IS_UKUI_NOTIFICATION_SERVER").toBool()) { QJsonObject applicationsSettings = m_settingsData.value(QStringLiteral("Applications")).toObject(); for (const QString &app : data) { applicationsSettings.remove(UkuiNotification::Utils::desktopEntry2Name(app)); } m_settingsData.insert(QStringLiteral("Applications"), applicationsSettings); QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); m_watcher->removePath(SETTINGS_FILE_PATH_NAME); save2SettingsFile(m_settingsData); m_watcher->addPath(SETTINGS_FILE_PATH_NAME); lockFile.unlock(); Q_EMIT settingsUpdateFinished(); } for(const QString &app : data) { Q_EMIT appUninstalled(UkuiNotification::Utils::desktopEntry2Name(app)); } } void SettingsManagerPrivate::save2SettingsFile(const QJsonObject &jsonDocData) { QDir dir; QString configFileDir(SETTINGS_FILE_PATH); if (!dir.exists(configFileDir)) { if (!dir.mkdir(configFileDir)) { qWarning() << "Unable to create notification settings config file."; return; } } QFile settingsFile(SETTINGS_FILE_PATH_NAME); settingsFile.open(QIODevice::WriteOnly | QIODevice::Truncate); if (settingsFile.write(QJsonDocument(jsonDocData).toJson()) == -1) { qWarning() << "SettingsManagerPrivate: Error saving configuration file."; } settingsFile.flush(); settingsFile.close(); } void SettingsManagerPrivate::checkApplicationList(QJsonObject &data) { QStringList appList = getAppInfo(); QStringList appNeedRemoved; QJsonObject applicationSettings = data.value(QStringLiteral("Applications")).toObject(); for(const QString &desktopFile : applicationSettings.keys()) { if(!appList.contains(desktopFile)) { appNeedRemoved.append(desktopFile); } } //移除应用列表里已ç»�ä¸�存在的应用 for(const QString &desktopFile : appNeedRemoved) { applicationSettings.remove(desktopFile); } data.insert(QStringLiteral("Applications"), applicationSettings); save2SettingsFile(data); } QJsonObject SettingsManagerPrivate::loadAllowListData() { QFile file(SETTINGS_ALLOW_LIST_NAME); if (!file.exists()) { qWarning() << "SettingsManagerPrivate::loadAllowListData" << file.fileName() << "is not exists"; return QJsonObject(); } if (!file.open(QFile::ReadOnly)) { qWarning() << "SettingsManagerPrivate: configuration file " << file.fileName() << "open failed !"; return QJsonObject(); } // 读å�–jsonæ•°æ�® QByteArray byteArray = file.readAll(); file.close(); QJsonParseError errRpt; QJsonDocument jsonDocument(QJsonDocument::fromJson(byteArray, &errRpt)); if (errRpt.error != QJsonParseError::NoError) { qWarning() << "SettingsManagerPrivate: Incorrect configuration files " << file.fileName() << "JSON parse error"; return QJsonObject(); } return jsonDocument.object(); } SettingsManager::SettingsManager(QObject *parent) : QObject(parent), d(new SettingsManagerPrivate(this)) { connect(d, &SettingsManagerPrivate::settingsUpdateFinished, this, &SettingsManager::settingsDataChanged); connect(d, &SettingsManagerPrivate::appUninstalled, this, &SettingsManager::appUninstalled); d->init(); } QJsonObject SettingsManager::getGlobalSettings() { return d->m_settingsData.value(QStringLiteral("Global")).toObject(); } QJsonObject SettingsManager::getAllAppSettings() { return d->m_settingsData.value(QStringLiteral("Applications")).toObject(); } QJsonObject SettingsManager::getAppSettings(const QString &appDesktopName) { if(appDesktopName == QStringLiteral("default") || appDesktopName.isEmpty()) { return d->m_applicationDefaultSettings; } QJsonValue value = d->m_settingsData.value(QStringLiteral("Applications")).toObject().value(appDesktopName); if(value.isUndefined()) { return {}; } return value.toObject(); } QJsonObject SettingsManager::getAppDefaultSettings() { return d->m_applicationDefaultSettings; } void SettingsManager::getAppList(QStringList &defaultAppList, QStringList &otherAppList) { auto checkDefaultApp = [](const QJsonObject& appData) -> bool{ if (appData.value("ConfigurationSource").toString() == QStringLiteral("Default")) { return true; } return false; }; QJsonObject applicationsData = d->m_settingsData.value(QStringLiteral("Applications")).toObject(); for(const QString &appName : applicationsData.keys()) { QJsonObject appData = applicationsData.value(appName).toObject(); if (checkDefaultApp(appData)) { defaultAppList << appName; } else { otherAppList << appName; } } } SettingsManager *SettingsManager::self() { std::call_once(flag, [ & ] { s_self = new SettingsManager(); }); return s_self; } bool SettingsManager::setGlobalSettings(SettingsProperty::Property key, const QVariant &value) { if(!GLOBAL_SETTINGS.contains(key)) { return false; } auto info = SettingsPropertiesInfo(key); QString valueToSet = info.valueToString(value); QJsonObject data = d->m_settingsData.value(QStringLiteral("Global")).toObject(); data.insert(info.name(), valueToSet); d->m_settingsData.insert(QStringLiteral("Global"), data); QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); d->save2SettingsFile(d->m_settingsData); lockFile.unlock(); return true; } bool SettingsManager::setAppSettings(const QString &appDesktopName, SettingsProperty::Property key, const QVariant &value) { if(!SINGLE_APPLICATION_SETTINGS.contains(key)) { return false; } QJsonObject appsData = d->m_settingsData.value(QStringLiteral("Applications")).toObject(); QJsonValue dataValue = appsData.value(appDesktopName); if(dataValue.isUndefined()) { return false; } QJsonObject oneAppData = dataValue.toObject(); auto info = SettingsPropertiesInfo(key); QString valueToSet = info.valueToString(value); if(oneAppData.value(info.name()).toString() == valueToSet) { return false; } oneAppData.insert(info.name(), valueToSet); appsData.insert(appDesktopName, oneAppData); d->m_settingsData.insert(QStringLiteral("Applications"), appsData); QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); d->save2SettingsFile(d->m_settingsData); lockFile.unlock(); return true; } bool SettingsManager::addAppSettings(const QString &appDesktopName, const QString &configurationSource) { if (appDesktopName.isEmpty()) { qWarning() << "SettingsManager::addAppSettings:" << "app desktop name is empty."; return false; } QJsonObject appsData = d->m_settingsData.value(QStringLiteral("Applications")).toObject(); //标记é…�ç½®æ�¥æº� d->m_applicationDefaultSettings.insert(QStringLiteral("ConfigurationSource"), configurationSource); appsData.insert(appDesktopName, d->m_applicationDefaultSettings); d->m_settingsData.insert(QStringLiteral("Applications"), appsData); QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); d->m_watcher->removePath(SETTINGS_FILE_PATH_NAME); d->save2SettingsFile(d->m_settingsData); d->m_watcher->addPath(SETTINGS_FILE_PATH_NAME); lockFile.unlock(); return true; } bool SettingsManager::deleteAppSettings(const QString &appDesktopName) { if (appDesktopName.isEmpty()) { qWarning() << "SettingsManager::deleteAppSettings:" << "app desktop name is empty."; return false; } QJsonObject appsData = d->m_settingsData.value(QStringLiteral("Applications")).toObject(); if (!appsData.contains(appDesktopName)) { qWarning() << "SettingsManager::deleteAppSettings:" << "Applications settings not containns "<< appDesktopName; return false; } appsData.remove(appDesktopName); d->m_settingsData.insert(QStringLiteral("Applications"), appsData); QLockFile lockFile(SETTINGS_FILE_PATH + QStringLiteral("ukui-notification-settings.json.lock")); lockFile.lock(); d->m_watcher->removePath(SETTINGS_FILE_PATH_NAME); d->save2SettingsFile(d->m_settingsData); d->m_watcher->addPath(SETTINGS_FILE_PATH_NAME); lockFile.unlock(); return true; } bool SettingsManager::hasAppSettings(const QString &appDesktopName) { if (appDesktopName.isEmpty()) { qWarning() << "SettingsManager::hasAppSettings" << "app desktop name is empty."; return false; } return !d->m_settingsData.value(QStringLiteral("Applications")).toObject().value(appDesktopName).isUndefined(); } bool SettingsManager::isInAllowList(const QString &appDesktopName) { if (appDesktopName.isEmpty()) { qWarning() << "SettingsManager::isInAllowList:" <<"app desktop name is empty."; return false; } return d->m_allowListData.value(QStringLiteral("Applications")).toObject().keys().contains(appDesktopName); } ukui-notification/libukui-notification/notification-settings/notification-global-settings.cpp0000664000175000017500000003605515160523746032125 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "notification-global-settings.h" #include #include #include #include #include #include #include #include #include "settings-manager.h" #include "settings-properties.h" #include "settings-properties-info.h" namespace UkuiNotification{ class NotificationGlobalSettingsPrivate { friend class NotificationGlobalSettings; public: ~NotificationGlobalSettingsPrivate() { if (m_usdInterface) { delete m_usdInterface; m_usdInterface = nullptr; } if(m_timeChecktimer) { delete m_timeChecktimer; m_timeChecktimer = nullptr; } } private: QJsonObject m_settings; QDBusInterface *m_usdInterface = nullptr; int m_currentScreenMode = 0; //0-仅主å±�ï¼›1-镜åƒ�ï¼›2-扩展;3-仅副å±� QTimer *m_timeChecktimer = nullptr; bool m_isDnD = false; }; } using namespace UkuiNotification;// UkuiNotification /*! \class UkuiNotification::NotificationGlobalSettings \inmodule UkuiNotification \inheaderfile notification-settings/notification-global-settings.h \brief æ��供通知系统的全局é…�置管ç�†åŠŸèƒ½. 该类负责管ç�†é€šçŸ¥ç³»ç»Ÿçš„全局设置,包括勿扰模å¼�(DND)çš„é…�ç½®ã€�时间设置以å�Šå±�幕状æ€�相关的设置。 主è¦�功能包括: \list \li 勿扰模å¼�的开å�¯/关闭状æ€�管ç�† \li 勿扰模å¼�计划开å�¯/关闭时间设置 \li 多å±�幕和全å±�状æ€�下的勿扰模å¼�设置 \li 通知接收和闹钟在勿扰模å¼�下警报设置 \endlist */ /*! Constructor */ NotificationGlobalSettings::NotificationGlobalSettings(QObject *parent) : QObject(parent), d(new NotificationGlobalSettingsPrivate()) { qmlRegisterUncreatableType("org.ukui.notification.client", 1, 0, "NotificationGlobalSettings", ""); connect(SettingsManager::self(), &SettingsManager::settingsDataChanged, this, &NotificationGlobalSettings::settingsDataChanged); d->m_settings = SettingsManager::self()->getGlobalSettings(); d->m_usdInterface = new QDBusInterface("org.ukui.SettingsDaemon", "/org/ukui/SettingsDaemon/xrandr", "org.ukui.SettingsDaemon.xrandr"); if(!d->m_usdInterface->isValid()) { qWarning() << "NotificationGlobalSettings: Fail to creat org.ukui.SettingsDaemon dbus interface!"; return; } QDBusReply reply = d->m_usdInterface->call("getScreenMode", "ukui-notification-server"); if (reply.isValid()) { d->m_currentScreenMode = reply.value(); } else { qWarning()<<"NotificationGlobalSettings: Call getScreenMode failed!"; } connect(d->m_usdInterface, SIGNAL(screenModeChanged(int)), this, SLOT(screenModeChanged(int))); d->m_timeChecktimer = new QTimer; d->m_timeChecktimer->setSingleShot(true); //设置为精密定时器 d->m_timeChecktimer->setTimerType(Qt::PreciseTimer); connect(d->m_timeChecktimer, &QTimer::timeout, this, &NotificationGlobalSettings::checkTimeForDND); d->m_isDnD = isDND(); checkTimeForDND(); } /*! Destructor */ NotificationGlobalSettings::~NotificationGlobalSettings() { if(d) { delete d; d = nullptr; } } /*! \property NotificationGlobalSettings::scheduleTurnOnDND 此属性管ç�†å‹¿æ‰°æ¨¡å¼�计划开关,开å�¯ä¹‹å�Žä¼šæ ¹æ�®è®¡åˆ’æ—¶é—´å¼€å�¯/关闭勿扰模å¼�. \sa scheduleTurnOnDNDTime, scheduleTurnOffDNDTime */ bool NotificationGlobalSettings::scheduleTurnOnDND() { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::ScheduleTurnOnDND).name()).toVariant().toBool(); } /*! \property NotificationGlobalSettings::scheduleTurnOnDNDTime 此属性为勿扰模å¼�计划开å�¯æ—¶é—´ \sa scheduleTurnOffDNDTime */ QTime NotificationGlobalSettings::scheduleTurnOnDNDTime() { SettingsPropertiesInfo dndOnTimeInfo(SettingsProperty::ScheduleTurnOnDNDTime); QString dndOnTimeStr = d->m_settings.value(dndOnTimeInfo.name()).toString(); // 字符串为空 if (dndOnTimeStr.isEmpty()) { qWarning() << "ScheduleTurnOnDNDTime is empty, using default value:" << dndOnTimeInfo.defaultValue(); return QTime::fromString(dndOnTimeInfo.defaultValue(), "HHmm"); } static const QStringList timeFormats = {"HHmm", "HH:mm"}; //è§£æž�时间字符串 for (const auto &format : timeFormats) { QTime dndOnTime = QTime::fromString(dndOnTimeStr, format); if (dndOnTime.isValid()) { return dndOnTime; } } qWarning() << "Invalid ScheduleTurnOnDNDTime format:" << dndOnTimeStr << ", using default value:" << dndOnTimeInfo.defaultValue(); return QTime::fromString(dndOnTimeInfo.defaultValue(), "HHmm"); } /*! \property NotificationGlobalSettings::scheduleTurnOffDNDTime 此属性为勿扰模å¼�计划关闭时间 \sa scheduleTurnOnDNDTime */ QTime NotificationGlobalSettings::scheduleTurnOffDNDTime() { SettingsPropertiesInfo dndOffTimeInfo(SettingsProperty::ScheduleTurnOffDNDTime); QString dndOffTimeStr = d->m_settings.value(dndOffTimeInfo.name()).toString(); if (dndOffTimeStr.isEmpty()) { qWarning() << "ScheduleTurnOffDNDTime is empty, using default value:" << dndOffTimeInfo.defaultValue(); return QTime::fromString(dndOffTimeInfo.defaultValue(), "HHmm"); } static const QStringList timeFormats = {"HHmm", "HH:mm"}; for (const auto &format : timeFormats) { QTime dndOffTime = QTime::fromString(dndOffTimeStr, format); if (dndOffTime.isValid()) { return dndOffTime; } } qWarning() << "Invalid ScheduleTurnOffDNDTime format:" << dndOffTimeStr << ", using default value:" << dndOffTimeInfo.defaultValue(); return QTime::fromString(dndOffTimeInfo.defaultValue(), "HHmm"); } /*! \property NotificationGlobalSettings::DNDWhileMultiScreen 此属性表示多å±�幕下是å�¦è¿›å…¥å‹¿æ‰°æ¨¡å¼�开关 \sa DNDWhileFullScreen */ bool NotificationGlobalSettings::DNDWhileMultiScreen() { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::DNDWhileMultiScreen).name()).toVariant().toBool(); } /*! \property NotificationGlobalSettings::DNDWhileFullScreen 此属性表示全å±�下是å�¦è¿›å…¥å‹¿æ‰°æ¨¡å¼�开关 \sa DNDWhileMultiScreen */ bool NotificationGlobalSettings::DNDWhileFullScreen() { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::DNDWhileFullScreen).name()).toVariant().toBool(); } /*! \property NotificationGlobalSettings::notifyAlarmWhileDND 此属性表示勿扰模å¼�下是å�¦å…�许闹钟æ��示 */ bool NotificationGlobalSettings::notifyAlarmWhileDND() { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::NotifyAlarmWhileDND).name()).toVariant().toBool(); } /*! \property NotificationGlobalSettings::receiveNotificationsFromApps 此属性表示是å�¦å…�许æ�¥è‡ªåº”用的通知 */ bool NotificationGlobalSettings::receiveNotificationsFromApps() { return d->m_settings.value(SettingsPropertiesInfo(SettingsProperty::ReceiveNotificationsFromApps).name()).toVariant().toBool(); } void NotificationGlobalSettings::settingsDataChanged() { QJsonObject data = SettingsManager::self()->getGlobalSettings(); for(SettingsProperty::Property property : GLOBAL_SETTINGS) { QString name = SettingsPropertiesInfo(property).name(); QJsonValue value = data.value(name); if(d->m_settings.value(name) != value) { d->m_settings.insert(name, value); switch (property) { case SettingsProperty::ScheduleTurnOnDND: Q_EMIT scheduleTurnOnDNDChanged(value.toVariant().toBool()); checkTimeForDND(); break; case SettingsProperty::ScheduleTurnOnDNDTime: Q_EMIT scheduleTurnOnDNDTimeChanged(QTime::fromString(value.toString(), "HHmm")); checkTimeForDND(); break; case SettingsProperty::ScheduleTurnOffDNDTime: Q_EMIT scheduleTurnOffDNDTimeChanged(QTime::fromString(value.toString(), "HHmm")); checkTimeForDND(); break; case SettingsProperty::DNDWhileMultiScreen: Q_EMIT DNDWhileMultiScreenChanged(value.toVariant().toBool()); checkDNDMode(); break; case SettingsProperty::DNDWhileFullScreen: Q_EMIT DNDWhileFullScreenChanged(value.toVariant().toBool()); checkDNDMode(); break; case SettingsProperty::NotifyAlarmWhileDND: Q_EMIT notifyAlarmWhileDNDChanged(value.toVariant().toBool()); break; case SettingsProperty::ReceiveNotificationsFromApps: Q_EMIT receiveNotificationsFromAppsChanged(value.toVariant().toBool()); break; default: break; } } } } void NotificationGlobalSettings::setScheduleTurnOnDND(bool enable) { SettingsManager::self()->setGlobalSettings(SettingsProperty::ScheduleTurnOnDND, enable); } void NotificationGlobalSettings::setScheduleTurnOnDNDTime(const QTime &time) { SettingsManager::self()->setGlobalSettings(SettingsProperty::ScheduleTurnOnDNDTime, time); } void NotificationGlobalSettings::setScheduleTurnOffDNDTime(const QTime &time) { SettingsManager::self()->setGlobalSettings(SettingsProperty::ScheduleTurnOffDNDTime, time); } void NotificationGlobalSettings::setDNDWhileMultiScreen(bool enable) { SettingsManager::self()->setGlobalSettings(SettingsProperty::DNDWhileMultiScreen, enable); } void NotificationGlobalSettings::setDNDWhileFullScreen(bool enable) { SettingsManager::self()->setGlobalSettings(SettingsProperty::DNDWhileFullScreen, enable); } void NotificationGlobalSettings::setNotifyAlarmWhileDND(bool enable) { SettingsManager::self()->setGlobalSettings(SettingsProperty::NotifyAlarmWhileDND, enable); } void NotificationGlobalSettings::setReceiveNotificationsFromApps(bool enable) { SettingsManager::self()->setGlobalSettings(SettingsProperty::ReceiveNotificationsFromApps, enable); } /*! \readonly \property NotificationGlobalSettings::DND 此属性表示当å‰�是å�¦ä¸ºå‹¿æ‰°æ¨¡å¼� */ bool NotificationGlobalSettings::isDND() { bool dnd = false; if(scheduleTurnOnDND()) { const QTime currentTime = QTime::currentTime(); const QTime dndOnTime = scheduleTurnOnDNDTime(); const QTime dndOffTime = scheduleTurnOffDNDTime(); if (dndOnTime > dndOffTime) { dnd = (currentTime >= dndOnTime) || (currentTime < dndOffTime); } else { dnd = (currentTime >= dndOnTime) && (currentTime < dndOffTime); } } if(!dnd) { if(DNDWhileMultiScreen()) { if(d->m_currentScreenMode == 1 || d->m_currentScreenMode == 2) { dnd = true; } } } if(!dnd) { if(DNDWhileFullScreen()) { QDBusReply registeredReply = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("com.kylin.Wlcom")); if (registeredReply.isValid() && registeredReply.value()) { QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("com.kylin.Wlcom"), QStringLiteral("/com/kylin/Wlcom/View"), QStringLiteral("com.kylin.Wlcom.View"), QStringLiteral("HaveFullScreenActiveWindow")); QDBusReply reply = QDBusConnection::sessionBus().call(msg); if(reply.isValid()) { dnd = reply.value(); } } else { QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("haveFullScreenActiveWindow")); QDBusReply reply = QDBusConnection::sessionBus().call(msg); if(reply.isValid()) { dnd = reply.value(); } } } } return dnd; } void NotificationGlobalSettings::screenModeChanged(int mode) { qDebug() << "NotificationGlobalSettings::screenModeChanged : " << mode; d->m_currentScreenMode = mode; checkDNDMode(); } void NotificationGlobalSettings::checkDNDMode() { bool dnd = isDND(); if (d->m_isDnD != dnd) { qDebug() << "NotificationGlobalSettings::checkDNDMode DND is changed: " << dnd; d->m_isDnD = dnd; Q_EMIT dndChanged(dnd); } } void NotificationGlobalSettings::checkTimeForDND() { checkDNDMode(); if (!scheduleTurnOnDND()) { // 勿扰模å¼�开关关闭,关闭定时器 if (d->m_timeChecktimer->isActive()) { d->m_timeChecktimer->stop(); } return; } QTime currentTime = QTime::currentTime(); QTime dndOnTime = scheduleTurnOnDNDTime(); QTime dndOffTime = scheduleTurnOffDNDTime(); int msec = 60000; // 1分钟 if (dndOnTime == dndOffTime) {// å¼€å�¯å…³é—­æ—¶é—´ä¸€è‡´ï¼Œå�¯åŠ¨å®šæ—¶å™¨æ— æ„�义 if (d->m_timeChecktimer->isActive()) { d->m_timeChecktimer->stop(); } return; } else if (dndOnTime > dndOffTime) { if (currentTime >= dndOffTime && currentTime < dndOnTime) { msec = currentTime.msecsTo(dndOnTime); } else { msec = currentTime.msecsTo(dndOffTime); } } else { if (currentTime >= dndOnTime && currentTime < dndOffTime) { msec = currentTime.msecsTo(dndOffTime); } else { msec = currentTime.msecsTo(dndOnTime); } } //跨天处ç�† static constexpr int MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000; if (msec < 0) { msec += MILLISECONDS_PER_DAY; } if (d->m_timeChecktimer->isActive()) { d->m_timeChecktimer->stop(); } d->m_timeChecktimer->start(msec); }ukui-notification/libukui-notification/notification-settings/single-application-settings.h0000664000175000017500000000614315160523746031423 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_SINGLE_APPLICATION_SETTINGS_H #define UKUI_NOTIFICATION_SINGLE_APPLICATION_SETTINGS_H #include #include "settings-properties.h" #include namespace UkuiNotification { class SingleApplicationSettingsPrivate; /** * @short 表示å�•个应用的设置通知设置. * @author iaom */ class SingleApplicationSettings : public QObject { Q_OBJECT Q_PROPERTY(bool allowNotify READ allowNotify WRITE setAllowNotify NOTIFY allowNotifyChanged) Q_PROPERTY(bool allowSound READ allowSound WRITE setAllowSound NOTIFY allowSoundChanged) Q_PROPERTY(bool showContentOnLockScreen READ showContentOnLockScreen WRITE setShowContentOnLockScreen NOTIFY showContentOnLockScreenChanged) Q_PROPERTY(bool showNotificationOnLockScreen READ showNotificationOnLockScreen WRITE setShowNotificationOnLockScreen NOTIFY showNotificationOnLockScreenChanged) // Q_PROPERTY(SettingsProperty::Property PopupStyle READ popupStyle WRITE setPopupStyle NOTIFY popupStyleChanged) public: explicit SingleApplicationSettings(const QString &desktopEntry = QString(), QObject *parent = nullptr); SingleApplicationSettings(const SingleApplicationSettings &other); SingleApplicationSettings &operator=(const SingleApplicationSettings &other); SingleApplicationSettings &operator=(SingleApplicationSettings &&other) Q_DECL_NOEXCEPT; ~SingleApplicationSettings(); bool allowNotify() const; void setAllowNotify(bool enable); bool allowSound() const ; void setAllowSound(bool enable); bool showContentOnLockScreen() const ; void setShowContentOnLockScreen(bool enable); bool showNotificationOnLockScreen() const; void setShowNotificationOnLockScreen(bool enable); // SettingsProperty::Property popupStyle() const; // void setPopupStyle(SettingsProperty::Property style); QString desktopEntry() const; Q_SIGNALS: void allowNotifyChanged(bool); void allowSoundChanged(bool); void showContentOnLockScreenChanged(bool); void showNotificationOnLockScreenChanged(bool); void popupStyleChanged(SettingsProperty::Property); void uninstalled(); private Q_SLOTS: void init(); void settingsDataChanged(const QString& desktopEntry); void appUninstalled(const QString &desktopEntry); private: SingleApplicationSettingsPrivate *d = nullptr; }; } #endif //UKUI_NOTIFICATION_SINGLE_APPLICATION_SETTINGS_H ukui-notification/libukui-notification/notification-settings/applications-settings.h0000664000175000017500000000536015160523734030324 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_APPLICATIONS_SETTINGS_H #define UKUI_NOTIFICATION_APPLICATIONS_SETTINGS_H #include #include #include "single-application-settings.h" #include "popup-notification.h" namespace UkuiNotification{ typedef QMap ApplicationsSettingsMap; class ApplicationsSettingsPrivate; /** * @short 用于获å�–应用的设置. * @author iaom */ class ApplicationsSettings : public QObject { Q_OBJECT public: static ApplicationsSettings *self(); ~ApplicationsSettings(); /** * 获å�–æŸ�æ�¡é€šçŸ¥çš„é…�ç½® * @param notification 表示一æ�¡é€šçŸ¥ * @return 返回的指针ä¸�需è¦�使用者回收 */ SingleApplicationSettings *creatSettings(const PopupNotification ¬ification); SingleApplicationSettings *creatSettings(QString desktopEntry); ApplicationsSettingsMap &getAllApplicationsSettings(); /** * @brief getAppSettings * 获å�–当å‰�用户æŸ�个应用通知相关é…�置信æ�¯ã€‚ * @param appDesktopName ä¼ "default"获å�–é…�置默认值 */ QJsonObject getAppSettings(const QString &appDesktopName); bool setAppSetting(const QString &appDesktopName, SettingsProperty::Property key, const QVariant &value); bool hasAppSettings(const QString &appDesktopName); bool hasAppSettings(const PopupNotification ¬ification); /** * @brief 是å�¦åœ¨ç™½å��å�•内 * @param * @return */ bool isInAllowList(const QString &appDesktopName); bool isInAllowList(const PopupNotification ¬ification); Q_SIGNALS: void applicationUninstalled(const QString &desktopEntry); void settingsUpdated(const QString& desktopEntry); void applicationInstalled(const QString &desktopEntry); private Q_SLOTS: private: ApplicationsSettings(QObject *parent = nullptr); void settingsDataChanged(); void onApplicationUninstalled(const QString &desktopEntry); ApplicationsSettingsPrivate *d = nullptr; }; } #endif //UKUI_NOTIFICATION_APPLICATIONS_SETTINGS_H ukui-notification/libukui-notification/notification-settings/settings-properties-info.h0000664000175000017500000000460715160523734030766 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef SETTINGS_PROPERTIES_INFO_H #define SETTINGS_PROPERTIES_INFO_H #include #include #include #include "settings-properties.h" #include namespace UkuiNotification { class SettingsPropertiesInfoPrivate; /** * \class SettingsPropertiesInfo SettingsPropertiesInfo.h */ class Q_DECL_IMPORT SettingsPropertiesInfo : public QObject { Q_OBJECT public: SettingsPropertiesInfo(); SettingsPropertiesInfo(SettingsProperty::Property property); SettingsPropertiesInfo(const SettingsPropertiesInfo& pi); ~SettingsPropertiesInfo(); SettingsPropertiesInfo& operator=(const SettingsPropertiesInfo& rhs); bool operator==(const SettingsPropertiesInfo& rhs) const; /** * The enumeration which represents this property */ SettingsProperty::Property property() const; /** * The internal unique name used to refer to the property */ QString name() const; /** * A user visible name of the property */ QString displayName() const; /** * The type the value of this property should be. * Eg - Property::Height should be an integer */ QMetaType::Type valueType() const; QString defaultValue() const; QString valueToString(const QVariant &value) const; /** * Construct a SettingsPropertiesInfo from the internal property name. * The internal property name is case insensitive */ static SettingsPropertiesInfo fromName(const QString& name); private: const std::unique_ptr d; }; } // namespace Q_DECLARE_METATYPE(UkuiNotification::SettingsPropertiesInfo) #endif // SETTINGS_PROPERTIES_INFO_H ukui-notification/libukui-notification/notification-settings/settings-properties.h0000664000175000017500000000777415160523734030045 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef SETTINGS_PROPERTIES #define SETTINGS_PROPERTIES #include #include namespace UkuiNotification { namespace SettingsProperty { Q_NAMESPACE /** * @brief The Property enum contains all settings property types * */ enum Property { Invalid = 0, //Global settings about DND mode ScheduleTurnOnDND, //是å�¦åœ¨æ—¶é—´æ®µå†…自动开å�¯å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false ScheduleTurnOnDNDTime, //勿扰模å¼�å¼€å�¯æ—¶é—´ï¼ŒQDateTime类型,默认值00:00 ScheduleTurnOffDNDTime, //勿扰模å¼�结æ�Ÿæ—¶é—´ï¼ŒQDateTime类型,默认值00:00 DNDWhileMultiScreen, //多å±�å�¯åŠ¨æ—¶æ˜¯å�¦å�¯åŠ¨å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false DNDWhileFullScreen, //å…¨å±�状æ€�下是å�¦å�¯åŠ¨å‹¿æ‰°æ¨¡å¼�,bool类型,默认值false NotifyAlarmWhileDND, //勿扰模å¼�下是å�¦å…�许闹钟æ��示,bool类型,默认值false //Show notifications from applications ReceiveNotificationsFromApps, //是å�¦èŽ·å�–æ�¥è‡ªåº”用程åº�的通知,bool类型,默认值true //single app notification settings AllowNotify = ReceiveNotificationsFromApps + 1, //是å�¦æŽ¥æ”¶å½“å‰�应用通知,bool类型,默认值true AllowSound, //是å�¦æ‰“开通知æ��示声,bool类型,默认值true ShowContentOnLockScreen, //é”�å±�界é�¢æ˜¯å�¦æ˜¾ç¤ºé€šçŸ¥å†…容信æ�¯ï¼Œbool类型,默认值false ShowNotificationOnLockScreen, //é”�å±�界é�¢æ˜¯å�¦æ˜¾ç¤ºé€šçŸ¥ï¼Œbool类型,默认值false // PopupStyle, //通知样å¼�,appNotificationStyle类型,默认值Mutative // // //single app notification settings中的 popupStyle 类型å�–值范围 // TransientPopup = PopupStyle +1, //横幅模å¼�,显示在å�³ä¸Šè§’,会自动消失 // ResidentPopup, //æ��示模å¼�,会ä¿�留在å±�幕上,直到被关闭 // NoPopup //无,通知ä¸�会显示在å±�幕上,但是会进入通知中心 ConfigurationSource = 100 //用于标记é…�ç½®æ�¥æº� }; typedef QMap PropertyMap; } static const QList GLOBAL_SETTINGS { SettingsProperty::ScheduleTurnOnDND, SettingsProperty::ScheduleTurnOnDNDTime, SettingsProperty::ScheduleTurnOffDNDTime, SettingsProperty::DNDWhileMultiScreen, SettingsProperty::DNDWhileFullScreen, SettingsProperty::NotifyAlarmWhileDND, SettingsProperty::ReceiveNotificationsFromApps }; static const QList SINGLE_APPLICATION_SETTINGS { SettingsProperty::AllowNotify, SettingsProperty::AllowSound, SettingsProperty::ShowContentOnLockScreen, SettingsProperty::ShowNotificationOnLockScreen, // SettingsProperty::PopupStyle, SettingsProperty::Property::ConfigurationSource }; } // namespace UkuiNotification Q_DECLARE_METATYPE(UkuiNotification::SettingsProperty::Property) static void registerSettingsPropertyMetaTypeOnce() { static bool registered = []() { qRegisterMetaType("UkuiNotification::SettingsProperty::Property"); return true; }(); } #endif ukui-notification/libukui-notification/notification-settings/settings-manager-private.h0000664000175000017500000000561615160523734030724 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef NotificationSettingsPrivate_H #define NotificationSettingsPrivate_H #include "settings-manager.h" #include #include #include #include #include "settings-properties.h" namespace UkuiNotification { /** * @brief NOTIFICATION_SETTINGS_VERSION * 通知é…�置文件版本å�·ï¼Œç”¨äºŽåˆ¤æ–­æ˜¯å�¦éœ€è¦�æ›´æ–°é…�置文件。 * 1.0 -> 2.0 -> 2.1 * 1.0版本:存储所有应用通知é…�ç½® * 2.0版本: 清空旧版本版本é…�置,按需增加应用通知é…�ç½® * 2.1版本: 增加通知é…�ç½®æ�¥æº�属性 */ #define NOTIFICATION_SETTINGS_VERSION "2.1" class SettingsManagerPrivate : public QObject { friend class SettingsManager; Q_OBJECT public: explicit SettingsManagerPrivate(QObject* parent = nullptr); ~SettingsManagerPrivate(); void init(); private Q_SLOTS: /** * @brief checkAndLoad * 检查通知é…�置文件,ä¸�存在则åˆ�始化生æˆ�默认é…�置文件,存在则根æ�®é…�置文件版本判断是å�¦æ›´æ–°é…�置文件。 */ void checkAndLoad(); private: /** * @brief createSettingsFile * åˆ�始化创建通知é…�置文件。 */ void createSettingsFile(); /** * @brief updateSettingsFile * 更新通知é…�置文件。 */ void updateSettingsFile(const QString& oldVersion, const QString& newVersion, QJsonObject& data); /** * @brief getAppInfo * 从æ�œç´¢åº”用数æ�®åº“æœ�务中获å�–desktopä¿¡æ�¯ã€‚ */ QStringList getAppInfo(); void initSettingsData(QJsonObject &data); void checkApplicationList(QJsonObject &data); QJsonObject loadAllowListData(); public Q_SLOTS: void desktopFileDelete(const QStringList &data); Q_SIGNALS: void settingsUpdateFinished(); void appUninstalled(const QString &desktopEntry); private: void save2SettingsFile(const QJsonObject &jsonDocData); QJsonObject m_settingsData; QFileSystemWatcher *m_watcher = nullptr; UkuiSearch::ApplicationInfo& m_applicationInfo; QJsonObject m_applicationDefaultSettings; bool m_needCheckApplist = true; const QJsonObject m_allowListData; }; } #endif // NotificationSettingsPrivate_H ukui-notification/libukui-notification/notification-settings/applications-settings.cpp0000664000175000017500000001737015160523746030666 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "applications-settings.h" #include #include #include #include "settings-manager.h" #include #include "utils.h" using namespace UkuiNotification; static std::once_flag flag; static ApplicationsSettings *s_self; namespace UkuiNotification{ class ApplicationsSettingsPrivate { friend class ApplicationsSettings; private: ApplicationsSettingsMap m_cache; QJsonObject m_settingsData; }; } /*! 获å�– ApplicationsSettings 全局å�•例实例. */ ApplicationsSettings *UkuiNotification::ApplicationsSettings::self() { std::call_once(flag, [ & ] { s_self = new ApplicationsSettings(); }); return s_self; } /*! \class UkuiNotification::ApplicationsSettings \inmodule UkuiNotification \inheaderfile notifications-settings/applications-settings.h \brief æ��供应用程åº�通知设置的管ç�†åŠŸèƒ½. 该类负责管ç�†æ‰€æœ‰åº”用程åº�的通知设置,使用å�•例模å¼�设计,通过self()方法获å�–实例. */ /*! \fn void UkuiNotification::ApplicationsSettings::applicationUninstalled(const QString &desktopEntry) 此信å�·åœ¨åº”用程åº�被å�¸è½½æ—¶è§¦å�‘. */ /*! \fn void UkuiNotification::ApplicationsSettings::settingsUpdated(const QString& desktopEntry) 此信å�·åœ¨åº”用程åº�通知设置被更新时触å�‘. */ /*! \fn void UkuiNotification::ApplicationsSettings::applicationInstalled(const QString &desktopEntry) 此信å�·åœ¨åº”用程åº�安装时触å�‘. */ /*! Constructor */ ApplicationsSettings::ApplicationsSettings(QObject *parent) : QObject(parent), d(new ApplicationsSettingsPrivate) { d->m_settingsData = SettingsManager::self()->getAllAppSettings(); connect(SettingsManager::self(), &SettingsManager::appUninstalled, this, &ApplicationsSettings::onApplicationUninstalled); connect(SettingsManager::self(), &SettingsManager::settingsDataChanged, this, &ApplicationsSettings::settingsDataChanged); qmlRegisterUncreatableType("org.ukui.notification.client", 1, 0, "SingleApplicationSettings", ""); } /*! Destructor */ ApplicationsSettings::~ApplicationsSettings() { if(d) { qDeleteAll(d->m_cache); d->m_cache.clear(); delete d; d = nullptr; } } /*! \brief 获å�–æŸ�æ�¡é€šçŸ¥çš„é…�置。 \sa creatSettings(QString desktopEntry) */ SingleApplicationSettings *ApplicationsSettings::creatSettings(const PopupNotification ¬ification) { return creatSettings(notification.desktopEntry()); } /*! 获å�–所有应用的通知é…�置。 */ ApplicationsSettingsMap &ApplicationsSettings::getAllApplicationsSettings() { for(const QString &desktopEntry : d->m_settingsData.keys()) { if(!d->m_cache.contains(desktopEntry)) { d->m_cache.insert(desktopEntry, new SingleApplicationSettings(desktopEntry)); } } return d->m_cache; } /*! æ ¹æ�® \a appDesktopName 获å�–当å‰�用户æŸ�个应用通知相关é…�置信æ�¯ã€‚ ä¼ å…¥ "default" 获å�–é…�置默认值。 */ QJsonObject ApplicationsSettings::getAppSettings(const QString &appDesktopName) { if(appDesktopName == QStringLiteral("default") || appDesktopName.isEmpty()) { return SettingsManager::self()->getAppDefaultSettings(); } QJsonValue value = d->m_settingsData.value(appDesktopName); if(value.isUndefined()) { return SettingsManager::self()->getAppDefaultSettings();; } return value.toObject(); } /*! 设置应用通知相关é…�置。 \a appDesktopName 应用 desktop å��称。 \a key 通知的æŸ�个属性é…�置项。 \a value 对应属性é…�置值。 返回 \c true 表示设置æˆ�功,\c false 表示设置失败。 */ bool ApplicationsSettings::setAppSetting(const QString &appDesktopName, SettingsProperty::Property key, const QVariant &value) { return SettingsManager::self()->setAppSettings(appDesktopName, key, value); } /*! æ ¹æ�® \a appDesktopName, 查询是å�¦å­˜åœ¨åº”用通知相关é…�置。 */ bool ApplicationsSettings::hasAppSettings(const QString &appDesktopName) { return SettingsManager::self()->hasAppSettings(appDesktopName); } /*! 通过一æ�¡é€šçŸ¥ \a notification , 查询是å�¦å­˜åœ¨åº”用通知相关é…�置。 */ bool ApplicationsSettings::hasAppSettings(const PopupNotification ¬ification) { return hasAppSettings(notification.desktopEntry()); } /*! æ ¹æ�® \a appDesktopName , 查询是å�¦åœ¨ç™½å��å�•内。 白å��å�•内的应用相关的通知é…�ç½®ä¸�会暴露给应用设置。 */ bool ApplicationsSettings::isInAllowList(const QString &appDesktopName) { return SettingsManager::self()->isInAllowList(appDesktopName); } /*! \sa isInAllowList(const QString &appDesktopName) */ bool ApplicationsSettings::isInAllowList(const PopupNotification ¬ification) { return SettingsManager::self()->isInAllowList(notification.desktopEntry()); } void ApplicationsSettings::settingsDataChanged() { QJsonObject data = SettingsManager::self()->getAllAppSettings(); if(d->m_settingsData == data) { return; } //更新现有app é…�ç½® for (const QString &desktopEntry : data.keys()) { if (d->m_settingsData.contains(desktopEntry)) { const QJsonValue&& oldValue = d->m_settingsData.value(desktopEntry); const QJsonValue&& newValue = data.value(desktopEntry); if ( oldValue != newValue) { d->m_settingsData.insert(desktopEntry, newValue); Q_EMIT settingsUpdated(desktopEntry); } } } //新增 QStringList needAddList = StringListDiff(data.keys(), d->m_settingsData.keys()); //删除 QStringList needRemoveList = StringListDiff(d->m_settingsData.keys(), data.keys()); for(const QString &desktopEntry : needAddList) { d->m_settingsData.insert(desktopEntry, data.value(desktopEntry)); Q_EMIT applicationInstalled(desktopEntry); } for(const QString &desktopEntry : needRemoveList) { d->m_settingsData.remove(desktopEntry); Q_EMIT applicationUninstalled(desktopEntry); auto* singleSetting = d->m_cache.take(desktopEntry); if (singleSetting) { delete singleSetting; } } } void ApplicationsSettings::onApplicationUninstalled(const QString &desktopEntry) { if (d->m_settingsData.contains(desktopEntry)) { d->m_settingsData.remove(desktopEntry); Q_EMIT applicationUninstalled(desktopEntry); auto* singleSetting = d->m_cache.take(desktopEntry); if (singleSetting) { delete singleSetting; } } } /*! \brief æ ¹æ�® \a desktopEntry 获å�–应用的通知é…�ç½® */ SingleApplicationSettings *ApplicationsSettings::creatSettings(QString desktopEntry) { if(desktopEntry.isEmpty()) { desktopEntry = QStringLiteral("default"); } if(d->m_cache.contains(desktopEntry)) { return d->m_cache[desktopEntry]; } else { return d->m_cache.insert(desktopEntry, new SingleApplicationSettings(desktopEntry)).value(); } } ukui-notification/libukui-notification/notification-settings/settings-properties-info.cpp0000664000175000017500000002546515160523734031326 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "settings-properties-info.h" #include #include using namespace UkuiNotification; class UkuiNotification::SettingsPropertiesInfoPrivate { public: SettingsProperty::Property m_property; QString m_name; QString m_displayName; QMetaType::Type m_valueType; QString m_defaultValue; QMetaType::Type m_settingsPropertyMetaType; }; /*! \class UkuiNotification::SettingsPropertiesInfo \inmodule UkuiNotification \inheaderfile notification-settings/settings-properties-info.h \brief å°�装通知设置属性的元数æ�®ä¿¡æ�¯ 该类用于存储å�•个通知设置属性的完整æ��è¿°ä¿¡æ�¯ï¼ŒåŒ…括属性标识符ã€�内部å��ç§°ã€�本地化显示å��ç§°ã€� 值类型ã€�默认值等。æ��供了属性访问ã€�å��称到属性的转æ�¢ã€�值字符串化等功能,是通知设置系统中 属性元数æ�®ç®¡ç�†çš„æ ¸å¿ƒç±»ã€‚ */ /*! Constructor */ SettingsPropertiesInfo::SettingsPropertiesInfo(): d(new SettingsPropertiesInfoPrivate) { registerSettingsPropertyMetaTypeOnce(); d->m_property = SettingsProperty::Invalid; d->m_name = QStringLiteral("Invalid"); d->m_valueType = QMetaType::UnknownType; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) d->m_settingsPropertyMetaType = static_cast(QMetaType::type("UkuiNotification::SettingsProperty::Property")); #else d->m_settingsPropertyMetaType = static_cast(QMetaType::fromName("UkuiNotification::SettingsProperty::Property").id()); #endif } /*! 通过委托构造调用默认构造函数完æˆ�基础åˆ�始化,éš�å�Žæ ¹æ�®ä¼ å…¥çš„属性枚举值设置具体的属性元数æ�®ï¼Œ */ SettingsPropertiesInfo::SettingsPropertiesInfo(SettingsProperty::Property property) : SettingsPropertiesInfo() { d->m_property = property; switch (property) { case SettingsProperty::ScheduleTurnOnDND: d->m_name = QStringLiteral("ScheduleTurnOnDND"); d->m_displayName = tr("Schedule turn on"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; case SettingsProperty::ScheduleTurnOnDNDTime: d->m_name = QStringLiteral("ScheduleTurnOnDNDTime"); d->m_displayName = tr("Schedule turn on time"); d->m_valueType = QMetaType::QTime; d->m_defaultValue = "0000"; break; case SettingsProperty::ScheduleTurnOffDNDTime: d->m_name = QStringLiteral("ScheduleTurnOffDNDTime"); d->m_displayName = tr("Schedule turn off time"); d->m_valueType = QMetaType::QTime; d->m_defaultValue = "0000"; break; case SettingsProperty::DNDWhileMultiScreen: d->m_name = QStringLiteral("DNDWhileMultiScreen"); d->m_displayName = tr("Turn on while multi-screen connected"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; case SettingsProperty::DNDWhileFullScreen: d->m_name = QStringLiteral("DNDWhileFullScreen"); d->m_displayName = tr("Turn on in full screen mode"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; case SettingsProperty::NotifyAlarmWhileDND: d->m_name = QStringLiteral("NotifyAlarmWhileDND"); d->m_displayName = tr("Allow alarm to notify in do not disturb mode"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; case SettingsProperty::ReceiveNotificationsFromApps: d->m_name = QStringLiteral("ReceiveNotificationsFromApps"); d->m_displayName = tr("Get notifications from applications"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "true"; break; case SettingsProperty::AllowNotify: d->m_name = QStringLiteral("AllowNotify"); d->m_displayName = tr("Allow notify"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "true"; break; case SettingsProperty::AllowSound: d->m_name = QStringLiteral("AllowSound"); d->m_displayName = tr("Allow sound for notifications"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "true"; break; case SettingsProperty::ShowContentOnLockScreen: d->m_name = QStringLiteral("ShowContentOnLockScreen"); d->m_displayName = tr("Show notification content on lock screen"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; case SettingsProperty::ShowNotificationOnLockScreen: d->m_name = QStringLiteral("ShowNotificationOnLockScreen"); d->m_displayName = tr("Show notifications on lock screen"); d->m_valueType = QMetaType::Bool; d->m_defaultValue = "false"; break; // case SettingsProperty::PopupStyle: // d->m_name = QStringLiteral("popupStyle"); // d->m_displayName = tr("Style of popup notification"); // d->m_valueType = d->m_settingsPropertyMetaType; // d->m_defaultValue = "TransientPopup"; // break; // // case SettingsProperty::TransientPopup: // d->m_name = QStringLiteral("TransientPopup"); // d->m_displayName = tr("Popup: displayed in the upper right corner of the screen, will automatically disappear"); // d->m_valueType = QMetaType::Int; // break; // // case SettingsProperty::ResidentPopup: // d->m_name = QStringLiteral("ResidentPopup"); // d->m_displayName = tr("Notice: will remain on the screen until it is closed"); // d->m_valueType = QMetaType::Int; // break; // // case SettingsProperty::NoPopup: // d->m_name = QStringLiteral("NoPopup"); // d->m_displayName = tr("None: notifications will not be displayed on the screen, only be put into notification center"); // d->m_valueType = QMetaType::Int; // break; case SettingsProperty::ConfigurationSource: d->m_name = QStringLiteral("ConfigurationSource"); d->m_displayName = tr("Configuration source"); d->m_valueType = QMetaType::QString; d->m_defaultValue = "Default"; break; case SettingsProperty::Invalid: d->m_name = QStringLiteral("Invalid"); d->m_valueType = QMetaType::UnknownType; break; // NOTE: new properties must also be added to ::fromName() } } /*! Copy Constructor. */ SettingsPropertiesInfo::SettingsPropertiesInfo(const SettingsPropertiesInfo& pi) : d(new SettingsPropertiesInfoPrivate(*pi.d)) { } /*! Destructor. */ SettingsPropertiesInfo::~SettingsPropertiesInfo() = default; /*! Copy Assignment Operator. */ SettingsPropertiesInfo& SettingsPropertiesInfo::operator=(const SettingsPropertiesInfo& rhs) { *d = *rhs.d; return *this; } /*! Equality Comparison Operator. */ bool SettingsPropertiesInfo::operator==(const SettingsPropertiesInfo& rhs) const { return d->m_name == rhs.d->m_name && d->m_displayName == rhs.d->m_displayName && d->m_property == rhs.d->m_property && d->m_valueType == rhs.d->m_valueType; } /*! 返回当å‰�属性用于显示显示的å��ç§°. */ QString SettingsPropertiesInfo::displayName() const { return d->m_displayName; } /*! 返回当å‰�属性的唯一 name. */ QString SettingsPropertiesInfo::name() const { return d->m_name; } /*! 返回当å‰�属性的枚举类型. \sa SettingsProperty::Property */ SettingsProperty::Property SettingsPropertiesInfo::property() const { return d->m_property; } /*! 返回当å‰�属性的值类型. \sa QMetaType::Type */ QMetaType::Type SettingsPropertiesInfo::valueType() const { return d->m_valueType; } /*! æ ¹æ�®å±žæ€§ \a name 获å�–对应的属性数æ�®. */ SettingsPropertiesInfo SettingsPropertiesInfo::fromName(const QString& name) { static QHash propertyHash = { { QStringLiteral("ScheduleTurnOnDND"), SettingsProperty::ScheduleTurnOnDND }, { QStringLiteral("ScheduleTurnOnDNDTime"), SettingsProperty::ScheduleTurnOnDNDTime }, { QStringLiteral("ScheduleTurnOffDNDTime"), SettingsProperty::ScheduleTurnOffDNDTime }, { QStringLiteral("DNDWhileMultiScreen"), SettingsProperty::DNDWhileMultiScreen }, { QStringLiteral("DNDWhileFullScreen"), SettingsProperty::DNDWhileFullScreen }, { QStringLiteral("NotifyAlarmWhileDND"), SettingsProperty::NotifyAlarmWhileDND }, { QStringLiteral("ReceiveNotificationsFromApps"), SettingsProperty::ReceiveNotificationsFromApps }, { QStringLiteral("AllowNotify"), SettingsProperty::AllowNotify }, { QStringLiteral("AllowSound"), SettingsProperty::AllowSound }, { QStringLiteral("ShowContentOnLockScreen"), SettingsProperty::ShowContentOnLockScreen }, { QStringLiteral("ShowNotificationOnLockScreen"), SettingsProperty::ShowNotificationOnLockScreen }, // { QStringLiteral("popupStyle"), SettingsProperty::PopupStyle }, // { QStringLiteral("TransientPopup"), SettingsProperty::TransientPopup }, // { QStringLiteral("ResidentPopup"), SettingsProperty::ResidentPopup }, // { QStringLiteral("NoPopup"), SettingsProperty::NoPopup } { QStringLiteral("ConfigurationSource"), SettingsProperty::ConfigurationSource }, }; return {propertyHash.value(name)}; } /*! 返回当å‰�属性的默认值. */ QString SettingsPropertiesInfo::defaultValue() const { return d->m_defaultValue; } /*! 将属性 \a value 的值转æ�¢ä¸ºå­—符串. */ QString SettingsPropertiesInfo::valueToString(const QVariant &value) const { if(d->m_valueType == d->m_settingsPropertyMetaType) { return SettingsPropertiesInfo(static_cast(value.toInt())).name(); } else if(d->m_valueType == QMetaType::QTime) { return value.toTime().toString("HHmm"); } else { return value.toString(); } } ukui-notification/libukui-notification/utils.cpp0000664000175000017500000000531315160523734021145 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "utils.h" #include #include #include #include using namespace UkuiNotification; UkuiSearch::ApplicationInfo &Utils::applicationInfo() { static UkuiSearch::ApplicationInfo s_applicationInfo; return s_applicationInfo; } QString Utils::desktopEntryFromPid(uint pid, bool isFullPath) { QString desktop; if(applicationInfo().tranPidToDesktopFp(pid, desktop)) { if (isFullPath) { return desktop; } return desktopEntry2Name(desktop); } return {}; } QString Utils::displayFromPid(uint pid) { QFile environFile(QStringLiteral("/proc/%1/environ").arg(QString::number(pid))); if (environFile.open(QIODevice::ReadOnly | QIODevice::Text)) { const QByteArray DISPLAY = UkuiQuick::WindowProxy::isWayland() ? QByteArrayLiteral("WAYLAND_DISPLAY") : QByteArrayLiteral("DISPLAY"); const auto lines = environFile.readAll().split('\0'); for (const QByteArray &line : lines) { const int equalsIdx = line.indexOf('='); if (equalsIdx <= 0) { continue; } const QByteArray key = line.left(equalsIdx); if (key == DISPLAY) { const QByteArray value = line.mid(equalsIdx + 1); return value; } } } return {}; } QString Utils::desktopEntryFromName(QString desktopFileName) { QString desktopFilePathName; applicationInfo().desktopFilePathFromName(desktopFileName, desktopFilePathName); return desktopFilePathName; } QString Utils::appNameForDesktopEntry(const QString &desktopFileName) { auto appInfo = applicationInfo().getInfo(desktopFileName, UkuiSearch::ApplicationProperty::LocalName); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (appInfo.isValid() && appInfo.type() == QVariant::String) { #else if (appInfo.isValid() && appInfo.typeId() == QVariant::String) { #endif return appInfo.toString(); } return {}; }ukui-notification/libukui-notification/popup-notification.cpp0000664000175000017500000003655415160523734023647 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "popup-notification.h" #include #include #include namespace UkuiNotification { class PopupNotificationPrivate { public: PopupNotificationPrivate(); ~PopupNotificationPrivate(); QImage parseImageHint(const QDBusArgument &arg); void loadImageFromPath(const QString &path); QSize maximumImageSize(); uint m_id = 0; QString m_applicationName; QString m_applicationIconName; QString m_summary; QString m_body; QList> m_actions; bool m_hasDefaultAction = false; QString m_defaultActionLabel; QVariantMap m_hints = QVariantMap(); QString m_category; QImage m_image; QString m_icon; QDateTime m_createdTime; QString m_desktopEntry; PopupNotification::Urgency m_urgency = PopupNotification::NormalUrgency; int m_timeout = -1; bool m_resident = false; bool m_transient = false; QString m_soundFile; QString m_soundName; bool m_suppressSound = false; QString m_display; QStringList m_actionState; bool m_noFold = false; int m_popupTimeout = 6000; //ms }; } using namespace UkuiNotification; PopupNotificationPrivate::PopupNotificationPrivate() { } PopupNotificationPrivate::~PopupNotificationPrivate() = default; QImage PopupNotificationPrivate::parseImageHint(const QDBusArgument &arg) { //copy from plasma-workspace int width, height, rowStride, hasAlpha, bitsPerSample, channels; QByteArray pixels; char *ptr; char *end; arg.beginStructure(); arg >> width >> height >> rowStride >> hasAlpha >> bitsPerSample >> channels >> pixels; arg.endStructure(); auto copyLineRGB32 = [](QRgb *dst, const char *src, int width) { const char *end = src + width * 3; for (; src != end; ++dst, src += 3) { *dst = qRgb(src[0], src[1], src[2]); } }; auto copyLineARGB32 = [](QRgb *dst, const char *src, int width) { const char *end = src + width * 4; for (; src != end; ++dst, src += 4) { *dst = qRgba(src[0], src[1], src[2], src[3]); } }; QImage::Format format = QImage::Format_Invalid; void (*fcn)(QRgb *, const char *, int) = nullptr; if (bitsPerSample == 8) { if (channels == 4) { format = QImage::Format_ARGB32; fcn = copyLineARGB32; } else if (channels == 3) { format = QImage::Format_RGB32; fcn = copyLineRGB32; } } if (format == QImage::Format_Invalid) { qWarning() << "Unsupported image format (hasAlpha:" << hasAlpha << "bitsPerSample:" << bitsPerSample << "channels:" << channels << ")"; return QImage(); } QImage image(width, height, format); ptr = pixels.data(); end = ptr + pixels.length(); for (int y = 0; y < height; ++y, ptr += rowStride) { if (ptr + channels * width > end) { qWarning() << "Image data is incomplete. y:" << y << "height:" << height; break; } fcn((QRgb *)image.scanLine(y), ptr, width); } return image; } void PopupNotificationPrivate::loadImageFromPath(const QString &path) { //copy from plasma-workspace QUrl imageUrl; if (path.startsWith(QLatin1Char('/'))) { imageUrl = QUrl::fromLocalFile(path); } else if (path.contains(QLatin1Char('/'))) { imageUrl = QUrl(path); if (!imageUrl.isLocalFile()) { qDebug() << "Refused to load image from" << path << "which isn't a valid local location."; return; } } if (!imageUrl.isValid()) { m_icon = path; return; } QImageReader reader(imageUrl.toLocalFile()); reader.setAutoTransform(true); const QSize imageSize = reader.size(); if (imageSize.isValid() && (imageSize.width() > maximumImageSize().width() || imageSize.height() > maximumImageSize().height())) { const QSize thumbnailSize = imageSize.scaled(maximumImageSize(), Qt::KeepAspectRatio); reader.setScaledSize(thumbnailSize); } m_image = reader.read(); } QSize PopupNotificationPrivate::maximumImageSize() { return QSize(256, 256); } /*! \class UkuiNotification::PopupNotification \inmodule UkuiNotification \inheaderfile popup-notification.h \brief 表示一æ�¡é€šçŸ¥ï¼ŒåŒ…å�«ä¸€æ�¡é€šçŸ¥æ¶ˆæ�¯çš„全部. PopupNotification ç±»å°�装了一æ�¡é€šçŸ¥çš„æ‰€æœ‰å±žæ€§å’Œè¡Œä¸ºï¼ŒåŒ…括通知IDã€�应用程åº�å��ç§°ã€�图标ã€�摘è¦�ã€�正文ã€�动作ã€�æ��示信æ�¯ã€�类别ã€�图片ã€�声音等。 */ /*! \enum PopupNotification::Urgency 通知的紧急程度. \value LowUrgency 低:ä¸�弹窗æ��醒,直接进入通知中心;é‡�å¤�应用通知会折å�  \value NormalUrgency 普通:弹窗默认6så�Žå…³é—­ï¼Œè¿›å…¥é€šçŸ¥ä¸­å¿ƒï¼›é‡�å¤�应用通知会折å�  \value CriticalUrgency é‡�è¦�:通知弹窗默认常驻,å�¯ç‚¹å‡»å…³é—­ï¼›é€šçŸ¥ä¸�会折å�  */ /*! \typedef ActionList \relates UkuiNotification å�Œ QList> */ /*! Construct from \a id. */ PopupNotification::PopupNotification(uint id) : d(new PopupNotificationPrivate()) { d->m_id = id; } /*! Copy constructor from \a other. */ PopupNotification::PopupNotification(const PopupNotification &other) : d(new PopupNotificationPrivate(*other.d)) { } /*! Copy assignment operator from \a other. */ PopupNotification &PopupNotification::operator=( const PopupNotification &other) { *d = *other.d; return *this; } /*! Move assignment operator from \a other. */ PopupNotification &PopupNotification::operator=(PopupNotification &&other) Q_DECL_NOEXCEPT { d = other.d; other.d = nullptr; return *this; } /*! Destructor */ PopupNotification::~PopupNotification() { if(d) { delete d; d = nullptr; } } /*! \readonly \property PopupNotification::id \brief 通知的ID */ uint PopupNotification::id() const { return d->m_id; } /*! \property PopupNotification::applicationName \brief 应用程åº�å��ç§°. */ QString PopupNotification::applicationName() const { return d->m_applicationName; } void PopupNotification::setApplicationName(const QString &applicationName) { d->m_applicationName = applicationName; } /*! \property PopupNotification::applicationIconName \brief 应用程åº�图标å��ç§°. */ QString PopupNotification::applicationIconName() const { return d->m_applicationIconName; } void PopupNotification::setApplicationIconName(const QString &applicationIconName) { d->m_applicationIconName = applicationIconName; } /*! \property PopupNotification::summary \brief 通知消æ�¯çš„æ‘˜è¦�. */ QString PopupNotification::summary() const { return d->m_summary; } void PopupNotification::setSummary(const QString &summary) { d->m_summary = summary; } /*! \property PopupNotification::body \brief 通知消æ�¯çš„æ­£æ–‡. */ QString PopupNotification::body() const { return d->m_body; } void PopupNotification::setBody(const QString &body) { d->m_body = body; } /*! \readonly \property PopupNotification::hasDefaultAction \brief 通知消æ�¯æ˜¯å�¦æœ‰é»˜è®¤ action,通常用于点击通知弹窗时执行。 */ bool PopupNotification::hasDefaultAction() const { return d->m_hasDefaultAction; } QString PopupNotification::defaultActionLabel() { return d->m_defaultActionLabel; } void PopupNotification::setActions(const QStringList &actions) { if (actions.count() % 2 != 0) { qWarning() << "List of actions must contain an even number of items, tried to set actions to" << actions; return; } d->m_hasDefaultAction = false; for (int i = 0; i < actions.count(); i += 2) { const QString &key = actions.at(i); const QString &label = actions.at(i + 1); if (!d->m_hasDefaultAction && key == QLatin1String("default")) { d->m_hasDefaultAction = true; d->m_defaultActionLabel = label; } d->m_actions.append({key, label}); } } /*! \readonly \property PopupNotification::actions \brief 通知消æ�¯çš„ action 列表. 通知 action 列表,表示通知包å�«çš„ actions å�Šæ‰§è¡ŒåŠ¨ä½œä¿¡æ�¯ï¼Œåˆ—表中两个为一组,å�¶æ•°ä½�(从0开始)表示一æ�¡ action 的唯一标识,奇数ä½�表示è¦�显示给用户的的内容。 一般点击消æ�¯ä½“产生的 action 为 “defaultâ€�,对应的内容无è¦�求,一般ä¸�会显示给用户(但是需è¦�在å�‘é€�å��议中和 action 拼æˆ�一组)。有é¢�外需è¦�用户æ“�作的 action 则会在通知弹窗里以按钮形å¼�展示。 */ QList> PopupNotification::actions() const { return d->m_actions; } QVariantMap PopupNotification::hints() const { return d->m_hints; } void PopupNotification::setHints(const QVariantMap &hints) { d->m_hints = hints; d->m_desktopEntry = hints.value(QStringLiteral("desktop-entry")).toString(); bool ok; int urgency = hints.value(QStringLiteral("urgency")).toInt(&ok); if(ok) { switch (urgency) { default: case 0: //低等级,ä¸�弹窗 setUrgency(Urgency::LowUrgency); d->m_popupTimeout = 0; break; case 1: //中等级,弹窗时间默认6ç§’ setUrgency(Urgency::NormalUrgency); d->m_popupTimeout = 6000; break; case 2: //高等级,默认弹窗常驻,ä¸�å�¯æŠ˜å�  setUrgency(Urgency::CriticalUrgency); d->m_popupTimeout = -1; d->m_noFold = true; break; } } d->m_createdTime = QDateTime::fromString(hints.value(QStringLiteral("x-ukui-createdTime")).toString()); d->m_resident = hints.value(QStringLiteral("resident")).toBool(); d->m_transient = hints.value(QStringLiteral("transient")).toBool(); d->m_category = hints.value(QStringLiteral("category")).toString(); auto end = hints.end(); auto it = hints.find(QStringLiteral("image-data")); if (it != end) { d->m_image = d->parseImageHint(it->value()); if (!d->m_image.isNull()) { const QSize max = d->maximumImageSize(); if (d->m_image.size().width() > max.width() || d->m_image.size().height() > max.height()) { d->m_image = d->m_image.scaled(max, Qt::KeepAspectRatio, Qt::SmoothTransformation); } } } if (d->m_image.isNull()) { it = hints.find(QStringLiteral("image-path")); if (it != end) { d->loadImageFromPath(it->toString()); } } d->m_soundFile = hints.value(QStringLiteral("sound-file")).toString(); d->m_soundName = hints.value(QStringLiteral("sound-name")).toString(); d->m_suppressSound = hints.value(QStringLiteral("suppress-sound")).toBool(); d->m_display = hints.value(QStringLiteral("x-ukui-display")).toString(); d->m_actionState = hints.value(QStringLiteral("x-ukui-action-state")).toStringList(); QVariant tmp = hints.value(QStringLiteral("x-ukui-no-fold")); if(!tmp.isNull()) { d->m_noFold = tmp.toBool(); } tmp = hints.value(QStringLiteral("x-ukui-popup-timeout")); if(!tmp.isNull()) { d->m_popupTimeout = tmp.toInt(); } } /*! \property PopupNotification::timeout \brief 通知消æ�¯çš„è¶…æ—¶æ—¶é—´. */ int PopupNotification::timeout() const { return d->m_timeout; } void PopupNotification::setTimeout(int timeout) { d->m_timeout = timeout; } /*! \readonly \property PopupNotification::createdTime \brief 通知消æ�¯çš„创建时间. */ QDateTime PopupNotification::createdTime() const { return d->m_createdTime; } /*! \readonly \property PopupNotification::enableActionIcons \brief 是å�¦æ”¯æŒ� hints 中的 action-icon 功能. */ bool PopupNotification::enableActionIcons() const { //TODO å�¯ä»¥æ”¯æŒ�action-icon return false; } /*! \readonly \property PopupNotification::category \brief 通知消æ�¯çš„分类. */ QString PopupNotification::category() const { return d->m_category; } QString PopupNotification::desktopEntry() const { return d->m_desktopEntry; } /*! \readonly \property PopupNotification::image \brief 对应image-data字段. */ QImage PopupNotification::image() const { return d->m_image; } /*! \readonly \property PopupNotification::icon \brief 当加载 image-data 失败,或通过 image-path 加载 image 失败时(image-path ä¸�是 URL),icon 会被设置为 image-path æ•°æ�®ã€‚ */ QString PopupNotification::icon() const { return d->m_icon; } /*! \readonly \property PopupNotification::resident \brief 通知消æ�¯æ˜¯å�¦å¸¸é©». 当设置为true时,通知中心将ä¸�会在用户点击 action 按钮å�Žè‡ªåŠ¨ç§»é™¤æ¶ˆæ�¯ã€‚仅当用户关闭或被通知å�‘é€�者关闭æ‰�会移除通知。 */ bool PopupNotification::resident() const { return d->m_resident; } /*! \readonly \property PopupNotification::soundFile \brief 通知å�‘é€�时播放的声音文件路径。 */ QString PopupNotification::soundFile() const { return d->m_soundFile; } /*! \readonly \property PopupNotification::soundName \brief 声音主题中的声音å��称。 */ QString PopupNotification::soundName() const { return d->m_soundName; } /*! \readonly \property PopupNotification::suppressSound \brief 指定通知æœ�务é�™éŸ³ï¼Œé€šå¸¸ç”¨äºŽé€šçŸ¥å�‘é€�者播放自己的声音。 */ bool PopupNotification::suppressSound() const { return d->m_suppressSound; } /*! \readonly \property PopupNotification::transient \brief 设置为 true å�Žï¼Œé€šçŸ¥æœ�务将通知视为临时的(ä¸�会一直存在) */ bool PopupNotification::transient() const { return d->m_transient; } /*! \readonly \property PopupNotification::display \brief 表示当å‰�通知è¦�显示在哪个DISPLAY上. */ QString PopupNotification::display() const { return d->m_display; } void PopupNotification::setUrgency(PopupNotification::Urgency urgency) { d->m_urgency = urgency; } PopupNotification::Urgency PopupNotification::urgency() const { return d->m_urgency; } /*! \readonly \property PopupNotification::actionState \brief å’Œ action 对应,ä¾�次表示æ¯�个 action 的状æ€�(包括 default action). */ QStringList PopupNotification::actionState() const { return d->m_actionState; } /*! \readonly \property PopupNotification::noFold \brief 设置为trueå�Žï¼Œé€šçŸ¥å°†ä¸�会被折å� . */ bool PopupNotification::noFold() const { return d->m_noFold; } /*! \readonly \property PopupNotification::popupTimeout \brief 通知弹窗æŒ�ç»­æ—¶é—´. */ int PopupNotification::popupTimeout() const { return d->m_popupTimeout; } ukui-notification/libukui-notification/notification-close-reason.h0000664000175000017500000000310215160523734024522 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATIONCLOSEREASON_H #define UKUI_NOTIFICATION_NOTIFICATIONCLOSEREASON_H #include #include "ukui-notification_global.h" namespace UkuiNotification { /** * @short 通知被关闭的原因. * @author iaom */ class UKUINOTIFICATION_EXPORT NotificationCloseReason { Q_GADGET public: /** * The reason a notification was closed */ enum CloseReason { /** * 通知过期. */ Expired = 1, /** * 通知被用户关闭. */ DismissedByUser = 2, /** * 通知被å�‘é€�者通过调用CloseNotification接å�£å…³é—­ */ Revoked = 3, /** * 未定义/ä¿�留原因 */ Undefined = 4, }; Q_ENUM(CloseReason) }; } #endif //UKUI_NOTIFICATION_NOTIFICATIONCLOSEREASON_Hukui-notification/libukui-notification/ukui-notification_global.h0000664000175000017500000000200615160523734024427 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUINOTIFICATION_GLOBAL_H #define UKUINOTIFICATION_GLOBAL_H #include #if defined(UKUINOTIFICATION_LIBRARY) # define UKUINOTIFICATION_EXPORT Q_DECL_EXPORT #else # define UKUINOTIFICATION_EXPORT Q_DECL_IMPORT #endif #endif // UKUINOTIFICATION_GLOBAL_H ukui-notification/libukui-notification/utils.h0000664000175000017500000000527015160523734020614 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_UTILS_H #define UKUI_NOTIFICATION_UTILS_H #include #include #include namespace UkuiNotification { /** * @short æ��供一些方便的接å�£. * @author iaom */ namespace Utils { /** * @brief 获å�–全局UkuiSearch::ApplicationInfo 实例 * @return */ UkuiSearch::ApplicationInfo& applicationInfo(); /** * @brief æ ¹æ�®è¿›ç¨‹å�·@p pid 获å�–应用的desktop文件,isFullPath 是å�¦èŽ·å�–全路径的标志ä½�。 * @return isFullPath==true 获å�–desktop文件全路径, å�¦åˆ™èŽ·å�–desktop文件å�� (ä¸�å�«å�Žç¼€ï¼‰ */ QString desktopEntryFromPid(uint pid, bool isFullPath = false); /** * @brief æ ¹æ�®è¿›ç¨‹å�·@p pid 获å�–应用所在的DISPLAY。 * @return DISPLAY的值 */ QString displayFromPid(uint pid); /** * @brief æ ¹æ�®desktop文件å��(ä¸�带å�Žç¼€ï¼‰èŽ·å�–全路径。 * @return desktop文件全路径 */ QString desktopEntryFromName(QString desktopFileName); /** * @brief 从desktop文件全路径截å�–desktop文件å��(ä¸�å�«å�Žç¼€ï¼‰ * @param desktop文件全路径 * @return desktop 文件å�� */ inline QString desktopEntry2Name(const QString& desktopFileName) { if (desktopFileName.endsWith(".desktop")) { return QFileInfo(desktopFileName).completeBaseName(); } return QFileInfo(desktopFileName).fileName(); }; /** * @brief 获å�–应用å��称, 通过desktop全路径 * @return */ QString appNameForDesktopEntry(const QString& desktopFileName); /** * * @return 返回a中存在b中ä¸�存在的元素, 求差集 */ #define StringListDiff \ ([](const QStringList& a, const QStringList& b) { \ QSet setA(a.begin(), a.end()); \ QSet setB(b.begin(), b.end()); \ return QStringList(setA.subtract(setB).values()); \ }) } } #endif //UKUI_NOTIFICATION_UTILS_H ukui-notification/libukui-notification/popup-notification.h0000664000175000017500000002034615160523734023304 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_POPUP_NOTIFICATION_H #define UKUI_NOTIFICATION_POPUP_NOTIFICATION_H #include "ukui-notification_global.h" #include #include #include #include #include #include #include #include #include namespace UkuiNotification { class PopupNotificationPrivate; typedef QList> ActionList; /** * @short 表示一æ�¡é€šçŸ¥ã€‚ * @author iaom */ class UKUINOTIFICATION_EXPORT PopupNotification { friend class NotificationSettingsTest; Q_GADGET /** * 通知ID。 */ Q_PROPERTY(uint id READ id) /** * 应用å��称。 */ Q_PROPERTY(QString applicationName READ applicationName WRITE setApplicationName) /** * 应用图标å��。 */ Q_PROPERTY(QString applicationIconName READ applicationIconName WRITE setApplicationIconName) /** * 通知摘è¦�。 */ Q_PROPERTY(QString summary READ summary WRITE setSummary) /** * 通知消æ�¯ä½“。 */ Q_PROPERTY(QString body READ body WRITE setBody) /** * 通知创建时间。 */ Q_PROPERTY(QDateTime createdTime READ createdTime) /** * 是å�¦æœ‰é»˜è®¤action,通常用于点击通知弹窗时执行。 */ Q_PROPERTY(bool hasDefaultAction READ hasDefaultAction) /** * 通知action列表,表示通知包å�«çš„actionså�Šæ‰§è¡ŒåŠ¨ä½œä¿¡æ�¯ï¼Œåˆ—表中两个为一组,å�¶æ•°ä½�(从0开始)表示一æ�¡action的唯一标识,奇数ä½�表示è¦�显示给用户的的内容。 * 一般点击消æ�¯ä½“产生的action为“defaultâ€�,对应的内容无è¦�求,一般ä¸�会显示给用户(但是需è¦�在å�‘é€�å��议中和action拼æˆ�一组)。有é¢�外需è¦�用户æ“�作的action则会在通知弹窗里以按钮形å¼�展示。 */ Q_PROPERTY(ActionList actions READ actions) /** * 通知超时失效时间(通知失效å�Žä¼šå�‘é€�NotificationClosedä¿¡å�·ï¼Œå¹¶ä¸”通知弹窗无法å†�ç»§ç»­æ“�作)-1:系统默认;0 ä¸�会超时; >0 表示超时时间。 */ Q_PROPERTY(int timeout READ timeout WRITE setTimeout) /** * 是å�¦æ”¯æŒ�hints中的action-icon功能。 */ Q_PROPERTY(bool enableActionIcons READ enableActionIcons) /** * 对应hints中的image-data字段。 */ Q_PROPERTY(QImage image READ image) /** * 当加载image-data失败,或通过image-path加载image失败时(image-pathä¸�是URL),icon会被设置为image-pathæ•°æ�®ã€‚ */ Q_PROPERTY(QString icon READ icon) /** * 当设置为true时,通知中心将ä¸�会在用户点击action按钮å�Žè‡ªåŠ¨ç§»é™¤æ¶ˆæ�¯ã€‚仅当用户关闭或被通知å�‘é€�者关闭æ‰�会移除通知。 */ Q_PROPERTY(bool resident READ resident) /** * 设置为trueå�Žï¼Œé€šçŸ¥æœ�务将通知视为临时的(ä¸�会一直存在)。 */ Q_PROPERTY(bool transient READ transient) /** * 通知å�‘é€�时播放的声音文件路径。 */ Q_PROPERTY(QString soundFile READ soundFile) /** * 声音主题中的声音å��称。 */ Q_PROPERTY(QString soundName READ soundName) /** * 指定通知æœ�务é�™éŸ³ï¼Œé€šå¸¸ç”¨äºŽé€šçŸ¥å�‘é€�者播放自己的声音。 */ Q_PROPERTY(bool suppressSound READ suppressSound) /** * 当å‰�通知的ç§�类。 */ Q_PROPERTY(QString category READ category) /** * 紧急程度。 */ Q_PROPERTY(Urgency urgency READ urgency WRITE setUrgency) /** * 表示当å‰�通知è¦�显示在哪个DISPLAY上。 */ Q_PROPERTY(QString display READ display) /** * å’Œaction对应,ä¾�次表示æ¯�个action的状æ€�(包括default action)。 */ Q_PROPERTY(QStringList actionState READ actionState) /** * 设置为trueå�Žï¼Œé€šçŸ¥å°†ä¸�会被折å� ã€‚ */ Q_PROPERTY(bool noFold READ noFold) /** * 通知弹窗æŒ�续时间,超过此时间å�Žè¢«æ”¶çº³è¿›é€šçŸ¥ä¸­å¿ƒï¼ˆå�•ä½�秒)。-1:表示消æ�¯é€šçŸ¥å¸¸é©»,ä¸�会收纳进通知中心;0:表示通知将直接进入侧边æ �通知中心,ä¸�会弹窗;>0: 表示通知弹窗æŒ�续时间。 */ Q_PROPERTY(int popupTimeout READ popupTimeout) public: /** * The notification urgency. */ enum Urgency { /** * 低:ä¸�弹窗æ��醒,直接进入通知中心;é‡�å¤�应用通知会折å� ã€‚ */ LowUrgency = 0, /** * 普通:弹窗默认6så�Žå…³é—­ï¼Œè¿›å…¥é€šçŸ¥ä¸­å¿ƒï¼›é‡�å¤�应用通知会折å� ã€‚ */ NormalUrgency = 1, /** * é‡�è¦�:通知弹窗默认常驻,å�¯ç‚¹å‡»å…³é—­ï¼›é€šçŸ¥ä¸�会折å� ã€‚ */ CriticalUrgency = 2, }; Q_ENUM(Urgency) explicit PopupNotification(uint id = 0); PopupNotification(const PopupNotification &other); PopupNotification &operator=(const PopupNotification &other); PopupNotification &operator=(PopupNotification &&other) Q_DECL_NOEXCEPT; ~PopupNotification(); /** * 通知ID。 */ uint id() const; /** * 应用å��称。 */ QString applicationName() const; void setApplicationName(const QString &applicationName); /** * 应用图标å��。 */ QString applicationIconName() const; void setApplicationIconName(const QString &applicationIconName); /** * 通知摘è¦�。 */ QString summary() const; void setSummary(const QString &summary); /** * 通知消æ�¯ä½“。 */ QString body() const; void setBody(const QString &body); /** * 是å�¦æœ‰é»˜è®¤action,通常用于点击通知弹窗时执行。 */ bool hasDefaultAction() const; /** * 默认actionçš„labelå��称。 */ QString defaultActionLabel(); void setActions(const QStringList &actions); ActionList actions() const; QStringList actionState() const; QVariantMap hints() const; void setHints(const QVariantMap &hints); int timeout() const; void setTimeout(int timeout); QDateTime createdTime() const; //m_hints /** * 使用图标显示action * @return */ bool enableActionIcons() const; /** * 分类 * @return */ QString category() const; /** * desktopå��称(ä¸�带.desktopå�Žç¼€ï¼‰ * @return */ QString desktopEntry() const; /** * 对应image-data字段 * @return */ QImage image() const; /** * 当加载image-data失败,或通过image-path加载image失败时(image-pathä¸�是URL),icon会被设置为image-pathæ•°æ�® * @return */ QString icon() const; /** * 是å�¦æŒ�续显示,ä¸�会自动移除,直到被用户手动或å�‘é€�者删除 * @return */ bool resident() const; /** * 通知å�‘é€�时播放的声音文件路径 * @return */ QString soundFile() const; /** * 声音主题中的声音å��ç§° * @return */ QString soundName() const; /** * 是å�¦é�™éŸ³ * @return */ bool suppressSound() const; /** * 暂时通知(会自动移除) * @return */ bool transient() const; Urgency urgency() const; void setUrgency(Urgency urgency); /** * 通知å�‘é€�者所在的display * @return */ QString display() const; /** * 是å�¦ä¸�折å�  * @return */ bool noFold() const; /** * 弹窗æŒ�ç»­æ—¶é—´ * @return */ int popupTimeout() const; private: PopupNotificationPrivate *d = nullptr; }; } #endif //UKUI_NOTIFICATION_POPUP_NOTIFICATION_H ukui-notification/notification-ukcc-plugin/0000775000175000017500000000000015160523746020057 5ustar fengfengukui-notification/notification-ukcc-plugin/translations/0000775000175000017500000000000015160523746022600 5ustar fengfengukui-notification/notification-ukcc-plugin/translations/de.ts0000664000175000017500000001146615160523746023550 0ustar fengfeng Notice Notice Bemerken NotFaze Mode 勿扰模å¼� Do not disturb mode Modus "Nicht stören" /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (Benachrichtigungsbanner, Eingabeaufforderungen werden ausgeblendet und Benachrichtigungstöne werden stummgeschaltet) Automatically turn on Automatisch einschalten /Notice/Do not disturb mode Mode/Automatically turn on to An Automatically turn on when multiple screens are connected Automatisches Einschalten, wenn mehrere Bildschirme angeschlossen sind /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Automatisches Öffnen im Vollbildmodus /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode Automatische Alarmerinnerungen im Modus "Nicht stören" zulassen /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings Einstellungen für Hinweise Get notifications from the app Erhalten Sie Benachrichtigungen von der App /notice/Get notifications from the app NoticeMenu Beep sound when notified Piepton bei Benachrichtigung Show message on screenlock Nachricht auf der Bildschirmsperre anzeigen Show noticfication on screenlock Benachrichtigung auf Bildschirmsperre anzeigen Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/ky.ts0000664000175000017500000001213415160523746023574 0ustar fengfeng Notice Notice ۇقتۇرۇۇ NotFaze Mode 勿扰模å¼� Do not disturb mode تااسىئر قىلبوو ۉلگۉسۉ /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (ۇقتۇرۇۇ لوزۇنكىلىرى، ئەسكەرتىشلەر جاشىرىنعان بولوت ØŒ ۇقتۇرۇۇ دووشسۇز بولوت ) Automatically turn on اپتوماتتىك قوزعوتۇۇ /Notice/Do not disturb mode Mode/Automatically turn on to عا Automatically turn on when multiple screens are connected ÙƒÛ…Ù¾ ەكىران ۇلانعاندا اپتوماتتىك اچىلات /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode پۉتۉن ەكىران ابالىندا اپتوماتتىك اچىلات /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode ئاۋارە قىلبوو ابالىندا قوڭعۇراقتۇۇ ساات ەسكەرتۉۉگۅ ۇرۇقسات جاسالات. /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings ۇقتۇرۇۇ Get notifications from the app ئەپتىن Ú¯Û•Ù„Ú¯Û•Ù† ۇقتۇرۇۇعا Û•Û• بولۇۇ /notice/Get notifications from the app NoticeMenu Beep sound when notified ۇقتۇرۇۇ جاساعاندا ەسكەرتۉۉ وبونۇ Show message on screenlock ەكىران قۇلۇپتوو كۅرۉنمۅ بەتىندە ۇچۇر مازمۇنۇن كۅرسۅتۅت. Show noticfication on screenlock ەكىران قۇلۇپتوو كۅرۉنمۅ بەتىندە ۇقتۇرۇۇ كۅرسۅتۉۉ Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/zh_CN.ts0000664000175000017500000001107215160523746024152 0ustar fengfeng Notice Notice 通知 NotFaze Mode 勿扰模å¼� Do not disturb mode 勿扰模å¼� /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (通知横幅ã€�æ��示将会éš�è—�,通知声音将会é�™éŸ³) Automatically turn on 自动开å�¯ /Notice/Do not disturb mode Mode/Automatically turn on to 至 Automatically turn on when multiple screens are connected 多å±�连接时自动开å�¯ /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode å…¨å±�模å¼�下自动开å�¯ /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode 勿扰模å¼�下å…�许闹钟æ��示 /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings 通知 Get notifications from the app 获å�–æ�¥è‡ªåº”用的通知 /notice/Get notifications from the app NoticeMenu Beep sound when notified 通知时æ��示声音 Show message on screenlock 在é”�å±�界é�¢æ˜¾ç¤ºæ¶ˆæ�¯å†…容 Show noticfication on screenlock 在é”�å±�界é�¢æ˜¾ç¤ºé€šçŸ¥ Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/kk.ts0000664000175000017500000001211215160523746023552 0ustar fengfeng Notice Notice ۇقتٸرۋ NotFaze Mode 勿扰模å¼� Do not disturb mode جارا ورىنداماستىق Ù�ورماسى /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (ۇقتٸرۋ لوزۇنكىلىرى، ئەسكەرتىشلەر جاسىرىلعان بولادٸ، ۇقتٸرۋ دٸبٸسسز بولادٸ) Automatically turn on اۆتوماتتى قوزعالتۋ /Notice/Do not disturb mode Mode/Automatically turn on to عا Automatically turn on when multiple screens are connected كوپ ەكٸران جالعانعاندا اۆتوماتتى اشٸلدٸ /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode پۇتٸن ەكٸران كۇيىندە اۆتوماتتى اشٸلدٸ /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode اۋرە ورىنداماستىق كۇيىندە قوڭىراۋلىق ساعات ەسكەرتكى رۇحسات قىلىندى. /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings ۇقتٸرۋ Get notifications from the app ئەپتىن ÙƒÛ•Ù„ ۇقتٸرۋعا ÙŠÛ• بولۋ /notice/Get notifications from the app NoticeMenu Beep sound when notified ۇقتٸرۋ قىلعاندا ەسكەرتپەۋ داۋىسى Show message on screenlock ەكٸران قۇلپىلاۋ كورىنبە بەتىندە حابار مازمۇندى كورسەتەدى. Show noticfication on screenlock ەكٸران قۇلپىلاۋ كورىنبە بەتىندە ۇقتٸرۋ كورسەتۋ Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/ar.ts0000664000175000017500000001161715160523746023560 0ustar fengfeng Notice Notice لاحظ NotFaze Mode 勿扰模å¼� Do not disturb mode وضع عدم الإزعاج /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (سيتم إخÙ�اء لاÙ�تات الإشعارات والمطالبات وسيتم كتم أصوات الإشعارات) Automatically turn on التÙ�عيل التلقائي /Notice/Do not disturb mode Mode/Automatically turn on to Ù„ Automatically turn on when multiple screens are connected التشغيل التلقائي عند توصيل شاشات متعددة /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Ù�تح تلقائيا Ù�ÙŠ وضع ملء الشاشة /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode السماح بتذكيرات التنبيه التلقائي Ù�ÙŠ وضع عدم الإزعاج /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings إعدادات الإشعار Get notifications from the app الحصول على إشعارات من التطبيق /notice/Get notifications from the app NoticeMenu Beep sound when notified صوت صÙ�ير عند الإخطار Show message on screenlock إظهار الرسالة على Ù‚Ù�Ù„ الشاشة Show noticfication on screenlock إظهار الإشعارات على Ù‚Ù�Ù„ الشاشة Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/ug.ts0000664000175000017500000001220715160523746023565 0ustar fengfeng Notice Notice ئۇقتۇرۇش NotFaze Mode 勿扰模å¼� Do not disturb mode دەخلى قىلماسلىق ئەندىزىسى /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (ئۇقتۇرۇش لوزۇنكىلىرى، ئەسكەرتىشلەر يوشۇرۇنغان بولىدۇ، ئۇقتۇرۇش ئاۋازسىز بولىدۇ) Automatically turn on ئاپتوماتىك قوزغىتىش /Notice/Do not disturb mode Mode/Automatically turn on to غا Automatically turn on when multiple screens are connected ÙƒÛ†Ù¾ ئÛ�كران ئۇلانغاندا ئاپتوماتىك ئÛ�چىلىدۇ /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode پۈتۈن ئÛ�كران ھالىتىدە ئاپتوماتىك ئÛ�چىلىدۇ /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode ئاۋارە قىلماسلىق ھالىتىدە قوڭغۇراقلىق سائەت ئەسكەرتىشكە رۇخسەت قىلىنىدۇ. /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings ئۇقتۇرۇش Get notifications from the app ئەپتىن ÙƒÛ•Ù„Ú¯Û•Ù† ئۇقتۇرۇشقا ئÛ�رىشىش /notice/Get notifications from the app NoticeMenu Beep sound when notified ئۇقتۇرۇش قىلغاندا ئەسكەرتىش ئاۋازى Show message on screenlock ئÛ�كران قۇلۇپلاش كۆرۈنمە يۈزىدە ئۇچۇر مەزمۇنىنى كۆرسىتىدۇ. Show noticfication on screenlock ئÛ�كران قۇلۇپلاش كۆرۈنمە يۈزىدە ئۇقتۇرۇش كۆرسىتىش Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/bo_CN.ts0000664000175000017500000001457215160523746024141 0ustar fengfeng Notice Notice བརྡ་à½�ོà¼� NotFaze Mode མི་དམངས་ཀྱི་དཔེ་དབྱིབས་མིན་པà¼� Do not disturb mode མི་དམངས་ཀྱི་དཔེ་དབྱིབས་མིན་པà¼� /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (བརྡ་à½�ོ་གà½�ོང་བའི་འཕྲེད་འགེལ་སྦྱར་ཡིག་དང་à¼� བརྡ་གà½�ོང་ཡི་གེ་སྦས་སà¾�ུང་བྱས་ནས་བརྡ་à½�ྱབ་ཀྱི་སྒྲ་གྲགས་ཡོང་à¼� ) Automatically turn on རང་འགུལ་གྱིས་à½�་ཕྱེ་བà¼� /Notice/Do not disturb mode Mode/Automatically turn on to དེ་ལྟར་བྱས་ན་ Automatically turn on when multiple screens are connected བརྙན་ཤེལ་མང་པོ་སྦྲེལ་མà½�ུད་བྱེད་སà¾�བས་རང་འགུལ་གྱིས་à½�་ཕྱེ་བà¼� /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode བརྙན་ཤེལ་ཧྲིལ་པོའི་རྣམ་པའི་à½�ོག་ནས་རང་འགུལ་གྱིས་སྒོ་ /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode རང་འགུལ་གྱིས་ཉེན་བརྡ་གà½�ོང་བའི་དྲན་སà¾�ུལ་བྱེད་སྟངས་ལ་སུན་པོ་བཟོ་མི་རུང་à¼� /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings བརྡ་à½�ོའི་སྒྲིག་བཀོདà¼� Get notifications from the app ཉེར་སྤྱོད་གོ་རིམ་à½�ྲོད་ནས་བརྡ་à½�ོ་གà½�ོང་དགོསà¼� /notice/Get notifications from the app NoticeMenu Beep sound when notified བརྡ་à½�ོ་གà½�ོང་སà¾�བས་སà¾�ད་ཅོར་རྒྱག་པà¼� Show message on screenlock བརྙན་ཤེལ་སྟེང་ནས་ཆ་འཕྲིན་མངོན་པà¼� Show noticfication on screenlock བརྙན་ཤེལ་སྟེང་ནས་དོ་སྣང་བྱེད་པà¼� Notification Style བརྡ་à½�ོ་གà½�ོང་སྟངསà¼� Banner: Appears in the upper right corner of the screen, and disappears automatically འཕྲེད་འགེལ་ཡི་གེà¼� བརྙན་ཤེལ་གྱི་གཡས་ཟུར་དུ་མངོན་པ་མ་ཟདà¼� རང་འགུལ་གྱིས་མེད་པར་གྱུར་པà¼� Tip:It will be kept on the screen until it is closed རྩེ་མོà¼� འཆར་ངོས་སུ་ཉར་ཚགས་བྱས་ནས་སྒོ་མ་བརྒྱབ་གོང་ལ་ཉར་ཚགས་བྱེད་དགོསà¼� None:Notifications will not be displayed on the screen, but will go to the notification center གཅིག་ཀྱང་མ་ལུས་པར་འཆར་ངོས་སུ་བརྡ་à½�ོ་མི་མངོན་པར་བརྡ་à½�ྱབ་ལྟེ་གནས་སུ་འགྲོ་རྒྱུ་རེདà¼� ukui-notification/notification-ukcc-plugin/translations/vi.ts0000664000175000017500000001147415160523746023575 0ustar fengfeng Notice Notice Thông báo NotFaze Mode 勿扰模å¼� Do not disturb mode Chế độ không làm phiá»�n /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (Biểu ngữ thông báo, lá»�i nhắc sẽ bị ẩn và âm thanh thông báo sẽ bị tắt tiếng) Automatically turn on Tá»± động bật /Notice/Do not disturb mode Mode/Automatically turn on to đến Automatically turn on when multiple screens are connected Tá»± động bật khi nhiá»�u màn hình được kết nối /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Tá»± động mở ở chế độ toàn màn hình /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode Cho phép nhắc nhở báo thức tá»± động ở chế độ Không làm phiá»�n /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings Cài đặt thông báo Get notifications from the app Nhận thông báo từ ứng dụng /notice/Get notifications from the app NoticeMenu Beep sound when notified Âm thanh bíp khi được thông báo Show message on screenlock Hiển thị tin nhắn trên khóa màn hình Show noticfication on screenlock Hiển thị thông báo trên khóa màn hình Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/mn.ts0000664000175000017500000001333415160523746023566 0ustar fengfeng Notice Notice ᠮᠡᠳᠡᠭᠳᠡᠯ NotFaze Mode 勿扰模å¼� Do not disturb mode ᠬᠠᠷᠰᠢᠯᠠᠬᠤ ᠵᠢ ᠵᠣᠭᠰᠣᠭᠠᠬᠤ ᠮᠤᠳᠦ᠋ᠯ /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) ( ᠮᠡᠳᠡᠭᠳᠡᠯ ᠤ᠋ᠨ ᠡᠯᠬᠦᠬᠡᠰᠦ᠂ ᠰᠠᠨᠠᠭᠤᠯᠤᠮᠵᠢ ᠨᠢᠭᠤᠴᠠᠯᠠᠬᠤ᠂ ᠮᠡᠳᠡᠭᠳᠡᠯ ᠤ᠋ᠨ ᠲᠤᠬᠢᠶ᠎ᠠ ᠳᠠᠭᠤ ᠥᠬᠡᠢ ᠪᠤᠯᠬᠤ) Automatically turn on ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠡᠷ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ /Notice/Do not disturb mode Mode/Automatically turn on to á ¡á ´á ¡ Automatically turn on when multiple screens are connected ᠣᠯᠠᠨ ᠳᠡᠯᠭᠡᠴᠡᠨ ᠳ᠋ᠤ᠌ ᠵᠠᠯᠭᠠᠬᠤ ᠦᠶ᠎ᠡ ᠳ᠋ᠤ᠌ ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠪᠡᠷ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode ᠪᠦᠳᠦᠨ ᠳᠡᠯᠭᠡᠴᠡ ᠵᠢᠨ ᠪᠠᠢᠳᠠᠯ ᠳᠤᠤᠷ᠎ᠡ ᠳᠠᠬᠢᠨ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode ᠬᠠᠷᠰᠢᠯᠠᠬᠤ ᠵᠢ ᠬᠣᠷᠢᠭᠯᠠᠬᠤ ᠪᠠᠢᠳᠠᠯ ᠳᠤᠤᠷ᠎ᠡ ᠰᠡᠷᠢᠬᠦᠯᠬᠡᠳᠦ á ´á  á ­ ᠤ᠋ᠨ ᠰᠠᠨᠠᠭᠤᠯᠬᠤ ᠵᠢ ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings ᠮᠡᠳᠡᠭᠳᠡᠯ Get notifications from the app ᠬᠡᠷᠡᠭᠯᠡᠭᠡᠨ á ¡á ´á ¡ ᠢᠷᠡᠯᠳᠡᠢ ᠮᠡᠳᠡᠭᠳᠡᠯ ᠢ᠋ ᠤᠯᠬᠤ /notice/Get notifications from the app NoticeMenu Beep sound when notified ᠮᠡᠳᠡᠭᠳᠡᠬᠦ ᠦᠶ᠎ᠡ ᠵᠢᠨ ᠰᠠᠨᠠᠭᠤᠯᠬᠤ ᠳᠠᠭᠤ Show message on screenlock ᠣᠨᠢᠰᠤᠯᠠᠬᠤ ᠵᠠᠭᠠᠭ ᠭᠠᠳᠠᠷᠭᠤ ᠳᠡᠭᠡᠷ᠎ᠡ ᠰᠤᠷᠠᠭ ᠵᠠᠩᠬᠢ ᠵᠢᠨ ᠠᠭᠤᠯᠭ᠎ᠠ ᠵᠢ ᠢᠯᠡᠷᠡᠬᠦᠯᠬᠦ Show noticfication on screenlock ᠣᠨᠢᠰᠤᠯᠠᠬᠤ ᠵᠠᠭᠠᠭ ᠭᠠᠳᠠᠷᠭᠤ ᠳᠡᠭᠡᠷ᠎ᠡ ᠮᠡᠳᠡᠭᠳᠡᠯ ᠢ᠋ ᠢᠯᠡᠷᠡᠬᠦᠯᠬᠦ Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/fr.ts0000664000175000017500000001147515160523746023567 0ustar fengfeng Notice Notice Remarquer NotFaze Mode 勿扰模å¼� Do not disturb mode Mode Ne pas déranger /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (Les bannières de notification, les invites seront masquées et les sons de notification seront désactivés) Automatically turn on Activer automatiquement /Notice/Do not disturb mode Mode/Automatically turn on to À Automatically turn on when multiple screens are connected S’allume automatiquement lorsque plusieurs écrans sont connectés /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Ouverture automatique en mode plein écran /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode Autoriser les rappels automatiques d’alarme en mode Ne pas déranger /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings Paramètres de l’avis Get notifications from the app Recevoir des notifications de l’application /notice/Get notifications from the app NoticeMenu Beep sound when notified Bip sonore lors de la notification Show message on screenlock Afficher le message sur le verrouillage de l’écran Show noticfication on screenlock Afficher la notification sur le verrouillage de l’écran Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/en_US.ts0000664000175000017500000001137215160523746024165 0ustar fengfeng Notice Notice Notice NotFaze Mode NotFaze Mode Do not disturb mode /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (Notification banners, prompts will be hidden, and notification sounds will be muted) Automatically turn on Automatically turn on /Notice/Do not disturb mode Mode/Automatically turn on to to Automatically turn on when multiple screens are connected Automatically turn on when multiple screens are connected /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Automatically open in full screen mode /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode Allow automatic alarm reminders in Do Not Disturb mode /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings Notice Settings Get notifications from the app Get notifications from the app /notice/Get notifications from the app NoticeMenu Beep sound when notified Beep sound when notified Show message on screenlock Show message on screenlock Show noticfication on screenlock Show noticfication on screenlock Notification Style Notification Style Banner: Appears in the upper right corner of the screen, and disappears automatically Banner: Appears in the upper right corner of the screen, and disappears automatically Tip:It will be kept on the screen until it is closed Tip:It will be kept on the screen until it is closed None:Notifications will not be displayed on the screen, but will go to the notification center None:Notifications will not be displayed on the screen, but will go to the notification center ukui-notification/notification-ukcc-plugin/translations/es.ts0000664000175000017500000001143515160523746023563 0ustar fengfeng Notice Notice Notar NotFaze Mode 勿扰模å¼� Do not disturb mode Modo No molestar /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (Los banners de notificación, las indicaciones se ocultarán y los sonidos de notificación se silenciarán) Automatically turn on Encendido automático /Notice/Do not disturb mode Mode/Automatically turn on to Para Automatically turn on when multiple screens are connected Se enciende automáticamente cuando hay varias pantallas conectadas /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode Apertura automática en modo de pantalla completa /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode Permitir recordatorios de alarma automáticos en el modo No molestar /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings Configuración de avisos Get notifications from the app Recibir notificaciones de la aplicación /notice/Get notifications from the app NoticeMenu Beep sound when notified Sonido de pitido cuando se notifica Show message on screenlock Mostrar mensaje en el bloqueo de pantalla Show noticfication on screenlock Mostrar notificación en el bloqueo de pantalla Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/translations/zh_HK.ts0000664000175000017500000001107615160523746024160 0ustar fengfeng Notice Notice 通知 NotFaze Mode 勿扰模å¼� Do not disturb mode 勿擾模å¼� /Notice/Do not disturb mode Mode (Notification banners, prompts will be hidden, and notification sounds will be muted) (通知橫幅ã€�æ��示將會隱è—�,通知è�²éŸ³å°‡æœƒé�œéŸ³ï¼‰ Automatically turn on 自動開啟 /Notice/Do not disturb mode Mode/Automatically turn on to 至 Automatically turn on when multiple screens are connected 多å±�連接時自動開啟 /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected Automatically open in full screen mode å…¨å±�模å¼�下自動開啟 /Notice/Do not disturb mode/Automatically open in full screen mode Allow automatic alarm reminders in Do Not Disturb mode 勿擾模å¼�下å…�許鬧é�˜æ��示 /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode Notice Settings 通知 Get notifications from the app ç�²å�–來自應用的通知 /notice/Get notifications from the app NoticeMenu Beep sound when notified 通知時æ��示è�²éŸ³ Show message on screenlock 在鎖å±�介é�¢é¡¯ç¤ºæ¶ˆæ�¯å…§å®¹ Show noticfication on screenlock 在鎖å±�介é�¢é¡¯ç¤ºé€šçŸ¥ Notification Style 通知样å¼� Banner: Appears in the upper right corner of the screen, and disappears automatically 横幅:显示在å±�幕å�³ä¸Šè§’,会自动消失 Tip:It will be kept on the screen until it is closed æ��示:会ä¿�留在å±�幕上,直到被关闭 None:Notifications will not be displayed on the screen, but will go to the notification center æ— :通知ä¸�会显示在å±�幕上,但会进入通知中心 ukui-notification/notification-ukcc-plugin/notice-menu.h0000664000175000017500000000405515160523746022457 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef NOTICEMENU_H #define NOTICEMENU_H #include #include #include #include #include #include #include "applications-settings.h" using namespace kdk; class NoticeMenu : public QMenu { Q_OBJECT public: explicit NoticeMenu(QWidget *parent = nullptr); void initStatus(UkuiNotification::SingleApplicationSettings *settings); void setVoiceEnable(bool state); void setDetailShowOnLockScreenEnable(bool state); void setShowOnLockScreenEnable(bool state); void setPopupStyle(UkuiNotification::SettingsProperty::Property style); static QFrame *setLine(); private: void initUi(); void setFrame(QFrame *frame, QString str, KSwitchButton *btn); void setFrame(QFrame *frame, QString str, QRadioButton *btn); void setConnect(); private: KSwitchButton *m_voiceBtn = nullptr; KSwitchButton *m_detailBtn = nullptr; KSwitchButton *m_showBtn = nullptr; QButtonGroup *m_styleGroup = nullptr; QRadioButton *m_noneBtn = nullptr; QRadioButton *m_mutativeBtn = nullptr; QRadioButton *m_alwaysBtn = nullptr; protected: void showEvent(QShowEvent *event) override; Q_SIGNALS: void voiceSignals(bool checked); void detailSignals(bool checked); void showSignals(bool checked); void styleBtnSignals(int id); }; #endif // NOTICEMENU_H ukui-notification/notification-ukcc-plugin/CMakeLists.txt0000664000175000017500000000361715160523746022626 0ustar fengfeng set(notification-ukcc-plugin_LIB_SRCS notification-ukcc-plugin.cpp notification-ukcc-plugin.h notice-menu.cpp notice-menu.h) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Widgets LinguistTools REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets LinguistTools REQUIRED) find_package(PkgConfig REQUIRED) set(UKUI_NOTIFICATION_EXTERNAL_LIBS "") set(UKUI_NOTIFICATION_PC_PKGS kysdk-applications) foreach(PC_LIB IN ITEMS ${UKUI_NOTIFICATION_PC_PKGS}) pkg_check_modules(${PC_LIB} REQUIRED IMPORTED_TARGET ${PC_LIB}) if(${${PC_LIB}_FOUND}) include_directories(${${PC_LIB}_INCLUDE_DIRS}) link_directories(${${PC_LIB}_LIBRARY_DIRS}) list(APPEND UKUI_NOTIFICATION_EXTERNAL_LIBS ${${PC_LIB}_LIBRARIES}) endif() endforeach() include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) include_directories(../libukui-notification/notification-settings) include_directories(../libukui-notification) file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts) # 更新翻译并创建.qm文件 if(COMMAND qt_create_translation) qt_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${TS_FILES}) else() qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${TS_FILES}) endif() add_library(notification-ukcc-plugin SHARED ${notification-ukcc-plugin_LIB_SRCS} ${QM_FILES} ) target_link_libraries(notification-ukcc-plugin PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::DBus Qt${QT_VERSION_MAJOR}::Network ukui-notification ukcc ${UKUI_NOTIFICATION_EXTERNAL_LIBS} ) install(TARGETS notification-ukcc-plugin DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/ukui-control-center) install(FILES ${TS_FILES} ${QM_FILES} DESTINATION /usr/share/ukui-notification/notification-ukcc-plugin/translations) ukui-notification/notification-ukcc-plugin/notice-menu.cpp0000664000175000017500000001632015160523746023010 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "notice-menu.h" #include #include #include NoticeMenu::NoticeMenu(QWidget *parent) : QMenu(parent) { setFixedSize(380, 190); initUi(); setConnect(); } void NoticeMenu::initStatus(UkuiNotification::SingleApplicationSettings *settings) { m_voiceBtn->blockSignals(true); m_showBtn->blockSignals(true); m_detailBtn->blockSignals(true); // m_styleGroup->blockSignals(true); m_voiceBtn->setChecked(settings->allowSound()); m_detailBtn->setChecked(settings->showContentOnLockScreen()); m_showBtn->setChecked(settings->showNotificationOnLockScreen()); // int styleId = 0; // UkuiNotification::SettingsProperty::Property style = settings->popupStyle(); // if (style == UkuiNotification::SettingsProperty::TransientPopup) { // styleId = 0; // } else if (style == UkuiNotification::SettingsProperty::ResidentPopup) { // styleId = 1; // } else if (style == UkuiNotification::SettingsProperty::NoPopup) { // styleId = 2; // } // m_styleGroup->button(styleId)->setChecked(true); m_voiceBtn->blockSignals(false); m_showBtn->blockSignals(false); m_detailBtn->blockSignals(false); // m_styleGroup->blockSignals(false); } void NoticeMenu::setVoiceEnable(bool state) { m_voiceBtn->blockSignals(true); m_voiceBtn->setChecked(state); m_voiceBtn->blockSignals(false); } void NoticeMenu::setDetailShowOnLockScreenEnable(bool state) { m_detailBtn->blockSignals(true); m_detailBtn->setChecked(state); m_detailBtn->blockSignals(false); } void NoticeMenu::setShowOnLockScreenEnable(bool state) { m_showBtn->blockSignals(true); m_showBtn->setChecked(state); m_showBtn->blockSignals(false); } void NoticeMenu::setPopupStyle(UkuiNotification::SettingsProperty::Property style) { Q_UNUSED(style) // int styleId = 0; // if (style == UkuiNotification::SettingsProperty::TransientPopup) { // styleId = 0; // } else if (style == UkuiNotification::SettingsProperty::ResidentPopup) { // styleId = 1; // } else if (style == UkuiNotification::SettingsProperty::NoPopup) { // styleId = 2; // } // m_styleGroup->blockSignals(true); // m_styleGroup->button(styleId)->setChecked(true); // m_styleGroup->blockSignals(false); } void NoticeMenu::initUi() { QVBoxLayout *menuLyt = new QVBoxLayout(this); menuLyt->setSpacing(0); menuLyt->setContentsMargins(8, 0, 8, 0); QFrame *voiceFrame = new QFrame(this); m_voiceBtn = new KSwitchButton; m_voiceBtn->setTranslucent(true); setFrame(voiceFrame, tr("Beep sound when notified"), m_voiceBtn); QFrame *line_1 = setLine(); QFrame *detailFrame = new QFrame(this); m_detailBtn = new KSwitchButton; m_detailBtn->setTranslucent(true); setFrame(detailFrame, tr("Show message on screenlock"), m_detailBtn); QFrame *line_2 = setLine(); QFrame *showFrame = new QFrame(this); m_showBtn = new KSwitchButton; m_showBtn->setTranslucent(true); setFrame(showFrame, tr("Show noticfication on screenlock"), m_showBtn); // QFrame *line_3 = setLine(); // QLabel *styletitleLabel = new QLabel(tr("Notification Style"), this); // styletitleLabel->setContentsMargins(24, 0, 0, 0); // // m_styleGroup = new QButtonGroup(this); // // QFrame *mutativeFrame = new QFrame(this); // m_mutativeBtn = new QRadioButton; // m_styleGroup->addButton(m_mutativeBtn, 0); // setFrame(mutativeFrame, tr("Banner: Appears in the upper right corner of the screen, and disappears automatically"), m_mutativeBtn); // // QFrame *alwaysFrame = new QFrame(this); // m_alwaysBtn = new QRadioButton; // m_styleGroup->addButton(m_alwaysBtn, 1); // setFrame(alwaysFrame, tr("Tip:It will be kept on the screen until it is closed"), m_alwaysBtn); // // QFrame *noneFrame = new QFrame(this); // m_noneBtn = new QRadioButton; // m_styleGroup->addButton(m_noneBtn, 2); // setFrame(noneFrame, tr("None:Notifications will not be displayed on the screen, but will go to the notification center"), m_noneBtn); menuLyt->addWidget(voiceFrame); menuLyt->addWidget(line_1); menuLyt->addWidget(detailFrame); menuLyt->addWidget(line_2); menuLyt->addWidget(showFrame); // menuLyt->addWidget(line_3); menuLyt->addSpacing(16); // menuLyt->addWidget(styletitleLabel); // menuLyt->addWidget(mutativeFrame); // menuLyt->addWidget(alwaysFrame); // menuLyt->addWidget(noneFrame); menuLyt->addStretch(); // éš�è—�未实现模å�— // voiceFrame->hide(); // line_1->hide(); // detailFrame->hide(); // line_2->hide(); // line_3->hide(); // styletitleLabel->hide(); // mutativeFrame->hide(); // alwaysFrame->hide(); // noneFrame->hide(); // setFixedHeight(60); } void NoticeMenu::setFrame(QFrame *frame, QString str, KSwitchButton *btn) { frame->setFixedHeight(60); frame->setFrameShape(QFrame::NoFrame); QHBoxLayout *hLyt = new QHBoxLayout(frame); hLyt->setContentsMargins(24, 0, 24, 0); hLyt->setSpacing(8); FixLabel *label = new FixLabel(str, frame); label->setFixedWidth(250); hLyt->addWidget(label); hLyt->addStretch(); hLyt->addWidget(btn); } void NoticeMenu::setFrame(QFrame *frame, QString str, QRadioButton *btn) { frame->setFixedHeight(48); frame->setFrameShape(QFrame::NoFrame); QHBoxLayout *hLyt = new QHBoxLayout(frame); hLyt->setContentsMargins(24, 0, 24, 0); FixLabel *label = new FixLabel(str, frame); label->setFixedWidth(288); hLyt->addWidget(btn); hLyt->addWidget(label); hLyt->addStretch(); } QFrame *NoticeMenu::setLine() { QFrame *line = new QFrame(); line->setMinimumSize(QSize(0, 1)); line->setMaximumSize(QSize(16777215, 1)); line->setLineWidth(0); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); return line; } void NoticeMenu::setConnect() { connect(m_voiceBtn, &KSwitchButton::stateChanged, this, &NoticeMenu::voiceSignals); connect(m_detailBtn, &KSwitchButton::stateChanged, this, &NoticeMenu::detailSignals); connect(m_showBtn, &KSwitchButton::stateChanged, this, &NoticeMenu::showSignals); // connect(m_styleGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &NoticeMenu::styleBtnSignals); } void NoticeMenu::showEvent(QShowEvent *event) { int menuXPos = this->pos().x(); int menuWidth = this->size().width()-4; int buttonWidth = 36; QPoint pos = QPoint(menuXPos - menuWidth + buttonWidth, this->pos().y()); this->move(pos); QMenu::showEvent(event); } ukui-notification/notification-ukcc-plugin/notification-ukcc-plugin.cpp0000664000175000017500000007307715160523746025506 0ustar fengfeng /* * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "notification-ukcc-plugin.h" #include "notice-menu.h" #include #include #include #include #include #include "security-control-config.h" #include "utils.h" #include using namespace UkuiNotification; #define THEME_QT_SCHEMA "org.ukui.style" static std::once_flag onceFlag; UkuiSearch::ApplicationInfo& appInfo() { return Utils::applicationInfo(); } class ToolButton : public QToolButton { public: explicit ToolButton(QWidget *parent = nullptr): QToolButton(parent) { } protected: void paintEvent(QPaintEvent *event) override; }; Notice::Notice() { QTranslator* translator = new QTranslator(this); if(!translator->load("/usr/share/ukui-notification/notification-ukcc-plugin/translations/" + QLocale::system().name())) { qWarning() << "/usr/share/ukui-notification/notification-ukcc-plugin/translations/" + QLocale::system().name() << "load failed"; } qApp->installTranslator(translator); m_pluginName = tr("Notice"); m_pluginType = SYSTEM; } Notice::~Notice() { if (m_globalSettings) { delete m_globalSettings; m_globalSettings = nullptr; } } QString Notice::plugini18nName() { return m_pluginName; } int Notice::pluginTypes() { return m_pluginType; } QWidget *Notice::pluginUi() { std::call_once(onceFlag, [ & ] { if (QGSettings::isSchemaInstalled(THEME_QT_SCHEMA)) { QByteArray id(THEME_QT_SCHEMA); m_themeSetting = new QGSettings(id, QByteArray(), this); } if (!m_globalSettings) { m_globalSettings = new NotificationGlobalSettings(); } m_pluginWidget = new QWidget; m_pluginWidget->setAttribute(Qt::WA_DeleteOnClose); initUi(m_pluginWidget); initSearchText(); initNoticeStatus(); initConnection(); initListUI(); }); return m_pluginWidget; } const QString Notice::name() const { return QStringLiteral("Notice"); } QString Notice::translationPath() const { return QStringLiteral("/usr/share/ukui-notification/notification-ukcc-plugin/translations/%1.ts"); } bool Notice::isShowOnHomePage() const { return false; } QIcon Notice::icon() const { return QIcon::fromTheme("ukui-tool-symbolic"); } bool Notice::isEnable() const { return true; } void Notice::initUi(QWidget *widget) { QVBoxLayout *mverticalLayout = new QVBoxLayout(widget); mverticalLayout->setSpacing(0); mverticalLayout->setContentsMargins(0, 0, 0, 0); QFrame *notFazeFrame = new QFrame(widget); initNotFaze(notFazeFrame); QWidget *Noticewidget = new QWidget(widget); Noticewidget->setMinimumSize(QSize(550, 0)); Noticewidget->setMaximumSize(QSize(16777215, 16777215)); QVBoxLayout *NoticeLayout = new QVBoxLayout(Noticewidget); NoticeLayout->setContentsMargins(0, 0, 0, 0); NoticeLayout->setSpacing(8); m_noticeLabel = new TitleLabel(Noticewidget); m_notFazeLabel = new TitleLabel(); //~ contents_path /Notice/Do not disturb mode Mode m_notFazeLabel->setText(tr("Do not disturb mode")); LightLabel *notFazeLabel = new LightLabel(tr("(Notification banners, prompts will be hidden, and notification sounds will be muted)")); QFrame *distrubFrame = new QFrame(widget); distrubFrame->setMinimumWidth(550); distrubFrame->setMaximumWidth(16777215); QHBoxLayout *distrubLyt = new QHBoxLayout(distrubFrame); distrubLyt->setContentsMargins(0, 0, 0, 0); distrubLyt->addWidget(m_notFazeLabel); distrubLyt->addSpacing(4); distrubLyt->addWidget(notFazeLabel, Qt::AlignLeft); m_getNoticeFrame = new QFrame(Noticewidget); m_getNoticeFrame->setMinimumSize(QSize(550, 60)); m_getNoticeFrame->setMaximumSize(QSize(16777215, 60)); m_getNoticeFrame->setFrameShape(QFrame::Box); QHBoxLayout *mGetNoticeLayout = new QHBoxLayout(m_getNoticeFrame); mGetNoticeLayout->setContentsMargins(16,0,16,0); m_getNoticeLabel = new QLabel(m_getNoticeFrame); m_getNoticeLabel->setFixedWidth(550); m_enableSwitchBtn = new KSwitchButton(m_getNoticeFrame); m_enableSwitchBtn->setObjectName("getnoticeinfo"); mGetNoticeLayout->addWidget(m_getNoticeLabel,Qt::AlignLeft); mGetNoticeLayout->addStretch(); mGetNoticeLayout->addWidget(m_enableSwitchBtn); m_noticeAppFrame = new QFrame(Noticewidget); m_noticeAppFrame->setMinimumSize(QSize(550, 0)); m_noticeAppFrame->setMaximumSize(QSize(16777215, 16777215)); m_noticeAppFrame->setFrameShape(QFrame::Box); m_appListVerticalLayout = new QVBoxLayout(m_noticeAppFrame); m_appListVerticalLayout->setContentsMargins(0, 0, 0, 0); m_appListVerticalLayout->setSpacing(0); NoticeLayout->addWidget(m_noticeLabel); NoticeLayout->addWidget(m_getNoticeFrame); NoticeLayout->addWidget(m_noticeAppFrame); NoticeLayout->addStretch(); if (1) { mverticalLayout->addWidget(distrubFrame); mverticalLayout->addSpacing(8); mverticalLayout->addWidget(notFazeFrame); mverticalLayout->addSpacing(32); } else { distrubFrame->hide(); notFazeFrame->hide(); } mverticalLayout->addWidget(Noticewidget); } void Notice::initNotFaze(QFrame *frame) { frame->setMinimumSize(QSize(550, 0)); frame->setMaximumSize(QSize(16777215, 16777215)); frame->setFrameShape(QFrame::Box); QVBoxLayout *notFazeLyt = new QVBoxLayout(frame); notFazeLyt->setContentsMargins(0, 0, 0, 0); notFazeLyt->setSpacing(0); QFrame *line_1 = NoticeMenu::setLine(); QFrame *line_2 = NoticeMenu::setLine(); QFrame *line_3 = NoticeMenu::setLine(); QFrame *autoOpenFrame = new QFrame(frame); autoOpenFrame->setMinimumSize(550, 60); autoOpenFrame->setMaximumSize(16777215, 60); QHBoxLayout *autoLyt = new QHBoxLayout(autoOpenFrame); autoLyt->setContentsMargins(16, 0, 16, 0); //~ contents_path /Notice/Do not disturb mode Mode/Automatically turn on QLabel *autoOpenLabel = new QLabel(tr("Automatically turn on"), autoOpenFrame); m_openTimeHComboBox = new QComboBox(autoOpenFrame); m_openTimeHComboBox->setObjectName("opentimehour"); m_openTimeHComboBox->setFixedWidth(64); m_openTimeMComboBox = new QComboBox(autoOpenFrame); m_openTimeMComboBox->setObjectName("opentimeminute"); m_openTimeMComboBox->setFixedWidth(64); m_closeTimeHComboBox = new QComboBox(autoOpenFrame); m_closeTimeHComboBox->setObjectName("closetimehour"); m_closeTimeHComboBox->setFixedWidth(64); m_closeTimeMComboBox = new QComboBox(autoOpenFrame); m_closeTimeMComboBox->setObjectName("closetimeminute"); m_closeTimeMComboBox->setFixedWidth(64); for (int i = 0; i < 24; i++) { m_openTimeHComboBox->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); m_closeTimeHComboBox->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); } for (int i = 0; i < 60; i++) { m_openTimeMComboBox->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); m_closeTimeMComboBox->addItem(QStringLiteral("%1").arg(i, 2, 10, QLatin1Char('0'))); } QLabel * label_1 = new QLabel(autoOpenFrame); label_1->setFixedWidth(20); label_1->setText(tr("to")); QLabel *label_2 = new QLabel(autoOpenFrame); label_2->setFixedWidth(4); label_2->setText(":"); QLabel *label_3 = new QLabel(autoOpenFrame); label_3->setFixedWidth(4); label_3->setText(":"); m_autoOpenSwitchBtn = new KSwitchButton(autoOpenFrame); m_autoOpenSwitchBtn->setObjectName("autoopen"); autoLyt->addWidget(autoOpenLabel); autoLyt->addStretch(); autoLyt->addWidget(m_openTimeHComboBox); autoLyt->addWidget(label_2); autoLyt->addWidget(m_openTimeMComboBox); autoLyt->addWidget(label_1); autoLyt->addWidget(m_closeTimeHComboBox); autoLyt->addWidget(label_3); autoLyt->addWidget(m_closeTimeMComboBox); autoLyt->addSpacing(24); autoLyt->addWidget(m_autoOpenSwitchBtn); QFrame *multiScreenFrame = new QFrame(frame); m_multiScreenSwitchBtn= new KSwitchButton(); m_multiScreenSwitchBtn->setObjectName("multiscreen"); //~ contents_path /Notice/Do not disturb mode/Automatically turn on when multiple screens are connected setFrame(multiScreenFrame, m_multiScreenSwitchBtn, tr("Automatically turn on when multiple screens are connected")); QFrame *fullScreenFrame = new QFrame(frame); m_fullScreenSwitchBtn= new KSwitchButton(); m_fullScreenSwitchBtn->setObjectName("fullscreen"); //~ contents_path /Notice/Do not disturb mode/Automatically open in full screen mode setFrame(fullScreenFrame, m_fullScreenSwitchBtn, tr("Automatically open in full screen mode")); QFrame *allowAlarmrRemindersFrame = new QFrame(frame); m_allowAlarmSwitchBtn= new KSwitchButton(); m_allowAlarmSwitchBtn->setObjectName("allowAlarmr"); //~ contents_path /Notice/Do not disturb mode/Allow automatic alarm reminders in Do Not Disturb mode setFrame(allowAlarmrRemindersFrame, m_allowAlarmSwitchBtn, tr("Allow automatic alarm reminders in Do Not Disturb mode")); notFazeLyt->addWidget(autoOpenFrame); notFazeLyt->addWidget(line_1); notFazeLyt->addWidget(multiScreenFrame); notFazeLyt->addWidget(line_2); notFazeLyt->addWidget(fullScreenFrame); notFazeLyt->addWidget(line_3); notFazeLyt->addWidget(allowAlarmrRemindersFrame); } void Notice::setFrame(QFrame *frame, KSwitchButton *btn, QString str) { frame->setMinimumSize(QSize(550, 60)); frame->setMaximumSize(QSize(16777215, 60)); frame->setFrameShape(QFrame::NoFrame); QHBoxLayout *hLyt = new QHBoxLayout(frame); hLyt->setContentsMargins(16, 0, 16, 0); QLabel *label = new QLabel(str, frame); hLyt->addWidget(label); hLyt->addStretch(); hLyt->addWidget(btn); } void Notice::initSearchText() { m_noticeLabel->setText(tr("Notice Settings")); //~ contents_path /notice/Get notifications from the app m_getNoticeLabel->setText(tr("Get notifications from the app")); } void Notice::initConnection() { if (m_globalSettings) { connect(m_openTimeHComboBox, &QComboBox::currentTextChanged, this, [&](const QString &text){ //Utils::buriedSettings(name(), "open time(hour) when auto turn on do not disturb mode", QString("settings"), text); m_globalSettings->setScheduleTurnOnDNDTime(QTime::fromString(text + ":" + m_openTimeMComboBox->currentText(), "hh:mm")); }); connect(m_openTimeMComboBox, &QComboBox::currentTextChanged, this, [&](const QString &text){ //Utils::buriedSettings(name(), "open time(minute) when auto turn on do not disturb mode", QString("settings"), m_openTimeMCombox->currentText()); m_globalSettings->setScheduleTurnOnDNDTime(QTime::fromString(text + ":" + m_openTimeHComboBox->currentText(), "mm:hh")); }); connect(m_closeTimeHComboBox, &QComboBox::currentTextChanged, this, [&](const QString &text){ //Utils::buriedSettings(name(), "close time(hour) when auto turn on do not disturb mode", QString("settings"), m_closeTimeMCombox->currentText()); m_globalSettings->setScheduleTurnOffDNDTime(QTime::fromString(text + ":" + m_closeTimeMComboBox->currentText(), "hh:mm")); }); connect(m_closeTimeMComboBox, &QComboBox::currentTextChanged, this, [&](const QString &text){ //Utils::buriedSettings(name(), "close time(minute) when auto turn on do not disturb mode", QString("settings"), m_closeTimeMCombox->currentText()); m_globalSettings->setScheduleTurnOffDNDTime(QTime::fromString(text + ":" + m_closeTimeHComboBox->currentText(), "mm:hh")); }); connect(m_autoOpenSwitchBtn, &KSwitchButton::stateChanged, [&](bool state) { //Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false"); m_globalSettings->setScheduleTurnOnDND(state); setComBoxStatus(state); }); connect(m_multiScreenSwitchBtn, &KSwitchButton::stateChanged, [&](bool state) { //Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false"); m_globalSettings->setDNDWhileMultiScreen(state); }); connect(m_fullScreenSwitchBtn, &KSwitchButton::stateChanged, [&](bool state) { //Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false"); m_globalSettings->setDNDWhileFullScreen(state); }); connect(m_allowAlarmSwitchBtn, &KSwitchButton::stateChanged, [&](bool state) { //Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false"); m_globalSettings->setNotifyAlarmWhileDND(state); }); connect(m_enableSwitchBtn, &KSwitchButton::stateChanged, [&](bool state){ //Utils::buriedSettings(name(), "whether to get the notification from the app", QString("settings"), state ? "true" : "false"); if (SecurityControlConfig::instance().isNotificationEnable()) { m_globalSettings->setReceiveNotificationsFromApps(state); } setHiddenNoticeApp(state); }); connect(m_globalSettings, &NotificationGlobalSettings::scheduleTurnOnDNDChanged, this, [&](bool state) { m_autoOpenSwitchBtn->blockSignals(true); m_autoOpenSwitchBtn->setChecked(state); m_autoOpenSwitchBtn->blockSignals(false); setComBoxStatus(state); }); connect(m_globalSettings, &NotificationGlobalSettings::scheduleTurnOnDNDTimeChanged, this, [&](QTime time) { m_openTimeHComboBox->blockSignals(true); m_openTimeHComboBox->setCurrentText(time.toString("hh")); m_openTimeHComboBox->blockSignals(false); m_openTimeMComboBox->blockSignals(true); m_openTimeMComboBox->setCurrentText(time.toString("mm")); m_openTimeMComboBox->blockSignals(false); }); connect(m_globalSettings, &NotificationGlobalSettings::scheduleTurnOffDNDTimeChanged, this, [&](QTime time) { m_closeTimeHComboBox->blockSignals(true); m_closeTimeHComboBox->setCurrentText(time.toString("hh")); m_closeTimeHComboBox->blockSignals(false); m_closeTimeMComboBox->blockSignals(true); m_closeTimeMComboBox->setCurrentText(time.toString("mm")); m_closeTimeMComboBox->blockSignals(false); }); connect(m_globalSettings, &NotificationGlobalSettings::DNDWhileMultiScreenChanged, this, [&](bool state) { m_multiScreenSwitchBtn->blockSignals(true); m_multiScreenSwitchBtn->setChecked(state); m_multiScreenSwitchBtn->blockSignals(false); }); connect(m_globalSettings, &NotificationGlobalSettings::DNDWhileFullScreenChanged, this, [&](bool state) { m_fullScreenSwitchBtn->blockSignals(true); m_fullScreenSwitchBtn->setChecked(state); m_fullScreenSwitchBtn->blockSignals(false); }); connect(m_globalSettings, &NotificationGlobalSettings::notifyAlarmWhileDNDChanged, this, [&](bool state) { m_allowAlarmSwitchBtn->blockSignals(true); m_allowAlarmSwitchBtn->setChecked(state); m_allowAlarmSwitchBtn->blockSignals(false); }); connect(m_globalSettings, &NotificationGlobalSettings::receiveNotificationsFromAppsChanged, this, [&](bool state) { m_enableSwitchBtn->blockSignals(true); m_enableSwitchBtn->setChecked(state); m_enableSwitchBtn->blockSignals(false); setHiddenNoticeApp(state); }); } connect(&SecurityControlConfig::instance(), &SecurityControlConfig::configChanged, this, [&] { bool enableNotification = SecurityControlConfig::instance().isNotificationEnable(); qDebug() << "Security config changed, enable notification" << enableNotification; if (!enableNotification) { m_enableSwitchBtn->blockSignals(true); m_enableSwitchBtn->setChecked(enableNotification); m_enableSwitchBtn->blockSignals(false); m_enableSwitchBtn->setEnabled(enableNotification); setHiddenNoticeApp(enableNotification); } }); connect(&SecurityControlConfig::instance(), &SecurityControlConfig::exitControl, this, [&] { bool state = m_globalSettings->receiveNotificationsFromApps(); qDebug() << "Exit control, reset state" << state; m_enableSwitchBtn->setEnabled(true); m_enableSwitchBtn->blockSignals(true); m_enableSwitchBtn->setChecked(state); m_enableSwitchBtn->blockSignals(false); setHiddenNoticeApp(state); }); } void Notice::initNoticeStatus() { if (m_globalSettings) { m_autoOpenSwitchBtn->blockSignals(true); m_autoOpenSwitchBtn->setChecked(m_globalSettings->scheduleTurnOnDND()); setComBoxStatus(m_autoOpenSwitchBtn->isChecked()); m_autoOpenSwitchBtn->blockSignals(false); QTime openTime = m_globalSettings->scheduleTurnOnDNDTime(); m_openTimeHComboBox->blockSignals(true); m_openTimeHComboBox->setCurrentText(openTime.toString("hh")); m_openTimeHComboBox->blockSignals(false); m_openTimeMComboBox->blockSignals(true); m_openTimeMComboBox->setCurrentText(openTime.toString("mm")); m_openTimeMComboBox->blockSignals(false); QTime closeTime = m_globalSettings->scheduleTurnOffDNDTime(); m_closeTimeHComboBox->blockSignals(true); m_closeTimeHComboBox->setCurrentText(closeTime.toString("hh")); m_closeTimeHComboBox->blockSignals(false); m_closeTimeMComboBox->blockSignals(true); m_closeTimeMComboBox->setCurrentText(closeTime.toString("mm")); m_closeTimeMComboBox->blockSignals(false); m_multiScreenSwitchBtn->blockSignals(true); m_multiScreenSwitchBtn->setChecked(m_globalSettings->DNDWhileMultiScreen()); m_multiScreenSwitchBtn->blockSignals(false); m_fullScreenSwitchBtn->blockSignals(true); m_fullScreenSwitchBtn->setChecked(m_globalSettings->DNDWhileFullScreen()); m_fullScreenSwitchBtn->blockSignals(false); m_allowAlarmSwitchBtn->blockSignals(true); m_allowAlarmSwitchBtn->setChecked(m_globalSettings->notifyAlarmWhileDND()); m_allowAlarmSwitchBtn->blockSignals(false); m_enableSwitchBtn->blockSignals(true); m_enableSwitchBtn->setChecked(SecurityControlConfig::instance().isNotificationEnable() && m_globalSettings->receiveNotificationsFromApps()); m_enableSwitchBtn->blockSignals(false); m_enableSwitchBtn->setEnabled(SecurityControlConfig::instance().isNotificationEnable()); } setHiddenNoticeApp(m_enableSwitchBtn->isChecked()); } void Notice::initListUI() { const UkuiSearch::ApplicationProperties& properties = { UkuiSearch::ApplicationProperty::LocalName, UkuiSearch::ApplicationProperty::Icon }; connect(this, &Notice::appDataInfo, this, &Notice::addItemUi, Qt::QueuedConnection); (void)QtConcurrent::run([=](){ auto convertAppinfoMap = [](const UkuiSearch::ApplicationInfoMap& appInfoMap) -> UkuiSearch::ApplicationInfoMap { //全路径desktop map, 转æ�¢ä¸ºdesktop文件å��çš„ map UkuiSearch::ApplicationInfoMap newAppInfoMap; for (auto it = appInfoMap.begin(); it != appInfoMap.end(); ++it) { QString newKey = Utils::desktopEntry2Name(it.key()); if (!newAppInfoMap.contains(newKey)) { newAppInfoMap.insert(newKey, it.value()); } } return newAppInfoMap; }; const UkuiSearch::ApplicationInfoMap& appInfoMap = appInfo().getInfo(properties); Q_EMIT appDataInfo(convertAppinfoMap(appInfoMap)); }); connect(ApplicationsSettings::self(), &ApplicationsSettings::applicationInstalled, this, [=](const QString &appDesktopName){ const UkuiSearch::ApplicationProperties& properties = { UkuiSearch::ApplicationProperty::LocalName, UkuiSearch::ApplicationProperty::Icon }; (void)QtConcurrent::run([=](){ UkuiSearch::ApplicationPropertyMap dataMap = appInfo().getInfo(Utils::desktopEntryFromName(appDesktopName) , properties); UkuiSearch::ApplicationInfoMap appInfoMap = {{appDesktopName, dataMap}}; Q_EMIT appDataInfo(appInfoMap); }); }); } void Notice::addItemUi(const UkuiSearch::ApplicationInfoMap &appInfoMap) { if (appInfoMap.count() == 1) { QString desktopEntry = appInfoMap.keys().at(0); UkuiSearch::ApplicationPropertyMap dataMap = appInfoMap.value(desktopEntry); if (!m_appList.contains(desktopEntry)) { initItemUi(desktopEntry, dataMap, ApplicationsSettings::self()->creatSettings(desktopEntry)); m_appList.append(desktopEntry); } } else { ApplicationsSettingsMap dataMap = ApplicationsSettings::self()->getAllApplicationsSettings(); ApplicationsSettingsMap::const_iterator i = dataMap.constBegin(); m_appList.clear(); while(i != dataMap.constEnd()) { const QString& desktopPath = i.key(); if (appInfoMap.contains(desktopPath)) { initItemUi(desktopPath, appInfoMap[desktopPath], i.value()); m_appList.append(desktopPath); } else { qWarning() << "Can't find application info for: " << desktopPath; } ++i; } } } void Notice::initItemUi(const QString &desktopPath, const UkuiSearch::ApplicationPropertyMap& properties, SingleApplicationSettings *settings) { QString localName = properties[UkuiSearch::ApplicationProperty::LocalName].toString(); QString iconName = properties[UkuiSearch::ApplicationProperty::Icon].toString(); QString fileName = desktopPath.left(desktopPath.indexOf(QLatin1Char('.'))); QFrame *baseWidget = new QFrame(m_noticeAppFrame); baseWidget->setMinimumWidth(550); baseWidget->setMaximumWidth(16777215); baseWidget->setFixedHeight(60); baseWidget->setFrameShape(QFrame::Shape::NoFrame); baseWidget->setAttribute(Qt::WA_DeleteOnClose); QLabel *iconLabel = new QLabel(baseWidget); iconLabel->setFixedSize(32, 32); setAppIcon(iconLabel, iconName); connect(m_themeSetting, &QGSettings::changed, [&, iconLabel, iconName](const QString &key){ if (key == "iconThemeName") setAppIcon(iconLabel, iconName); }); QHBoxLayout *devHorLayout = new QHBoxLayout(baseWidget); devHorLayout->setSpacing(8); devHorLayout->setContentsMargins(16, 0, 16, 0); QLabel *nameLabel = new QLabel(baseWidget); nameLabel->setText(localName); ToolButton *setBtn = new ToolButton(baseWidget); setBtn->setProperty("useButtonPalette", true); setBtn->setPopupMode(QToolButton::InstantPopup); setBtn->setAutoRaise(true); setBtn->setFixedSize(QSize(36, 36)); setBtn->setIcon(QIcon::fromTheme("view-more-horizontal-symbolic")); NoticeMenu *menu = new NoticeMenu(setBtn); setBtn->setMenu(menu); KSwitchButton *appSwitch = new KSwitchButton(baseWidget); devHorLayout->addWidget(iconLabel); devHorLayout->addWidget(nameLabel); devHorLayout->addStretch(); devHorLayout->addWidget(setBtn); devHorLayout->addWidget(appSwitch); m_appListVerticalLayout->addWidget(baseWidget); if (m_appListVerticalLayout->count() >= 2) { QFrame *line = new QFrame(m_pluginWidget); line->setMinimumSize(QSize(0, 1)); line->setMaximumSize(QSize(16777215, 1)); line->setLineWidth(0); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); m_appListVerticalLayout->insertWidget(m_appListVerticalLayout->count() - 1, line); } appSwitch->blockSignals(true); appSwitch->setChecked(settings->allowNotify()); appSwitch->blockSignals(false); menu->blockSignals(true); menu->initStatus(settings); menu->blockSignals(false); connect(appSwitch, &KSwitchButton::stateChanged, [=](bool state) { //Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false"); ApplicationsSettings::self()->setAppSetting(desktopPath, SettingsProperty::AllowNotify, state); }); connect(settings, &SingleApplicationSettings::allowNotifyChanged, [=](bool state) { appSwitch->blockSignals(true); appSwitch->setChecked(state); appSwitch->blockSignals(false); }); connect(settings, &SingleApplicationSettings::allowSoundChanged, [=](bool state) { menu->blockSignals(true); menu->setVoiceEnable(state); menu->blockSignals(false); }); connect(settings, &SingleApplicationSettings::showContentOnLockScreenChanged, [=](bool state) { menu->blockSignals(true); menu->setDetailShowOnLockScreenEnable(state); menu->blockSignals(false); }); connect(settings, &SingleApplicationSettings::showNotificationOnLockScreenChanged, [=](bool state) { menu->blockSignals(true); menu->setShowOnLockScreenEnable(state); menu->blockSignals(false); }); connect(settings, &SingleApplicationSettings::popupStyleChanged, [=](SettingsProperty::Property style) { menu->blockSignals(true); menu->setPopupStyle(style); menu->blockSignals(false); }); connect(settings, &SingleApplicationSettings::uninstalled, [=]() { for (int i = 0; i < m_appList.length(); i++) { if (desktopPath == m_appList.at(i)) { m_appList.removeAt(i); if (i == 0) { removeLayoutItem(i); removeLayoutItem(i); } else { removeLayoutItem(i * 2 - 1); removeLayoutItem(i * 2 - 1); } } } }); connect(menu, &NoticeMenu::voiceSignals, [=](bool checked) { //Common::buriedSettings(name(), "whether prompt sound during notification", QString("settings"), checked ? "true" : "false"); ApplicationsSettings::self()->setAppSetting(desktopPath, SettingsProperty::AllowSound, checked); }); connect(menu, &NoticeMenu::detailSignals, [=](bool checked) { //Common::buriedSettings(name(), "whether to show the message content in the lock screen interface", QString("settings"), checked ? "true" : "false"); ApplicationsSettings::self()->setAppSetting(desktopPath, SettingsProperty::ShowContentOnLockScreen, checked); }); connect(menu, &NoticeMenu::showSignals, [=](bool checked) { //Common::buriedSettings(name(), "whether to show the notice in the lock screen interface", QString("settings"), checked ? "true" : "false"); ApplicationsSettings::self()->setAppSetting(desktopPath, SettingsProperty::ShowNotificationOnLockScreen, checked); }); // connect(menu, &NoticeMenu::styleBtnSignals, [=](int id) { // QString str("mutative"); // SettingsProperty::Property style = SettingsProperty::TransientPopup; // if (id == 0) { // str = "mutative"; // style = SettingsProperty::TransientPopup; // } else if (id == 1) { // str = "always"; // style = SettingsProperty::ResidentPopup; // } else if (id == 2) { // str = "none"; // style = SettingsProperty::NoPopup; // } // //Common::buriedSettings(name(), "set notice style", QString("settings"), str); // ApplicationsSettings::self()->setAppSetting(desktopPath, SettingsProperty::PopupStyle, style); // }); } void Notice::setAppIcon(QLabel *iconlabel, const QString &icon) { QFileInfo iconFile(QString("/usr/share/pixmaps/" + icon + ".png")); QPixmap pixmap; QIcon currentIcon = QIcon::fromTheme(icon); if (!currentIcon.isNull()) { pixmap = currentIcon.pixmap(QSize(32, 32)); } else if (iconFile.exists()) { pixmap = QPixmap(iconFile.filePath()).scaled(32, 32); } else { pixmap = QPixmap(QString(":/img/plugins/autoboot/desktop.png")); } iconlabel->setPixmap(pixmap); } void Notice::setHiddenNoticeApp(bool status) { m_noticeAppFrame->setVisible(status); } void Notice::setComBoxStatus(bool status) { m_openTimeHComboBox->setEnabled(status); m_closeTimeHComboBox->setEnabled(status); m_openTimeMComboBox->setEnabled(status); m_closeTimeMComboBox->setEnabled(status); } void Notice::removeLayoutItem(int i) { if ((i >= 0)&&(m_appListVerticalLayout->count() > i)) { QWidget* widget = m_appListVerticalLayout->itemAt(i)->widget(); if (widget) { m_appListVerticalLayout->removeWidget(widget); widget->deleteLater(); } } } void ToolButton::paintEvent(QPaintEvent *event) { QPalette palette; palette.setColor(QPalette::Button, palette.base().color()); this->setPalette(palette); QToolButton::paintEvent(event); } ukui-notification/notification-ukcc-plugin/notification-ukcc-plugin.h0000664000175000017500000000652515160523734025142 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef NOTIFICATION_UKCC_PLUGIN_H #define NOTIFICATION_UKCC_PLUGIN_H #include #include #include #include #include #include #include #include "applications-settings.h" #include "notification-global-settings.h" using namespace kdk; class Notice : public QObject, CommonInterface { Q_OBJECT Q_PLUGIN_METADATA(IID "org.ukcc.CommonInterface") Q_INTERFACES(CommonInterface) public: Notice(); ~Notice(); QString plugini18nName() Q_DECL_OVERRIDE; int pluginTypes() Q_DECL_OVERRIDE; QWidget * pluginUi() Q_DECL_OVERRIDE; const QString name() const Q_DECL_OVERRIDE; QString translationPath() const override; bool isShowOnHomePage() const Q_DECL_OVERRIDE; QIcon icon() const Q_DECL_OVERRIDE; bool isEnable() const Q_DECL_OVERRIDE; void initUi(QWidget *widget); void initNotFaze(QFrame *frame); void setFrame(QFrame *frame, KSwitchButton *btn, QString str); void initSearchText(); void initConnection(); void initNoticeStatus(); void initListUI(); void addItemUi(const UkuiSearch::ApplicationInfoMap& appInfoMap); void initItemUi(const QString &desktopPath, const UkuiSearch::ApplicationPropertyMap& properties, UkuiNotification::SingleApplicationSettings *settings); void setAppIcon(QLabel *iconlabel, const QString &icon); Q_SIGNALS: void appDataInfo(const UkuiSearch::ApplicationInfoMap&); private: void setHiddenNoticeApp(bool status); void setComBoxStatus(bool status); void removeLayoutItem(int i); private: QString m_pluginName; int m_pluginType; QVector m_appList; QWidget *m_pluginWidget = nullptr; TitleLabel *m_noticeLabel = nullptr; TitleLabel *m_notFazeLabel = nullptr; QLabel *m_getNoticeLabel = nullptr; QFrame *m_noticeAppFrame = nullptr; QFrame *m_getNoticeFrame = nullptr; KSwitchButton *m_autoOpenSwitchBtn = nullptr; KSwitchButton *m_multiScreenSwitchBtn = nullptr; KSwitchButton *m_fullScreenSwitchBtn = nullptr; KSwitchButton *m_allowAlarmSwitchBtn = nullptr; KSwitchButton *m_enableSwitchBtn = nullptr; QComboBox *m_openTimeHComboBox = nullptr; QComboBox *m_openTimeMComboBox = nullptr; QComboBox *m_closeTimeHComboBox = nullptr; QComboBox *m_closeTimeMComboBox = nullptr; QGSettings *m_themeSetting = nullptr; QVBoxLayout *m_appListVerticalLayout = nullptr; UkuiNotification::NotificationGlobalSettings *m_globalSettings = nullptr; }; #endif // NOTIFICATION_UKCC_PLUGIN_H ukui-notification/README.en.md0000664000175000017500000000007015160523734015024 0ustar fengfeng# ukui-notification #### Description ukui-notification ukui-notification/notification-server/0000775000175000017500000000000015160523746017144 5ustar fengfengukui-notification/notification-server/translations/0000775000175000017500000000000015160523746021665 5ustar fengfengukui-notification/notification-server/translations/de.ts0000664000175000017500000000232215160523734022621 0ustar fengfeng NotificationControlRegister System notification System-Benachrichtigungen Whether to allow "%1" to send system notifications Gibt an, ob '%1' das Senden von Systembenachrichtigungen zugelassen werden soll If not, you will no longer receive any prompt messages from the app Wenn nicht, erhalten Sie keine Eingabeaufforderungen mehr von der App Disallow Unstatthaft Allow erlauben NotificationServer::NotificationServerApplication Quit notification server Opt-out vom Benachrichtigungsdienst ukui-notification/notification-server/translations/ky.ts0000664000175000017500000000211415160523746022656 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow جول قويما Allow ۇرۇقسات NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/zh_CN.ts0000664000175000017500000000216715160523734023241 0ustar fengfeng NotificationControlRegister System notification 系统通知 Whether to allow "%1" to send system notifications 是å�¦å…�许“%1â€�å�‘é€�系统通知 If not, you will no longer receive any prompt messages from the app è‹¥ä¸�å…�许,将ä¸�å†�接收该应用的任何æ��示消æ�¯ Disallow ä¸�å…�许 Allow å…�许 NotificationServer::NotificationServerApplication Quit notification server 退出通知æœ�务 ukui-notification/notification-server/translations/kk.ts0000664000175000017500000000211615160523746022642 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow جول قويما Allow ماقۇلداۋ NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/ar.ts0000664000175000017500000000212115160523746022633 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow Allow NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/ug.ts0000664000175000017500000000211415160523746022646 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow يول قويما Allow ئىجازەت NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/bo_CN.ts0000664000175000017500000000212415160523746023214 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow Allow ཆོག་པ་ NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/vi.ts0000664000175000017500000000212115160523746022647 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow Allow NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/mn.ts0000664000175000017500000000214015160523746022644 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow Allow ᠵᠥᠪᠰᠢᠶᠡᠷᠡᠬᠦ NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/fr.ts0000664000175000017500000000234515160523734022645 0ustar fengfeng NotificationControlRegister System notification Notifications système Whether to allow "%1" to send system notifications S’il faut autoriser ' %1' pour envoyer des notifications système If not, you will no longer receive any prompt messages from the app Si ce n’est pas le cas, vous ne recevrez plus de messages d’invite de l’application Disallow Non autorisé Allow permettre NotificationServer::NotificationServerApplication Quit notification server Désactivation du service de notification ukui-notification/notification-server/translations/en_US.ts0000664000175000017500000000212415160523734023242 0ustar fengfeng NotificationControlRegister System notification Whether to allow "%1" to send system notifications If not, you will no longer receive any prompt messages from the app Disallow Allow NotificationServer::NotificationServerApplication Quit notification server ukui-notification/notification-server/translations/es.ts0000664000175000017500000000233115160523734022640 0ustar fengfeng NotificationControlRegister System notification Notificaciones del sistema Whether to allow "%1" to send system notifications Si se debe permitir que '%1' envíe notificaciones del sistema If not, you will no longer receive any prompt messages from the app De lo contrario, ya no recibirá ningún mensaje de aviso de la aplicación Disallow No permitido Allow conceder NotificationServer::NotificationServerApplication Quit notification server Exclusión voluntaria del servicio de notificación ukui-notification/notification-server/translations/zh_HK.ts0000664000175000017500000000217015160523734023235 0ustar fengfeng NotificationControlRegister System notification 系統通知 Whether to allow "%1" to send system notifications 是å�¦å…�許「%1ã€� 發é€�系統通知 If not, you will no longer receive any prompt messages from the app è‹¥ä¸�å…�許,將ä¸�å†�接收該應用的任何æ��示消æ�¯ Disallow ä¸�å…�許 Allow å…�許 NotificationServer::NotificationServerApplication Quit notification server 退出通知æœ�å‹™ ukui-notification/notification-server/server.cpp0000664000175000017500000002527315160523746021167 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include #include #include "server.h" #include "server-private.h" #include "notificationsadaptor.h" #include "notificationserveradaptor.h" #include "notificationsettingsadaptor.h" #include "notification-server-config.h" #include "utils.h" #include "notification-close-reason.h" #include "notification-settings/settings-manager.h" #include "notification-manager.h" #include "security-control-config.h" using namespace NotificationServer; using namespace UkuiNotification; ServerPrivate::ServerPrivate(QObject *parent) : QObject(parent) , m_notificationWatchers(new QDBusServiceWatcher(this)) , m_notificationControlRegister(new NotificationControlRegister) , m_notificationDefaultDirWatcher(new NotificationDefaultDirWatcher(m_notificationControlRegister, this)) , m_notificationSettingsQuery(new NotificaitonSettingsQuery(this)) { SecurityControlConfig::instance(); m_notificationWatchers->setConnection(QDBusConnection::sessionBus()); m_notificationWatchers->setWatchMode(QDBusServiceWatcher::WatchForUnregistration); connect(m_notificationWatchers, &QDBusServiceWatcher::serviceUnregistered, m_notificationWatchers, &QDBusServiceWatcher::removeWatchedService); connect(this, &ServerPrivate::NotificationClosed, &NotificationManager::self() ,&NotificationManager::onNotificationClosed); connect(m_notificationSettingsQuery, &NotificaitonSettingsQuery::alarmSoundAllowedChanged, this, &ServerPrivate::AlarmSoundAllowedChanged); } ServerPrivate::~ServerPrivate() = default; QStringList ServerPrivate::GetCapabilities() const { return QStringList(); } uint ServerPrivate::Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout) { if (!SecurityControlConfig::instance().isNotificationEnable()) { qWarning() << "Under security control! All notifications are disabled now!"; return 0; } uint id = 0; if(replaces_id > 0) { id = replaces_id; } else { id = m_increasedNotificationId++; } QVariantMap newHints = hints; newHints.insert(QStringLiteral("x-ukui-createdTime"), QDateTime::currentDateTime().toString()); uint pid = 0; if (calledFromDBus()) { QDBusReply pidReply = connection().interface()->servicePid(message().service()); if(pidReply.isValid()) { pid = pidReply.value(); } } if (newHints.value(QStringLiteral("x-ukui-display")).toString().isEmpty() && pid > 0) { newHints.insert(QStringLiteral("x-ukui-display"), UkuiNotification::Utils::displayFromPid(pid)); } QString desktopEntry = newHints.value(QStringLiteral("desktop-entry")).toString(); const QString& checkDesktopEntry = UkuiNotification::Utils::desktopEntryFromName(desktopEntry); if (!checkDesktopEntry.isEmpty()) { desktopEntry = UkuiNotification::Utils::desktopEntry2Name(checkDesktopEntry); } if (desktopEntry.isEmpty() && pid > 0) { qInfo() << "check desktop from name failed, try from pid" << pid; desktopEntry = UkuiNotification::Utils::desktopEntryFromPid(pid); } newHints.insert(QStringLiteral("desktop-entry"), desktopEntry); qDebug() << "New message received:" << app_name << id << app_icon << summary << body << actions << hints << timeout << "new hints" << newHints; //APP 第一次å�‘é€�通知,注册到控制é�¢æ�¿ç®¡æŽ§ if (calledFromDBus()) { if (desktopEntry.isEmpty()) { qWarning() << "Failed to retrieve desktop file" << app_name << pid; } //é�ždbus调用å�‘é€�的通知ä¸�进行注册 m_notificationControlRegister->registerNotificationControl(desktopEntry); } if (m_notificationWatchers->watchedServices().isEmpty()) { NotificationPtr notification = std::make_shared(); notification->setAppName(app_name); notification->setId(id); notification->setAppIcon(app_icon); notification->setSummary(summary); notification->setBody(body); notification->setActions(actions); notification->setHints(newHints); notification->setTimeout(timeout); m_notificationsCache.insert(id, notification); return id; } for(const QString &service : m_notificationWatchers->watchedServices()) { QDBusMessage msg = QDBusMessage::createMethodCall(service, QStringLiteral("/NotificationClient"), QStringLiteral("org.ukui.NotificationClient"), QStringLiteral("Notify")); msg.setArguments({app_name, id, app_icon, summary, body, actions, newHints, timeout}); QDBusConnection::sessionBus().call(msg, QDBus::NoBlock); } return id; } QString ServerPrivate::GetServerInformation(QString &vendor, QString &version, QString &spec_version) const { vendor = QStringLiteral("Kylin"); version = QLatin1String(NOTIFICATION_SERVER_VERSION); spec_version = QStringLiteral("1.2"); return QStringLiteral("UKUI"); } void ServerPrivate::CloseNotification(uint id) { if(m_notificationsCache.contains(id)) { m_notificationsCache.remove(id); } qDebug() << "CloseNotification(Revoked)" << id; Q_EMIT NotificationClosed(id, UkuiNotification::NotificationCloseReason::Revoked); } bool ServerPrivate::init() { new NotificationsAdaptor(this); new NotificationServerAdaptor(this); new NotificationSettingsAdaptor(this); QDBusConnection conn = QDBusConnection::sessionBus(); if(!conn.registerObject(notificationServicePath(), this)) { qWarning() << "Failed to register Notification DBus object!" << conn.lastError().message(); return false; } auto registration = conn.interface()->registerService(notificationServiceName(), QDBusConnectionInterface::ReplaceExistingService, QDBusConnectionInterface::DontAllowReplacement); if (registration.value() != QDBusConnectionInterface::ServiceRegistered) { qWarning() << "Failed to register Notification service on DBus!"; return false; } UkuiNotification::SettingsManager::self(); return true; } QString ServerPrivate::notificationServiceName() { return QStringLiteral("org.freedesktop.Notifications"); } QString ServerPrivate::notificationServicePath() { return QStringLiteral("/org/freedesktop/Notifications"); } QString ServerPrivate::notificationServiceInterface() { return QStringLiteral("org.freedesktop.Notifications");; } void ServerPrivate::RegisterClient() { m_notificationWatchers->addWatchedService(message().service()); qDebug() << "Watched services:" << m_notificationWatchers->watchedServices(); sendCache(); } void ServerPrivate::UnRegisterClient() { m_notificationWatchers->removeWatchedService(message().service()); } void ServerPrivate::CloseNotification(uint id, uint reason) { if(m_notificationsCache.contains(id)) { m_notificationsCache.remove(id); } qDebug() << "CloseNotification" << id << reason; Q_EMIT NotificationClosed(id, reason); } void ServerPrivate::InvokeAction(uint id, const QString &action_key) { NotificationManager::self().invokedAction(id, action_key); qDebug() << "InvokeAction" << id << action_key; Q_EMIT ActionInvoked(id, action_key); } void ServerPrivate::sendCache() { for(const uint &id : m_notificationsCache.keys()) { auto notification = m_notificationsCache.take(id); for(const QString &service : m_notificationWatchers->watchedServices()) { QDBusMessage msg = QDBusMessage::createMethodCall(service, QStringLiteral("/NotificationClient"), QStringLiteral("org.ukui.NotificationClient"), QStringLiteral("Notify")); msg.setArguments({notification->appName(), notification->id(), notification->appIcon(), notification->summary(), notification->body(), notification->actions(), notification->hints(), notification->timeout()}); QDBusConnection::sessionBus().call(msg, QDBus::NoBlock); } } } void ServerPrivate::UpdateUnreadMessagesNumber(const QString &desktopEntry, uint number) { Q_EMIT UnreadMessagesNumberUpdated(desktopEntry, number); } void ServerPrivate::RegisterNotificationControl(const QString &desktopEntry) { if (UkuiNotification::Utils::desktopEntryFromName(desktopEntry).isEmpty()) { qWarning() << "RegisterNotificationControl failed: " << desktopEntry << "is illegal."; return; } m_notificationControlRegister->registerNotificationControl(desktopEntry, NotificationControlRegister::RegisterMode::Interface); } bool ServerPrivate::IsAlarmSoundAllowed() { return m_notificationSettingsQuery->isAlarmSoundAllowed(); } bool ServerPrivate::IsSoundAllowed(const QString& desktopEntry) { return m_notificationSettingsQuery->isSoundAllowed(desktopEntry); } Server::Server(QObject *parent): QObject(parent), d(new ServerPrivate(this)) { } Server &Server::self() { static Server self; return self; } bool Server::init() { return d->init(); } uint Server::notify(NotificationPtr notification) { return d->Notify(notification->appName(), notification->replaceId(), notification->appIcon(), notification->summary(), notification->body(), notification->actions(), notification->hints(), notification->timeout()); } void Server::closeNotification(uint id) { d->CloseNotification(id); } Server::~Server() = default; ukui-notification/notification-server/notification-server-application.cpp0000664000175000017500000000535215160523734026145 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include #include #include #include "notification-server-application.h" #include #include #include "notification-server-config.h" #include "server.h" using namespace NotificationServer; NotificationServerApplication::NotificationServerApplication(int &argc, char **argv, const QString &applicationName) : QtSingleCoreApplication(applicationName, argc, argv) { setApplicationVersion(NOTIFICATION_SERVER_VERSION); qApp->setProperty("IS_UKUI_NOTIFICATION_SERVER", QVariant(true)); if (!this->isRunning()) { connect(this, &QtSingleCoreApplication::messageReceived, [=](QString msg) { this->parseCmd(msg, true); }); Server::self().init(); installQTranslator(); } parseCmd(arguments().join(" ").toUtf8(), !isRunning()); } NotificationServerApplication::~NotificationServerApplication() { } void NotificationServerApplication::parseCmd(QString msg, bool isPrimary) { QCommandLineParser parser; parser.addHelpOption(); parser.addVersionOption(); QCommandLineOption quitOption(QStringList()<<"q"<<"quit", tr("Quit notification server")); parser.addOption(quitOption); if (isPrimary) { const QStringList args = QString(msg).split(' '); parser.process(args); if (parser.isSet(quitOption)) { qApp->quit(); return; } } else { if (arguments().count() < 2) { parser.showHelp(); } parser.process(arguments()); sendMessage(msg); } } void NotificationServerApplication::installQTranslator() { QTranslator* translator = new QTranslator(this); if(!translator->load(QLocale(), QStringLiteral(""), QStringLiteral(""), QStringLiteral("/usr/share/ukui-notification/notification-server/translations/"))) { qWarning() << "/usr/share/ukui-notification/notification-server/translations/" + QLocale::system().name() << "load failed"; } qApp->installTranslator(translator); } ukui-notification/notification-server/notification-manager.h0000664000175000017500000000257415160523734023420 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #ifndef NOTIFICATIONMANAGER_H #define NOTIFICATIONMANAGER_H #include #include #include "notification.h" namespace NotificationServer { class NotificationManager : public QObject { Q_OBJECT public: static NotificationManager& self(); Q_DISABLE_COPY(NotificationManager) void notify(NotificationPtr notification); void invokedAction(const uint, const QString&); public Q_SLOTS: void onNotificationClosed(uint id, uint reason); private: explicit NotificationManager(QObject *parent = nullptr); ~NotificationManager(); QMap m_notifications; }; } #endif // NOTIFICATIONMANAGER_H ukui-notification/notification-server/CMakeLists.txt0000664000175000017500000000710115160523746021703 0ustar fengfengset(VERSION_MAJOR 1) set(VERSION_MINOR 1) set(VERSION_MICRO 0) #changelog v1.0.0->v1.1.0:超时时间统一为å�•ä½�为ms set(NOTIFICATION_SERVER_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}) find_package(PkgConfig REQUIRED) set(UKUI_NOTIFICATION_PC_PKGS ukui-search) foreach(PC_LIB IN ITEMS ${UKUI_NOTIFICATION_PC_PKGS}) pkg_check_modules(${PC_LIB} REQUIRED ${PC_LIB}) if(${${PC_LIB}_FOUND}) include_directories(${${PC_LIB}_INCLUDE_DIRS}) link_directories(${${PC_LIB}_LIBRARY_DIRS}) list(APPEND UKUI_NOTIFICATION_EXTERNAL_LIBS ${${PC_LIB}_LIBRARIES}) endif() endforeach() configure_file (notification-server-config.h.in notification-server-config.h @ONLY) set(3rdParties_DIR ../3rd-parties/qtsingleapplication/src/) set(notificationServer_SRCS server.h server-private.h server.cpp main.cpp ${3rdParties_DIR}qtsinglecoreapplication.h ${3rdParties_DIR}qtsinglecoreapplication.cpp ${3rdParties_DIR}qtlocalpeer.h ${3rdParties_DIR}qtlocalpeer.cpp notification-server-application.cpp notification-server-application.h log-utils.h log-utils.cpp notification-control-register.h notification-control-register.cpp notification-manager.cpp notification-manager.h notification.cpp notification.h notification-default-dir-watcher.cpp notification-default-dir-watcher.h notificaiton-settings-query.cpp notificaiton-settings-query.h ) if(COMMAND qt_add_dbus_adaptor) qt_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.freedesktop.Notifications.xml server-private.h NotificationServer::ServerPrivate) qt_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationServer.xml server-private.h NotificationServer::ServerPrivate) qt_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationSettings.xml server-private.h NotificationServer::ServerPrivate) else() qt5_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.freedesktop.Notifications.xml server-private.h NotificationServer::ServerPrivate) qt5_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationServer.xml server-private.h NotificationServer::ServerPrivate) qt5_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationSettings.xml server-private.h NotificationServer::ServerPrivate) endif() file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts) if(COMMAND qt_create_translation) qt_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${TS_FILES}) else() qt5_create_translation(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${TS_FILES}) endif() add_executable(ukui-notification-server ${notificationServer_SRCS} ${QM_FILES}) include_directories(../libukui-notification) target_include_directories(ukui-notification-server PUBLIC ${3rdParties_DIR}) target_link_libraries(ukui-notification-server PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::DBus Qt${QT_VERSION_MAJOR}::Network ukui-notification ${UKUI_NOTIFICATION_EXTERNAL_LIBS} ) set(DBUS_SERVICE_FILE data/org.freedesktop.Notifications.service) set(DESKTOP_FILE data/ukui-notification-server.desktop) install(TARGETS ukui-notification-server DESTINATION /usr/bin) install(FILES ${DBUS_SERVICE_FILE} DESTINATION /usr/share/dbus-1/services) install(FILES ${DESKTOP_FILE} DESTINATION /etc/xdg/autostart) install(FILES ${TS_FILES} ${QM_FILES} DESTINATION /usr/share/ukui-notification/notification-server/translations) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/conf/notification-allowlist.json DESTINATION /etc/ukui/ukui-notification/) ukui-notification/notification-server/main.cpp0000664000175000017500000000276615160523734020604 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include #include #include "notification-server-application.h" #include "log-utils.h" int main(int argc, char *argv[]) { // QTranslator translator; // const QStringList uiLanguages = QLocale::system().uiLanguages(); // for (const QString &locale : uiLanguages) { // const QString baseName = "ukui-notification_" + QLocale(locale).name(); // if (translator.load(":/i18n/" + baseName)) { // a.installTranslator(&translator); // break; // } // } LogUtils::initLogFile("ukui-notification-server"); qInstallMessageHandler(LogUtils::messageOutput); NotificationServer::NotificationServerApplication app(argc, argv); if(app.isRunning()) { return 0; } return app.exec(); } ukui-notification/notification-server/notification-default-dir-watcher.cpp0000664000175000017500000002206115160523734026165 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #include "notification-default-dir-watcher.h" #include #include #include #include #include #include #include "notification-settings/settings-manager.h" static const QStringList DEFAULT_APP_LIST_PATHS = {"/etc/ukui/ukui-notification/default-app", "/opt/system/conf/ukui/ukui-notification/default-app" }; NotificationDefaultDirWatcher::NotificationDefaultDirWatcher(const std::unique_ptr& notificationControlRegister, QObject *parent) : QObject{parent} , m_fileSystemWatcher(new UkuiSearch::FileSystemWatcher()) , m_notificationControlRegister(notificationControlRegister) { //监å�¬é»˜è®¤ç›®å½• updateWatcherPath(); connect(m_fileSystemWatcher.get(), &UkuiSearch::FileSystemWatcher::created, this, &NotificationDefaultDirWatcher::onDefaultAppFileAdd); connect(m_fileSystemWatcher.get(), &UkuiSearch::FileSystemWatcher::moveTo, this, &NotificationDefaultDirWatcher::onDefaultAppFileAdd); connect(m_fileSystemWatcher.get(), &UkuiSearch::FileSystemWatcher::moved, this, &NotificationDefaultDirWatcher::onDefaultAppFileDeleted); connect(m_fileSystemWatcher.get(), &UkuiSearch::FileSystemWatcher::deleted, this, &NotificationDefaultDirWatcher::onDefaultAppFileDeleted); connect(m_fileSystemWatcher.get(), &UkuiSearch::FileSystemWatcher::modified, this, &NotificationDefaultDirWatcher::onDefaultAppFileModified); connect(&UkuiNotification::Utils::applicationInfo(), &UkuiSearch::ApplicationInfo::appDBItems2BAdd, [this] (const QStringList& desktopEntries){ //应用安装 const QStringList defaultAppList = getDefaultAppList(); for ( const QString& desktopEntry : desktopEntries) { const QString desktop = UkuiNotification::Utils::desktopEntry2Name(desktopEntry); if (defaultAppList.contains(desktop)) { registerDefaultApp(desktop); qDebug() << "[NotificationDefaultDirWatcher] Registering default app:" << desktop; } } }); connect(&UkuiNotification::Utils::applicationInfo(), &UkuiSearch::ApplicationInfo::appDBItems2BDelete, [this] (const QStringList& desktopEntries){ //应用å�¸è½½ for ( const QString& desktopEntry : desktopEntries) { const QString desktop = UkuiNotification::Utils::desktopEntry2Name(desktopEntry); unRegisterDefaultApp(desktop); qDebug() << "[NotificationDefaultDirWatcher] Unregistering default app:" << desktop; } }); } void NotificationDefaultDirWatcher::onDefaultAppFileAdd(const QString &path, bool isDir) { handleDefaultAppFileChanged(path, isDir, false); } void NotificationDefaultDirWatcher::onDefaultAppFileDeleted(const QString &path, bool isDir) { handleDefaultAppFileChanged(path, isDir, true); } void NotificationDefaultDirWatcher::onDefaultAppFileModified(const QString &path) { handleDefaultAppFileChanged(path, false, true); } /** * @brief 如果监å�¬çš„目录ä¸�存在,获å�–上一级目录 * @param path * @return */ QString NotificationDefaultDirWatcher::findFirstExistingAncestorDir(const QString &path) { QDir dir(path); while (true) { const QString absolutePath = dir.absolutePath(); if (dir.exists()) { return absolutePath; } if (absolutePath == "/") { return absolutePath; } if (!dir.cdUp()) { qWarning() << "NotificationDefaultDirWatcher::findFirstExistingAncestorDir: Failed to cdUp from path " << absolutePath; return absolutePath; } } } /** * @brief DEFAULT_APP_LIST_PATHS * 默认目录创建时, 更新监å�¬ç›®å½•为默认目录 * 路径删除时,获å�–默认目录的上一级目录监å�¬ */ void NotificationDefaultDirWatcher::updateWatcherPath() { if (!m_watcherPaths.isEmpty()) { for (const QString& path : m_watcherPaths) { m_fileSystemWatcher->removeWatch(path); } } for (const QString& defaultPath : DEFAULT_APP_LIST_PATHS) { m_watcherPaths << findFirstExistingAncestorDir(defaultPath); } m_fileSystemWatcher->addWatch(m_watcherPaths); qDebug() << "Notification watch path is updated:" << m_watcherPaths; //刷新默认列表 refreshDefaultAppListMap(); } /** * @brief 获å�–默认的列表 * @return */ QStringList NotificationDefaultDirWatcher::getDefaultAppList() { QStringList defaultAppList; for (const QString& defaultPath : DEFAULT_APP_LIST_PATHS) { QDir dir(defaultPath); if (!dir.exists()) { continue; } for (const QString &fileName : dir.entryList(QDir::Files)) { const QStringList desktopEntries = getDefaultAppDesktopEntries(dir.absoluteFilePath(fileName)); for (const QString& appDesktop : desktopEntries) { if (!defaultAppList.contains(appDesktop)) { defaultAppList << appDesktop; } } } } return defaultAppList; } /** * @brief 读å�–文件的"DesktopEntries"内容 * @param path * @return */ QStringList NotificationDefaultDirWatcher::getDefaultAppDesktopEntries(const QString& path) { QFile file(path); if (!file.exists()) { qWarning() << "NotificationDefaultDirWatcher::getDefaultAppDesktopEntries" << file.fileName() << "is not exists"; return QStringList(); } if (!file.open(QFile::ReadOnly)) { qWarning() << "NotificationDefaultDirWatcher::getDefaultAppDesktopEntries" << file.fileName() << "open failed"; return QStringList(); } QByteArray byteArray = file.readAll(); file.close(); QJsonParseError errRpt; QJsonDocument jsonDocument(QJsonDocument::fromJson(byteArray, &errRpt)); if (errRpt.error != QJsonParseError::NoError) { qWarning() << "NotificationDefaultDirWatcher::getDefaultAppDesktopEntries Incorrect configuration files " << file.fileName() << "JSON parse error"; return QStringList(); } QJsonObject jsonObject = jsonDocument.object(); if (!jsonObject.contains("DesktopEntries")) { return QStringList(); } return jsonObject.value("DesktopEntries").toString().split(","); } /** * @brief 加载DEFAULT_APP_LIST_PATHS 下的默认é…�ç½® */ void NotificationDefaultDirWatcher::refreshDefaultAppListMap() { const QStringList newDefaultApplist = getDefaultAppList(); QStringList oldDefaultApplist; QStringList otherApplist; UkuiNotification::SettingsManager::self()->getAppList(oldDefaultApplist, otherApplist); //新增 QStringList newAddList = StringListDiff(newDefaultApplist, oldDefaultApplist); //删除 QStringList newRemoveList = StringListDiff(oldDefaultApplist, newDefaultApplist); for (const QString& desktop : newAddList) { if (otherApplist.contains(desktop)) { //新增默认应用,已ç»�存在é…�置,需è¦�æ›´æ–°é…�ç½®æ�¥æº� updateDefaultApp(desktop); } else { registerDefaultApp(desktop); } } for (const QString& desktop : newRemoveList) { unRegisterDefaultApp(desktop); } } /** * @brief 默认应用的é…�置文件改å�˜ * @param path * @param isDir * @param isDelete */ void NotificationDefaultDirWatcher::handleDefaultAppFileChanged(const QString &path, bool isDir, bool isDelete) { if (isDir) { //改å�˜çš„目录符å�ˆé¢„期时,进行更新 if (DEFAULT_APP_LIST_PATHS.contains(path)) { updateWatcherPath(); } } else { //读å�–默认é…�置内容,更改é…�ç½® for (const QString& defaultAppPath : DEFAULT_APP_LIST_PATHS) { if (path.startsWith(defaultAppPath) && path.endsWith(QStringLiteral(".json"))) { refreshDefaultAppListMap(); } } } } void NotificationDefaultDirWatcher::registerDefaultApp(const QString &desktop) { m_notificationControlRegister->registerNotificationControl(desktop, NotificationControlRegister::RegisterMode::Default); } void NotificationDefaultDirWatcher::unRegisterDefaultApp(const QString &desktop) { m_notificationControlRegister->unRegisterNotificationControl(desktop); } void NotificationDefaultDirWatcher::updateDefaultApp(const QString &desktop) { m_notificationControlRegister->updateNotificationControl(desktop, NotificationControlRegister::RegisterMode::Default); } ukui-notification/notification-server/notificaiton-settings-query.h0000664000175000017500000000311415160523734025000 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #ifndef NOTIFICAITONSETTINGSQUERY_H #define NOTIFICAITONSETTINGSQUERY_H #include #include #include class NotificaitonSettingsQuery : public QObject { Q_OBJECT public: explicit NotificaitonSettingsQuery(QObject* parent = nullptr); ~NotificaitonSettingsQuery() = default; bool isAlarmSoundAllowed() const; bool isSoundAllowed(const QString& desktopEntry) const; Q_SIGNALS: void alarmSoundAllowedChanged(bool); private Q_SLOTS: void checkAlarmSoundAllowed(); private: UkuiNotification::NotificationGlobalSettings* m_notificationGlobalSettings{nullptr}; UkuiNotification::SingleApplicationSettings* m_alarmSingleAppSettings{nullptr}; bool m_alarmSoundAllowed{false}; }; #endif //NOTIFICAITONSETTINGSQUERY_H ukui-notification/notification-server/notificaiton-settings-query.cpp0000664000175000017500000001112415160523734025333 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #include "notificaiton-settings-query.h" #include using namespace UkuiNotification; NotificaitonSettingsQuery::NotificaitonSettingsQuery(QObject* parent) :QObject(parent) { m_notificationGlobalSettings = new NotificationGlobalSettings(this); connect(m_notificationGlobalSettings, &NotificationGlobalSettings::dndChanged, this, &NotificaitonSettingsQuery::checkAlarmSoundAllowed); connect(m_notificationGlobalSettings, &NotificationGlobalSettings::receiveNotificationsFromAppsChanged, this, &NotificaitonSettingsQuery::checkAlarmSoundAllowed); connect(m_notificationGlobalSettings, &NotificationGlobalSettings::notifyAlarmWhileDNDChanged, this, &NotificaitonSettingsQuery::checkAlarmSoundAllowed); //获å�–闹钟é…�ç½® m_alarmSingleAppSettings = new SingleApplicationSettings(QStringLiteral("ukui-clock"), this); if (m_alarmSingleAppSettings) { connect(m_alarmSingleAppSettings, &SingleApplicationSettings::allowNotifyChanged, this, &NotificaitonSettingsQuery::checkAlarmSoundAllowed); connect(m_alarmSingleAppSettings, &SingleApplicationSettings::allowSoundChanged, this, &NotificaitonSettingsQuery::checkAlarmSoundAllowed); } } bool NotificaitonSettingsQuery::isAlarmSoundAllowed() const { //勿扰模å¼� bool isDND = m_notificationGlobalSettings->isDND(); //勿扰模å¼�å…�许闹钟æ��示 bool notifyAlarmWhileDND = m_notificationGlobalSettings->notifyAlarmWhileDND(); if (isDND && !notifyAlarmWhileDND) { //勿扰模å¼�,ä¸�å…�许闹钟æ��示 return false; } //å…�许获å�–应用的通知 bool isAllowedReceiveNotifications = m_notificationGlobalSettings->receiveNotificationsFromApps(); //闹钟é…�ç½® bool clockAllowedNotify = m_alarmSingleAppSettings->allowNotify(); bool clockAllowedSound = m_alarmSingleAppSettings->allowSound(); return isAllowedReceiveNotifications && clockAllowedNotify && clockAllowedSound; } bool NotificaitonSettingsQuery::isSoundAllowed(const QString& desktopEntry) const { if (desktopEntry.isEmpty()) { qWarning() << "NotificaitonSettingsQuery::isSoundAllowed : desktop is empty"; return false; } QString desktop = desktopEntry; if (desktop.startsWith("/")) { desktop = Utils::desktopEntry2Name(desktop); } qDebug() << "NotificaitonSettingsQuery::isSoundAllowed : " << desktop << "obtains the playback prompt sound status ."; //勿扰模å¼� bool isDND = m_notificationGlobalSettings->isDND(); //获å�–是å�¦å…�许获å�–通知 bool isAllowedReceiveNotifications = m_notificationGlobalSettings->receiveNotificationsFromApps(); //勿扰模å¼�å…�许闹钟æ��示 bool notifyAlarmWhileDND = false; //默认å�•个应用é…�ç½® bool singleAppAllowedNotify = true; bool SingleAppAllowedSound = true; if (desktop == QStringLiteral("ukui-clock")) { //查询闹钟时æ‰�获å�–notifyAlarmWhileDND的实际状æ€� notifyAlarmWhileDND = m_notificationGlobalSettings->notifyAlarmWhileDND(); singleAppAllowedNotify = m_alarmSingleAppSettings->allowNotify(); SingleAppAllowedSound = m_alarmSingleAppSettings->allowSound(); } else { const SingleApplicationSettings singleAppSettings(desktop); singleAppAllowedNotify = singleAppSettings.allowNotify(); SingleAppAllowedSound = singleAppSettings.allowSound(); } return (!isDND || notifyAlarmWhileDND) && isAllowedReceiveNotifications && singleAppAllowedNotify && SingleAppAllowedSound; } void NotificaitonSettingsQuery::checkAlarmSoundAllowed() { bool alarmSoundAllowed = isAlarmSoundAllowed(); if (m_alarmSoundAllowed != alarmSoundAllowed) { qDebug() << "NotificaitonSettingsQuery::checkAlarmSoundAllowed AlarmSoundAllowed changed: " << alarmSoundAllowed; m_alarmSoundAllowed = alarmSoundAllowed; Q_EMIT alarmSoundAllowedChanged(alarmSoundAllowed); } } ukui-notification/notification-server/server.h0000664000175000017500000000241615160523734020623 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_SERVER_H #define UKUI_NOTIFICATION_SERVER_H #include #include "notification.h" namespace NotificationServer { class ServerPrivate; class Server : public QObject { Q_OBJECT public: static Server &self(); ~Server(); bool init(); uint notify(NotificationPtr notification); void closeNotification(uint id); private: explicit Server(QObject *parent = nullptr); Q_DISABLE_COPY(Server) ServerPrivate *d = nullptr; }; } // NotificationServer #endif //UKUI_NOTIFICATION_SERVER_H ukui-notification/notification-server/conf/0000775000175000017500000000000015160523746020071 5ustar fengfengukui-notification/notification-server/conf/notification-allowlist.json0000664000175000017500000000627415160523734025470 0ustar fengfeng{ "Applications": { "kylin-updateresult-notify": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-reboot-installnotify": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-stepinstall-notify": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "ksc-defender": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "ksc-defender-trust-measure-notify": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "ksc-virus-dialog": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-activation-volume": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-activation-check-deactivate": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-activation-autostart": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-activation-prompt-autostart": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-camera": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "kylin-recorder": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "ukui-powermanagement-daemon": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "secriskbox": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" }, "peony": { "AllowNotify": "true", "AllowSound": "true", "ShowContentOnLockScreen": "false", "ShowNotificationOnLockScreen": "false" } } } ukui-notification/notification-server/notification.h0000664000175000017500000000432015160523734021777 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #ifndef NOTIFICATION_H #define NOTIFICATION_H #include #include namespace NotificationServer { class NotificationPrivate; class NotificationAction : public QObject { Q_OBJECT public: explicit NotificationAction(QObject* parent = nullptr); ~NotificationAction() = default; void active(); Q_SIGNALS: void actionActived(); }; class Notification : public std::enable_shared_from_this { public: Notification(); Notification& operator=(const Notification& other); ~Notification(); QString appName() const; uint id() const; uint replaceId() const; QString appIcon() const; QString summary() const; QString body() const; QStringList actions() const; QVariantMap hints() const; int timeout() const; void setAppName(const QString &appName); void setId(uint id); void setReplaceId(uint replaceId); void setAppIcon(const QString &appIcon); void setSummary(const QString &summary); void setBody(const QString &body); void setActions(const QStringList &actions); void setHints(const QVariantMap &hints); void setTimeout(int timeout); NotificationAction* addAction(const QString& actionId, const QString& label); NotificationAction* findAction(const QString& actionId); void activeAction(const QString& actionId); void send(); private: NotificationPrivate* d{nullptr}; }; using NotificationPtr = std::shared_ptr; } #endif // NOTIFICATION_H ukui-notification/notification-server/notification-control-register.cpp0000664000175000017500000001060215160523746025635 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #include #include #include "notification-control-register.h" #include "notification-settings/settings-manager.h" #include "notification.h" #include "notification-manager.h" #include "utils.h" using namespace NotificationServer; NotificationControlRegister::NotificationControlRegister(QObject *parent) : QObject{parent} { } void NotificationControlRegister::registerNotificationControl(const QString &desktopEntry, RegisterMode mode) { if (desktopEntry.isEmpty()) { qWarning() << "registerNotificationControl filed :" << "desktop entry is empty ."; return; } //白å��å�•检测 if (UkuiNotification::SettingsManager::self()->isInAllowList(desktopEntry)) { qDebug() << desktopEntry << "notification configuration is in allow list"; return; } //é…�置存在 if (UkuiNotification::SettingsManager::self()->hasAppSettings(desktopEntry)) { return; } qDebug() << "need add settings: " << desktopEntry << "notification configuration does not exist"; //添加é…�ç½® if (!UkuiNotification::SettingsManager::self()->addAppSettings(desktopEntry, registerModeToString(mode))) { qWarning() << "Failed to add app settings :" << desktopEntry; return; } if (mode == RegisterMode::Notice) { QTimer::singleShot(6000, [desktopEntry]() { const QString& desktopFullPath = UkuiNotification::Utils::desktopEntryFromName(desktopEntry); if (desktopFullPath.isEmpty()) { qWarning() << "Failed to query desktop files through desktop entry :" << desktopEntry; return; } QString appName = UkuiNotification::Utils::appNameForDesktopEntry(desktopFullPath); if (appName.isEmpty()) { qWarning() << "Failed to retrieve app name, using desktop entry." << desktopFullPath ; appName = desktopEntry; } auto notification = std::make_shared(); notification->setAppName(tr("System notification")); notification->setAppIcon("ukui-control-center"); notification->setSummary(tr("Whether to allow \"%1\" to send system notifications").arg(appName)); notification->setBody(tr("If not, you will no longer receive any prompt messages from the app")); //hints QVariantMap hints; hints.insert("urgency", 2); notification->setHints(hints); //actions auto* disallowAction = notification->addAction("Disallow", tr("Disallow")); auto* allowAction = notification->addAction("Allow", tr("Allow")); notification->send(); auto actionOption = [desktopEntry] (NotificationAction* action, bool isAllow) { if (action) { connect(action, &NotificationAction::actionActived, [desktopEntry, isAllow] () { UkuiNotification::SettingsManager::self()->setAppSettings(desktopEntry, UkuiNotification::SettingsProperty::AllowNotify, isAllow); }); } }; actionOption(disallowAction, false); actionOption(allowAction, true); }); } } void NotificationControlRegister::unRegisterNotificationControl(const QString &desktopEntry) { UkuiNotification::SettingsManager::self()->deleteAppSettings(desktopEntry); } void NotificationControlRegister::updateNotificationControl(const QString& desktopEntry, RegisterMode mode) { UkuiNotification::SettingsManager::self()->setAppSettings(desktopEntry, UkuiNotification::SettingsProperty::ConfigurationSource ,registerModeToString(mode)); } ukui-notification/notification-server/notification.cpp0000664000175000017500000000772315160523734022344 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #include #include #include #include "notification.h" #include "notification-manager.h" namespace NotificationServer{ class NotificationPrivate { public: NotificationPrivate() = default; ~NotificationPrivate(); QString m_appName; uint m_id = 0; uint m_replaceId = 0; QString m_appIcon; QString m_summary; QString m_body; QStringList m_actions; QVariantMap m_hints; int m_timeout = -1; QMap m_notificationActions; }; } using namespace NotificationServer; NotificationPrivate::~NotificationPrivate() { qDeleteAll(m_notificationActions); m_notificationActions.clear(); } NotificationAction::NotificationAction(QObject* parent) : QObject(parent) { } void NotificationAction::active() { Q_EMIT actionActived(); } Notification::Notification() : d(new NotificationPrivate) { } Notification::~Notification() { if (d) { delete d; d = nullptr; } } uint Notification::id() const { return d->m_id; } void Notification::setId(uint id) { d->m_id = id; } uint Notification::replaceId() const { return d->m_replaceId; } void Notification::setReplaceId(uint replaceId) { d->m_replaceId = replaceId; } QString Notification::appName() const { return d->m_appName; } void Notification::setAppName(const QString &appName) { d->m_appName = appName; } QString Notification::appIcon() const { return d->m_appIcon; } void Notification::setAppIcon(const QString &appIcon) { d->m_appIcon = appIcon; } QString Notification::summary() const { return d->m_summary; } void Notification::setSummary(const QString &summary) { d->m_summary = summary; } QString Notification::body() const { return d->m_body; } void Notification::setBody(const QString &body) { d->m_body = body; } QStringList Notification::actions() const { return d->m_actions; } void Notification::setActions(const QStringList &actions) { if (actions.count() % 2 != 0) { qWarning() << "List of actions must contain an even number of items, tried to set actions to" << actions; return; } for (int i = 0; i < actions.count(); i += 2) { const QString &actionId = actions.at(i); const QString &label = actions.at(i + 1); addAction(actionId, label); } } QVariantMap Notification::hints() const { return d->m_hints; } void Notification::setHints(const QVariantMap &hints) { d->m_hints = hints; } int Notification::timeout() const { return d->m_timeout; } void Notification::setTimeout(int timeout) { d->m_timeout = timeout; } NotificationAction* Notification::addAction(const QString& actionId, const QString &label) { d->m_actions << actionId << label; NotificationAction* action = new NotificationAction; d->m_notificationActions.insert(actionId, action); return action; } NotificationAction *Notification::findAction(const QString &actionId) { return d->m_notificationActions[actionId]; } void Notification::activeAction(const QString &actionId) { auto* action = d->m_notificationActions[actionId]; if (action) { action->active(); } } void Notification::send() { NotificationManager::self().notify(shared_from_this()); } ukui-notification/notification-server/log-utils.h0000664000175000017500000000242715160523746021241 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef LOGUTILS_H #define LOGUTILS_H #include class LogUtils { public: static void initLogFile(const QString &fileName); static void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg); private: static void checkLogFile(); static bool checkFileSize(const QString &fileName); static void clearFile(const QString &fileName); static quint64 m_startUpTime; static int m_logFileId; static QString m_logFileName; static QString m_currentLogFile; }; #endif // LOGUTILS_H ukui-notification/notification-server/notification-default-dir-watcher.h0000664000175000017500000000403715160523734025635 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #ifndef NOTIFICATIONDEFAULTDIRWATCHER_H #define NOTIFICATIONDEFAULTDIRWATCHER_H #include #include #include #include "file-system-watcher.h" #include "notification-control-register.h" class NotificationDefaultDirWatcher : public QObject { Q_OBJECT public: explicit NotificationDefaultDirWatcher(const std::unique_ptr&, QObject *parent = nullptr); private Q_SLOTS: void onDefaultAppFileAdd(const QString& path, bool isDir); void onDefaultAppFileDeleted(const QString& path, bool isDir); void onDefaultAppFileModified(const QString& path); private: QString findFirstExistingAncestorDir(const QString& path); void updateWatcherPath(); QStringList getDefaultAppList(); QStringList getDefaultAppDesktopEntries(const QString& path); void refreshDefaultAppListMap(); void handleDefaultAppFileChanged(const QString& path, bool isDir, bool); void registerDefaultApp(const QString& desktop); void unRegisterDefaultApp(const QString& desktop); void updateDefaultApp(const QString &desktop); QStringList m_watcherPaths; std::unique_ptr m_fileSystemWatcher; const std::unique_ptr& m_notificationControlRegister; }; #endif // NOTIFICATIONDEFAULTDIRWATCHER_H ukui-notification/notification-server/notification-control-register.h0000664000175000017500000000326515160523746025311 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #ifndef NOTIFICATIONCONTROLREGISTER_H #define NOTIFICATIONCONTROLREGISTER_H #include class NotificationControlRegister : public QObject { Q_OBJECT public: enum class RegisterMode {Default, Notice, Interface}; static QString registerModeToString(RegisterMode mode) { switch (mode) { default: case RegisterMode::Default: return "Default"; case RegisterMode::Notice: return "Notice"; case RegisterMode::Interface: return "Interface"; } } explicit NotificationControlRegister(QObject* parent = nullptr); ~NotificationControlRegister() = default; void registerNotificationControl(const QString& desktopEntry, RegisterMode mode = RegisterMode::Notice); void unRegisterNotificationControl(const QString& desktopEntry); void updateNotificationControl(const QString& desktopEntry, RegisterMode mode); }; #endif // NOTIFICATIONCONTROLREGISTER_H ukui-notification/notification-server/server-private.h0000664000175000017500000000710715160523746022300 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_SERVER_PRIVATE_H #define UKUI_NOTIFICATION_SERVER_PRIVATE_H #include #include #include #include "notification-control-register.h" #include "notification.h" #include "notification-default-dir-watcher.h" #include "notificaiton-settings-query.h" class QDBusServiceWatcher; namespace NotificationServer { class ServerPrivate : public QObject, protected QDBusContext { Q_OBJECT //dbus interface public: QStringList GetCapabilities() const; uint Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout); void CloseNotification(uint id); QString GetServerInformation(QString &vendor, QString &version, QString &spec_version) const; /** * 注册æˆ�为通知中心客户端 */ void RegisterClient(); /** * 注销 */ void UnRegisterClient(); /** * 通知中心关闭通知 * @param id 通知id * @param reason 关闭原因 */ void CloseNotification(uint id, uint); void InvokeAction(uint id, const QString &action_key); void UpdateUnreadMessagesNumber(const QString &desktopEntry, uint number); /** * @brief RegisterNotificationControl * @param desktop 文件å��,ä¸�带å�Žç¼€ */ void RegisterNotificationControl(const QString &desktopEntry); /*! * @brief 是å�¦å…�许闹钟播放æ��示音 * @return */ bool IsAlarmSoundAllowed(); /*! *@brief 获å�–å�•个应用是å�¦å…�许播放声音 * @param desktop 文件å��,ä¸�带å�Žç¼€ * @return bool */ bool IsSoundAllowed(const QString &desktopEntry); Q_SIGNALS: void NotificationClosed(uint id, uint reason); void ActionInvoked(uint id, const QString &actionKey); void ActivationToken(uint id, const QString &ActivationToken); void UnreadMessagesNumberUpdated(const QString &desktopEntry, uint number); void AlarmSoundAllowedChanged(bool); public: explicit ServerPrivate(QObject *parent = nullptr); ~ServerPrivate() override; bool init(); static QString notificationServiceName(); static QString notificationServicePath(); static QString notificationServiceInterface(); private: void sendCache(); QDBusServiceWatcher *m_notificationWatchers = nullptr; uint m_increasedNotificationId = 1; QMap m_notificationsCache; std::unique_ptr m_notificationControlRegister; NotificationDefaultDirWatcher* m_notificationDefaultDirWatcher{nullptr}; NotificaitonSettingsQuery* m_notificationSettingsQuery{nullptr}; }; } // NotificationServer #endif //UKUI_NOTIFICATION_SERVER_PRIVATE_H ukui-notification/notification-server/notification-server-application.h0000664000175000017500000000254615160523734025614 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_SERVER_APPLICATION_H #define UKUI_NOTIFICATION_NOTIFICATION_SERVER_APPLICATION_H #include #include "qtsinglecoreapplication.h" namespace NotificationServer { class NotificationServerApplication : public QtSingleCoreApplication { Q_OBJECT public: NotificationServerApplication(int &argc, char *argv[], const QString &applicationName = "ukui-notification-server"); ~NotificationServerApplication(); protected Q_SLOTS: void parseCmd(QString msg, bool isPrimary); private: void installQTranslator(); }; } #endif //UKUI_NOTIFICATION_NOTIFICATION_SERVER_APPLICATION_H ukui-notification/notification-server/notification-server-config.h.in0000664000175000017500000000207615160523734025161 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef NOTIFICATION_SERVER_CONFIG_H_IN #define NOTIFICATION_SERVER_CONFIG_H_IN #define VERSION_MAJOR "@VERSION_MAJOR@" #define VERSION_MINOR "@VERSION_MINOR@" #define VERSION_MICRO "@VERSION_MICRO@" #define NOTIFICATION_SERVER_VERSION "@NOTIFICATION_SERVER_VERSION@" #endif // NOTIFICATION_SERVER_CONFIG_H_INNOTIFICATION_SERVER_VERSIONukui-notification/notification-server/notification-manager.cpp0000664000175000017500000000344215160523734023746 0ustar fengfeng/* * Copyright (C) 2025, KylinSoft Co., Ltd. * * 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 . * * Authors: sundagao */ #include #include #include #include "notification-manager.h" #include "server.h" #include using namespace NotificationServer; NotificationManager& NotificationManager::self() { static NotificationManager instance; return instance; } void NotificationManager::notify(NotificationPtr notification) { uint id = NotificationServer::Server::self().notify(notification); m_notifications.insert(id, notification); } void NotificationManager::invokedAction(uint id, const QString& actionId) { auto notification = m_notifications[id]; if (notification) { notification->activeAction(actionId); } } void NotificationManager::onNotificationClosed(uint id, uint reason) { Q_UNUSED(reason) auto iter = m_notifications.find(id); if (iter != m_notifications.end()) { m_notifications.erase(iter); } } NotificationManager::NotificationManager(QObject *parent) : QObject{parent} { } NotificationManager::~NotificationManager() { m_notifications.clear(); } ukui-notification/notification-server/log-utils.cpp0000664000175000017500000001125115160523746021567 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "log-utils.h" #include #include #include #include #include #define LOG_FILE_COUNT 2 #define MAX_LOG_FILE_SIZE 4194304 #define MAX_LOG_CHECK_INTERVAL 43200000 quint64 LogUtils::m_startUpTime = 0; int LogUtils::m_logFileId = -1; QString LogUtils::m_logFileName; QString LogUtils::m_currentLogFile; static QString logFilePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.log/ukui-notification/"; void LogUtils::messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) { checkLogFile(); QByteArray localMsg = msg.toLocal8Bit(); QByteArray currentDate = QDate::currentDate().toString("yyyy-MM-dd").toLocal8Bit(); QByteArray currentTime = QTime::currentTime().toString().toLocal8Bit(); const char *file = context.file ? context.file : ""; const char *function = context.function ? context.function : ""; FILE *log_file = fopen(m_currentLogFile.toLocal8Bit().constData(), "a+"); switch (type) { case QtDebugMsg: if (!log_file) { break; } fprintf(log_file, "[%s %s] [Debug] %s (%s:%u, %s)\n", currentDate.constData(), currentTime.constData(), localMsg.constData(), file, context.line, function); break; case QtInfoMsg: fprintf(log_file? log_file: stdout, "\033[32m[%s %s] [Info] %s \033[0m(%s:%u, %s)\n", currentDate.constData(), currentTime.constData(), localMsg.constData(), file, context.line, function); break; case QtWarningMsg: fprintf(log_file? log_file: stderr, "\033[33m[%s %s] [Warning] %s \033[0m(%s:%u, %s)\n", currentDate.constData(), currentTime.constData(), localMsg.constData(), file, context.line, function); break; case QtCriticalMsg: fprintf(log_file? log_file: stderr, "\033[31m[%s %s] [Critical] %s \033[0m(%s:%u, %s)\n", currentDate.constData(), currentTime.constData(), localMsg.constData(), file, context.line, function); break; case QtFatalMsg: fprintf(log_file? log_file: stderr, "\033[1;31m[%s %s] [Fatal] %s \033[0m(%s:%u, %s)\n", currentDate.constData(), currentTime.constData(), localMsg.constData(), file, context.line, function); break; } if (log_file) { fclose(log_file); } } void LogUtils::initLogFile(const QString &fileName) { QDir dir; if (!dir.exists(logFilePath)) { if (!dir.mkpath(logFilePath)) { qWarning() << "Unable to create" << logFilePath; return; } } m_logFileName = logFilePath + fileName + "-%1.log"; for (int i = 0; i < LOG_FILE_COUNT; ++i) { m_currentLogFile = m_logFileName.arg(i); if (QFile::exists(m_currentLogFile)) { if (checkFileSize(m_currentLogFile)) { m_logFileId = i; break; } } else { QFile file(m_currentLogFile); file.open(QIODevice::WriteOnly); file.close(); } } if (m_logFileId < 0) { m_logFileId = 0; m_currentLogFile = m_logFileName.arg(m_logFileId); clearFile(m_currentLogFile); } qInfo() << "Current log file:" << m_currentLogFile; } void LogUtils::checkLogFile() { quint64 logTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); quint64 spacing = std::max(logTime, m_startUpTime) - std::min(logTime, m_startUpTime); if (spacing <= MAX_LOG_CHECK_INTERVAL || checkFileSize(m_currentLogFile)) { return; } m_logFileId = ((m_logFileId + 1) % LOG_FILE_COUNT); m_currentLogFile = m_logFileName.arg(m_logFileId); if (!checkFileSize(m_currentLogFile)) { clearFile(m_currentLogFile); } } bool LogUtils::checkFileSize(const QString &fileName) { return QFile(fileName).size() < MAX_LOG_FILE_SIZE; } void LogUtils::clearFile(const QString &fileName) { QFile file(fileName); file.open(QIODevice::WriteOnly); file.write(""); file.flush(); file.close(); } ukui-notification/notification-server/data/0000775000175000017500000000000015160523734020052 5ustar fengfengukui-notification/notification-server/data/ukui-notification-server.desktop0000664000175000017500000000056515160523734026420 0ustar fengfeng[Desktop Entry] Name=ukui-notification-server Name[zh_CN]=通知æœ�务 GenericName=ukui-notification-server GenericName[zh_CN]=通知æœ�务 Comment=ukui-notification-server Comment[zh_CN]=通知æœ�务 Exec=/usr/bin/ukui-notification-server %U Type=Application #Icon= X-UKUI-AutoRestart=true OnlyShowIn=UKUI NoDisplay=true X-UKUI-Autostart-Phase=Application Terminal=false ukui-notification/notification-server/data/org.freedesktop.Notifications.service0000664000175000017500000000013115160523734027340 0ustar fengfeng[D-BUS Service] Name=org.freedesktop.Notifications Exec=/usr/bin/ukui-notification-serverukui-notification/test/0000775000175000017500000000000015160523734014126 5ustar fengfengukui-notification/test/CMakeLists.txt0000664000175000017500000000103215160523734016662 0ustar fengfengset(notificationClientTest_SRCS notification-client-test.cpp notification-client-test.h main.cpp notification-settings-test.cpp notification-settings-test.h) include_directories(${CMAKE_SOURCE_DIR}/libukui-notification ${CMAKE_SOURCE_DIR}/libukui-notification/notification-settings) add_executable(ukui-notification-test ${notificationClientTest_SRCS}) target_link_libraries(ukui-notification-test PRIVATE Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Gui ukui-notification )ukui-notification/test/main.cpp0000664000175000017500000000202115160523734015551 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include #include #include "notification-client-test.h" #include "notification-settings-test.h" int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); // NotificationClientTest ct; NotificationSettingsTest setting; return app.exec(); }ukui-notification/test/notification-client-test.cpp0000664000175000017500000000312215160523734021547 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "notification-client-test.h" #include NotificationClientTest::NotificationClientTest(QObject *parent) : QObject(parent) { m_client = new UkuiNotification::NotificationClient(this); connect(m_client, &UkuiNotification::NotificationClient::newNotification, [&](const UkuiNotification::PopupNotification ¬ification){ qDebug() << notification.applicationName() << notification.applicationIconName() << notification.summary() << notification.body() << notification.actions() << notification.hints() << notification.timeout(); }); qDebug() << "Register client" << m_client->registerClient(); } NotificationClientTest::~NotificationClientTest() { } ukui-notification/test/notification-settings-test.h0000664000175000017500000000250515160523734021602 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_SETTINGS_TEST_H #define UKUI_NOTIFICATION_NOTIFICATION_SETTINGS_TEST_H #include #include "applications-settings.h" #include "notification-global-settings.h" class NotificationSettingsTest : public QObject { Q_OBJECT public: explicit NotificationSettingsTest(QObject *parent = nullptr); ~NotificationSettingsTest(); void initConnection(UkuiNotification::SingleApplicationSettings *setting); private: UkuiNotification::NotificationGlobalSettings *m_globalSettings = nullptr; }; #endif //UKUI_NOTIFICATION_NOTIFICATION_SETTINGS_TEST_H ukui-notification/test/notification-client-test.h0000664000175000017500000000226115160523734021217 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #ifndef UKUI_NOTIFICATION_NOTIFICATION_CLIENT_TEST_H #define UKUI_NOTIFICATION_NOTIFICATION_CLIENT_TEST_H #include "notification-client.h" #include class NotificationClientTest : public QObject { Q_OBJECT public: explicit NotificationClientTest(QObject *parent = nullptr); ~NotificationClientTest(); private: UkuiNotification::NotificationClient *m_client = nullptr; }; #endif //UKUI_NOTIFICATION_NOTIFICATION_CLIENT_TEST_H ukui-notification/test/notification-settings-test.cpp0000664000175000017500000000737715160523734022151 0ustar fengfeng/* * Copyright (C) 2023, KylinSoft Co., Ltd. * * 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 . * * Authors: iaom */ #include "notification-settings-test.h" #include "popup-notification.h" NotificationSettingsTest::NotificationSettingsTest(QObject *parent) : QObject(parent) { UkuiNotification::ApplicationsSettingsMap &map = UkuiNotification::ApplicationsSettings::self()->getAllApplicationsSettings(); for(const QString &key : map.keys()) { initConnection(map.value(key)); } m_globalSettings = new UkuiNotification::NotificationGlobalSettings(this); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::scheduleTurnOnDNDChanged, this, [&](bool value){ qDebug() << "scheduleTurnOnDNDChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::scheduleTurnOnDNDTimeChanged, this, [&](QTime value){ qDebug() << "scheduleTurnOnDNDTimeChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::scheduleTurnOffDNDTimeChanged, this, [&](QTime value){ qDebug() << "scheduleTurnOffDNDTimeChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::DNDWhileMultiScreenChanged, this, [&](bool value){ qDebug() << "DNDWhileMultiScreenChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::DNDWhileFullScreenChanged, this, [&](bool value){ qDebug() << "DNDWhileFullScreenChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::notifyAlarmWhileDNDChanged, this, [&](bool value){ qDebug() << "notifyAlarmWhileDNDChanged" << value; }); connect(m_globalSettings, &UkuiNotification::NotificationGlobalSettings::receiveNotificationsFromAppsChanged, this, [&](bool value){ qDebug() << "receiveNotificationsFromAppsChanged" << value; }); } NotificationSettingsTest::~NotificationSettingsTest() { } void NotificationSettingsTest::initConnection(UkuiNotification::SingleApplicationSettings *setting) { connect(setting, &UkuiNotification::SingleApplicationSettings::allowNotifyChanged, this, [&](bool value){ qDebug() << "allowNotifyChanged" << value; }); connect(setting, &UkuiNotification::SingleApplicationSettings::allowSoundChanged, this, [&](bool value){ qDebug() << "allowSoundChanged" << value; }); connect(setting, &UkuiNotification::SingleApplicationSettings::showContentOnLockScreenChanged, this, [&](bool value){ qDebug() << "showContentOnLockScreenChanged" << value; }); connect(setting, &UkuiNotification::SingleApplicationSettings::showNotificationOnLockScreenChanged, this, [&](bool value){ qDebug() << "showNotificationOnLockScreenChanged" << value; }); connect(setting, &UkuiNotification::SingleApplicationSettings::popupStyleChanged, this, [&](UkuiNotification::SettingsProperty::Property value){ qDebug() << "popupStyleChanged" << value; }); connect(setting, &UkuiNotification::SingleApplicationSettings::uninstalled, this, [&](){ qDebug() << "uninstalled"; }); } ukui-notification/3rd-parties/0000775000175000017500000000000015160523734015304 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/0000775000175000017500000000000015160523734021356 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/src/0000775000175000017500000000000015160523734022145 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/src/qtlocalpeer.h0000664000175000017500000000144515160523734024635 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #ifndef QTLOCALPEER_H #define QTLOCALPEER_H #include #include #include #include "qtlockedfile.h" class QtLocalPeer : public QObject { Q_OBJECT public: QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); bool isClient(); bool sendMessage(const QString &message, int timeout); QString applicationId() const { return id; } Q_SIGNALS: void messageReceived(const QString &message); protected Q_SLOTS: void receiveConnection(); protected: QString id; QString socketName; QLocalServer* server; QtLP_Private::QtLockedFile lockFile; private: static const char* ack; }; #endif // QTLOCALPEER_H ukui-notification/3rd-parties/qtsingleapplication/src/qtsingleapplication.pri0000664000175000017500000000111015160523734026724 0ustar fengfenginclude(../common.pri) INCLUDEPATH += $$PWD DEPENDPATH += $$PWD QT *= network greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets qtsingleapplication-uselib:!qtsingleapplication-buildlib { LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME } else { SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h } win32 { contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTSINGLEAPPLICATION_EXPORT else:qtsingleapplication-uselib:DEFINES += QT_QTSINGLEAPPLICATION_IMPORT } ukui-notification/3rd-parties/qtsingleapplication/src/CMakeLists.txt0000664000175000017500000000011615160523734024703 0ustar fengfengtarget_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})ukui-notification/3rd-parties/qtsingleapplication/src/qtlockedfile.cpp0000664000175000017500000001020215160523734025312 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtlockedfile.h" /*! \class QtLockedFile \brief The QtLockedFile class extends QFile with advisory locking functions. A file may be locked in read or write mode. Multiple instances of \e QtLockedFile, created in multiple processes running on the same machine, may have a file locked in read mode. Exactly one instance may have it locked in write mode. A read and a write lock cannot exist simultaneously on the same file. The file locks are advisory. This means that nothing prevents another process from manipulating a locked file using QFile or file system functions offered by the OS. Serialization is only guaranteed if all processes that access the file use QLockedFile. Also, while holding a lock on a file, a process must not open the same file again (through any API), or locks can be unexpectedly lost. The lock provided by an instance of \e QtLockedFile is released whenever the program terminates. This is true even when the program crashes and no destructors are called. */ /*! \enum QtLockedFile::LockMode This enum describes the available lock modes. \value ReadLock A read lock. \value WriteLock A write lock. \value NoLock Neither a read lock nor a write lock. */ /*! Constructs an unlocked \e QtLockedFile object. This constructor behaves in the same way as \e QFile::QFile(). \sa QFile::QFile() */ QtLockedFile::QtLockedFile() : QFile() { #ifdef Q_OS_WIN wmutex = 0; rmutex = 0; #endif m_lock_mode = NoLock; } /*! Constructs an unlocked QtLockedFile object with file \a name. This constructor behaves in the same way as \e QFile::QFile(const QString&). \sa QFile::QFile() */ QtLockedFile::QtLockedFile(const QString &name) : QFile(name) { #ifdef Q_OS_WIN wmutex = 0; rmutex = 0; #endif m_lock_mode = NoLock; } /*! Opens the file in OpenMode \a mode. This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock. Returns true if successful; otherwise false. \sa QFile::open(), QFile::resize() */ bool QtLockedFile::open(OpenMode mode) { if (mode & QIODevice::Truncate) { qWarning("QtLockedFile::open(): Truncate mode not allowed."); return false; } return QFile::open(mode); } /*! Returns \e true if this object has a in read or write lock; otherwise returns \e false. \sa lockMode() */ bool QtLockedFile::isLocked() const { return m_lock_mode != NoLock; } /*! Returns the type of lock currently held by this object, or \e QtLockedFile::NoLock. \sa isLocked() */ QtLockedFile::LockMode QtLockedFile::lockMode() const { return m_lock_mode; } /*! \fn bool QtLockedFile::lock(LockMode mode, bool block = true) Obtains a lock of type \a mode. The file must be opened before it can be locked. If \a block is true, this function will block until the lock is aquired. If \a block is false, this function returns \e false immediately if the lock cannot be aquired. If this object already has a lock of type \a mode, this function returns \e true immediately. If this object has a lock of a different type than \a mode, the lock is first released and then a new lock is obtained. This function returns \e true if, after it executes, the file is locked by this object, and \e false otherwise. \sa unlock(), isLocked(), lockMode() */ /*! \fn bool QtLockedFile::unlock() Releases a lock. If the object has no lock, this function returns immediately. This function returns \e true if, after it executes, the file is not locked by this object, and \e false otherwise. \sa lock(), isLocked(), lockMode() */ /*! \fn QtLockedFile::~QtLockedFile() Destroys the \e QtLockedFile object. If any locks were held, they are released. */ ukui-notification/3rd-parties/qtsingleapplication/src/qtlockedfile.h0000664000175000017500000000254715160523734024774 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #ifndef QTLOCKEDFILE_H #define QTLOCKEDFILE_H #include #ifdef Q_OS_WIN #include #endif #if defined(Q_OS_WIN) # if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) # define QT_QTLOCKEDFILE_EXPORT # elif defined(QT_QTLOCKEDFILE_IMPORT) # if defined(QT_QTLOCKEDFILE_EXPORT) # undef QT_QTLOCKEDFILE_EXPORT # endif # define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport) # elif defined(QT_QTLOCKEDFILE_EXPORT) # undef QT_QTLOCKEDFILE_EXPORT # define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport) # endif #else # define QT_QTLOCKEDFILE_EXPORT #endif namespace QtLP_Private { class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile { public: enum LockMode { NoLock = 0, ReadLock, WriteLock }; QtLockedFile(); QtLockedFile(const QString &name); ~QtLockedFile(); bool open(OpenMode mode); bool lock(LockMode mode, bool block = true); bool unlock(); bool isLocked() const; LockMode lockMode() const; private: #ifdef Q_OS_WIN Qt::HANDLE wmutex; Qt::HANDLE rmutex; QVector rmutexes; QString mutexname; Qt::HANDLE getMutexHandle(int idx, bool doCreate); bool waitMutex(Qt::HANDLE mutex, bool doBlock); #endif LockMode m_lock_mode; }; } #endif ukui-notification/3rd-parties/qtsingleapplication/src/qtsinglecoreapplication.h0000664000175000017500000000126515160523734027245 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #ifndef QTSINGLECOREAPPLICATION_H #define QTSINGLECOREAPPLICATION_H #include class QtLocalPeer; class QtSingleCoreApplication : public QCoreApplication { Q_OBJECT public: QtSingleCoreApplication(int &argc, char **argv); QtSingleCoreApplication(const QString &id, int &argc, char **argv); bool isRunning(); QString id() const; public Q_SLOTS: bool sendMessage(const QString &message, int timeout = 5000); Q_SIGNALS: void messageReceived(const QString &message); private: QtLocalPeer* peer; }; #endif // QTSINGLECOREAPPLICATION_H ukui-notification/3rd-parties/qtsingleapplication/src/QtLockedFile0000664000175000017500000000003215160523734024371 0ustar fengfeng#include "qtlockedfile.h" ukui-notification/3rd-parties/qtsingleapplication/src/qtlockedfile_unix.cpp0000664000175000017500000000305415160523734026364 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include #include #include #include #include "qtlockedfile.h" bool QtLockedFile::lock(LockMode mode, bool block) { if (!isOpen()) { qWarning("QtLockedFile::lock(): file is not opened"); return false; } if (mode == NoLock) return unlock(); if (mode == m_lock_mode) return true; if (m_lock_mode != NoLock) unlock(); struct flock fl; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; int cmd = block ? F_SETLKW : F_SETLK; int ret = fcntl(handle(), cmd, &fl); if (ret == -1) { if (errno != EINTR && errno != EAGAIN) qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } m_lock_mode = mode; return true; } bool QtLockedFile::unlock() { if (!isOpen()) { qWarning("QtLockedFile::unlock(): file is not opened"); return false; } if (!isLocked()) return true; struct flock fl; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_type = F_UNLCK; int ret = fcntl(handle(), F_SETLKW, &fl); if (ret == -1) { qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } m_lock_mode = NoLock; return true; } QtLockedFile::~QtLockedFile() { if (isOpen()) unlock(); } ukui-notification/3rd-parties/qtsingleapplication/src/qtsingleapplication.cpp0000664000175000017500000002325015160523734026725 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtsingleapplication.h" #include "qtlocalpeer.h" #include /*! \class QtSingleApplication qtsingleapplication.h \brief The QtSingleApplication class provides an API to detect and communicate with running instances of an application. This class allows you to create applications where only one instance should be running at a time. I.e., if the user tries to launch another instance, the already running instance will be activated instead. Another usecase is a client-server system, where the first started instance will assume the role of server, and the later instances will act as clients of that server. By default, the full path of the executable file is used to determine whether two processes are instances of the same application. You can also provide an explicit identifier string that will be compared instead. The application should create the QtSingleApplication object early in the startup phase, and call isRunning() to find out if another instance of this application is already running. If isRunning() returns false, it means that no other instance is running, and this instance has assumed the role as the running instance. In this case, the application should continue with the initialization of the application user interface before entering the event loop with exec(), as normal. The messageReceived() signal will be emitted when the running application receives messages from another instance of the same application. When a message is received it might be helpful to the user to raise the application so that it becomes visible. To facilitate this, QtSingleApplication provides the setActivationWindow() function and the activateWindow() slot. If isRunning() returns true, another instance is already running. It may be alerted to the fact that another instance has started by using the sendMessage() function. Also data such as startup parameters (e.g. the name of the file the user wanted this new instance to open) can be passed to the running instance with this function. Then, the application should terminate (or enter client mode). If isRunning() returns true, but sendMessage() fails, that is an indication that the running instance is frozen. Here's an example that shows how to convert an existing application to use QtSingleApplication. It is very simple and does not make use of all QtSingleApplication's functionality (see the examples for that). \code // Original int main(int argc, char **argv) { QApplication app(argc, argv); MyMainWidget mmw; mmw.show(); return app.exec(); } // Single instance int main(int argc, char **argv) { QtSingleApplication app(argc, argv); if (app.isRunning()) return !app.sendMessage(someDataString); MyMainWidget mmw; app.setActivationWindow(&mmw); mmw.show(); return app.exec(); } \endcode Once this QtSingleApplication instance is destroyed (normally when the process exits or crashes), when the user next attempts to run the application this instance will not, of course, be encountered. The next instance to call isRunning() or sendMessage() will assume the role as the new running instance. For console (non-GUI) applications, QtSingleCoreApplication may be used instead of this class, to avoid the dependency on the QtGui library. \sa QtSingleCoreApplication */ void QtSingleApplication::sysInit(const QString &appId) { actWin = 0; peer = new QtLocalPeer(this, appId); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a argv, and \a GUIenabled are passed on to the QAppliation constructor. If you are creating a console application (i.e. setting \a GUIenabled to false), you may consider using QtSingleCoreApplication instead. */ QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled) : QApplication(argc, argv, GUIenabled) { sysInit(); } /*! Creates a QtSingleApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the QAppliation constructor. */ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) : QApplication(argc, argv) { sysInit(appId); } #if QT_VERSION < 0x050000 /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a argv, and \a type are passed on to the QAppliation constructor. */ QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) : QApplication(argc, argv, type) { sysInit(); } # if defined(Q_WS_X11) /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). \a dpy, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, visual, cmap) { sysInit(); } /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a argv, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, argc, argv, visual, cmap) { sysInit(); } /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be \a appId. \a dpy, \a argc, \a argv, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, argc, argv, visual, cmap) { sysInit(appId); } # endif // Q_WS_X11 #endif // QT_VERSION < 0x050000 /*! Returns true if another instance of this application is running; otherwise false. This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session). \sa sendMessage() */ bool QtSingleApplication::isRunning() { return peer->isClient(); } /*! Tries to send the text \a message to the currently running instance. The QtSingleApplication object in the running instance will emit the messageReceived() signal when it receives the message. This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within \a timeout milliseconds, this function return false. \sa isRunning(), messageReceived() */ bool QtSingleApplication::sendMessage(const QString &message, int timeout) { return peer->sendMessage(message, timeout); } /*! Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application. */ QString QtSingleApplication::id() const { return peer->applicationId(); } /*! Sets the activation window of this application to \a aw. The activation window is the widget that will be activated by activateWindow(). This is typically the application's main window. If \a activateOnMessage is true (the default), the window will be activated automatically every time a message is received, just prior to the messageReceived() signal being emitted. \sa activateWindow(), messageReceived() */ void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage) { actWin = aw; if (activateOnMessage) connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); else disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); } /*! Returns the applications activation window if one has been set by calling setActivationWindow(), otherwise returns 0. \sa setActivationWindow() */ QWidget* QtSingleApplication::activationWindow() const { return actWin; } /*! De-minimizes, raises, and activates this application's activation window. This function does nothing if no activation window has been set. This is a convenience function to show the user that this application instance has been activated when he has tried to start another instance. This function should typically be called in response to the messageReceived() signal. By default, that will happen automatically, if an activation window has been set. \sa setActivationWindow(), messageReceived(), initialize() */ void QtSingleApplication::activateWindow() { if (actWin) { actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized); actWin->raise(); actWin->activateWindow(); } } /*! \fn void QtSingleApplication::messageReceived(const QString& message) This signal is emitted when the current instance receives a \a message from another instance of this application. \sa sendMessage(), setActivationWindow(), activateWindow() */ /*! \fn void QtSingleApplication::initialize(bool dummy = true) \obsolete */ ukui-notification/3rd-parties/qtsingleapplication/src/qtlocalpeer.cpp0000664000175000017500000001215215160523734025165 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtlocalpeer.h" #include #include #include #include #if defined(Q_OS_WIN) #include #include typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*); static PProcessIdToSessionId pProcessIdToSessionId = 0; #endif #if defined(Q_OS_UNIX) #include #include #include #endif namespace QtLP_Private { #include "qtlockedfile.cpp" #if defined(Q_OS_WIN) #include "qtlockedfile_win.cpp" #else #include "qtlockedfile_unix.cpp" #endif } const char* QtLocalPeer::ack = "ack"; QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) : QObject(parent), id(appId) { QString prefix = id; if (id.isEmpty()) { id = QCoreApplication::applicationFilePath(); #if defined(Q_OS_WIN) id = id.toLower(); #endif prefix = id.section(QLatin1Char('/'), -1); } prefix.remove(QRegularExpression("[^a-zA-Z]")); prefix.truncate(6); QByteArray idc = id.toUtf8(); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) quint16 idNum = qChecksum(idc.constData(), idc.size()); #else quint16 idNum = qChecksum(QByteArrayView(idc.constData(), idc.size())); #endif socketName = QLatin1String("qtsingleapp-") + prefix + QLatin1Char('-') + QString::number(idNum, 16); #if defined(Q_OS_WIN) if (!pProcessIdToSessionId) { QLibrary lib("kernel32"); pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId"); } if (pProcessIdToSessionId) { DWORD sessionId = 0; pProcessIdToSessionId(GetCurrentProcessId(), &sessionId); socketName += QLatin1Char('-') + QString::number(sessionId, 16); } #else socketName += QLatin1Char('-') + QString::number(::getuid(), 16); #endif server = new QLocalServer(this); QString lockName = QDir(QDir::tempPath()).absolutePath() + QLatin1Char('/') + socketName + QLatin1String("-lockfile"); lockFile.setFileName(lockName); lockFile.open(QIODevice::ReadWrite); } bool QtLocalPeer::isClient() { if (lockFile.isLocked()) return false; if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) return true; bool res = server->listen(socketName); #if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) // ### Workaround if (!res && server->serverError() == QAbstractSocket::AddressInUseError) { QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName); res = server->listen(socketName); } #endif if (!res) qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString())); QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection())); return false; } bool QtLocalPeer::sendMessage(const QString &message, int timeout) { if (!isClient()) return false; QLocalSocket socket; bool connOk = false; for(int i = 0; i < 2; i++) { // Try twice, in case the other instance is just starting up socket.connectToServer(socketName); connOk = socket.waitForConnected(timeout/2); if (connOk || i) break; int ms = 250; #if defined(Q_OS_WIN) Sleep(DWORD(ms)); #else struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; nanosleep(&ts, NULL); #endif } if (!connOk) return false; QByteArray uMsg(message.toUtf8()); QDataStream ds(&socket); ds.writeBytes(uMsg.constData(), uMsg.size()); bool res = socket.waitForBytesWritten(timeout); if (res) { res &= socket.waitForReadyRead(timeout); // wait for ack if (res) res &= (socket.read(qstrlen(ack)) == ack); } return res; } void QtLocalPeer::receiveConnection() { QLocalSocket* socket = server->nextPendingConnection(); if (!socket) return; while (true) { if (socket->state() == QLocalSocket::UnconnectedState) { qWarning("QtLocalPeer: Peer disconnected"); delete socket; return; } if (socket->bytesAvailable() >= qint64(sizeof(quint32))) break; socket->waitForReadyRead(); } QDataStream ds(socket); QByteArray uMsg; quint32 remaining; ds >> remaining; uMsg.resize(remaining); int got = 0; char* uMsgBuf = uMsg.data(); do { got = ds.readRawData(uMsgBuf, remaining); remaining -= got; uMsgBuf += got; } while (remaining && got >= 0 && socket->waitForReadyRead(2000)); if (got < 0) { qWarning("QtLocalPeer: Message reception failed %s", socket->errorString().toLatin1().constData()); delete socket; return; } QString message(QString::fromUtf8(uMsg)); socket->write(ack, qstrlen(ack)); socket->waitForBytesWritten(1000); socket->waitForDisconnected(1000); // make sure client reads ack delete socket; emit messageReceived(message); //### (might take a long time to return) } ukui-notification/3rd-parties/qtsingleapplication/src/qtsingleapplication.h0000664000175000017500000000405715160523734026376 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #ifndef QTSINGLEAPPLICATION_H #define QTSINGLEAPPLICATION_H #include class QtLocalPeer; #if defined(Q_OS_WIN) # if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) # define QT_QTSINGLEAPPLICATION_EXPORT # elif defined(QT_QTSINGLEAPPLICATION_IMPORT) # if defined(QT_QTSINGLEAPPLICATION_EXPORT) # undef QT_QTSINGLEAPPLICATION_EXPORT # endif # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) # elif defined(QT_QTSINGLEAPPLICATION_EXPORT) # undef QT_QTSINGLEAPPLICATION_EXPORT # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) # endif #else # define QT_QTSINGLEAPPLICATION_EXPORT #endif class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication { Q_OBJECT public: QtSingleApplication(int &argc, char **argv, bool GUIenabled = true); QtSingleApplication(const QString &id, int &argc, char **argv); #if QT_VERSION < 0x050000 QtSingleApplication(int &argc, char **argv, Type type); # if defined(Q_WS_X11) QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0); QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); # endif // Q_WS_X11 #endif // QT_VERSION < 0x050000 bool isRunning(); QString id() const; void setActivationWindow(QWidget* aw, bool activateOnMessage = true); QWidget* activationWindow() const; // Obsolete: void initialize(bool dummy = true) { isRunning(); Q_UNUSED(dummy) } public Q_SLOTS: bool sendMessage(const QString &message, int timeout = 5000); void activateWindow(); Q_SIGNALS: void messageReceived(const QString &message); private: void sysInit(const QString &appId = QString()); QtLocalPeer *peer; QWidget *actWin; }; #endif // QTSINGLEAPPLICATION_H ukui-notification/3rd-parties/qtsingleapplication/src/qtlockedfile_win.cpp0000664000175000017500000001112115160523734026170 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtlockedfile.h" #include #include #define MUTEX_PREFIX "QtLockedFile mutex " // Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS #define MAX_READERS MAXIMUM_WAIT_OBJECTS #if QT_VERSION >= 0x050000 #define QT_WA(unicode, ansi) unicode #endif Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) { if (mutexname.isEmpty()) { QFileInfo fi(*this); mutexname = QString::fromLatin1(MUTEX_PREFIX) + fi.absoluteFilePath().toLower(); } QString mname(mutexname); if (idx >= 0) mname += QString::number(idx); Qt::HANDLE mutex; if (doCreate) { QT_WA( { mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16()); }, { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); if (!mutex) { qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); return 0; } } else { QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16()); }, { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); if (!mutex) { if (GetLastError() != ERROR_FILE_NOT_FOUND) qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); return 0; } } return mutex; } bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock) { Q_ASSERT(mutex); DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0); switch (res) { case WAIT_OBJECT_0: case WAIT_ABANDONED: return true; break; case WAIT_TIMEOUT: break; default: qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed"); } return false; } bool QtLockedFile::lock(LockMode mode, bool block) { if (!isOpen()) { qWarning("QtLockedFile::lock(): file is not opened"); return false; } if (mode == NoLock) return unlock(); if (mode == m_lock_mode) return true; if (m_lock_mode != NoLock) unlock(); if (!wmutex && !(wmutex = getMutexHandle(-1, true))) return false; if (!waitMutex(wmutex, block)) return false; if (mode == ReadLock) { int idx = 0; for (; idx < MAX_READERS; idx++) { rmutex = getMutexHandle(idx, false); if (!rmutex || waitMutex(rmutex, false)) break; CloseHandle(rmutex); } bool ok = true; if (idx >= MAX_READERS) { qWarning("QtLockedFile::lock(): too many readers"); rmutex = 0; ok = false; } else if (!rmutex) { rmutex = getMutexHandle(idx, true); if (!rmutex || !waitMutex(rmutex, false)) ok = false; } if (!ok && rmutex) { CloseHandle(rmutex); rmutex = 0; } ReleaseMutex(wmutex); if (!ok) return false; } else { Q_ASSERT(rmutexes.isEmpty()); for (int i = 0; i < MAX_READERS; i++) { Qt::HANDLE mutex = getMutexHandle(i, false); if (mutex) rmutexes.append(mutex); } if (rmutexes.size()) { DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), TRUE, block ? INFINITE : 0); if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { if (res != WAIT_TIMEOUT) qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky unlock(); return false; } } } m_lock_mode = mode; return true; } bool QtLockedFile::unlock() { if (!isOpen()) { qWarning("QtLockedFile::unlock(): file is not opened"); return false; } if (!isLocked()) return true; if (m_lock_mode == ReadLock) { ReleaseMutex(rmutex); CloseHandle(rmutex); rmutex = 0; } else { foreach(Qt::HANDLE mutex, rmutexes) { ReleaseMutex(mutex); CloseHandle(mutex); } rmutexes.clear(); ReleaseMutex(wmutex); } m_lock_mode = QtLockedFile::NoLock; return true; } QtLockedFile::~QtLockedFile() { if (isOpen()) unlock(); if (wmutex) CloseHandle(wmutex); } ukui-notification/3rd-parties/qtsingleapplication/src/qtsinglecoreapplication.pri0000664000175000017500000000050415160523734027603 0ustar fengfengINCLUDEPATH += $$PWD DEPENDPATH += $$PWD HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp QT *= network win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) } ukui-notification/3rd-parties/qtsingleapplication/src/qtsinglecoreapplication.cpp0000664000175000017500000000661515160523734027604 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtsinglecoreapplication.h" #include "qtlocalpeer.h" /*! \class QtSingleCoreApplication qtsinglecoreapplication.h \brief A variant of the QtSingleApplication class for non-GUI applications. This class is a variant of QtSingleApplication suited for use in console (non-GUI) applications. It is an extension of QCoreApplication (instead of QApplication). It does not require the QtGui library. The API and usage is identical to QtSingleApplication, except that functions relating to the "activation window" are not present, for obvious reasons. Please refer to the QtSingleApplication documentation for explanation of the usage. A QtSingleCoreApplication instance can communicate to a QtSingleApplication instance if they share the same application id. Hence, this class can be used to create a light-weight command-line tool that sends commands to a GUI application. \sa QtSingleApplication */ /*! Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc and \a argv are passed on to the QCoreAppliation constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) : QCoreApplication(argc, argv) { peer = new QtLocalPeer(this); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Creates a QtSingleCoreApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the QCoreAppliation constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) : QCoreApplication(argc, argv) { peer = new QtLocalPeer(this, appId); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Returns true if another instance of this application is running; otherwise false. This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session). \sa sendMessage() */ bool QtSingleCoreApplication::isRunning() { return peer->isClient(); } /*! Tries to send the text \a message to the currently running instance. The QtSingleCoreApplication object in the running instance will emit the messageReceived() signal when it receives the message. This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within \a timeout milliseconds, this function return false. \sa isRunning(), messageReceived() */ bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) { return peer->sendMessage(message, timeout); } /*! Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application. */ QString QtSingleCoreApplication::id() const { return peer->applicationId(); } /*! \fn void QtSingleCoreApplication::messageReceived(const QString& message) This signal is emitted when the current instance receives a \a message from another instance of this application. \sa sendMessage() */ ukui-notification/3rd-parties/qtsingleapplication/src/QtSingleApplication0000664000175000017500000000004115160523734025775 0ustar fengfeng#include "qtsingleapplication.h" ukui-notification/3rd-parties/qtsingleapplication/doc/0000775000175000017500000000000015160523734022123 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/doc/images/0000775000175000017500000000000015160523734023370 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/doc/images/qt-logo.png0000664000175000017500000000775315160523734025474 0ustar fengfeng‰PNG  IHDR9C©Ã:u²IDATxœbüÿÿ?Ãÿÿbh�ÿÿJnÿÿJnÿÿJnÿÿJnÿÿJnÿÿJnÿÿ´Ô¡ ÄЄÇþ—«`�šúˆ¯r'Q½úö( !! ¨ŠËN€ÿÿbÄ_üû÷��‘�‰‘pðÿûÿï?Ã?F&ˆ¨æFÿÿÂçÖÿÿ312þùû÷à•ãG.Ÿy÷í§ØG&Þ�?ÿ}åeç—ãW•ãS•áS’à–ágbÄð’ë˜( ~ÿÿ™þýÿÇÄÈtë齸¾‚“gŽ0sÿVv`fcdøÀÄÈÀøŸáßßÿ˜™ØY8øØE¹$¥xdùUäùUex•$xd9D˜™˜ÐÌDr=#‰‰ÿÿ®ÿÿÿgdd|úö…U¾×£Çw9D„-¼þó 2üüþb8Œøÿïÿ¿¿ÿÿüþ÷ûÏ¿ßÿýebddcæàeá”�â•—åS‘çW•áS–ä‘äcaBšÿÿÿý#Úõÿÿ®ÿþÿcfd®]Ðþèñ-Iµ\ _¿20110`x�™‘………•‘�êz†ß½ÿóú­w—þýûËÀÈÈÆÌÎÃÆ/Â).É#'˯"ǯ*Ë«,É+'Ì)ÎÊÄÆÌ@lYÿÿ®�@}ýñ­fŠÍÛ¯Ÿ™™˜Í¼ÿñ 2üýÃ@d†�‡$�þ1üûûïÏHØÿÿÃÀÀÀÊÄÎÃÆ'Ä)&É#'ç,ϯ*˧,Å#/Â%ÁÆÌ�ËXÿÿ®ÿþÿgfd¼óìþÛOï˜X8Y9þ±s2üÿG¬Cþ3üg@ fFff.ˆëÿ3üûý÷×ÓO÷|¸ù÷ÿv†ÿ ,Ìl¼%›���•‰íï¿?fRŽöò¾_ÿ|bb`yýì—‰š3+Ô‡Œ,ÌŒ,Ä4â ÿÿ"Í­ÿÿ3°°2>{ð›•E4ÌÞ‡���‰‰ùßÿ ˯N½ÿþ¶œˆ´ƒ‡Ô¦ý+×ÙÂÀÀ‘òQ�efdþñ•áÏ›?6:&£þýÿûþÇ›÷?ß|†¨„ÿÿ"=\ßÿn¤¢£$¡ðÿÿFFfFæÿ ÿ/¼<ÆÍÆóíû/.þÌâ,«le```d`b``0”´º{HTóOØ�ÅWƒl0ÿÿ"­`ddøó›éóëßf¦ ÿýcfbb`dx÷ýÕ›oÏ y…‘‰APŒõâý› ,Ì,ÿýeebWÒaúá,©ðûïˆQܬ¼±º…LŒL>Ü<ùd158ÿÿ"!\ÿÿg`bbøõã?Ã7F]u¨ Æ?Þ~ûý…‰‘é?Ãÿÿÿÿóñ³¼xÿæÃ× �žƒ�ŠÖß!Èÿÿ"1\™~|ûÏðŸU^\š�ÿ¾üúøûï/VîÿÿÿýÿÏÀÁÅüùÇ×�_? p @J$OG½œ¹%/ZÞ-«š1êã�÷‹ÎOæfãýþï‘ÿÿ"9 üúñŸ�™U„_ˆÚXùÏÀÀðýÏ׿ÿÿÂÛ.llŒÿüúúã¬ð”—úòûÅñ ÇàM€o>­¼5á矬LlÜl¼ÄØÿÿ”“1€0 m’ŠÒ00ðÿw¢„TVx€å“OþÚ ‘�bµ¥ÑýýGB”È8ÂGt‘UÕ´ÙXp¢lóÅIöëüÒÿÿ”–I ×ÿ¿×¶ñR/‚ùÁ@2ä× Y{» ]«“€d9#u–¬lÉe+â}ÇN6ÿÿ¢ÉXfò£Jÿÿ"Õ­ÿ™˜ÿÿÿûûJ¬13²002³øÿ ŒÈ¤Á@‘Kÿÿ"Å­ŒÐz‹áïŸo?¿1000@{µ ¬ÌlÈýÏ¿ÿ™`éä?ï¿ßÿÁ2Ùÿÿ"¹ŽecgdøûëÝç� HÝ.fFfˆ³þþùÏÀÄÂɆèå}þõñϿߌŒŒ”Œøÿÿ"٭윌 ž½yÁí0200ð°ñ³0³Ac™‘ñ×Ïì¬ì<œ\p�o¿½üûï/…ã.ÿÿ"Á­�Î?;#ûß›�!Íäÿ�hågâdáþ÷ÿddîû·¼\<|\¼§300<ù|ÿ?jó�Œôÿÿ"-½þûÇÀÂöŸU€åü�« ŒŒL9D„8Eÿþû iˆúð[ZPŒ‡ƒç?¬�zïý5fFä6ʨ?™™ˆ oÿÿ"½Ìbú')Ã~öÖåÏß?3311ügø÷ÿ/ «² Ö¯¿˜˜ÿýczÿú��²Ãß¿˜™>ýøpçývfŽÿÿÃLŒÌ~ÿgþõíÏ'"³ÿÿ"Ù­ÿü—QdùæÁ¡Ë' Ãi öò¾¿ÿüâà`þü–�áÍ¿'?ÈHÛ…—ÇžyÄÁÊþûïï?ÿ200üÿÏ Æ%©)hþé1Ÿ.‡7?‡àŸÿ†.ÿÿ"Í­ŒŒ 3ˆ2²Šý�¹yÄVfFfGyOÕð‡/ŸÙõ:Á?ÍÃÄéÿÿÿLLÌ [ï,ýÿï?/?ËÛÏï^}|Ã:`luX¸-åtàNîÿþ Xÿÿ"½¿ÅÀð÷ß_Ck¾ÍǶî>w�…™ù÷Ÿß©:»éÍæ«7WlšSÔÉÀÀðçÿofFæcOv{²“�‘ODŠé÷Ÿ7톚ÂÀÀÅÁ)*$ÀÈÄ@dÿÿ"¹ÏÍÈÈðç7ƒˆ$£‚1CRgɉi[¤…Å!½.f&v_#†ÿÿýûÿ—•‰íɧ{='JX˜Xþÿc`aÿgäÆÕº¹]R\ØÛÌ…å?Ó§_ïï¾»vàѦ·ß_°2±ìÿÿ"g|€‘‘áç�ÚfœîÛ•®(�mª¡ )\!­&&&F¦ÓÏö·Ë{ûí ÷¿ÿÿb“aáýÚ~>qéci.ŽO?ßøñößÿÜl¼Ää-ÿÿ"sÜ…‘‘áÇ�¿æ<Ϟݛçn%î›á‘h«mÆÈÈ)tûN–­¾6ƒ›•âPˆ–ß¿þ³0³Hˆñ~þýæã—ÌŒ,ú|ëןhmÂÿØF>ÿÿÿÏÂÄÊÃÆ1Ó:ÿÿ¢´ýÊÄÄðçÏ19Æßÿ_/ر†��á÷¿ßÿþÿccæÈ7kŸä±žŸ]èÏÿßÛ¯ŒŒŒ¿ÿýå’’ãSaÀÑÞÿÿ¢B[ûß?¶ºö|}kfž¼~‘�…�á?É�kF¶/¿>9*øq°pýÅQ�ÿÿ¢( @##ïŸÿe”™ÿ1| ›QXænäÈÏÅû÷ÿŸç_þúûƒ‰� #Æ¡³�p7½ýþB]X?F·��çÔÿÿ¢‚[aÎý'§ÌþKîãô›ù+ž ðqòüþ÷ëÛï/ÌŒ,,L¬ Œ L Ìðáö¿ÿþþþûë7tªƒ‘…‰ÅDÊ¡Úz /ÿÿÿÿ°#300ÿÿÂíVˆ·‰nCœËÄÈ")"üçïß/¿?110q°pýûÿ÷ï¿¿þþþýïl†�‡�_‚GV’WNŽOUž_UIPSCØ�…‰õ?Ã\e``ÿÿÂ=_ðR(2r-dúŒ‰‘�‘�‘á?ÿ_¿ÿù™šûóŸá?+7Ÿ8�Œ$�œŸŠ¼€šŸŠ$¯¼§ +Â:†xBÿÿÂêVFn^†?¿ÿ³þcbdd@êyÀÒÄ‚¿ÿÿþþûûÏßßþÿf```abãaå㔆L»)ð«Êñ«JñÈ sI°2±¡Ò¤!#3Áš ÿÿÂ>Ç ™^š´y^~o —(·µ?+33d:óïŸÈ.cåf…L©ÉÊò©(¨Éñ©Hñ*sJ`ΠMg222’Ú¥ÿÿž˜™þýû—ç›ÄÇÁ—15ëý·÷,lŒÌ ¬Ül¼"<’ QtSingleApplication Class Reference
  Home

QtSingleApplication Class Reference

The QtSingleApplication class provides an API to detect and communicate with running instances of an application. More...

 #include <QtSingleApplication>

Inherits QApplication.


Public Functions

QtSingleApplication ( int & argc, char ** argv, bool GUIenabled = true )
QtSingleApplication ( const QString & appId, int & argc, char ** argv )
QtSingleApplication ( int & argc, char ** argv, Type type )
QtSingleApplication ( Display * dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )
QtSingleApplication ( Display * dpy, int & argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )
QtSingleApplication ( Display * dpy, const QString & appId, int argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )
QWidget * activationWindow () const
QString id () const
bool isRunning ()
void setActivationWindow ( QWidget * aw, bool activateOnMessage = true )

Public Slots

void activateWindow ()
bool sendMessage ( const QString & message, int timeout = 5000 )

Signals

void messageReceived ( const QString & message )

Additional Inherited Members


Detailed Description

The QtSingleApplication class provides an API to detect and communicate with running instances of an application.

This class allows you to create applications where only one instance should be running at a time. I.e., if the user tries to launch another instance, the already running instance will be activated instead. Another usecase is a client-server system, where the first started instance will assume the role of server, and the later instances will act as clients of that server.

By default, the full path of the executable file is used to determine whether two processes are instances of the same application. You can also provide an explicit identifier string that will be compared instead.

The application should create the QtSingleApplication object early in the startup phase, and call isRunning() to find out if another instance of this application is already running. If isRunning() returns false, it means that no other instance is running, and this instance has assumed the role as the running instance. In this case, the application should continue with the initialization of the application user interface before entering the event loop with exec(), as normal.

The messageReceived() signal will be emitted when the running application receives messages from another instance of the same application. When a message is received it might be helpful to the user to raise the application so that it becomes visible. To facilitate this, QtSingleApplication provides the setActivationWindow() function and the activateWindow() slot.

If isRunning() returns true, another instance is already running. It may be alerted to the fact that another instance has started by using the sendMessage() function. Also data such as startup parameters (e.g. the name of the file the user wanted this new instance to open) can be passed to the running instance with this function. Then, the application should terminate (or enter client mode).

If isRunning() returns true, but sendMessage() fails, that is an indication that the running instance is frozen.

Here's an example that shows how to convert an existing application to use QtSingleApplication. It is very simple and does not make use of all QtSingleApplication's functionality (see the examples for that).

 // Original
 int main(int argc, char **argv)
 {
     QApplication app(argc, argv);

     MyMainWidget mmw;
     mmw.show();
     return app.exec();
 }

 // Single instance
 int main(int argc, char **argv)
 {
     QtSingleApplication app(argc, argv);

     if (app.isRunning())
         return !app.sendMessage(someDataString);

     MyMainWidget mmw;
     app.setActivationWindow(&mmw);
     mmw.show();
     return app.exec();
 }

Once this QtSingleApplication instance is destroyed (normally when the process exits or crashes), when the user next attempts to run the application this instance will not, of course, be encountered. The next instance to call isRunning() or sendMessage() will assume the role as the new running instance.

For console (non-GUI) applications, QtSingleCoreApplication may be used instead of this class, to avoid the dependency on the QtGui library.

See also QtSingleCoreApplication.


Member Function Documentation

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, bool GUIenabled = true )

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and GUIenabled are passed on to the QAppliation constructor.

If you are creating a console application (i.e. setting GUIenabled to false), you may consider using QtSingleCoreApplication instead.

QtSingleApplication::QtSingleApplication ( const QString & appId, int & argc, char ** argv )

Creates a QtSingleApplication object with the application identifier appId. argc and argv are passed on to the QAppliation constructor.

QtSingleApplication::QtSingleApplication ( int & argc, char ** argv, Type type )

Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc, argv, and type are passed on to the QAppliation constructor.

QtSingleApplication::QtSingleApplication ( Display * dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, visual, and cmap are passed on to the QApplication constructor.

QtSingleApplication::QtSingleApplication ( Display * dpy, int & argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

QtSingleApplication::QtSingleApplication ( Display * dpy, const QString & appId, int argc, char ** argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0 )

Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be appId. dpy, argc, argv, visual, and cmap are passed on to the QApplication constructor.

void QtSingleApplication::activateWindow ()   [slot]

De-minimizes, raises, and activates this application's activation window. This function does nothing if no activation window has been set.

This is a convenience function to show the user that this application instance has been activated when he has tried to start another instance.

This function should typically be called in response to the messageReceived() signal. By default, that will happen automatically, if an activation window has been set.

See also setActivationWindow(), messageReceived(), and initialize().

QWidget * QtSingleApplication::activationWindow () const

Returns the applications activation window if one has been set by calling setActivationWindow(), otherwise returns 0.

See also setActivationWindow().

QString QtSingleApplication::id () const

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

bool QtSingleApplication::isRunning ()

Returns true if another instance of this application is running; otherwise false.

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

See also sendMessage().

void QtSingleApplication::messageReceived ( const QString & message )   [signal]

This signal is emitted when the current instance receives a message from another instance of this application.

See also sendMessage(), setActivationWindow(), and activateWindow().

bool QtSingleApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

Tries to send the text message to the currently running instance. The QtSingleApplication object in the running instance will emit the messageReceived() signal when it receives the message.

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

See also isRunning() and messageReceived().

void QtSingleApplication::setActivationWindow ( QWidget * aw, bool activateOnMessage = true )

Sets the activation window of this application to aw. The activation window is the widget that will be activated by activateWindow(). This is typically the application's main window.

If activateOnMessage is true (the default), the window will be activated automatically every time a message is received, just prior to the messageReceived() signal being emitted.

See also activationWindow(), activateWindow(), and messageReceived().


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication-members.html0000664000175000017500000007370215160523734031470 0ustar fengfeng List of All Members for QtSingleApplication
  Home

List of All Members for QtSingleApplication

This is the complete list of members for QtSingleApplication, including inherited members.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication.dcf0000664000175000017500000000507115160523734027622 0ustar fengfeng
QtSingleApplication activateWindow activationWindow id isRunning messageReceived sendMessage setActivationWindow
QtSingleCoreApplication id isRunning messageReceived sendMessage
A non-GUI example
A Trivial Example
Loading Documents
Single Application
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication-example-trivial.html0000664000175000017500000001243415160523734033134 0ustar fengfeng A Trivial Example
  Home

A Trivial Example

The application in this example has a log-view that displays messages sent by further instances of the same application.

The example demonstrates the use of the QtSingleApplication class to detect and communicate with a running instance of the application using the sendMessage() API. The messageReceived() signal is used to display received messages in a QTextEdit log.

 /****************************************************************************
 **
 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the Qt Solutions component.
 **
 ** You may use this file under the terms of the BSD license as follows:
 **
 ** "Redistribution and use in source and binary forms, with or without
 ** modification, are permitted provided that the following conditions are
 ** met:
 **   * Redistributions of source code must retain the above copyright
 **     notice, this list of conditions and the following disclaimer.
 **   * 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.
 **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) 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
 ** OWNER 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."
 **
 ****************************************************************************/

 #include <qtsingleapplication.h>
 #include <QtGui/QTextEdit>

 class TextEdit : public QTextEdit
 {
     Q_OBJECT
 public:
     TextEdit(QWidget *parent = 0)
         : QTextEdit(parent)
     {}
 public slots:
     void append(const QString &str)
     {
         QTextEdit::append(str);
     }
 };

 #include "main.moc"

 int main(int argc, char **argv)
 {
     QtSingleApplication instance(argc, argv);

The example has only the main entry point function. A QtSingleApplication object is created immediately.

     if (instance.sendMessage("Wake up!"))
         return 0;

If another instance of this application is already running, sendMessage() will succeed, and this instance just exits immediately.

     TextEdit logview;
     logview.setReadOnly(true);
     logview.show();

Otherwise the instance continues as normal and creates the user interface.

     instance.setActivationWindow(&logview);

     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
                      &logview, SLOT(append(const QString&)));

     return instance.exec();

The logview object is also set as the application's activation window. Every time a message is received, the window will be raised and activated automatically.

The messageReceived() signal is also connected to the QTextEdit's append() slot. Every message received from further instances of this application will be displayed in the log.

Finally the event loop is entered.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/images/0000775000175000017500000000000015160523734024334 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/doc/html/images/qt-logo.png0000664000175000017500000000775315160523734026440 0ustar fengfeng‰PNG  IHDR9C©Ã:u²IDATxœbüÿÿ?Ãÿÿbh�ÿÿJnÿÿJnÿÿJnÿÿJnÿÿJnÿÿJnÿÿ´Ô¡ ÄЄÇþ—«`�šúˆ¯r'Q½úö( !! ¨ŠËN€ÿÿbÄ_üû÷��‘�‰‘pðÿûÿï?Ã?F&ˆ¨æFÿÿÂçÖÿÿ312þùû÷à•ãG.Ÿy÷í§ØG&Þ�?ÿ}åeç—ãW•ãS•áS’à–ágbÄð’ë˜( ~ÿÿ™þýÿÇÄÈtë齸¾‚“gŽ0sÿVv`fcdøÀÄÈÀøŸáßßÿ˜™ØY8øØE¹$¥xdùUäùUex•$xd9D˜™˜ÐÌDr=#‰‰ÿÿ®ÿÿÿgdd|úö…U¾×£Çw9D„-¼þó 2üüþb8Œøÿïÿ¿¿ÿÿüþ÷ûÏ¿ßÿýebddcæàeá”�â•—åS‘çW•áS–ä‘äcaBšÿÿÿý#Úõÿÿ®ÿþÿcfd®]Ðþèñ-Iµ\ _¿20110`x�™‘………•‘�êz†ß½ÿóú­w—þýûËÀÈÈÆÌÎÃÆ/Â).É#'˯"ǯ*Ë«,É+'Ì)ÎÊÄÆÌ@lYÿÿ®�@}ýñ­fŠÍÛ¯Ÿ™™˜Í¼ÿñ 2üýÃ@d†�‡$�þ1üûûïÏHØÿÿÃÀÀÀÊÄÎÃÆ'Ä)&É#'ç,ϯ*˧,Å#/Â%ÁÆÌ�ËXÿÿ®ÿþÿgfd¼óìþÛOï˜X8Y9þ±s2üÿG¬Cþ3üg@ fFff.ˆëÿ3üûý÷×ÓO÷|¸ù÷ÿv†ÿ ,Ìl¼%›���•‰íï¿?fRŽöò¾_ÿ|bb`yýì—‰š3+Ô‡Œ,ÌŒ,Ä4â ÿÿ"Í­ÿÿ3°°2>{ð›•E4ÌÞ‡���‰‰ùßÿ ˯N½ÿþ¶œˆ´ƒ‡Ô¦ý+×ÙÂÀÀ‘òQ�efdþñ•áÏ›?6:&£þýÿûþÇ›÷?ß|†¨„ÿÿ"=\ßÿn¤¢£$¡ðÿÿFFfFæÿ ÿ/¼<ÆÍÆóíû/.þÌâ,«le```d`b``0”´º{HTóOØ�ÅWƒl0ÿÿ"­`ddøó›éóëßf¦ ÿýcfbb`dx÷ýÕ›oÏ y…‘‰APŒõâý› ,Ì,ÿýeebWÒaúá,©ðûïˆQܬ¼±º…LŒL>Ü<ùd158ÿÿ"!\ÿÿg`bbøõã?Ã7F]u¨ Æ?Þ~ûý…‰‘é?Ãÿÿÿÿóñ³¼xÿæÃ× �žƒ�ŠÖß!Èÿÿ"1\™~|ûÏðŸU^\š�ÿ¾üúøûï/VîÿÿÿýÿÏÀÁÅüùÇ×�_? p @J$OG½œ¹%/ZÞ-«š1êã�÷‹ÎOæfãýþï‘ÿÿ"9 üúñŸ�™U„_ˆÚXùÏÀÀðýÏ׿ÿÿÂÛ.llŒÿüúúã¬ð”—úòûÅñ ÇàM€o>­¼5á矬LlÜl¼ÄØÿÿ”“1€0 m’ŠÒ00ðÿw¢„TVx€å“OþÚ ‘�bµ¥ÑýýGB”È8ÂGt‘UÕ´ÙXp¢lóÅIöëüÒÿÿ”–I ×ÿ¿×¶ñR/‚ùÁ@2ä× Y{» ]«“€d9#u–¬lÉe+â}ÇN6ÿÿ¢ÉXfò£Jÿÿ"Õ­ÿ™˜ÿÿÿûûJ¬13²002³øÿ ŒÈ¤Á@‘Kÿÿ"Å­ŒÐz‹áïŸo?¿1000@{µ ¬ÌlÈýÏ¿ÿ™`éä?ï¿ßÿÁ2Ùÿÿ"¹ŽecgdøûëÝç� HÝ.fFfˆ³þþùÏÀÄÂɆèå}þõñϿߌŒŒ”Œøÿÿ"٭윌 ž½yÁí0200ð°ñ³0³Ac™‘ñ×Ïì¬ì<œ\p�o¿½üûï/…ã.ÿÿ"Á­�Î?;#ûß›�!Íäÿ�hågâdáþ÷ÿddîû·¼\<|\¼§300<ù|ÿ?jó�Œôÿÿ"-½þûÇÀÂöŸU€åü�« ŒŒL9D„8Eÿþû iˆúð[ZPŒ‡ƒç?¬�zïý5fFä6ʨ?™™ˆ oÿÿ"½Ìbú')Ã~öÖåÏß?3311ügø÷ÿ/ «² Ö¯¿˜˜ÿýczÿú��²Ãß¿˜™>ýøpçývfŽÿÿÃLŒÌ~ÿgþõíÏ'"³ÿÿ"Ù­ÿü—QdùæÁ¡Ë' Ãi öò¾¿ÿüâà`þü–�áÍ¿'?ÈHÛ…—ÇžyÄÁÊþûïï?ÿ200üÿÏ Æ%©)hþé1Ÿ.‡7?‡àŸÿ†.ÿÿ"Í­ŒŒ 3ˆ2²Šý�¹yÄVfFfGyOÕð‡/ŸÙõ:Á?ÍÃÄéÿÿÿLLÌ [ï,ýÿï?/?ËÛÏï^}|Ã:`luX¸-åtàNîÿþ Xÿÿ"½¿ÅÀð÷ß_Ck¾ÍǶî>w�…™ù÷Ÿß©:»éÍæ«7WlšSÔÉÀÀðçÿofFæcOv{²“�‘ODŠé÷Ÿ7톚ÂÀÀÅÁ)*$ÀÈÄ@dÿÿ"¹ÏÍÈÈðç7ƒˆ$£‚1CRgɉi[¤…Å!½.f&v_#†ÿÿýûÿ—•‰íɧ{='JX˜Xþÿc`aÿgäÆÕº¹]R\ØÛÌ…å?Ó§_ïï¾»vàѦ·ß_°2±ìÿÿ"g|€‘‘áç�ÚfœîÛ•®(�mª¡ )\!­&&&F¦ÓÏö·Ë{ûí ÷¿ÿÿb“aáýÚ~>qéci.ŽO?ßøñößÿÜl¼Ää-ÿÿ"sÜ…‘‘áÇ�¿æ<Ϟݛçn%î›á‘h«mÆÈÈ)tûN–­¾6ƒ›•âPˆ–ß¿þ³0³Hˆñ~þýæã—ÌŒ,ú|ëןhmÂÿØF>ÿÿÿÏÂÄÊÃÆ1Ó:ÿÿ¢´ýÊÄÄðçÏ19Æßÿ_/ر†��á÷¿ßÿþÿccæÈ7kŸä±žŸ]èÏÿßÛ¯ŒŒŒ¿ÿýå’’ãSaÀÑÞÿÿ¢B[ûß?¶ºö|}kfž¼~‘�…�á?É�kF¶/¿>9*øq°pýÅQ�ÿÿ¢( @##ïŸÿe”™ÿ1| ›QXænäÈÏÅû÷ÿŸç_þúûƒ‰� #Æ¡³�p7½ýþB]X?F·��çÔÿÿ¢‚[aÎý'§ÌþKîãô›ù+ž ðqòüþ÷ëÛï/ÌŒ,,L¬ Œ L Ìðáö¿ÿþþþûë7tªƒ‘…‰ÅDÊ¡Úz /ÿÿÿÿ°#300ÿÿÂíVˆ·‰nCœËÄÈ")"üçïß/¿?110q°pýûÿ÷ï¿¿þþþýïl†�‡�_‚GV’WNŽOUž_UIPSCØ�…‰õ?Ã\e``ÿÿÂ=_ðR(2r-dúŒ‰‘�‘�‘á?ÿ_¿ÿù™šûóŸá?+7Ÿ8�Œ$�œŸŠ¼€šŸŠ$¯¼§ +Â:†xBÿÿÂêVFn^†?¿ÿ³þcbdd@êyÀÒÄ‚¿ÿÿþþûûÏßßþÿf```abãaå㔆L»)ð«Êñ«JñÈ sI°2±¡Ò¤!#3Áš ÿÿÂ>Ç ™^š´y^~o —(·µ?+33d:óïŸÈ.cåf…L©ÉÊò©(¨Éñ©Hñ*sJ`ΠMg222’Ú¥ÿÿž˜™þýû—ç›ÄÇÁ—15ëý·÷,lŒÌ ¬Ül¼"<’ A non-GUI example
  Home

A non-GUI example

This example shows how to use the single-application functionality in a console application. It does not require the QtGui library at all.

The only differences from the GUI application usage demonstrated in the other examples are:

1) The .pro file should include qtsinglecoreapplication.pri instead of qtsingleapplication.pri

2) The class name is QtSingleCoreApplication instead of QtSingleApplication.

3) No calls are made regarding window activation, for obvious reasons.

console.pro:

 TEMPLATE   = app
 CONFIG    += console
 SOURCES   += main.cpp
 include(../../src/qtsinglecoreapplication.pri)
 QT -= gui

main.cpp:

 /****************************************************************************
 **
 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the Qt Solutions component.
 **
 ** You may use this file under the terms of the BSD license as follows:
 **
 ** "Redistribution and use in source and binary forms, with or without
 ** modification, are permitted provided that the following conditions are
 ** met:
 **   * Redistributions of source code must retain the above copyright
 **     notice, this list of conditions and the following disclaimer.
 **   * 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.
 **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) 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
 ** OWNER 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."
 **
 ****************************************************************************/

 #include "qtsinglecoreapplication.h"
 #include <QtCore/QDebug>

 void report(const QString& msg)
 {
     qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg));
 }

 class MainClass : public QObject
 {
     Q_OBJECT
 public:
     MainClass()
         : QObject()
         {}

 public slots:
     void handleMessage(const QString& message)
         {
             report( "Message received: \"" + message + "\"");
         }
 };

 int main(int argc, char **argv)
 {
     report("Starting up");

     QtSingleCoreApplication app(argc, argv);

     if (app.isRunning()) {
         QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid()));
         bool sentok = app.sendMessage(msg, 2000);
         QString rep("Another instance is running, so I will exit.");
         rep += sentok ? " Message sent ok." : " Message sending failed; the other instance may be frozen.";
         report(rep);
         return 0;
     } else {
         report("No other instance is running; so I will.");
         MainClass mainObj;
         QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
                          &mainObj, SLOT(handleMessage(const QString&)));
         return app.exec();
     }
 }

 #include "main.moc"


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication-example-loader.html0000664000175000017500000001670015160523734032730 0ustar fengfeng Loading Documents
  Home

Loading Documents

The application in this example loads or prints the documents passed as commandline parameters to further instances of this application.

 /****************************************************************************
 **
 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the Qt Solutions component.
 **
 ** You may use this file under the terms of the BSD license as follows:
 **
 ** "Redistribution and use in source and binary forms, with or without
 ** modification, are permitted provided that the following conditions are
 ** met:
 **   * Redistributions of source code must retain the above copyright
 **     notice, this list of conditions and the following disclaimer.
 **   * 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.
 **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) 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
 ** OWNER 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."
 **
 ****************************************************************************/

 #include <qtsingleapplication.h>
 #include <QtCore/QFile>
 #include <QtGui/QMainWindow>
 #include <QtGui/QPrinter>
 #include <QtGui/QPainter>
 #include <QtGui/QTextEdit>
 #include <QtGui/QMdiArea>
 #include <QtCore/QTextStream>

 class MainWindow : public QMainWindow
 {
     Q_OBJECT
 public:
     MainWindow();

 public slots:
     void handleMessage(const QString& message);

 signals:
     void needToShow();

 private:
     QMdiArea *workspace;
 };

The user interface in this application is a QMainWindow subclass with a QMdiArea as the central widget. It implements a slot handleMessage() that will be connected to the messageReceived() signal of the QtSingleApplication class.

 MainWindow::MainWindow()
 {
     workspace = new QMdiArea(this);

     setCentralWidget(workspace);
 }

The MainWindow constructor creates a minimal user interface.

 void MainWindow::handleMessage(const QString& message)
 {
     enum Action {
         Nothing,
         Open,
         Print
     } action;

     action = Nothing;
     QString filename = message;
     if (message.toLower().startsWith("/print ")) {
         filename = filename.mid(7);
         action = Print;
     } else if (!message.isEmpty()) {
         action = Open;
     }
     if (action == Nothing) {
         emit needToShow();
         return;
     }

     QFile file(filename);
     QString contents;
     if (file.open(QIODevice::ReadOnly))
         contents = file.readAll();
     else
         contents = "[[Error: Could not load file " + filename + "]]";

     QTextEdit *view = new QTextEdit;
     view->setPlainText(contents);

     switch(action) {

The handleMessage() slot interprets the message passed in as a filename that can be prepended with /print to indicate that the file should just be printed rather than loaded.

     case Print:
         {
             QPrinter printer;
             view->print(&printer);
             delete view;
         }
         break;

     case Open:
         {
             workspace->addSubWindow(view);
             view->setWindowTitle(message);
             view->show();
             emit needToShow();
         }
         break;
     default:
         break;
     };
 }

Loading the file will also activate the window.

 #include "main.moc"

 int main(int argc, char **argv)
 {
     QtSingleApplication instance("File loader QtSingleApplication example", argc, argv);
     QString message;
     for (int a = 1; a < argc; ++a) {
         message += argv[a];
         if (a < argc-1)
             message += " ";
     }

     if (instance.sendMessage(message))
         return 0;

The main entry point function creates a QtSingleApplication object, and creates a message to send to a running instance of the application. If the message was sent successfully the process exits immediately.

     MainWindow mw;
     mw.handleMessage(message);
     mw.show();

     QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
                      &mw, SLOT(handleMessage(const QString&)));

     instance.setActivationWindow(&mw, false);
     QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow()));

     return instance.exec();
 }

If the message could not be sent the application starts up. Note that false is passed to the call to setActivationWindow() to prevent automatic activation for every message received, e.g. when the application should just print a file. Instead, the message handling function determines whether activation is requested, and signals that by emitting the needToShow() signal. This is then simply connected directly to QtSingleApplication's activateWindow() slot.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsinglecoreapplication.html0000664000175000017500000002356615160523734030714 0ustar fengfeng QtSingleCoreApplication Class Reference
  Home

QtSingleCoreApplication Class Reference

A variant of the QtSingleApplication class for non-GUI applications. More...

 #include <QtSingleCoreApplication>

Inherits QCoreApplication.


Public Functions

QtSingleCoreApplication ( int & argc, char ** argv )
QtSingleCoreApplication ( const QString & appId, int & argc, char ** argv )
QString id () const
bool isRunning ()

Public Slots

bool sendMessage ( const QString & message, int timeout = 5000 )

Signals

void messageReceived ( const QString & message )

Additional Inherited Members


Detailed Description

A variant of the QtSingleApplication class for non-GUI applications.

This class is a variant of QtSingleApplication suited for use in console (non-GUI) applications. It is an extension of QCoreApplication (instead of QApplication). It does not require the QtGui library.

The API and usage is identical to QtSingleApplication, except that functions relating to the "activation window" are not present, for obvious reasons. Please refer to the QtSingleApplication documentation for explanation of the usage.

A QtSingleCoreApplication instance can communicate to a QtSingleApplication instance if they share the same application id. Hence, this class can be used to create a light-weight command-line tool that sends commands to a GUI application.

See also QtSingleApplication.


Member Function Documentation

QtSingleCoreApplication::QtSingleCoreApplication ( int & argc, char ** argv )

Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). argc and argv are passed on to the QCoreAppliation constructor.

QtSingleCoreApplication::QtSingleCoreApplication ( const QString & appId, int & argc, char ** argv )

Creates a QtSingleCoreApplication object with the application identifier appId. argc and argv are passed on to the QCoreAppliation constructor.

QString QtSingleCoreApplication::id () const

Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application.

bool QtSingleCoreApplication::isRunning ()

Returns true if another instance of this application is running; otherwise false.

This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session).

See also sendMessage().

void QtSingleCoreApplication::messageReceived ( const QString & message )   [signal]

This signal is emitted when the current instance receives a message from another instance of this application.

See also sendMessage().

bool QtSingleCoreApplication::sendMessage ( const QString & message, int timeout = 5000 )   [slot]

Tries to send the text message to the currently running instance. The QtSingleCoreApplication object in the running instance will emit the messageReceived() signal when it receives the message.

This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within timeout milliseconds, this function return false.

See also isRunning() and messageReceived().


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsinglecoreapplication-members.html0000664000175000017500000003577715160523734032353 0ustar fengfeng List of All Members for QtSingleCoreApplication
  Home

List of All Members for QtSingleCoreApplication

This is the complete list of members for QtSingleCoreApplication, including inherited members.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication.index0000664000175000017500000003171415160523734030200 0ustar fengfeng ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication-obsolete.html0000664000175000017500000000372115160523734031644 0ustar fengfeng Obsolete Members for QtSingleApplication
  Home

Obsolete Members for QtSingleApplication

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

void initialize ( bool dummy = true )   (obsolete)

Member Function Documentation

void QtSingleApplication::initialize ( bool dummy = true )


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/doc/html/qtsingleapplication.qhp0000664000175000017500000000741115160523734027656 0ustar fengfeng com.nokia.qtsolutions.qtsingleapplication_head qdoc qt solutions qtsingleapplication qt solutions qtsingleapplication
qtsingleapplication.html index.html qtsingleapplication-example-trivial.html qtsinglecoreapplication.html qtsingleapplication-example-loader.html qtsinglecoreapplication-example-console.html classic.css images/qt-logo.png ukui-notification/3rd-parties/qtsingleapplication/doc/html/index.html0000664000175000017500000000527515160523734025075 0ustar fengfeng Single Application
  Home

Single Application

Description

The QtSingleApplication component provides support for applications that can be only started once per user.

For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance.

The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance. For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui.

Classes

Examples

Tested platforms

  • Qt 4.4, 4.5 / Windows XP / MSVC.NET 2005
  • Qt 4.4, 4.5 / Linux / gcc
  • Qt 4.4, 4.5 / MacOS X 10.5 / gcc


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions
ukui-notification/3rd-parties/qtsingleapplication/configure.bat0000664000175000017500000000176215160523734024035 0ustar fengfeng:: Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). :: SPDX-License-Identifier: BSD-3-Clause @echo off rem rem "Main" rem if not "%1"=="" ( if not "%1"=="-library" ( call :PrintUsage goto EOF ) ) if exist config.pri. del config.pri if "%1"=="-library" ( echo Configuring to build this component as a dynamic library. echo SOLUTIONS_LIBRARY = yes > config.pri ) echo . echo This component is now configured. echo . echo To build the component library (if requested) and example(s), echo run qmake and your make or nmake command. echo . echo To remove or reconfigure, run make (nmake) distclean. echo . goto EOF :PrintUsage echo Usage: configure.bat [-library] echo . echo -library: Build the component as a dynamic library (DLL). Default is to echo include the component source directly in the application. echo A DLL may be preferable for technical or licensing (LGPL) reasons. echo . goto EOF :EOF ukui-notification/3rd-parties/qtsingleapplication/common.pri0000664000175000017500000000124715160523734023366 0ustar fengfengexists(config.pri):infile(config.pri, SOLUTIONS_LIBRARY, yes): CONFIG += qtsingleapplication-uselib TEMPLATE += fakelib greaterThan(QT_MAJOR_VERSION, 5)|\ if(equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 4))|\ if(equals(QT_MAJOR_VERSION, 5):equals(QT_MINOR_VERSION, 4):greaterThan(QT_PATCH_VERSION, 1)) { QTSINGLEAPPLICATION_LIBNAME = $$qt5LibraryTarget(QtSolutions_SingleApplication-head) } else { QTSINGLEAPPLICATION_LIBNAME = $$qtLibraryTarget(QtSolutions_SingleApplication-head) } TEMPLATE -= fakelib QTSINGLEAPPLICATION_LIBDIR = $$PWD/lib unix:qtsingleapplication-uselib:!qtsingleapplication-buildlib:QMAKE_RPATHDIR += $$QTSINGLEAPPLICATION_LIBDIR ukui-notification/3rd-parties/qtsingleapplication/qtsingleapplication.pro0000664000175000017500000000016515160523734026154 0ustar fengfengTEMPLATE=subdirs CONFIG += ordered include(common.pri) qtsingleapplication-uselib:SUBDIRS=buildlib SUBDIRS+=examples ukui-notification/3rd-parties/qtsingleapplication/README.TXT0000664000175000017500000000164115160523734022716 0ustar fengfengQt Solutions Component: Single Application The QtSingleApplication component provides support for applications that can be only started once per user. Version history: 2.0: - Version 1.3 ported to Qt 4. 2.1: - Fix compilation problem on Mac. 2.2: - Really fix the Mac compilation problem. - Mac: fix crash due to wrong object releasing. - Mac: Fix memory leak. 2.3: - Windows: Force creation of internal widget to make it work with Qt 4.2. 2.4: - Fix the system for automatic window raising on message reception. NOTE: minor API change. 2.5: - Mac: Fix isRunning() to work and report correctly. 2.6: - - initialize() is now obsolete, no longer necessary to call it - - Fixed race condition where multiple instances migth be started - - QtSingleCoreApplication variant provided for non-GUI (console) usage - Complete reimplementation. Visible changes: - LGPL release. ukui-notification/3rd-parties/qtsingleapplication/INSTALL.TXT0000664000175000017500000002237415160523734023075 0ustar fengfengINSTALLATION INSTRUCTIONS These instructions refer to the package you are installing as some-package.tar.gz or some-package.zip. The .zip file is intended for use on Windows. The directory you choose for the installation will be referred to as your-install-dir. Note to Qt Visual Studio Integration users: In the instructions below, instead of building from command line with nmake, you can use the menu command 'Qt->Open Solution from .pro file' on the .pro files in the example and plugin directories, and then build from within Visual Studio. Unpacking and installation -------------------------- 1. Unpacking the archive (if you have not done so already). On Unix and Mac OS X (in a terminal window): cd your-install-dir gunzip some-package.tar.gz tar xvf some-package.tar This creates the subdirectory some-package containing the files. On Windows: Unpack the .zip archive by right-clicking it in explorer and choosing "Extract All...". If your version of Windows does not have zip support, you can use the infozip tools available from www.info-zip.org. If you are using the infozip tools (in a command prompt window): cd your-install-dir unzip some-package.zip 2. Configuring the package. The configure script is called "configure" on unix/mac and "configure.bat" on Windows. It should be run from a command line after cd'ing to the package directory. You can choose whether you want to use the component by including its source code directly into your project, or build the component as a dynamic shared library (DLL) that is loaded into the application at run-time. The latter may be preferable for technical or licensing (LGPL) reasons. If you want to build a DLL, run the configure script with the argument "-library". Also see the note about usage below. (Components that are Qt plugins, e.g. styles and image formats, are by default built as a plugin DLL.) The configure script will prompt you in some cases for further information. Answer these questions and carefully read the license text before accepting the license conditions. The package cannot be used if you do not accept the license conditions. 3. Building the component and examples (when required). If a DLL is to be built, or if you would like to build the examples, next give the commands qmake make [or nmake if your are using Microsoft Visual C++] The example program(s) can be found in the directory called "examples" or "example". Components that are Qt plugins, e.g. styles and image formats, are ready to be used as soon as they are built, so the rest of this installation instruction can be skipped. 4. Building the Qt Designer plugin (optional). Some of the widget components are provided with plugins for Qt Designer. To build and install the plugin, cd into the some-package/plugin directory and give the commands qmake make [or nmake if your are using Microsoft Visual C++] Restart Qt Designer to make it load the new widget plugin. Note: If you are using the built-in Qt Designer from the Qt Visual Studio Integration, you will need to manually copy the plugin DLL file, i.e. copy %QTDIR%\plugins\designer\some-component.dll to the Qt Visual Studio Integration plugin path, typically: C:\Program Files\Trolltech\Qt VS Integration\plugins Note: If you for some reason are using a Qt Designer that is built in debug mode, you will need to build the plugin in debug mode also. Edit the file plugin.pro in the plugin directory, changing 'release' to 'debug' in the CONFIG line, before running qmake. Solutions components are intended to be used directly from the package directory during development, so there is no 'make install' procedure. Using a component in your project --------------------------------- To use this component in your project, add the following line to the project's .pro file (or do the equivalent in your IDE): include(your-install-dir/some-package/src/some-package.pri) This adds the package's sources and headers to the SOURCES and HEADERS project variables respectively (or, if the component has been configured as a DLL, it adds that library to the LIBS variable), and updates INCLUDEPATH to contain the package's src directory. Additionally, the .pri file may include some dependencies needed by the package. To include a header file from the package in your sources, you can now simply use: #include or alternatively, in pre-Qt 4 style: #include Refer to the documentation to see the classes and headers this components provides. Install documentation (optional) -------------------------------- The HTML documentation for the package's classes is located in the your-install-dir/some-package/doc/html/index.html. You can open this file and read the documentation with any web browser. To install the documentation into Qt Assistant (for Qt version 4.4 and later): 1. In Assistant, open the Edit->Preferences dialog and choose the Documentation tab. Click the Add... button and select the file your-install-dir/some-package/doc/html/some-package.qch For Qt versions prior to 4.4, do instead the following: 1. The directory your-install-dir/some-package/doc/html contains a file called some-package.dcf. Execute the following commands in a shell, command prompt or terminal window: cd your-install-dir/some-package/doc/html/ assistant -addContentFile some-package.dcf The next time you start Qt Assistant, you can access the package's documentation. Removing the documentation from assistant ----------------------------------------- If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later: 1. In Assistant, open the Edit->Preferences dialog and choose the Documentation tab. In the list of Registered Documentation, select the item com.nokia.qtsolutions.some-package_version, and click the Remove button. For Qt versions prior to 4.4, do instead the following: 1. The directory your-install-dir/some-package/doc/html contains a file called some-package.dcf. Execute the following commands in a shell, command prompt or terminal window: cd your-install-dir/some-package/doc/html/ assistant -removeContentFile some-package.dcf Using the component as a DLL ---------------------------- 1. Normal components The shared library (DLL) is built and placed in the some-package/lib directory. It is intended to be used directly from there during development. When appropriate, both debug and release versions are built, since the run-time linker will in some cases refuse to load a debug-built DLL into a release-built application or vice versa. The following steps are taken by default to help the dynamic linker to locate the DLL at run-time (during development): Unix: The some-package.pri file will add linker instructions to add the some-package/lib directory to the rpath of the executable. (When distributing, or if your system does not support rpath, you can copy the shared library to another place that is searched by the dynamic linker, e.g. the "lib" directory of your Qt installation.) Mac: The full path to the library is hardcoded into the library itself, from where it is copied into the executable at link time, and ready by the dynamic linker at run-time. (When distributing, you will want to edit these hardcoded paths in the same way as for the Qt DLLs. Refer to the document "Deploying an Application on Mac OS X" in the Qt Reference Documentation.) Windows: the .dll file(s) are copied into the "bin" directory of your Qt installation. The Qt installation will already have set up that directory to be searched by the dynamic linker. 2. Plugins For Qt Solutions plugins (e.g. image formats), both debug and release versions of the plugin are built by default when appropriate, since in some cases the release Qt library will not load a debug plugin, and vice versa. The plugins are automatically copied into the plugins directory of your Qt installation when built, so no further setup is required. Plugins may also be built statically, i.e. as a library that will be linked into your application executable, and so will not need to be redistributed as a separate plugin DLL to end users. Static building is required if Qt itself is built statically. To do it, just add "static" to the CONFIG variable in the plugin/plugin.pro file before building. Refer to the "Static Plugins" section in the chapter "How to Create Qt Plugins" for explanation of how to use a static plugin in your application. The source code of the example program(s) will also typically contain the relevant instructions as comments. Uninstalling ------------ The following command will remove any fils that have been automatically placed outside the package directory itself during installation and building make distclean [or nmake if your are using Microsoft Visual C++] If Qt Assistant documentation or Qt Designer plugins have been installed, they can be uninstalled manually, ref. above. Enjoy! :) - The Qt Solutions Team. ukui-notification/3rd-parties/qtsingleapplication/examples/0000775000175000017500000000000015160523734023174 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/examples/examples.pro0000664000175000017500000000011115160523734025525 0ustar fengfengTEMPLATE = subdirs SUBDIRS = trivial \ loader \ console ukui-notification/3rd-parties/qtsingleapplication/examples/trivial/0000775000175000017500000000000015160523734024646 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/examples/trivial/trivial.qdoc0000664000175000017500000000271115160523734027171 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause /*! \page qtsingleapplication-example-trivial.html \title A Trivial Example The application in this example has a log-view that displays messages sent by further instances of the same application. The example demonstrates the use of the QtSingleApplication class to detect and communicate with a running instance of the application using the sendMessage() API. The messageReceived() signal is used to display received messages in a QTextEdit log. \quotefromfile trivial/main.cpp \printuntil instance The example has only the \c main entry point function. A QtSingleApplication object is created immediately. \printuntil return If another instance of this application is already running, sendMessage() will succeed, and this instance just exits immediately. \printuntil show() Otherwise the instance continues as normal and creates the user interface. \printuntil return instance.exec(); The \c logview object is also set as the application's activation window. Every time a message is received, the window will be raised and activated automatically. The messageReceived() signal is also connected to the QTextEdit's append() slot. Every message received from further instances of this application will be displayed in the log. Finally the event loop is entered. */ ukui-notification/3rd-parties/qtsingleapplication/examples/trivial/trivial.pro0000664000175000017500000000012115160523734027034 0ustar fengfengTEMPLATE = app include(../../src/qtsingleapplication.pri) SOURCES += main.cpp ukui-notification/3rd-parties/qtsingleapplication/examples/trivial/main.cpp0000664000175000017500000000145215160523734026300 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include #include class TextEdit : public QTextEdit { Q_OBJECT public: TextEdit(QWidget *parent = 0) : QTextEdit(parent) {} public slots: void append(const QString &str) { QTextEdit::append(str); } }; #include "main.moc" int main(int argc, char **argv) { QtSingleApplication instance(argc, argv); if (instance.sendMessage("Wake up!")) return 0; TextEdit logview; logview.setReadOnly(true); logview.show(); instance.setActivationWindow(&logview); QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), &logview, SLOT(append(const QString&))); return instance.exec(); } ukui-notification/3rd-parties/qtsingleapplication/examples/loader/0000775000175000017500000000000015160523734024442 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/examples/loader/loader.pro0000664000175000017500000000020615160523734026430 0ustar fengfenggreaterThan(QT_MAJOR_VERSION, 4): QT += printsupport TEMPLATE = app include(../../src/qtsingleapplication.pri) SOURCES += main.cpp ukui-notification/3rd-parties/qtsingleapplication/examples/loader/file1.qsl0000664000175000017500000000000715160523734026160 0ustar fengfengFile 1 ukui-notification/3rd-parties/qtsingleapplication/examples/loader/main.cpp0000664000175000017500000000432415160523734026075 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include #include #include #include #include #include #include #include class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(); public slots: void handleMessage(const QString& message); signals: void needToShow(); private: QMdiArea *workspace; }; MainWindow::MainWindow() { workspace = new QMdiArea(this); setCentralWidget(workspace); } void MainWindow::handleMessage(const QString& message) { enum Action { Nothing, Open, Print } action; action = Nothing; QString filename = message; if (message.toLower().startsWith("/print ")) { filename = filename.mid(7); action = Print; } else if (!message.isEmpty()) { action = Open; } if (action == Nothing) { emit needToShow(); return; } QFile file(filename); QString contents; if (file.open(QIODevice::ReadOnly)) contents = file.readAll(); else contents = "[[Error: Could not load file " + filename + "]]"; QTextEdit *view = new QTextEdit; view->setPlainText(contents); switch(action) { case Print: { QPrinter printer; view->print(&printer); delete view; } break; case Open: { workspace->addSubWindow(view); view->setWindowTitle(message); view->show(); emit needToShow(); } break; default: break; }; } #include "main.moc" int main(int argc, char **argv) { QtSingleApplication instance("File loader QtSingleApplication example", argc, argv); QString message; for (int a = 1; a < argc; ++a) { message += argv[a]; if (a < argc-1) message += " "; } if (instance.sendMessage(message)) return 0; MainWindow mw; mw.handleMessage(message); mw.show(); QObject::connect(&instance, SIGNAL(messageReceived(const QString&)), &mw, SLOT(handleMessage(const QString&))); instance.setActivationWindow(&mw, false); QObject::connect(&mw, SIGNAL(needToShow()), &instance, SLOT(activateWindow())); return instance.exec(); } ukui-notification/3rd-parties/qtsingleapplication/examples/loader/file2.qsl0000664000175000017500000000000715160523734026161 0ustar fengfengFile 2 ukui-notification/3rd-parties/qtsingleapplication/examples/loader/loader.qdoc0000664000175000017500000000335515160523734026566 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause /*! \page qtsingleapplication-example-loader.html \title Loading Documents The application in this example loads or prints the documents passed as commandline parameters to further instances of this application. \quotefromfile loader/main.cpp \printuntil }; The user interface in this application is a QMainWindow subclass with a QMdiArea as the central widget. It implements a slot \c handleMessage() that will be connected to the messageReceived() signal of the QtSingleApplication class. \printuntil } The MainWindow constructor creates a minimal user interface. \printto case Print: The handleMessage() slot interprets the message passed in as a filename that can be prepended with \e /print to indicate that the file should just be printed rather than loaded. \printto #include Loading the file will also activate the window. \printto mw The \c main entry point function creates a QtSingleApplication object, and creates a message to send to a running instance of the application. If the message was sent successfully the process exits immediately. \printuntil } If the message could not be sent the application starts up. Note that \c false is passed to the call to setActivationWindow() to prevent automatic activation for every message received, e.g. when the application should just print a file. Instead, the message handling function determines whether activation is requested, and signals that by emitting the needToShow() signal. This is then simply connected directly to QtSingleApplication's activateWindow() slot. */ ukui-notification/3rd-parties/qtsingleapplication/examples/console/0000775000175000017500000000000015160523734024636 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/examples/console/console.pro0000664000175000017500000000016515160523734027024 0ustar fengfengTEMPLATE = app CONFIG += console SOURCES += main.cpp include(../../src/qtsinglecoreapplication.pri) QT -= gui ukui-notification/3rd-parties/qtsingleapplication/examples/console/console.qdoc0000664000175000017500000000150115160523734027145 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause /*! \page qtsinglecoreapplication-example-console.html \title A non-GUI example This example shows how to use the single-application functionality in a console application. It does not require the \c QtGui library at all. The only differences from the GUI application usage demonstrated in the other examples are: 1) The \c.pro file should include \c qtsinglecoreapplication.pri instead of \c qtsingleapplication.pri 2) The class name is \c QtSingleCoreApplication instead of \c QtSingleApplication. 3) No calls are made regarding window activation, for obvious reasons. console.pro: \quotefile console/console.pro main.cpp: \quotefile console/main.cpp */ ukui-notification/3rd-parties/qtsingleapplication/examples/console/main.cpp0000664000175000017500000000245615160523734026275 0ustar fengfeng// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). // SPDX-License-Identifier: BSD-3-Clause #include "qtsinglecoreapplication.h" #include void report(const QString& msg) { qDebug("[%i] %s", (int)QCoreApplication::applicationPid(), qPrintable(msg)); } class MainClass : public QObject { Q_OBJECT public: MainClass() : QObject() {} public slots: void handleMessage(const QString& message) { report( "Message received: \"" + message + "\""); } }; int main(int argc, char **argv) { report("Starting up"); QtSingleCoreApplication app(argc, argv); if (app.isRunning()) { QString msg(QString("Hi master, I am %1.").arg(QCoreApplication::applicationPid())); bool sentok = app.sendMessage(msg, 2000); QString rep("Another instance is running, so I will exit."); rep += sentok ? " Message sent ok." : " Message sending failed; the other instance may be frozen."; report(rep); return 0; } else { report("No other instance is running; so I will."); MainClass mainObj; QObject::connect(&app, SIGNAL(messageReceived(const QString&)), &mainObj, SLOT(handleMessage(const QString&))); return app.exec(); } } #include "main.moc" ukui-notification/3rd-parties/qtsingleapplication/buildlib/0000775000175000017500000000000015160523734023144 5ustar fengfengukui-notification/3rd-parties/qtsingleapplication/buildlib/buildlib.pro0000664000175000017500000000072115160523734025454 0ustar fengfengTEMPLATE=lib CONFIG += qt dll qtsingleapplication-buildlib mac:CONFIG += absolute_library_soname win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all include(../src/qtsingleapplication.pri) TARGET = $$QTSINGLEAPPLICATION_LIBNAME DESTDIR = $$QTSINGLEAPPLICATION_LIBDIR win32 { DLLDESTDIR = $$[QT_INSTALL_BINS] QMAKE_DISTCLEAN += $$[QT_INSTALL_BINS]\\$${QTSINGLEAPPLICATION_LIBNAME}.dll } target.path = $$DESTDIR INSTALLS += target ukui-notification/3rd-parties/qtsingleapplication/configure0000775000175000017500000000126115160523734023265 0ustar fengfeng#!/bin/sh if [ "x$1" != "x" -a "x$1" != "x-library" ]; then echo "Usage: $0 [-library]" echo echo "-library: Build the component as a dynamic library (DLL). Default is to" echo " include the component source code directly in the application." echo exit 0 fi rm -f config.pri if [ "x$1" = "x-library" ]; then echo "Configuring to build this component as a dynamic library." echo "SOLUTIONS_LIBRARY = yes" > config.pri fi echo echo "This component is now configured." echo echo "To build the component library (if requested) and example(s)," echo "run qmake and your make command." echo echo "To remove or reconfigure, run make distclean." echo