pax_global_header00006660000000000000000000000064137502163320014514gustar00rootroot0000000000000052 comment=4e82f982720f74080233cc9a3070aa89ac78502b dde-calendar-5.7.0.23/000077500000000000000000000000001375021633200142535ustar00rootroot00000000000000dde-calendar-5.7.0.23/.gitignore000066400000000000000000000011741375021633200162460ustar00rootroot00000000000000# Compiled Object files *.slo *.lo *.o # Compiled Dynamic libraries *.so *.dylib # Compiled Static libraries *.lai *.la *.a build*/ *.pro.user* *.DS_Store *.core *.autosave # qm file is auto generate from .ts file *.qm # vim tmp file *.swp .vscode/ build/ debian/dde-calendar/usr/share/icons/hicolor/scalable/apps/dde-calendar.svg debian/dde-calendar/usr/share/doc/dde-calendar/copyright debian/dde-calendar/usr/share/doc/dde-calendar/changelog.gz .qmake.stash dde-calendar Makefile debian/dde-calendar.debhelper.log debian/dde-calendar.substvars debian/files debian/files debian/dde-calendar.substvars CMakeLists.txt.user *.user.*dde-calendar-5.7.0.23/.project.json000066400000000000000000000004221375021633200166700ustar00rootroot00000000000000{ "type": "homebrew", "3rdparty": [], "ignore": ["debian", ".tx", "assets", "translations", ".git", "README.md", "*.conf", "CMakeLists.txt", "*.user", "*.o", "*.desktop", "*.qrc", "*.svg", "*.png", "*.qm", "*.ts", "LICENSE", "*.pro"], "license": ["GPLv3"] }dde-calendar-5.7.0.23/.transifexrc000066400000000000000000000002601375021633200166020ustar00rootroot00000000000000[https://www.transifex.com] api_hostname = https://api.transifex.com hostname = https://www.transifex.com password = 1/2847330938c2eebc627c8dd113ba4f58aeb3fd3d username = api dde-calendar-5.7.0.23/.tx/000077500000000000000000000000001375021633200147645ustar00rootroot00000000000000dde-calendar-5.7.0.23/.tx/config000066400000000000000000000006501375021633200161550ustar00rootroot00000000000000[main] host = https://www.transifex.com minimum_perc = 80 mode = developer [deepin-desktop-environment.dde-calendar] file_filter = translations/dde-calendar_.ts source_file = translations/dde-calendar_en_US.ts source_lang = en_US type = QT [deepin-desktop-environment.dde-calendar_desktop] file_filter = translations/desktop/desktop_.ts source_file = translations/desktop/desktop.ts source_lang = en type = QT dde-calendar-5.7.0.23/CMakeLists.txt000066400000000000000000000071071375021633200170200ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.7) if (NOT DEFINED VERSION) set(VERSION 1.2.2) endif () #common resource names set(APP_RES_DIR "assets") set(APP_BIN_NAME "dde-calendar") set(APP_TRANS_SCRIPT "${APP_RES_DIR}/translate_generation.sh") set(APP_DESKTOP "${APP_RES_DIR}/dde-calendar.desktop") set(APP_QRC "${APP_RES_DIR}/resources.qrc") set(APP_SERVICE "${APP_RES_DIR}/dbus/com.deepin.Calendar.service") project(${APP_BIN_NAME}) set(CMAKE_CXX_STANDARD 11) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_FLAGS "-Wl,--as-needed -fPIE") set(CMAKE_EXE_LINKER_FLAGS "-pie") if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee") elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -Wl,--as-needed") endif () #compile flags if (CMAKE_BUILD_TYPE MATCHES Debug) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra") # Enable Qt builtin debug mode add_definitions("-DQT_MESSAGELOGCONTEXT") else() # -Wl, -O2 Enable linker optimizations # -Wl, --gc-sections Remove unused code resulting from -fdsta-sections and # -ffunction-sections set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") endif() #Generate the qm file execute_process(COMMAND bash ${APP_TRANS_SCRIPT} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/") macro(SUBDIRLIST result curdir) file(GLOB children RELATIVE ${curdir} ${curdir}/*) set(dirlist "") foreach(child ${children}) if(IS_DIRECTORY ${curdir}/${child}) LIST(APPEND dirlist ${child}) endif() endforeach() set(${result} ${dirlist}) endmacro() configure_file(${APP_RES_DIR}/environments.h.in environments.h @ONLY) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) SUBDIRLIST(all_src ${CMAKE_CURRENT_SOURCE_DIR}/src) #Include all app own subdirectorys foreach(subdir ${all_src}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/${subdir}) endforeach() file(GLOB_RECURSE Calendar_SRC ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) find_package(PkgConfig REQUIRED) find_package(DtkCore REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5Widgets REQUIRED) find_package(Qt5Svg REQUIRED) find_package(Qt5DBus REQUIRED) find_package(Qt5Svg REQUIRED) find_package(DtkWidget REQUIRED) find_package(DtkGui REQUIRED) find_package(DFrameworkdbus REQUIRED) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) # Tell CMake to create the executable add_executable(${PROJECT_NAME} ${Calendar_SRC} ${APP_QRC}) target_include_directories(${PROJECT_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR}) target_link_libraries(${PROJECT_NAME} ${DtkWidget_LIBRARIES} ${DtkCore_LIBRARIES} ${DtkGui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5DBus_LIBRARIES} ${DFrameworkdbus_LIBRARIES} ) set(CMAKE_INSTALL_PREFIX /usr) # Install files install(TARGETS dde-calendar DESTINATION bin) file(GLOB APP_QM_FILES "translations/*.qm") #install(FILES /usr/share/icons/bloom/apps/96/dde-calendar.svg # DESTINATION /share/icons/hicolor/scalable/apps/) install(FILES ${APP_QM_FILES} DESTINATION share/dde-calendar/translations) install(FILES ${APP_DESKTOP} DESTINATION share/applications) install(FILES ${APP_SERVICE} DESTINATION share/dbus-1/services) add_subdirectory(schedule-plugin) dde-calendar-5.7.0.23/LICENSE000066400000000000000000001045051375021633200152650ustar00rootroot00000000000000 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. {one line to give the program's name and a brief idea of what it does.} Copyright (C) {year} {name of author} 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: {project} Copyright (C) {year} {fullname} 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 . dde-calendar-5.7.0.23/README.md000066400000000000000000000000711375021633200155300ustar00rootroot00000000000000# dde-calendar Calendar for Deepin Desktop Environment. dde-calendar-5.7.0.23/assets/000077500000000000000000000000001375021633200155555ustar00rootroot00000000000000dde-calendar-5.7.0.23/assets/dbus/000077500000000000000000000000001375021633200165125ustar00rootroot00000000000000dde-calendar-5.7.0.23/assets/dbus/com.deepin.Calendar.service000066400000000000000000000001041375021633200236200ustar00rootroot00000000000000[D-BUS Service] Name=com.deepin.Calendar Exec=/usr/bin/dde-calendar dde-calendar-5.7.0.23/assets/dbus/com.deepin.Calendar.xml000066400000000000000000000003221375021633200227620ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/dde-calendar.desktop000066400000000000000000000167531375021633200214670ustar00rootroot00000000000000[Desktop Entry] Categories=Application;Utility;Calendar; Comment=Calendar is a date tool. Exec=dde-calendar GenericName=Calendar Icon=dde-calendar Name=Deepin Calendar StartupNotify=false Terminal=false Type=Application X-Deepin-Vendor=deepin X-MultipleArgs=false X-Deepin-TurboType=dtkwidget # Translations: # Do not manually modify! Comment[am_ET]=ቀን መቁጠሪያ Comment[ar]=التقويم هو أداة عرض التاريخ . Comment[ast]=Calendariu ye una ferramienta de dates. Comment[az]=Kalendar tarix alətidir Comment[bg]=Календарът е приложение за показване на датата. Comment[bn]=ক্যালেন্ডার একটি তারিখ টুল Comment[bo]=ལོ་ཐོ་ནི་ཚེས་གྲངས་ལྟ་བའི་ཡོ་བྱད་ཆུང་ཆུང་ཞིག་རེད། Comment[ca]=El calendari és una eina de cites. Comment[cs]=Kalendář je nástroj pro práci s daty. Comment[da]=Kalender er et datoværktøj. Comment[de]=Kalender ist ein Datumswerkzeug. Comment[el]=Εφαρμογή Ημερολογίου Comment[en_AU]=Calendar is a date tool. Comment[en_GB]=Calendar is a date tool Comment[eo]=Kalendaro estas datilo. Comment[es]=Calendario de Deepin es una herramienta de gestión de eventos. Comment[et]=Kalender on kuupäeva tööriist. Comment[fa]=تقویم یک ابزار تاریخ است. Comment[fi]=Kalenteri on ajankäytön apuohjelma. Comment[fr]=Simple calendrier. Comment[gl_ES]=O calendario é unha ferramenta de datas. Comment[hi_IN]=दिनदर्शिका तिथि हेतु एक साधन है। Comment[hr]=Kalendar je alat za rad sa vremenom. Comment[hu]=A Naptár egy dátum megjelenítő eszköz. Comment[id]=Kalender adalah sebuah peralatan penanggalan. Comment[it]=Calendario è un tool calendario. Localizzazione italiana a cura di Carofano Massimo Antonio. Comment[ja]=カレンダーは日時ツールです。 Comment[kn_IN]=ಕ್ಯಾಲೆಂಡರ್ ಒಂದು ದಿನದರ್ಶಕವಾಗಿದೆ. Comment[ko]=달력은 날짜 도구입니다. Comment[ku]=Salname navgîneke tarîxê ye. Comment[ku_IQ]=ساڵنامە ئامرازێکی بەروارە Comment[lt]=Kalendorius yra datų įrankis. Comment[lv]=Kalendārs ir datumu rīks. Comment[ml]=കലണ്ടർ ഒരു തീയതി ഉപകരണം ആണ് Comment[mn]=Хуанли нь огноо, цагалбарын хэрэгсэл. Comment[ms]=Kalendar merupakan alat tarikh. Comment[nb]=Kalander er et redskap for å organisere hendelser etter dato og klokkeslett. Comment[ne]=क्यालेन्डर एक मिति उपकरण हो। Comment[nl]=Kalender is een hulpmiddel voor het bijhouden van afspraken. Comment[pa]=ਕੈਲੰਡਰ ਤਾਰੀਖ ਸਾਧਨ ਹੈ। Comment[pl]=Kalendarz to narzędzie zarządzania czasem. Comment[pt]=O Calendário é uma ferramenta de data. Comment[pt_BR]=O Calendário é uma ferramenta que permite agendar e visualizar eventos. Comment[ro]=Calendarul este un instrument pentru date Comment[ru]=Календарь является приложением для планирования Вашего времени. Comment[si]=දින දසුන දින මෙවලමකි. Comment[sk]=Kalendár je dátumový nástroj. Comment[sl]=Koledar je orodje za urejanje datumov. Comment[sq]=Kalendari është një mjet datash. Comment[sr]=Календар је алат за приказивање датума. Comment[sv]=Kalender är ett datumverktyg. Comment[sw]=Kalenda ni chombo ya tarehe Comment[ta]=அட்டவணை தேதி கருவியாகும் Comment[tr]=Takvim, tarihi görüntüleyen bir araçtır. Comment[ug]=كالىندار ئۇ ۋاقىت قۇرالى Comment[uk]=Календар Comment[vi]=Lịch là một công cụ ngày tháng. Comment[zh_CN]=日历是一款查看日期的小工具。 Comment[zh_HK]=日曆是一款查看日期的小工具。 Comment[zh_TW]=簡易日期顯示工具 GenericName[am_ET]=ቀን መቁጠሪያ GenericName[ar]=التقويم GenericName[ast]=Calendariu GenericName[az]=Kalendar GenericName[bg]=Календар GenericName[bn]=ক্যালেন্ডার GenericName[bo]=ལོ་ཐོ། GenericName[ca]=Calendari GenericName[cs]=Kalendář GenericName[da]=Kalender GenericName[de]=Kalender GenericName[el]=Ημερολόγιο GenericName[en_AU]=Calendar GenericName[en_GB]=Calendar GenericName[eo]=Kalendaro GenericName[es]=Calendario GenericName[et]=Kalender GenericName[fa]=تقویم GenericName[fi]=Kalenteri GenericName[fr]=Calendrier GenericName[gl_ES]=Calendario GenericName[hi_IN]=दिनदर्शिका GenericName[hr]=Kalendar GenericName[hu]=Naptár GenericName[id]=Kalender GenericName[it]=Calendario GenericName[ja]=カレンダー GenericName[ko]=달력 GenericName[ku]=Salname GenericName[ku_IQ]=Salname GenericName[lt]=Kalendorius GenericName[lv]=Kalendārs GenericName[ml]=കലണ്ടർ GenericName[mn]=Хуанли GenericName[ms]=Kalendar GenericName[nb]=Kalender GenericName[ne]=क्यालेन्डर GenericName[nl]=Kalender GenericName[pa]=ਕੈਲੰਡਰ GenericName[pl]=Kalendarz GenericName[pt]=Calendário GenericName[pt_BR]=Calendário GenericName[ro]=Calendar GenericName[ru]=Календарь GenericName[si]=දින දසුන GenericName[sk]=Kalendár GenericName[sl]=Koledar GenericName[sq]=Kalendar GenericName[sr]=Календар GenericName[sv]=Kalender GenericName[sw]=Kalenda GenericName[tr]=Takvim GenericName[ug]=كالىندار GenericName[uk]=Календар GenericName[vi]=Lịch GenericName[zh_CN]=日历 GenericName[zh_HK]=日曆 GenericName[zh_TW]=日曆 Name[am_ET]=ዲፕኢን ቀን መቁጠሪያ Name[ar]=تقويم ديبين Name[ast]=Deepin Calendar Name[az]=Deepin Kalendarı Name[bg]=Deepin Календар Name[bn]=ডিপিন ক্যালেন্ডার Name[bo]=གྲ་རྒྱས་པའི་ལོ་ཐོ། Name[ca]=Calendari del Deepin Name[cs]=Kalendář Name[da]=Deepin kalender Name[de]=Deepin Kalender Name[el]=Ημερολόγιο Deepin Name[en_AU]=Deepin Calendar Name[en_GB]=Deepin Calendar Name[eo]=Deepin kalendaro Name[es]=Calendario Name[et]=Deepin Kalender Name[fa]=تقویم Deepin Name[fi]=Deepin kalenteri Name[fr]=Calendrier Deepin Name[gl_ES]=Calendario do Deepin Name[hi_IN]=डीपिन दिनदर्शिका Name[hr]=Deepin kalendar Name[hu]=Deepin Naptár Name[id]=Kalender Deepin Name[it]=Calendario di Deepin Name[ja]=Deepin カレンダー Name[kn_IN]=ಡೀಪಿನ್ ಕ್ಯಾಲೆಂಡರ್ Name[ko]=Deepin 달력 Name[ku]=Salnameya Deepin Name[ku_IQ]=ساڵنامەی Deepin Name[lt]=Deepin kalendorius Name[lv]=Deepin kalendārs Name[ml]=ഡീപിൻ കലണ്ടർ Name[mn]=Деепин Хуанли Name[ms]=Kalendar Deepin Name[nb]=Deepin Kalender Name[ne]=डिपिन क्यालेन्डर Name[nl]=Deepin Kalender Name[pa]=ਡੀਪਿਨ ਕੈਲੰਡਰ Name[pl]=Kalendarz Deepin Name[pt]=Calendário Deepin Name[pt_BR]=deepin Calendário Name[ro]=Calendarul Deepin Name[ru]=Календарь Deepin Name[si]=Deepin දින දසුන Name[sk]=Deepin Kalendár Name[sl]=Koledar Deepin Name[sq]=Kalendar Deepin Name[sr]=Дипин Календар Name[sv]=Deepin kalender Name[sw]=Kalenda ya Deepin Name[ta]=டீபின் நாள்காட்டி Name[tr]=Deepin Takvim Name[ug]=Deepin كالىندارى Name[uk]=Календар Deepin Name[vi]=Lịch Deepin Name[zh_CN]=深度日历 Name[zh_HK]=深度日曆 Name[zh_TW]=Deepin 日曆 dde-calendar-5.7.0.23/assets/environments.h.in000066400000000000000000000001651375021633200210640ustar00rootroot00000000000000#ifndef __ENVIRONMENTS_H_ #define __ENVIRONMENTS_H_ #define VERSION "@VERSION@" #endif // __ENVIRONMENTS_H_ dde-calendar-5.7.0.23/assets/resources.qrc000066400000000000000000000123731375021633200203040ustar00rootroot00000000000000 resources/dde-calendar.qss resources/icon/dde-calendar.svg resources/icon/dde-calendar_96.png resources/icon/dde-calendar_48.png resources/icon/next_disabled.svg resources/icon/next_hover.svg resources/icon/next_normal.svg resources/icon/next_press.svg resources/icon/previous_disabled.svg resources/icon/previous_hover.svg resources/icon/previous_normal.svg resources/icon/previous_press.svg resources/icon/today_hover.svg resources/icon/today_normal.svg resources/icon/today_press.svg resources/icon/dde-ji.svg resources/icon/dde-ban.svg resources/icon/dde-logo.svg resources/icon/dde-xiu.svg resources/icon/dde-yi.svg resources/icon/dde-choose24.svg resources/icon/dde-choose30.svg resources/icon/choose20X20_checked .svg resources/icon/icon_ji.svg resources/icon/icon_type_life.svg resources/icon/type_xiu.svg resources/icon/search_type_work.svg resources/icon/icon_type_other.svg resources/icon/choose30X30_checked .svg resources/icon/icon_yi.svg resources/icon/search_type_life.svg resources/icon/search_type_other.svg resources/icon/type_ban_bg.svg resources/icon/type_ban.svg resources/icon/icon_type_work.svg resources/icon/data_line_checked.svg resources/icon/type_xiu_bg.svg resources/icon/data_day_line.svg resources/icon/checkbox_checked .svg resources/icon/checkbox_unchecked .svg resources/icon/uos_logo.svg resources/icon/oval.svg resources/icon/darkchoose30X30_checked .svg resources/icon/darkchoose20X20_checked .svg resources/icon/dark_ban_bg.svg resources/icon/dark_xiu_bg.svg resources/icon/ban.svg resources/icon/xiu.svg resources/icon/warning.svg resources/DynamicIcon/day5.svg resources/DynamicIcon/calendar_bg.svg resources/DynamicIcon/day1.svg resources/DynamicIcon/day2.svg resources/DynamicIcon/day3.svg resources/DynamicIcon/day4.svg resources/DynamicIcon/day6.svg resources/DynamicIcon/day7.svg resources/DynamicIcon/day8.svg resources/DynamicIcon/day9.svg resources/DynamicIcon/day10.svg resources/DynamicIcon/day11.svg resources/DynamicIcon/day12.svg resources/DynamicIcon/day13.svg resources/DynamicIcon/day14.svg resources/DynamicIcon/day15.svg resources/DynamicIcon/day16.svg resources/DynamicIcon/day17.svg resources/DynamicIcon/day18.svg resources/DynamicIcon/day19.svg resources/DynamicIcon/day20.svg resources/DynamicIcon/day21.svg resources/DynamicIcon/day22.svg resources/DynamicIcon/day23.svg resources/DynamicIcon/day24.svg resources/DynamicIcon/day25.svg resources/DynamicIcon/day26.svg resources/DynamicIcon/day27.svg resources/DynamicIcon/day28.svg resources/DynamicIcon/day29.svg resources/DynamicIcon/day30.svg resources/DynamicIcon/day31.svg resources/DynamicIcon/month1.svg resources/DynamicIcon/month2.svg resources/DynamicIcon/month3.svg resources/DynamicIcon/month4.svg resources/DynamicIcon/month5.svg resources/DynamicIcon/month6.svg resources/DynamicIcon/month7.svg resources/DynamicIcon/month8.svg resources/DynamicIcon/month9.svg resources/DynamicIcon/month10.svg resources/DynamicIcon/month11.svg resources/DynamicIcon/month12.svg resources/DynamicIcon/week1.svg resources/DynamicIcon/week2.svg resources/DynamicIcon/week3.svg resources/DynamicIcon/week4.svg resources/DynamicIcon/week5.svg resources/DynamicIcon/week6.svg resources/DynamicIcon/week7.svg dde-calendar-5.7.0.23/assets/resources/000077500000000000000000000000001375021633200175675ustar00rootroot00000000000000dde-calendar-5.7.0.23/assets/resources/DynamicIcon/000077500000000000000000000000001375021633200217645ustar00rootroot00000000000000dde-calendar-5.7.0.23/assets/resources/DynamicIcon/calendar_bg.svg000066400000000000000000000050401375021633200247250ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day1.svg000066400000000000000000000016271375021633200233510ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day10.svg000066400000000000000000000035761375021633200234360ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day11.svg000066400000000000000000000022031375021633200234210ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day12.svg000066400000000000000000000035601375021633200234310ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day13.svg000066400000000000000000000052501375021633200234300ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day14.svg000066400000000000000000000024701375021633200234320ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day15.svg000066400000000000000000000050551375021633200234350ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day16.svg000066400000000000000000000120511375021633200234300ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day17.svg000066400000000000000000000022561375021633200234370ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day18.svg000066400000000000000000000057751375021633200234510ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day19.svg000066400000000000000000000117071375021633200234420ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day2.svg000066400000000000000000000032621375021633200233470ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day20.svg000066400000000000000000000051461375021633200234320ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day21.svg000066400000000000000000000035631375021633200234340ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day22.svg000066400000000000000000000051421375021633200234300ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day23.svg000066400000000000000000000066141375021633200234360ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day24.svg000066400000000000000000000040651375021633200234350ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day25.svg000066400000000000000000000065111375021633200234340ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day26.svg000066400000000000000000000134361375021633200234410ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day27.svg000066400000000000000000000036651375021633200234450ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day28.svg000066400000000000000000000073441375021633200234440ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day29.svg000066400000000000000000000131771375021633200234460ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day3.svg000066400000000000000000000047641375021633200233600ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day30.svg000066400000000000000000000066571375021633200234430ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day31.svg000066400000000000000000000052721375021633200234340ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day4.svg000066400000000000000000000020001375021633200233360ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day5.svg000066400000000000000000000046251375021633200233560ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day6.svg000066400000000000000000000115761375021633200233620ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day7.svg000066400000000000000000000016521375021633200233550ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day8.svg000066400000000000000000000055111375021633200233540ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/day9.svg000066400000000000000000000114041375021633200233530ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month1.svg000066400000000000000000000022621375021633200237150ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month10.svg000066400000000000000000000022471375021633200240000ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month11.svg000066400000000000000000000023611375021633200237760ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month12.svg000066400000000000000000000027601375021633200240020ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month2.svg000066400000000000000000000023761375021633200237240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month3.svg000066400000000000000000000035501375021633200237200ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month4.svg000066400000000000000000000032311375021633200237150ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month5.svg000066400000000000000000000032571375021633200237260ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month6.svg000066400000000000000000000026551375021633200237300ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month7.svg000066400000000000000000000021551375021633200237240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month8.svg000066400000000000000000000033221375021633200237220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/month9.svg000066400000000000000000000034731375021633200237320ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week1.svg000066400000000000000000000027011375021633200235210ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week2.svg000066400000000000000000000037371375021633200235340ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week3.svg000066400000000000000000000031751375021633200235310ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week4.svg000066400000000000000000000030411375021633200235220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week5.svg000066400000000000000000000021101375021633200235170ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week6.svg000066400000000000000000000033171375021633200235320ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/DynamicIcon/week7.svg000066400000000000000000000030211375021633200235230ustar00rootroot00000000000000 dde-calendar-5.7.0.23/assets/resources/dde-calendar.qss000066400000000000000000000003441375021633200226230ustar00rootroot00000000000000QFrame#CalendarBackground { background-color: rgba(220, 220, 220, 200) } QLabel#CalendarHeaderWeekday { font-size: 14px; color: #696969; } QLabel#CalendarHeaderWeekend { font-size: 14px; color: #ff5b38; } dde-calendar-5.7.0.23/assets/resources/deepin-calendar.qss000066400000000000000000000003441375021633200233330ustar00rootroot00000000000000QFrame#CalendarBackground { background-color: rgba(220, 220, 220, 200) } QLabel#CalendarHeaderWeekday { font-size: 14px; color: #696969; } QLabel#CalendarHeaderWeekend { font-size: 14px; color: #ff5b38; } dde-calendar-5.7.0.23/assets/resources/icon/000077500000000000000000000000001375021633200205175ustar00rootroot00000000000000dde-calendar-5.7.0.23/assets/resources/icon/ban.svg000066400000000000000000000015731375021633200220060ustar00rootroot00000000000000 类型 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/checkbox_checked .svg000077500000000000000000000075411375021633200245460ustar00rootroot00000000000000 checkbox_checked 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/checkbox_unchecked .svg000077500000000000000000000020021375021633200250740ustar00rootroot00000000000000 checkbox_unchecked 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/choose20X20_checked .svg000077500000000000000000000032671375021633200246750ustar00rootroot00000000000000 椭圆形 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/choose30X30_checked .svg000077500000000000000000000033141375021633200246700ustar00rootroot00000000000000 choose_checked Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dark_ban_bg.svg000066400000000000000000000024711375021633200234550ustar00rootroot00000000000000 类型 3 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dark_xiu_bg.svg000066400000000000000000000024731375021633200235240ustar00rootroot00000000000000 类型 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/darkchoose20X20_checked .svg000066400000000000000000000034401375021633200255250ustar00rootroot00000000000000 checkbox_checked Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/darkchoose30X30_checked .svg000066400000000000000000000033271375021633200255330ustar00rootroot00000000000000 choose30X30_checked Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/data_day_line.svg000077500000000000000000000013501375021633200240170ustar00rootroot00000000000000 Line Copy 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/data_line_checked.svg000077500000000000000000000036611375021633200246370ustar00rootroot00000000000000 Rectangle 75 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-ban.svg000077500000000000000000000020251375021633200225340ustar00rootroot00000000000000 类型-班 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-calendar.svg000077500000000000000000000117731375021633200235570ustar00rootroot00000000000000 logo Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-calendar_48.png000066400000000000000000000024531375021633200240470ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATh[lUs S\RTA+Q%`!-&> A!@ixiA$ >1>(`JjkI4h[msaڅnwwfR?33眙176#ץyv@D" B BNQwaoB9iF$y@ꪨCуcFDL$^:=Tr .3J´Fv$ήy \  t}7 Zam\ ܼ)gW[ޑ.eF?=)$3sK >Gm`>="sM8eW[z7% !@yn-7n;L΋ېo@;crI`4y]gp߻x/s-x-E7F8nFIwFƃ(b yޔ(}v(C,-tߚJfz;5?}t ߿Dt=}yضj5҂0My/ E%ԣ!SgC_D <`\ZYJ\Zmri1f4J 1m0|+@3!(.n^e0M>1zuuR?+5(7 `E+o?:T0Ob~M%hm6~,HoVAAկdcQߪ9 &wfMwgfD~V@?ۉ\T\Th&Ҋ3N %vxK븦 YٵQPFZK'4|Z8BB09`rYi5:nY$@骨  \"p|0٘0ٸ"okXᖼXy /ȑHv m}V {0u0%`2|a$%B&7RT':cbpkuL5 ^R&&{fuCZb2.E S߀AUlyQZp8,׈" K-Bk: ˷#;+:[BXj?5p Z >Šx{wf: K}PӸpTR}U#bd;|4GD̸eme á@{\rG"B&v\rCYG&TRܚ0 0 0 0΍p HԾOEG PTتJnYjɣH> m?p%Y$u`?E !뢌IO0܍݈ j2obx~VT>;O7-%?+ j%B{Lh %t[&\ГM&M(ؗn*B[|iMMm8o[5t|4g ; |}7,# [7eBgm+UTI63 .tMO ysb>D=߃obK w@z7вz'Jxok%;߃*^=\F3߻p֏۸ak%~KsM>[ :1xIC3luѨ(ln2z;[8olp53+ϋ1M M'|Zl{uMgWM}=mK<5ktFcP#yT")/#, mȯBǃGIb )Ez%l1=dG &ĩ1 FcT3'd8ekVvEA 4OqAj121}`oO/R֭6S?rhy! o"8b/Q[U-nj11&OD 5C0&+FYF;A0Of$k/[2Z!Dw!B~f=ϘWD?W0SKFIBOŰp5>1ޮGzDTc; |jpD\j 5|kށx@/·=޲j+] sQn59_Cl@gﵥ  6.[2Q4qUx s2G:~m![6E9_틙ϘG6k>_|rg^J;P"/lJC7 z O>@M$2/@. &tr[f|#oL&m|xg\m 9 Q2cP2x&"s;^rM3 5@dF–QǞ"?{Ѩljr,lu<ӦvuJ3-]ߵް#%sxt}J  ƎNpL;TNx瑿?G:|,54qomWX ϜAmgꝰ02Ht?3qG;1oJ{yjfWDr(b[6UL@:!"&wD.i`v#;Pƿ V6$L'79PdIƃ$w?lFg *4.)ZJCddxzⰾ.h4 0 0 0 0 0 0cU.XY&WϐJٞqhTxZ?l86V f d}%I"$  5~c\z_\DhђIɈUk}m'"U)Dk&>_KqmmGlb͐e]:'V26TwZSm@:kkf*i檔:ZmKpSFWoW.jF EMz%̉|G"9CA#QyIKقϥJNmPؕR+5 , IENDB`dde-calendar-5.7.0.23/assets/resources/icon/dde-choose24.svg000077500000000000000000000041041375021633200234220ustar00rootroot00000000000000 choose24X24_checked Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-choose30.svg000077500000000000000000000033141375021633200234210ustar00rootroot00000000000000 choose_checked Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-ji.svg000077500000000000000000000025701375021633200224030ustar00rootroot00000000000000 icon_ji Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-logo.svg000077500000000000000000000117731375021633200227460ustar00rootroot00000000000000 logo Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-xiu.svg000077500000000000000000000020251375021633200226010ustar00rootroot00000000000000 类型-休 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/dde-yi.svg000077500000000000000000000025701375021633200224220ustar00rootroot00000000000000 icon_yi Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/icon_ji.svg000077500000000000000000000025701375021633200226610ustar00rootroot00000000000000 icon_ji Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/icon_type_life.svg000077500000000000000000000025141375021633200242350ustar00rootroot00000000000000 icon_type_life Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/icon_type_other.svg000077500000000000000000000024731375021633200244430ustar00rootroot00000000000000 icon_type_other Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/icon_type_work.svg000077500000000000000000000025021375021633200242750ustar00rootroot00000000000000 编组 5 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/icon_yi.svg000077500000000000000000000025701375021633200227000ustar00rootroot00000000000000 icon_yi Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/next_disabled.svg000066400000000000000000000015271375021633200240520ustar00rootroot00000000000000 next_disabled Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/next_hover.svg000066400000000000000000000014751375021633200234300ustar00rootroot00000000000000 next_hover Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/next_normal.svg000066400000000000000000000014771375021633200235770ustar00rootroot00000000000000 next_normal Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/next_press.svg000066400000000000000000000014751375021633200234410ustar00rootroot00000000000000 next_press Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/oval.svg000066400000000000000000000027021375021633200222020ustar00rootroot00000000000000 椭圆形 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/previous_disabled.svg000066400000000000000000000015251375021633200247460ustar00rootroot00000000000000 previous_disabled Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/previous_hover.svg000066400000000000000000000014731375021633200243240ustar00rootroot00000000000000 previous_hover Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/previous_normal.svg000066400000000000000000000014751375021633200244730ustar00rootroot00000000000000 previous_normal Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/previous_press.svg000066400000000000000000000014731375021633200243350ustar00rootroot00000000000000 previous_press Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/search_type_life.svg000077500000000000000000000012751375021633200245550ustar00rootroot00000000000000 矩形 3 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/search_type_other.svg000077500000000000000000000012751375021633200247570ustar00rootroot00000000000000 矩形 4 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/search_type_work.svg000077500000000000000000000013131375021633200246110ustar00rootroot00000000000000 矩形 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/today_hover.svg000066400000000000000000000017551375021633200235730ustar00rootroot00000000000000 today_hover Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/today_normal.svg000066400000000000000000000017571375021633200237420ustar00rootroot00000000000000 today_normal Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/today_press.svg000066400000000000000000000017551375021633200236040ustar00rootroot00000000000000 today_press Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/type_ban.svg000077500000000000000000000020251375021633200230430ustar00rootroot00000000000000 类型-班 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/type_ban_bg.svg000077500000000000000000000024711375021633200235200ustar00rootroot00000000000000 类型 3 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/type_xiu.svg000077500000000000000000000020251375021633200231100ustar00rootroot00000000000000 类型-休 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/type_xiu_bg.svg000077500000000000000000000024731375021633200235670ustar00rootroot00000000000000 类型 2 Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/uos_logo.svg000066400000000000000000000054441375021633200230750ustar00rootroot00000000000000 uos_logo Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/warning.svg000066400000000000000000000065321375021633200227130ustar00rootroot00000000000000 deepin-cloudprint-config-helper Created with Sketch. dde-calendar-5.7.0.23/assets/resources/icon/xiu.svg000066400000000000000000000015731375021633200220530ustar00rootroot00000000000000 类型 Created with Sketch. dde-calendar-5.7.0.23/assets/translate_generation.sh000066400000000000000000000003501375021633200223170ustar00rootroot00000000000000#!/bin/bash # this file is used to auto-generate .qm file from .ts file. # author: shibowen at linuxdeepin.com ts_list=(`ls translations/*.ts`) for ts in "${ts_list[@]}" do printf "\nprocess ${ts}\n" lrelease "${ts}" done dde-calendar-5.7.0.23/debian/000077500000000000000000000000001375021633200154755ustar00rootroot00000000000000dde-calendar-5.7.0.23/debian/changelog000066400000000000000000000004531375021633200173510ustar00rootroot00000000000000dde-calendar (1.0.0-1) stable; urgency=low * Autobuild Tag 1.0.0 -- TagBuilder Fri, 12 Aug 2016 17:34:34 +0000 dde-calendar (1.0-1) unstable; urgency=medium * Initial release -- Deepin Packages Builder Fri, 18 Mar 2016 17:01:43 +0800 dde-calendar-5.7.0.23/debian/compat000066400000000000000000000000021375021633200166730ustar00rootroot000000000000009 dde-calendar-5.7.0.23/debian/control000066400000000000000000000013121375021633200170750ustar00rootroot00000000000000Source: dde-calendar Section: utils Priority: optional Maintainer: Deepin Packages Builder Build-Depends: debhelper (>=9), cmake, pkg-config, qtbase5-dev, libdtkgui-dev, libdtkwidget-dev, qttools5-dev-tools, deepin-gettext-tools, libdframeworkdbus-dev Standards-Version: 3.9.6 Homepage: http://www.deepin.org Vcs-Git: https://github.com/linuxdeepin/dde-calendar Package: dde-calendar Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, dde-api Description: Calendar is a smart daily planner to schedule all things in life. Calendar is a small management tool for personal life that combines time and events and integrates the function of memorizing and scheduling. dde-calendar-5.7.0.23/debian/copyright000066400000000000000000000017261375021633200174360ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: dde-calendar Source: https://github.com/linuxdeepin/dde-calendar Files: * Copyright: Deepin Technology Co., Ltd. License: GPL-3+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". dde-calendar-5.7.0.23/debian/rules000066400000000000000000000012431375021633200165520ustar00rootroot00000000000000#!/usr/bin/make -f export QT_SELECT=5 include /usr/share/dpkg/default.mk DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) DH_AUTO_ARGS = --parallel --buildsystem=cmake # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 %: dh $@ --parallel override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_BUILD_TYPE=Release \ -DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) #Ignore the dpkg-shlibdeps: warning (it uses none of the library's symbols) #Qt Mutidedia lib will ref to network libraray. override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--warnings=0 dde-calendar-5.7.0.23/debian/source/000077500000000000000000000000001375021633200167755ustar00rootroot00000000000000dde-calendar-5.7.0.23/debian/source/format000066400000000000000000000000151375021633200202040ustar00rootroot000000000000003.0 (native) dde-calendar-5.7.0.23/schedule-plugin/000077500000000000000000000000001375021633200173435ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/CMakeLists.txt000066400000000000000000000046731375021633200221150ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.7) if (NOT DEFINED VERSION) set(VERSION 1.2.2) endif () #common resource names set(APP_RES_DIR "assets") set(APP_BIN_NAME "uosschedulex-plugin") set(APP_QRC "${APP_RES_DIR}/resources.qrc") project(${APP_BIN_NAME}) set(CMAKE_CXX_STANDARD 11) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee") endif () add_definitions("-DSCHEDULEPLUGIN_LIBRARY") add_definitions("-DQT_DEPRECATED_WARNINGS") #compile flags if (CMAKE_BUILD_TYPE MATCHES Debug) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra") # Enable Qt builtin debug mode add_definitions("-DQT_MESSAGELOGCONTEXT") else() # -Wl, -O2 Enable linker optimizations # -Wl, --gc-sections Remove unused code resulting from -fdsta-sections and # -ffunction-sections set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") endif() macro(SUBDIRLIST result curdir) file(GLOB children RELATIVE ${curdir} ${curdir}/*) set(dirlist "") foreach(child ${children}) if(IS_DIRECTORY ${curdir}/${child}) LIST(APPEND dirlist ${child}) endif() endforeach() set(${result} ${dirlist}) endmacro() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) SUBDIRLIST(all_src ${CMAKE_CURRENT_SOURCE_DIR}/src) #Include all app own subdirectorys foreach(subdir ${all_src}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/${subdir}) endforeach() file(GLOB_RECURSE Schedule_Plugin_SRC ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) find_package(PkgConfig REQUIRED) find_package(DFrameworkdbus REQUIRED) find_package(DtkWidget REQUIRED) find_package(Qt5Svg REQUIRED) find_package(Qt5DBus REQUIRED) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) # Tell CMake to create the lib add_library(${PROJECT_NAME} SHARED ${Schedule_Plugin_SRC} ${APP_QRC} src/interface/service.h) target_include_directories(${PROJECT_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR}) target_link_libraries(${PROJECT_NAME} ${Qt5Svg_LIBRARIES} ${Qt5DBus_LIBRARIES} ${DtkWidget_LIBRARIES} ${DFrameworkdbus_LIBRARIES} ) # Install files install(TARGETS ${PROJECT_NAME} DESTINATION /usr/lib/deepin-aiassistant/serivce-plugins) dde-calendar-5.7.0.23/schedule-plugin/assets/000077500000000000000000000000001375021633200206455ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/assets/resources.qrc000066400000000000000000000053241375021633200233720ustar00rootroot00000000000000 resources/DynamicIcon/calendar_bg.svg resources/DynamicIcon/day1.svg resources/DynamicIcon/day2.svg resources/DynamicIcon/day3.svg resources/DynamicIcon/day4.svg resources/DynamicIcon/day5.svg resources/DynamicIcon/day6.svg resources/DynamicIcon/day7.svg resources/DynamicIcon/day8.svg resources/DynamicIcon/day9.svg resources/DynamicIcon/day10.svg resources/DynamicIcon/day11.svg resources/DynamicIcon/day12.svg resources/DynamicIcon/day13.svg resources/DynamicIcon/day14.svg resources/DynamicIcon/day15.svg resources/DynamicIcon/day16.svg resources/DynamicIcon/day17.svg resources/DynamicIcon/day18.svg resources/DynamicIcon/day19.svg resources/DynamicIcon/day20.svg resources/DynamicIcon/day21.svg resources/DynamicIcon/day22.svg resources/DynamicIcon/day23.svg resources/DynamicIcon/day24.svg resources/DynamicIcon/day25.svg resources/DynamicIcon/day26.svg resources/DynamicIcon/day27.svg resources/DynamicIcon/day28.svg resources/DynamicIcon/day29.svg resources/DynamicIcon/day30.svg resources/DynamicIcon/day31.svg resources/DynamicIcon/month1.svg resources/DynamicIcon/month2.svg resources/DynamicIcon/month3.svg resources/DynamicIcon/month4.svg resources/DynamicIcon/month5.svg resources/DynamicIcon/month6.svg resources/DynamicIcon/month7.svg resources/DynamicIcon/month8.svg resources/DynamicIcon/month9.svg resources/DynamicIcon/month10.svg resources/DynamicIcon/month11.svg resources/DynamicIcon/month12.svg resources/DynamicIcon/week1.svg resources/DynamicIcon/week2.svg resources/DynamicIcon/week3.svg resources/DynamicIcon/week4.svg resources/DynamicIcon/week5.svg resources/DynamicIcon/week6.svg resources/DynamicIcon/week7.svg dde-calendar-5.7.0.23/schedule-plugin/assets/resources/000077500000000000000000000000001375021633200226575ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/000077500000000000000000000000001375021633200250545ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/calendar_bg.svg000066400000000000000000000050401375021633200300150ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day1.svg000066400000000000000000000016271375021633200264410ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day10.svg000066400000000000000000000035761375021633200265260ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day11.svg000066400000000000000000000022031375021633200265110ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day12.svg000066400000000000000000000035601375021633200265210ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day13.svg000066400000000000000000000052501375021633200265200ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day14.svg000066400000000000000000000024701375021633200265220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day15.svg000066400000000000000000000050551375021633200265250ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day16.svg000066400000000000000000000120511375021633200265200ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day17.svg000066400000000000000000000022561375021633200265270ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day18.svg000066400000000000000000000057751375021633200265410ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day19.svg000066400000000000000000000117071375021633200265320ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day2.svg000066400000000000000000000032621375021633200264370ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day20.svg000066400000000000000000000051461375021633200265220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day21.svg000066400000000000000000000035631375021633200265240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day22.svg000066400000000000000000000051421375021633200265200ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day23.svg000066400000000000000000000066141375021633200265260ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day24.svg000066400000000000000000000040651375021633200265250ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day25.svg000066400000000000000000000065111375021633200265240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day26.svg000066400000000000000000000134361375021633200265310ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day27.svg000066400000000000000000000036651375021633200265350ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day28.svg000066400000000000000000000073441375021633200265340ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day29.svg000066400000000000000000000131771375021633200265360ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day3.svg000066400000000000000000000047641375021633200264500ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day30.svg000066400000000000000000000066571375021633200265330ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day31.svg000066400000000000000000000052721375021633200265240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day4.svg000066400000000000000000000020001375021633200264260ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day5.svg000066400000000000000000000046251375021633200264460ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day6.svg000066400000000000000000000115761375021633200264520ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day7.svg000066400000000000000000000016521375021633200264450ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day8.svg000066400000000000000000000055111375021633200264440ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/day9.svg000066400000000000000000000114041375021633200264430ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month1.svg000066400000000000000000000022621375021633200270050ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month10.svg000066400000000000000000000022471375021633200270700ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month11.svg000066400000000000000000000023611375021633200270660ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month12.svg000066400000000000000000000027601375021633200270720ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month2.svg000066400000000000000000000023761375021633200270140ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month3.svg000066400000000000000000000035501375021633200270100ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month4.svg000066400000000000000000000032311375021633200270050ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month5.svg000066400000000000000000000032571375021633200270160ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month6.svg000066400000000000000000000026551375021633200270200ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month7.svg000066400000000000000000000021551375021633200270140ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month8.svg000066400000000000000000000033221375021633200270120ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/month9.svg000066400000000000000000000034731375021633200270220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week1.svg000066400000000000000000000027011375021633200266110ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week2.svg000066400000000000000000000037371375021633200266240ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week3.svg000066400000000000000000000031751375021633200266210ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week4.svg000066400000000000000000000030411375021633200266120ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week5.svg000066400000000000000000000021101375021633200266070ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week6.svg000066400000000000000000000033171375021633200266220ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/assets/resources/DynamicIcon/week7.svg000066400000000000000000000030211375021633200266130ustar00rootroot00000000000000 dde-calendar-5.7.0.23/schedule-plugin/src/000077500000000000000000000000001375021633200201325ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/data/000077500000000000000000000000001375021633200210435ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/data/canceljsondata.cpp000066400000000000000000000017131375021633200245220ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "canceljsondata.h" #include #include "../globaldef.h" cancelJsonData::cancelJsonData() : JsonData() { } cancelJsonData::~cancelJsonData() { } dde-calendar-5.7.0.23/schedule-plugin/src/data/canceljsondata.h000066400000000000000000000017571375021633200241770ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CANCELJSONDATA_H #define CANCELJSONDATA_H #include "jsondata.h" class cancelJsonData : public JsonData { public: cancelJsonData(); ~cancelJsonData() override; }; #endif // CANCELJSONDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/changejsondata.cpp000066400000000000000000000051251375021633200245230ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "changejsondata.h" #include "../globaldef.h" #include changejsondata::changejsondata() : JsonData() { } void changejsondata::jsonObjResolve(const QJsonObject &jsobj) { if (jsobj[JSON_NAME] == JSON_FROMDATETIME) { fromDatetimeJsonResolve(jsobj); return; } if (jsobj[JSON_NAME] == JSON_TODATETIME) { toDatetimeJsonResolve(jsobj); return; } if (jsobj[JSON_NAME] == JSON_TOPLACE) { toPlaceJsonResolve(jsobj); return; } } void changejsondata::setDefaultValue() { JsonData::setDefaultValue(); m_fromDateTime.clear(); m_toDateTime.clear(); m_toPlaceStr.clear(); } void changejsondata::fromDatetimeJsonResolve(const QJsonObject &jsobj) { setFromDateTime(suggestDatetimeResolve(jsobj)); } void changejsondata::toDatetimeJsonResolve(const QJsonObject &jsobj) { setToDateTime(suggestDatetimeResolve(jsobj)); } void changejsondata::toPlaceJsonResolve(const QJsonObject &jsobj) { setToPlaceStr(jsobj[JSON_VALUE].toString()); } QString changejsondata::toPlaceStr() const { return m_toPlaceStr; } void changejsondata::setToPlaceStr(const QString &toPlaceStr) { m_toPlaceStr = toPlaceStr; } bool changejsondata::isVaild() const { return this->m_toDateTime.suggestDatetime.size() ==0 && this->m_fromDateTime.suggestDatetime.size()==0 && this->toPlaceStr().isEmpty() && JsonData::isVaild(); } SemanticsDateTime changejsondata::toDateTime() const { return m_toDateTime; } void changejsondata::setToDateTime(const SemanticsDateTime &toDateTime) { m_toDateTime = toDateTime; } SemanticsDateTime changejsondata::fromDateTime() const { return m_fromDateTime; } void changejsondata::setFromDateTime(const SemanticsDateTime &fromDateTime) { m_fromDateTime = fromDateTime; } dde-calendar-5.7.0.23/schedule-plugin/src/data/changejsondata.h000066400000000000000000000046731375021633200241770ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CHANGEJSONDATA_H #define CHANGEJSONDATA_H #include "jsondata.h" class changejsondata : public JsonData { public: changejsondata(); /** * @brief fromDateTime 获取语义from时间数据 * @return 时间数据 */ SemanticsDateTime fromDateTime() const; /** * @brief setFromDateTime 设置语义from时间数据 * @param fromDateTime 时间数据 */ void setFromDateTime(const SemanticsDateTime &fromDateTime); /** * @brief toDateTime 获取语义toDateTime时间数据 * @return 时间数据 */ SemanticsDateTime toDateTime() const; /** * @brief setToDateTime 设置语义toDateTime时间数据 * @param toDateTime 时间数据 */ void setToDateTime(const SemanticsDateTime &toDateTime); QString toPlaceStr() const; void setToPlaceStr(const QString &toPlaceStr); /** * @brief isVaild 判断json是否为原始数据 * @return true为原始数据 */ bool isVaild() const override; private: void jsonObjResolve(const QJsonObject &jsobj) override; void setDefaultValue() override; void fromDatetimeJsonResolve(const QJsonObject &jsobj); void toDatetimeJsonResolve(const QJsonObject &jsobj); void toPlaceJsonResolve(const QJsonObject &jsobj); private: /** * @brief m_fromDateTime 需要修改的时间信息 */ SemanticsDateTime m_fromDateTime {}; /** * @brief m_toDateTime 修改到的时间信息 */ SemanticsDateTime m_toDateTime {}; /** * @brief m_toPlaceStr 修改的日常内容 */ QString m_toPlaceStr {}; }; #endif // CHANGEJSONDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/clocaldata.cpp000066400000000000000000000044301375021633200236370ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "clocaldata.h" CLocalData::CLocalData() { } QVector CLocalData::scheduleInfoVector() const { return m_scheduleInfoVector; } void CLocalData::setScheduleInfoVector(const QVector &scheduleInfoVector) { m_scheduleInfoVector = scheduleInfoVector; } ScheduleDtailInfo CLocalData::SelectInfo() const { return m_SelectInfo; } void CLocalData::setSelectInfo(const ScheduleDtailInfo &SelectInfo) { m_SelectInfo = SelectInfo; } void CLocalData::setToTitleName(const QString &title) { m_ToTitleName = title; } QString CLocalData::getToTitleName() const { return m_ToTitleName; } void CLocalData::setToTime(const QVector &timeInfo) { m_ToTime = timeInfo; } QVector CLocalData::getToTime() const { return m_ToTime; } int CLocalData::getOffet() const { return m_offset; } void CLocalData::setOffset(int offset) { m_offset = offset; } CLocalData *CLocalData::getDataByPoint(const CLocalData *localData) { if (this == localData || localData == nullptr) return this; this->m_offset = localData->m_offset; this->m_SelectInfo = localData->m_SelectInfo; this->m_ToTime = localData->m_ToTime; this->m_scheduleInfoVector = localData->m_scheduleInfoVector; this->m_ToTitleName = localData->m_ToTitleName; return this; } void CLocalData::setNewInfo(const ScheduleDtailInfo &newInfo) { m_NewInfo = newInfo; } ScheduleDtailInfo CLocalData::getNewInfo() const { return m_NewInfo; } dde-calendar-5.7.0.23/schedule-plugin/src/data/clocaldata.h000066400000000000000000000035021375021633200233030ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CLOCALDATA_H #define CLOCALDATA_H #include "schedulestructs.h" #include "timedatastruct.h" class CLocalData { public: CLocalData(); QVector scheduleInfoVector() const; void setScheduleInfoVector(const QVector &scheduleInfoVector); ScheduleDtailInfo SelectInfo() const; void setSelectInfo(const ScheduleDtailInfo &SelectInfo); void setToTitleName(const QString &title); QString getToTitleName() const; void setToTime(const QVector &timeInfo); QVector getToTime() const; int getOffet() const; void setOffset(int offset); CLocalData *getDataByPoint(const CLocalData *localData); void setNewInfo(const ScheduleDtailInfo &newInfo); ScheduleDtailInfo getNewInfo() const; private: QVector m_scheduleInfoVector {}; ScheduleDtailInfo m_SelectInfo {}; ScheduleDtailInfo m_NewInfo {}; QString m_ToTitleName {""}; QVector m_ToTime {}; int m_offset {-1}; }; #endif // CLOCALDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/createjsondata.cpp000066400000000000000000000017601375021633200245420ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "createjsondata.h" #include #include #include #include #include "../globaldef.h" CreateJsonData::CreateJsonData() : JsonData() { } dde-calendar-5.7.0.23/schedule-plugin/src/data/createjsondata.h000066400000000000000000000017321375021633200242060ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CREATEJSONDATA_H #define CREATEJSONDATA_H #include "jsondata.h" class CreateJsonData : public JsonData { public: CreateJsonData(); private: }; #endif // CREATEJSONDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/jsondata.cpp000066400000000000000000000220751375021633200233600ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "jsondata.h" #include #include #include #include #include "../globaldef.h" JsonData::JsonData() { } JsonData::~JsonData() { } void JsonData::JosnResolve(const QJsonObject &jsObj) { setDefaultValue(); if (jsObj.contains("slots") && jsObj["slots"].isArray()) { auto slotsObjArr = jsObj["slots"].toArray(); for (int j = 0; j < slotsObjArr.size(); ++j) { auto slotsObj = slotsObjArr[j].toObject(); if (slotsObj.contains(JSON_NAME) && slotsObj[JSON_NAME].isString()) { if (slotsObj[JSON_NAME] == JSON_CONTENT) { contentJsonResolve(slotsObj); continue; } if (slotsObj[JSON_NAME] == JSON_REPEAT) { repeatJsonResolve(slotsObj); continue; } if (slotsObj[JSON_NAME] == JSON_DATETIME) { datetimeJsonResolve(slotsObj); continue; } if (slotsObj[JSON_NAME] == JSON_PROPERTY) { propertyJsonResolve(slotsObj); continue; } if (slotsObj[JSON_NAME] == JSON_POSRANK_OFFSET) { posRankOffsetResolve(slotsObj); continue; } jsonObjResolve(slotsObj); } } } } QString JsonData::SuggestMsg() const { return m_SuggestMsg; } void JsonData::setSuggestMsg(const QString &SuggestMsg) { m_SuggestMsg = SuggestMsg; } bool JsonData::ShouldEndSession() const { return m_ShouldEndSession; } void JsonData::setShouldEndSession(bool ShouldEndSession) { m_ShouldEndSession = ShouldEndSession; } void JsonData::setRepeatStatus(const JsonData::RepeatStatus &RepeatStatus) { m_RepeatStatus = RepeatStatus; } QString JsonData::TitleName() const { return m_TitleName; } void JsonData::setTitleName(const QString &TitleName) { m_TitleName = TitleName; } void JsonData::setDateTimeStatus(const JsonData::DateTimeStatus &DateTimeStatus) { m_DateTimeStatus = DateTimeStatus; } JsonData::RepeatStatus JsonData::getRepeatStatus() const { return m_RepeatStatus; } QVector JsonData::getRepeatNum() const { return m_RepeatNum; } void JsonData::setRepeatNum(const QVector &RepeatNum) { m_RepeatNum = RepeatNum; } SemanticsDateTime JsonData::getDateTime() const { return m_DateTime; } void JsonData::setDateTime(const SemanticsDateTime &DateTime) { m_DateTime = DateTime; } void JsonData::contentJsonResolve(const QJsonObject &jsobj) { setTitleName(jsobj[JSON_VALUE].toString()); } void JsonData::repeatJsonResolve(const QJsonObject &jsobj) { QString repeatValue = jsobj[JSON_VALUE].toString(); if (repeatValue.contains("EVERYEAR")) { setRepeatStatus(EVEY); return; } if (repeatValue.contains("EVERYDAY")) { setRepeatStatus(EVED); return; } if (repeatValue.contains("WORKDAY")) { setRepeatStatus(WORKD); return; } if (repeatValue.contains("RESTDAY")) { setRepeatStatus(RESTD); return; } if (repeatValue.contains("WEEKEND")) { setRepeatStatus(RESTD); return; } QRegExp rxlen("([W,M])([0-9]{0,2})"); int pos = 0; QVector repeatnum {}; repeatnum.clear(); while ((pos = rxlen.indexIn(repeatValue, pos)) != -1) { if (rxlen.cap(1).contains("M")) { setRepeatStatus(EVEM); } if (rxlen.cap(1).contains("W")) { setRepeatStatus(EVEW); } if (rxlen.cap(0).size() > 0 && rxlen.cap(2) != "") { repeatnum.append(rxlen.cap(2).toInt()); } pos += rxlen.matchedLength(); } setRepeatNum(repeatnum); } void JsonData::datetimeJsonResolve(const QJsonObject &jsobj) { setDateTime(suggestDatetimeResolve(jsobj)); } void JsonData::propertyJsonResolve(const QJsonObject &jsobj) { QString propertyValue = jsobj[JSON_VALUE].toString(); if (propertyValue == JSON_NEXT) { setPropertyStatus(NEXT); return; } if (propertyValue == JSON_LAST) { setPropertyStatus(LAST); return; } if (propertyValue == JSON_ALL) { setPropertyStatus(ALL); return; } if (propertyValue == JSON_THIS) { setPropertyStatus(PRO_THIS); return; } } void JsonData::posRankOffsetResolve(const QJsonObject &jsobj) { setOffset(jsobj[JSON_VALUE].toString().toInt()); } SemanticsDateTime JsonData::suggestDatetimeResolve(const QJsonObject &jsobj) { SemanticsDateTime semdatetime {}; semdatetime.clear(); QString DateTimeJson = jsobj[JSON_NORMVALUE].toString(); QJsonParseError jsonError; QJsonDocument doc = QJsonDocument::fromJson(DateTimeJson.toUtf8(), &jsonError); //建议时间 QString sugdateTimeStr{""}; //模糊时间 QString dateTimeStr{""}; if (!doc.isNull() && (jsonError.error == QJsonParseError::NoError)) { auto rootObject = doc.object(); sugdateTimeStr = (rootObject["suggestDatetime"].toString()); dateTimeStr = rootObject["datetime"].toString(); } //建议时间解析赋值 if (sugdateTimeStr != "") { if (sugdateTimeStr.contains("/")) { QStringList dateTimeList = sugdateTimeStr.split("/"); for (int i = 0; i < dateTimeList.size(); ++i) { //如果数据不为空,添加解析数据 if(!dateTimeList.at(i).isEmpty()){ semdatetime.suggestDatetime.append(resolveNormValue(dateTimeList.at(i))); } } } else { semdatetime.suggestDatetime.append(resolveNormValue(sugdateTimeStr)); } } //模糊时间解析赋值 if(!dateTimeStr.isEmpty()){ if(dateTimeStr.contains("/")){ QStringList dateTimeList = dateTimeStr.split("/"); for (int i = 0; i < dateTimeList.size(); ++i) { //如果数据不为空,添加解析数据 if(!dateTimeList.at(i).isEmpty()){ semdatetime.dateTime.append(resolveDateTimeValeu(dateTimeList.at(i))); } } } else { semdatetime.dateTime.append(resolveDateTimeValeu(dateTimeStr)); } } return semdatetime; } SuggestDatetimeInfo JsonData::resolveNormValue(const QString &str) { SuggestDatetimeInfo datetimeInfo; datetimeInfo.hasTime = str.contains(JSON_DATETIME_DELIMITER); datetimeInfo.datetime = QDateTime::fromString(str, Qt::ISODate); return datetimeInfo; } DateTimeInfo JsonData::resolveDateTimeValeu(const QString &dateTimeStr) { DateTimeInfo dateTimeInfo{}; //根据关键符合“T”分割字符 QStringList dateList = dateTimeStr.split(JSON_DATETIME_DELIMITER); //如果只有一个表示没有时间信息 if(dateList.size() ==1){ dateTimeInfo.m_Date = QDate::fromString(dateList.at(0),DATEFORMAT); dateTimeInfo.hasDate = true; dateTimeInfo.hasTime = false; }else if (dateList.size()>1) { //如果第一个数据为空表示没有日期信息 if(dateList.at(0).isEmpty()){ dateTimeInfo.hasDate = false; }else { dateTimeInfo.m_Date = QDate::fromString(dateList.at(0),DATEFORMAT); dateTimeInfo.hasDate = true; } dateTimeInfo.m_Time = QTime::fromString(dateList.at(1),TIMEFORMAT); dateTimeInfo.hasTime = true; } return dateTimeInfo; } void JsonData::setDefaultValue() { setTitleName(""); setDateTimeStatus(NODATE); setRepeatStatus(NONE); setPropertyStatus(PRO_NONE); m_RepeatNum.clear(); m_DateTime.clear(); setOffset(-1); } void JsonData::jsonObjResolve(const QJsonObject &jsobj) { Q_UNUSED(jsobj); } JsonData::PropertyStatus JsonData::getPropertyStatus() const { return m_propertyStatus; } void JsonData::setPropertyStatus(const PropertyStatus &propertyStatus) { m_propertyStatus = propertyStatus; } int JsonData::offset() const { return m_offset; } void JsonData::setOffset(int offset) { m_offset = offset; } bool JsonData::isVaild() const { return TitleName() == "" && getDateTime().suggestDatetime.size() == 0 && m_offset == -1 && m_RepeatStatus == NONE && m_propertyStatus == PRO_NONE; } dde-calendar-5.7.0.23/schedule-plugin/src/data/jsondata.h000066400000000000000000000076251375021633200230310ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 JSONDATA_H #define JSONDATA_H #include #include #include "timedatastruct.h" class QJsonObject; class JsonData { public: enum RepeatStatus { NONE, EVED, EVEW, EVEM, EVEY, WORKD, RESTD }; enum DateTimeStatus { NODATE, NOTIME, ALLHAS }; enum PropertyStatus { PRO_NONE, NEXT, LAST, ALL, PRO_THIS }; public: JsonData(); virtual ~JsonData(); void JosnResolve(const QJsonObject &jsObj); QString SuggestMsg() const; void setSuggestMsg(const QString &SuggestMsg); bool ShouldEndSession() const; void setShouldEndSession(bool ShouldEndSession); void setRepeatStatus(const RepeatStatus &RepeatStatus); QString TitleName() const; void setTitleName(const QString &TitleName); void setDateTimeStatus(const DateTimeStatus &DateTimeStatus); RepeatStatus getRepeatStatus() const; QVector getRepeatNum() const; void setRepeatNum(const QVector &RepeatNum); SemanticsDateTime getDateTime() const; void setDateTime(const SemanticsDateTime &DateTime); PropertyStatus getPropertyStatus() const; void setPropertyStatus(const PropertyStatus &propertyStatus); int offset() const; void setOffset(int offset); /** * @brief isVaild 判断json是否为原始数据 * @return true为原始数据 */ virtual bool isVaild() const; protected: void contentJsonResolve(const QJsonObject &jsobj); void repeatJsonResolve(const QJsonObject &jsobj); /** * @brief datetimeJsonResolve 时间关键字解析 * @param jsobj json对象 */ void datetimeJsonResolve(const QJsonObject &jsobj); void propertyJsonResolve(const QJsonObject &jsobj); /** * @brief posRankOffsetResolve 偏移关键字解析 * @param jsobj json对象 */ void posRankOffsetResolve(const QJsonObject &jsobj); SemanticsDateTime suggestDatetimeResolve(const QJsonObject &jsobj); /** * @brief resolveNormValue 解析建议时间数据 * @param str string格式的建议时间 * @return 建议时间 */ SuggestDatetimeInfo resolveNormValue(const QString &str); /** * @brief resolveDateTimeValeu 解析模糊时间数据 * @param dateTimeStr string格式的模糊时间 * @return 模糊时间 */ DateTimeInfo resolveDateTimeValeu(const QString &dateTimeStr); virtual void setDefaultValue(); virtual void jsonObjResolve(const QJsonObject &jsobj); private: QString m_SuggestMsg {""}; bool m_ShouldEndSession {false}; RepeatStatus m_RepeatStatus {NONE}; QVector m_RepeatNum {}; DateTimeStatus m_DateTimeStatus {NODATE}; PropertyStatus m_propertyStatus {PRO_NONE}; QString m_TitleName {""}; SemanticsDateTime m_DateTime {}; int m_offset {-1}; }; #endif // JSONDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/queryjsondata.cpp000066400000000000000000000017551375021633200244500ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "queryjsondata.h" #include #include #include #include #include "../globaldef.h" QueryJsonData::QueryJsonData() : JsonData() { } dde-calendar-5.7.0.23/schedule-plugin/src/data/queryjsondata.h000066400000000000000000000017131375021633200241070ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 QUERYJSONDATA_H #define QUERYJSONDATA_H #include "jsondata.h" class QueryJsonData : public JsonData { public: QueryJsonData(); }; #endif // QUERYJSONDATA_H dde-calendar-5.7.0.23/schedule-plugin/src/data/schedulecolourmanage.cpp000066400000000000000000000445421375021633200257510ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "schedulecolourmanage.h" ScheduleColourManage::ScheduleColourManage() : m_LifeScheduleColour(new CSchedulesColor()) , m_WorkScheduleColour(new CSchedulesColor()) , m_OtherScheduleColour(new CSchedulesColor()) , m_SolarScheduleColour(new CSchedulesColor()) { } ScheduleColourManage::~ScheduleColourManage() { delete m_LifeScheduleColour; m_LifeScheduleColour = nullptr; delete m_WorkScheduleColour; m_WorkScheduleColour = nullptr; delete m_OtherScheduleColour; m_OtherScheduleColour = nullptr; delete m_SolarScheduleColour; m_SolarScheduleColour = nullptr; } void ScheduleColourManage::setTheMe(int type) { setLifeScheduleTheme(type); setOtherScheduleTheme(type); setWorkScheduleTheme(type); setSolarScheduleTheme(type); } CSchedulesColor ScheduleColourManage::getColorByTypeId(const int &id) { //1工作 2 生活 3其他 CSchedulesColor color; switch (id) { case 1: color = WorkScheduleColour(); break; case 2: color = LifeScheduleColour(); break; case 3: color = OtherScheduleColour(); break; case 4: color = SolarScheduleColour(); break; default: color = OtherScheduleColour(); break; } return color; } CSchedulesColor ScheduleColourManage::LifeScheduleColour() const { return *m_LifeScheduleColour; } CSchedulesColor ScheduleColourManage::WorkScheduleColour() const { return *m_WorkScheduleColour; } CSchedulesColor ScheduleColourManage::OtherScheduleColour() const { return *m_OtherScheduleColour; } CSchedulesColor ScheduleColourManage::SolarScheduleColour() const { return *m_SolarScheduleColour; } void ScheduleColourManage::setLifeScheduleTheme(int type) { if (type == 0 || type == 1) { m_LifeScheduleColour->type = 2; m_LifeScheduleColour->dotColor = "#82D245"; m_LifeScheduleColour->dotColor.setAlphaF(1); m_LifeScheduleColour->gradientFromC = "#B7E6FB"; m_LifeScheduleColour->gradientFromC.setAlphaF(0.7); m_LifeScheduleColour->gradientToC = "#D4FFB3"; m_LifeScheduleColour->gradientToC.setAlphaF(0.7); m_LifeScheduleColour->Purecolor = "#6FFF00"; m_LifeScheduleColour->Purecolor.setAlphaF(0.2); m_LifeScheduleColour->shadowcolor = "#82D245"; m_LifeScheduleColour->textColor = "#000000"; m_LifeScheduleColour->timeColor = "#53A316"; m_LifeScheduleColour->hightlightgradientFromC = "#9AE5FF"; m_LifeScheduleColour->hightlightgradientToC = "#C7FF94"; QColor lifeP("#C7FF94"); //lifeP.setAlphaF(0.8); m_LifeScheduleColour->hightlightPurecolor = lifeP; m_LifeScheduleColour->hovergradientFromC = "#A8E9FF"; m_LifeScheduleColour->hovergradientToC = "#D5FFAF"; m_LifeScheduleColour->hovergradientFromC.setAlphaF(0.95); m_LifeScheduleColour->hovergradientToC.setAlphaF(0.95); QColor lifehP("#C4FF98"); lifehP.setAlphaF(0.8); m_LifeScheduleColour->hoverPurecolor = lifehP; m_LifeScheduleColour->splitColor = "#82D245"; m_LifeScheduleColour->pressgradientToC = m_LifeScheduleColour->gradientToC; m_LifeScheduleColour->pressgradientFromC = m_LifeScheduleColour->gradientFromC; m_LifeScheduleColour->pressPurecolor = m_LifeScheduleColour->Purecolor; m_LifeScheduleColour->pressgradientToC.setAlphaF(0.8); m_LifeScheduleColour->pressgradientFromC.setAlphaF(0.8); m_LifeScheduleColour->pressPurecolor.setAlphaF(0.2); } else { m_LifeScheduleColour->type = 2; m_LifeScheduleColour->dotColor = "#59F88D"; m_LifeScheduleColour->dotColor.setAlphaF(0.5); m_LifeScheduleColour->gradientFromC = "#2D6883"; m_LifeScheduleColour->gradientToC = "#5D7D44"; m_LifeScheduleColour->gradientToC.setAlphaF(0.5); m_LifeScheduleColour->gradientFromC.setAlphaF(0.5); m_LifeScheduleColour->Purecolor = "#59F88D"; m_LifeScheduleColour->Purecolor.setAlphaF(0.1); m_LifeScheduleColour->shadowcolor = "#25FA6B"; m_LifeScheduleColour->shadowcolor.setAlphaF(0.5); m_LifeScheduleColour->textColor = "#C0C6D4"; // m_LifeScheduleColour->textColor.setAlphaF(1); m_LifeScheduleColour->timeColor = "#38A35B"; m_LifeScheduleColour->hightlightgradientFromC = "#2D6883"; m_LifeScheduleColour->hightlightgradientFromC.setAlphaF(0.8); m_LifeScheduleColour->hightlightgradientToC = "#5D7D44"; m_LifeScheduleColour->hightlightgradientToC.setAlphaF(0.8); QColor lifeP("#337044"); lifeP.setAlphaF(0.8); m_LifeScheduleColour->hightlightPurecolor = lifeP; m_LifeScheduleColour->splitColor = "#25FA6B"; m_LifeScheduleColour->splitColor.setAlphaF(0.3); m_LifeScheduleColour->hovergradientFromC = "#2D6883"; m_LifeScheduleColour->hovergradientToC = "#5D7D44"; m_LifeScheduleColour->hovergradientFromC.setAlphaF(0.65); m_LifeScheduleColour->hovergradientToC.setAlphaF(0.65); QColor lifehP("#59F88D"); lifehP.setAlphaF(0.2); m_LifeScheduleColour->hoverPurecolor = lifehP; m_LifeScheduleColour->pressgradientToC = m_LifeScheduleColour->gradientToC; m_LifeScheduleColour->pressgradientFromC = m_LifeScheduleColour->gradientFromC; m_LifeScheduleColour->pressPurecolor = m_LifeScheduleColour->Purecolor; m_LifeScheduleColour->pressgradientToC.setAlphaF(0.4); m_LifeScheduleColour->pressgradientFromC.setAlphaF(0.4); m_LifeScheduleColour->pressPurecolor.setAlphaF(0.15); } } void ScheduleColourManage::setWorkScheduleTheme(int type) { if (type == 0 || type == 1) { m_WorkScheduleColour->type = 1; m_WorkScheduleColour->dotColor = "#FB2525"; m_WorkScheduleColour->dotColor.setAlphaF(0.5); m_WorkScheduleColour->gradientFromC = "#FBCEB7"; m_WorkScheduleColour->gradientFromC.setAlphaF(0.7); m_WorkScheduleColour->gradientToC = "#FA9D9A"; m_WorkScheduleColour->gradientToC.setAlphaF(0.7); m_WorkScheduleColour->Purecolor = "#F85566"; m_WorkScheduleColour->Purecolor.setAlphaF(0.2); m_WorkScheduleColour->shadowcolor = "#FB2525"; m_WorkScheduleColour->shadowcolor.setAlphaF(0.5); m_WorkScheduleColour->textColor = "#000000"; m_WorkScheduleColour->timeColor = "#B54A4B"; m_WorkScheduleColour->hightlightgradientFromC = "#FFD0B8"; m_WorkScheduleColour->hightlightgradientToC = "#FF908D"; QColor workP("#F9AEB8"); //workP.setAlphaF(0.8); m_WorkScheduleColour->hightlightPurecolor = workP; m_WorkScheduleColour->splitColor = "#FB2525"; m_WorkScheduleColour->splitColor.setAlphaF(0.5); m_WorkScheduleColour->hovergradientFromC = "#FFD0B8"; m_WorkScheduleColour->hovergradientFromC.setAlphaF(0.95); m_WorkScheduleColour->hovergradientToC = "#FF9D9A"; m_WorkScheduleColour->hovergradientToC.setAlphaF(0.95); QColor workhP("#FFB6BD"); workhP.setAlphaF(0.8); m_WorkScheduleColour->hoverPurecolor = workhP; m_WorkScheduleColour->pressgradientToC = m_WorkScheduleColour->gradientToC; m_WorkScheduleColour->pressgradientFromC = m_WorkScheduleColour->gradientFromC; m_WorkScheduleColour->pressPurecolor = m_WorkScheduleColour->Purecolor; m_WorkScheduleColour->pressgradientToC.setAlphaF(0.8); m_WorkScheduleColour->pressgradientFromC.setAlphaF(0.8); m_WorkScheduleColour->pressPurecolor.setAlphaF(0.2); } else { m_WorkScheduleColour->type = 1; m_WorkScheduleColour->dotColor = "#F85566"; m_WorkScheduleColour->dotColor.setAlphaF(0.5); m_WorkScheduleColour->gradientFromC = "#965A26"; m_WorkScheduleColour->gradientToC = "#8B2521"; m_WorkScheduleColour->gradientToC.setAlphaF(0.5); m_WorkScheduleColour->gradientFromC.setAlphaF(0.5); m_WorkScheduleColour->Purecolor = "#F85566"; m_WorkScheduleColour->Purecolor.setAlphaF(0.1); m_WorkScheduleColour->shadowcolor = "#FB2525"; m_WorkScheduleColour->shadowcolor.setAlphaF(0.5); m_WorkScheduleColour->textColor = "#C0C6D4"; // m_WorkScheduleColour->textColor.setAlphaF(1); m_WorkScheduleColour->timeColor = "#B54A4B"; m_WorkScheduleColour->hightlightgradientToC = "#992D2A"; m_WorkScheduleColour->hightlightgradientToC.setAlphaF(0.8); m_WorkScheduleColour->hightlightgradientFromC = "#8B521F"; m_WorkScheduleColour->hightlightgradientFromC.setAlphaF(0.8); QColor workP("#77373E"); workP.setAlphaF(0.8); m_WorkScheduleColour->hightlightPurecolor = workP; m_WorkScheduleColour->hovergradientFromC = "#965A26"; m_WorkScheduleColour->hovergradientToC = "#8B2521"; m_WorkScheduleColour->hovergradientFromC.setAlphaF(0.65); m_WorkScheduleColour->hovergradientToC.setAlphaF(0.65); QColor workhP("#F85566"); workhP.setAlphaF(0.2); m_WorkScheduleColour->hoverPurecolor = workhP; m_WorkScheduleColour->splitColor = "#F85566"; m_WorkScheduleColour->splitColor.setAlphaF(0.5); m_WorkScheduleColour->pressgradientToC = m_WorkScheduleColour->gradientToC; m_WorkScheduleColour->pressgradientFromC = m_WorkScheduleColour->gradientFromC; m_WorkScheduleColour->pressPurecolor = m_WorkScheduleColour->Purecolor; m_WorkScheduleColour->pressgradientToC.setAlphaF(0.4); m_WorkScheduleColour->pressgradientFromC.setAlphaF(0.4); m_WorkScheduleColour->pressPurecolor.setAlphaF(0.15); } } void ScheduleColourManage::setOtherScheduleTheme(int type) { if (type == 0 || type == 1) { m_OtherScheduleColour->type = 3; m_OtherScheduleColour->dotColor = "#BA60FA"; m_OtherScheduleColour->dotColor.setAlphaF(1); m_OtherScheduleColour->gradientFromC = "#FBE9B7"; m_OtherScheduleColour->gradientFromC.setAlphaF(0.7); m_OtherScheduleColour->gradientToC = "#DFB3FF"; m_OtherScheduleColour->gradientToC.setAlphaF(0.7); m_OtherScheduleColour->Purecolor = "#D191FF"; m_OtherScheduleColour->Purecolor.setAlphaF(0.2); m_OtherScheduleColour->shadowcolor = "#BA60FA"; m_OtherScheduleColour->textColor = "#000000"; m_OtherScheduleColour->timeColor = "#8548B1"; m_OtherScheduleColour->hightlightgradientFromC = "#FFE8AC"; m_OtherScheduleColour->hightlightgradientToC = "#FBA5FF"; QColor otherP("#EAC4FF"); //otherP.setAlphaF(0.8); m_OtherScheduleColour->hightlightPurecolor = otherP; m_OtherScheduleColour->hovergradientFromC = "#FFE8AC"; m_OtherScheduleColour->hovergradientToC = "#E2A5FF"; m_OtherScheduleColour->hovergradientFromC.setAlphaF(0.95); m_OtherScheduleColour->hovergradientToC.setAlphaF(0.95); QColor otherhP("#E6C5FF"); otherhP.setAlphaF(0.8); m_OtherScheduleColour->hoverPurecolor = otherhP; m_OtherScheduleColour->splitColor = "#BA60FA"; m_OtherScheduleColour->pressgradientToC = m_OtherScheduleColour->gradientToC; m_OtherScheduleColour->pressgradientFromC = m_OtherScheduleColour->gradientFromC; m_OtherScheduleColour->pressPurecolor = m_OtherScheduleColour->Purecolor; m_OtherScheduleColour->pressgradientToC.setAlphaF(0.8); m_OtherScheduleColour->pressgradientFromC.setAlphaF(0.8); m_OtherScheduleColour->pressPurecolor.setAlphaF(0.2); } else { m_OtherScheduleColour->type = 3; m_OtherScheduleColour->dotColor = "#C155F8"; m_OtherScheduleColour->dotColor.setAlphaF(0.7); m_OtherScheduleColour->gradientFromC = "#8C4E2C"; m_OtherScheduleColour->gradientToC = "#7D37AF"; m_OtherScheduleColour->gradientToC.setAlphaF(0.5); m_OtherScheduleColour->gradientFromC.setAlphaF(0.5); m_OtherScheduleColour->Purecolor = "#C155F8"; m_OtherScheduleColour->Purecolor.setAlphaF(0.1); m_OtherScheduleColour->shadowcolor = "#BE3DFF"; m_OtherScheduleColour->shadowcolor.setAlphaF(0.5); m_OtherScheduleColour->textColor = "#C0C6D4"; // m_OtherScheduleColour->textColor.setAlphaF(1); m_OtherScheduleColour->timeColor = "#9857C8"; m_OtherScheduleColour->hightlightgradientFromC = "#8C4E2C"; m_OtherScheduleColour->hightlightgradientFromC.setAlphaF(0.8); m_OtherScheduleColour->hightlightgradientToC = "#803BAE"; m_OtherScheduleColour->hightlightgradientToC.setAlphaF(0.8); QColor otherP("#613776"); otherP.setAlphaF(0.8); m_OtherScheduleColour->hightlightPurecolor = otherP; m_OtherScheduleColour->hovergradientFromC = "#8C4E2C"; m_OtherScheduleColour->hovergradientToC = "#7D37AF"; m_OtherScheduleColour->hovergradientFromC.setAlphaF(0.65); m_OtherScheduleColour->hovergradientToC.setAlphaF(0.65); QColor otherhP("#C155F8"); otherhP.setAlphaF(0.2); m_OtherScheduleColour->hoverPurecolor = otherhP; m_OtherScheduleColour->splitColor = "#BA32FF"; m_OtherScheduleColour->splitColor.setAlphaF(0.5); m_OtherScheduleColour->pressgradientToC = m_OtherScheduleColour->gradientToC; m_OtherScheduleColour->pressgradientFromC = m_OtherScheduleColour->gradientFromC; m_OtherScheduleColour->pressPurecolor = m_OtherScheduleColour->Purecolor; m_OtherScheduleColour->pressgradientToC.setAlphaF(0.4); m_OtherScheduleColour->pressgradientFromC.setAlphaF(0.4); m_OtherScheduleColour->pressPurecolor.setAlphaF(0.15); } } void ScheduleColourManage::setSolarScheduleTheme(int type) { if (type == 0 || type == 1) { m_SolarScheduleColour->type = 4; m_SolarScheduleColour->dotColor = "#FF7272"; m_SolarScheduleColour->dotColor.setAlphaF(1); m_SolarScheduleColour->gradientFromC = "#FF7272"; m_SolarScheduleColour->gradientFromC.setAlphaF(0.3); m_SolarScheduleColour->gradientToC = "#FF7272"; m_SolarScheduleColour->gradientToC.setAlphaF(0.3); m_SolarScheduleColour->Purecolor = "#FF7272"; m_SolarScheduleColour->Purecolor.setAlphaF(0.3); m_SolarScheduleColour->shadowcolor = "#BA60FA"; m_SolarScheduleColour->textColor = "#000000"; m_SolarScheduleColour->timeColor = "#8548B1"; m_SolarScheduleColour->hightlightgradientFromC = "#F9AAAA"; m_SolarScheduleColour->hightlightgradientFromC.setAlphaF(1); m_SolarScheduleColour->hightlightgradientToC = "#F9AAAA"; m_SolarScheduleColour->hightlightgradientToC.setAlphaF(1); m_SolarScheduleColour->hightlightPurecolor = "#F9AAAA"; m_SolarScheduleColour->hightlightPurecolor.setAlphaF(1); m_SolarScheduleColour->hovergradientFromC = "#FFB0B1"; m_SolarScheduleColour->hovergradientToC = "#FFB0B1"; m_SolarScheduleColour->hovergradientFromC.setAlphaF(0.95); m_SolarScheduleColour->hovergradientToC.setAlphaF(0.95); m_SolarScheduleColour->hoverPurecolor = "#FF7272"; m_SolarScheduleColour->splitColor = "#FF7272"; m_SolarScheduleColour->pressgradientFromC = "#FF7272"; m_SolarScheduleColour->pressgradientFromC.setAlphaF(0.3); m_SolarScheduleColour->pressgradientToC = "#FF7272"; m_SolarScheduleColour->pressgradientToC.setAlphaF(0.3); m_SolarScheduleColour->pressPurecolor = m_SolarScheduleColour->Purecolor; m_SolarScheduleColour->pressgradientToC.setAlphaF(0.4); m_SolarScheduleColour->pressgradientFromC.setAlphaF(0.4); m_SolarScheduleColour->pressPurecolor.setAlphaF(0.1); } else { m_SolarScheduleColour->type = 4; m_SolarScheduleColour->dotColor = "#FF7272"; m_SolarScheduleColour->dotColor.setAlphaF(0.8); m_SolarScheduleColour->gradientFromC = "#FF7272"; m_SolarScheduleColour->gradientFromC.setAlphaF(0.3); m_SolarScheduleColour->gradientToC = "#FF7272"; m_SolarScheduleColour->gradientToC.setAlphaF(0.3); m_SolarScheduleColour->Purecolor = "#FF7272"; m_SolarScheduleColour->Purecolor.setAlphaF(0.3); m_SolarScheduleColour->shadowcolor = "#BA60FA"; m_SolarScheduleColour->textColor = "#C0C6D4"; m_SolarScheduleColour->timeColor = "#8548B1"; m_SolarScheduleColour->hightlightgradientFromC = "#A24545"; m_SolarScheduleColour->hightlightgradientFromC.setAlphaF(0.8); m_SolarScheduleColour->hightlightgradientToC = "#A24545"; m_SolarScheduleColour->hightlightgradientToC.setAlphaF(0.8); m_SolarScheduleColour->hightlightPurecolor = "#A24545"; m_SolarScheduleColour->hightlightPurecolor.setAlphaF(0.8); m_SolarScheduleColour->hovergradientFromC = "#E56464"; m_SolarScheduleColour->hovergradientToC = "#E56464"; m_SolarScheduleColour->hovergradientFromC.setAlphaF(0.35); m_SolarScheduleColour->hovergradientToC.setAlphaF(0.35); m_SolarScheduleColour->hoverPurecolor = "#E56464"; m_SolarScheduleColour->splitColor = "#FF7272"; m_SolarScheduleColour->pressgradientFromC = "#FF7272"; m_SolarScheduleColour->pressgradientFromC.setAlphaF(0.3); m_SolarScheduleColour->pressgradientToC = m_SolarScheduleColour->pressgradientFromC; // m_SolarScheduleColour->pressgradientToC = "#000000"; // m_SolarScheduleColour->pressgradientToC.setAlphaF(0.05); m_SolarScheduleColour->pressPurecolor = m_SolarScheduleColour->Purecolor; m_SolarScheduleColour->pressgradientToC.setAlphaF(0.4); m_SolarScheduleColour->pressgradientFromC.setAlphaF(0.4); m_SolarScheduleColour->pressPurecolor.setAlphaF(0.1); } } dde-calendar-5.7.0.23/schedule-plugin/src/data/schedulecolourmanage.h000066400000000000000000000042711375021633200254110ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULECOLOURMANAGE_H #define SCHEDULECOLOURMANAGE_H #include struct CSchedulesColor { int type; QColor gradientFromC; QColor gradientToC; QColor dotColor; QColor Purecolor; QColor shadowcolor; QColor textColor; QColor timeColor; QColor hightlightgradientFromC; QColor hightlightgradientToC; QColor hightlightPurecolor; QColor hovergradientFromC; QColor hovergradientToC; QColor hoverPurecolor; QColor splitColor; QColor pressgradientFromC; QColor pressgradientToC; QColor pressPurecolor; }; class ScheduleColourManage { public: ScheduleColourManage(); ~ScheduleColourManage(); public: void setTheMe(int type = 0); CSchedulesColor getColorByTypeId(const int &id); private: CSchedulesColor LifeScheduleColour() const; CSchedulesColor WorkScheduleColour() const; CSchedulesColor OtherScheduleColour() const; CSchedulesColor SolarScheduleColour() const; private: void setLifeScheduleTheme(int type = 0); void setWorkScheduleTheme(int type = 0); void setOtherScheduleTheme(int type = 0); void setSolarScheduleTheme(int type = 0); private: CSchedulesColor *m_LifeScheduleColour {nullptr}; CSchedulesColor *m_WorkScheduleColour {nullptr}; CSchedulesColor *m_OtherScheduleColour {nullptr}; CSchedulesColor *m_SolarScheduleColour {nullptr}; }; #endif // SCHEDULECOLOURMANAGE_H dde-calendar-5.7.0.23/schedule-plugin/src/data/schedulestructs.h000066400000000000000000000107731375021633200244500ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULESTURCTS_H #define SCHEDULESTURCTS_H #include #include #include #include typedef struct _tagScheduleRemindInfo { int id; QDateTime remindDateTime; int times; _tagScheduleRemindInfo() { times = 1; } } ScheduleRemindInfo; typedef struct _tagScheduleRemindData { int n; //全天代表天数 非全天代表分钟 QTime time; //全天该变量才有效 } ScheduleRemindData; typedef struct _tagScheduleEndRepeatData { int type; //0 永不 1 多少次结束 2 结束日期 QDateTime date; //为2时才有效 int tcount; //1时有效 } ScheduleEndRepeatData; typedef struct _tagScheduleType { QString typeName; //work life other QColor color; //颜色 int ID; } ScheduleType; typedef struct _tagScheduleDtailInfo { int id; QDateTime beginDateTime; QDateTime endDateTime; QVector ignore; QString titleName; QString description; bool allday; //1全天 ScheduleType type; //1工作 2 生活 3其他 int RecurID; //0 代表原始 大于0 代表克隆 bool remind; //0无 1 提醒 ScheduleRemindData remindData; int rpeat; //0 无 1 每天 2 每个工作日 3 每周 4每月 5每年 ScheduleEndRepeatData enddata; explicit _tagScheduleDtailInfo() { type.ID = -1; } bool operator==(const _tagScheduleDtailInfo &info) const { if (info.type.ID == 4) { return this->id == info.id && this->RecurID == info.RecurID && titleName == info.titleName && beginDateTime == info.beginDateTime; } else { return this->id == info.id && this->RecurID == info.RecurID && titleName == info.titleName; } } bool operator<(const _tagScheduleDtailInfo &info) const { if (beginDateTime.date() != endDateTime.date() && info.beginDateTime.date() == info.endDateTime.date()) { return true; } else if (beginDateTime.date() == endDateTime.date() && info.beginDateTime.date() != info.endDateTime.date()) { return false; } else if (beginDateTime.date() != endDateTime.date() && info.beginDateTime.date() != info.endDateTime.date()) { if (beginDateTime.date() == info.beginDateTime.date()) { return beginDateTime.daysTo(endDateTime) > info.beginDateTime.daysTo(info.endDateTime); } return beginDateTime.date() < info.beginDateTime.date(); } else { if (type.ID == 4) return true; if (info.type.ID == 4) return false; if (beginDateTime == info.beginDateTime) { if (titleName == info.titleName) { return id < info.id; } return titleName < info.titleName; } else { return beginDateTime < info.beginDateTime; } } } } ScheduleDtailInfo; typedef struct _tagScheduleDateRangeInfo { QDate date; QVector vData; } ScheduleDateRangeInfo; typedef struct _tagMScheduleDateRangeInfo { QDate bdate; QDate edate; bool state; int num; ScheduleDtailInfo tData; bool operator<(const _tagMScheduleDateRangeInfo &info) const { if (bdate == info.bdate) { if (bdate.daysTo(edate) == info.bdate.daysTo(info.edate)) { return tData < info.tData; } else { return bdate.daysTo(edate) > info.bdate.daysTo(info.edate); } } else { return bdate < info.bdate; } } bool operator==(const _tagMScheduleDateRangeInfo &info) const { return bdate == info.bdate && edate == info.edate && tData == info.tData && state == info.state && num == info.num; } } MScheduleDateRangeInfo; #endif dde-calendar-5.7.0.23/schedule-plugin/src/data/timedatastruct.h000066400000000000000000000035711375021633200242570ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 TIMEDATASTRUCT_H #define TIMEDATASTRUCT_H #include #include /** * @brief The ToDateTimeInfo struct 修改时间信息 * m_Date 日期信息 * m_Time 时间信息 * hasDate 是否存在日期信息 * hasTime 是否存在时间信息 */ struct DateTimeInfo { QDate m_Date{}; QTime m_Time{}; bool hasDate{false}; bool hasTime{false}; }; /** * @brief The SuggestDatetimeInfo struct 建议时间信息 * datetime 时间信息 * hasTime 是否存在具体时间点 */ struct SuggestDatetimeInfo{ QDateTime datetime {}; bool hasTime {false}; }; /** * @brief The ScheduleDateTime struct 语言时间信息 * m_DateTime 时间信息,获取时间点的时候需要用到 * m_sugTime 建议使用的时间信息 */ struct SemanticsDateTime { QVector dateTime{}; QVector suggestDatetime{}; /** * @brief clear 清空数据 */ void clear(){ this->dateTime.clear(); this->suggestDatetime.clear(); } }; #endif // TIMEDATASTRUCT_H dde-calendar-5.7.0.23/schedule-plugin/src/dbus/000077500000000000000000000000001375021633200210675ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/dbus/schedulesdbus.cpp000066400000000000000000000556671375021633200244530ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #include "schedulesdbus.h" #include #include #include /* * Implementation of interface class DCalendarDBus */ CSchedulesDBus::CSchedulesDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) { QDBusConnection::sessionBus().connect(this->service(), this->path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(__propertyChanged__(QDBusMessage))); } CSchedulesDBus::~CSchedulesDBus() { QDBusConnection::sessionBus().disconnect(service(), path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(propertyChanged(QDBusMessage))); } QString CSchedulesDBus::createScheduleDtailInfojson(const ScheduleDtailInfo &info) { QJsonObject json; json.insert("ID", info.id); json.insert("AllDay", info.allday); json.insert("Remind", createScheduleRemind(info)); json.insert("RRule", createScheduleRRule(info)); json.insert("Title", info.titleName); json.insert("Description", info.description); json.insert("Type", info.type.ID); json.insert("Start", toconvertData(info.beginDateTime)); json.insert("End", toconvertData(info.endDateTime)); //json.insert("Start", "2006-01-02T15:04:05+07:00"); //json.insert("End", "2006-01-02T17:04:05+07:00"); json.insert("RecurID", info.RecurID); QJsonArray jsonarry; for (int i = 0; i < info.ignore.count(); i++) { jsonarry.append(toconvertData(info.ignore.at(i))); } json.insert("Ignore", jsonarry); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } QString CSchedulesDBus::createScheduleTypejson(const ScheduleType &info) { QJsonObject json; json.insert("ID", info.ID); json.insert("Name", info.typeName); QString colorName = QString("#%1%2%3").arg(info.color.red(), 2, 16, QChar('0')).arg(info.color.green(), 2, 16, QChar('0')).arg(info.color.blue(), 2, 16, QChar('0')); json.insert("Color", info.color.name()); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } ScheduleType CSchedulesDBus::parsingScheduleTypejson(QJsonObject &object) { ScheduleType type; QJsonObject &rootObj = object; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { type.ID = rootObj.value("ID").toInt(); } if (rootObj.contains("Name")) { type.typeName = rootObj.value("Name").toString(); } if (rootObj.contains("Color")) { QString str = rootObj.value("Color").toString(); type.color = QColor(rootObj.value("Color").toString()); } return type; } ScheduleDtailInfo CSchedulesDBus::parsingScheduleDtailInfojsonID(QJsonObject &obj) { ScheduleDtailInfo info; QJsonObject &rootObj = obj; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { info.id = rootObj.value("ID").toInt(); } if (rootObj.contains("AllDay")) { info.allday = rootObj.value("AllDay").toBool(); } if (rootObj.contains("Remind")) { parsingScheduleRemind(rootObj.value("Remind").toString(), info); } if (rootObj.contains("Title")) { info.titleName = rootObj.value("Title").toString(); } if (rootObj.contains("Description")) { info.description = rootObj.value("Description").toString(); } if (rootObj.contains("Type")) { GetType(rootObj.value("Type").toInt(), info.type); } if (rootObj.contains("Start")) { info.beginDateTime = fromconvertData(rootObj.value("Start").toString()); } if (rootObj.contains("End")) { info.endDateTime = fromconvertData(rootObj.value("End").toString()); } if (rootObj.contains("RecurID")) { info.RecurID = rootObj.value("RecurID").toInt(); } if (rootObj.contains("RRule")) { parsingScheduleRRule(rootObj.value("RRule").toString(), info); } if (rootObj.contains("Ignore")) { QJsonArray subArray = rootObj.value("Ignore").toArray(); for (int i = 0; i < subArray.size(); i++) { QString subObj = subArray.at(i).toString(); info.ignore.append(fromconvertData(subObj)); } } return info; } QString CSchedulesDBus::createScheduleRRule(const ScheduleDtailInfo &info) { if (info.rpeat == 0) return QString(); // QString str = "'"; QString str; switch (info.rpeat) { case 1: { str += "FREQ=DAILY"; } break; case 2: { str += "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"; } break; case 3: { str += "FREQ=WEEKLY"; } break; case 4: { str += "FREQ=MONTHLY"; } break; case 5: { str += "FREQ=YEARLY"; } break; } switch (info.enddata.type) { case 1: { str += QString(";COUNT=%1").arg(info.enddata.tcount + 1); } break; case 2: { QDateTime datetime = info.enddata.date; //datetime.setDate(datetime); str += ";UNTIL=" + datetime.toString("yyyyMMddThhmmss") + "Z"; // str += ";UNTIL=" + toconvertData(datetime); } break; } //str += "'"; return str; } void CSchedulesDBus::parsingScheduleRRule(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.rpeat = 0; return; } QString rrulestrs = str; QStringList rruleslist = rrulestrs.split(";", QString::SkipEmptyParts); if (rruleslist.count() > 0) { if (rruleslist.contains("FREQ=DAILY") && rruleslist.contains("BYDAY=MO,TU,WE,TH,FR")) info.rpeat = 2; else if (rruleslist.contains("FREQ=DAILY")) { info.rpeat = 1; } else if (rruleslist.contains("FREQ=WEEKLY")) { info.rpeat = 3; } else if (rruleslist.contains("FREQ=MONTHLY")) { info.rpeat = 4; } else if (rruleslist.contains("FREQ=YEARLY")) { info.rpeat = 5; } info.enddata.type = 0; for (int i = 0; i < rruleslist.count(); i++) { if (rruleslist.at(i).contains("COUNT=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 1; info.enddata.tcount = liststr.at(1).toInt() - 1; } if (rruleslist.at(i).contains("UNTIL=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 2; info.enddata.date = QDateTime::fromString(liststr.at(1).left(liststr.at(1).count() - 1), "yyyyMMddThhmmss"); //info.enddata.date = fromconvertData(liststr.at(1)); info.enddata.date = info.enddata.date; } } } } QString CSchedulesDBus::createScheduleRemind(const ScheduleDtailInfo &info) { if (!info.remind) return QString(); QString str; if (info.allday) { str = QString::number(info.remindData.n) + ";" + info.remindData.time.toString("hh:mm"); } else { str = QString::number(info.remindData.n); } return str; } void CSchedulesDBus::parsingScheduleRemind(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.remind = false; return; } info.remind = true; if (info.allday) { QStringList liststr = str.split(";", QString::SkipEmptyParts); info.remindData.n = liststr.at(0).toInt(); info.remindData.time = QTime::fromString(liststr.at(1), "hh:mm"); } else { info.remindData.n = str.toInt(); } } QString CSchedulesDBus::toconvertData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "+" + datetimeutc.toString("hh:mm"); //QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "Z07:00"; return str; } QDateTime CSchedulesDBus::fromconvertData(QString str) { QStringList liststr = str.split("+", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } QString CSchedulesDBus::toconvertIGData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "Z" + datetimeutc.toString("hh:mm"); //QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "Z07:00"; return str; } QDateTime CSchedulesDBus::fromconvertiIGData(QString str) { QStringList liststr = str.split("Z", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } qint64 CSchedulesDBus::CreateJob(const ScheduleDtailInfo &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleDtailInfojson(info)); qDebug() << argumentList.at(0); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("CreateJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { qDebug() << reply; return -1; } QDBusReply id = reply; return id.value(); } bool CSchedulesDBus::GetJobs(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay, QVector &out) { QList argumentList; argumentList << QVariant::fromValue(startYear) << QVariant::fromValue(startMonth) << QVariant::fromValue(startDay); argumentList << QVariant::fromValue(endYear) << QVariant::fromValue(endMonth) << QVariant::fromValue(endDay); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::GetJob(qint64 jobId, ScheduleDtailInfo &out) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject ssubObj = jsonDoc.object(); out = parsingScheduleDtailInfojsonID(ssubObj); return true; } bool CSchedulesDBus::UpdateJob(const ScheduleDtailInfo &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleDtailInfojson(info)); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("UpdateJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { //dbus UpdateJob 错误提醒 qDebug()<<"UpdateJob Err"; qDebug()< jobs = reply; //if (!jobs.isValid()) return false; return true; } bool CSchedulesDBus::DeleteJob(qint64 jobId) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("DeleteJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } return true; } bool CSchedulesDBus::QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QVector &out) { QJsonObject qjson; qjson.insert("Key", key); qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QString &out) { QJsonObject qjson; qjson.insert("Key", key); qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; out = jobs.value().toLocal8Bit(); return true; } bool CSchedulesDBus::QueryJobsWithLimit(QDateTime starttime, QDateTime endtime, qint32 maxNum, QVector &out) { QJsonObject qjson; qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); qjson.insert("key", ""); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); argumentList << maxNum; QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobsWithLimit"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::QueryJobsWithRule(QDateTime starttime, QDateTime endtime, QString rule, QVector &out) { QJsonObject qjson; qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); qjson.insert("key", ""); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); argumentList << rule; QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobsWithRule"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::GetTypes(QVector &out) { QList argumentList; //argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetTypes"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); out.append(parsingScheduleTypejson(subObj)); } return true; } bool CSchedulesDBus::GetType(qint64 jobId, ScheduleType &out) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject subObj = jsonDoc.object(); out = parsingScheduleTypejson(subObj); return true; } qint64 CSchedulesDBus::CreateType(const ScheduleType &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleTypejson(info)); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("CreateType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return -1; } QDBusReply id = reply; return id.value(); } bool CSchedulesDBus::DeleteType(qint64 jobId) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("DeleteType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } return true; } bool CSchedulesDBus::UpdateType(const ScheduleType &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleTypejson(info)); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("UpdateType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage) { return false; } return true; } dde-calendar-5.7.0.23/schedule-plugin/src/dbus/schedulesdbus.h000066400000000000000000000107601375021633200241010ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #ifndef SCHEDULESDBUS_H #define SCHEDULESDBUS_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../data/schedulestructs.h" /* * Proxy class for interface com.deepin.api.LunarCalendar */ class CSchedulesDBus : public QDBusAbstractInterface { Q_OBJECT Q_SLOT void __propertyChanged__(const QDBusMessage &msg) { QList arguments = msg.arguments(); if (3 != arguments.count()) return; QString interfaceName = msg.arguments().at(0).toString(); if (interfaceName != "com.deepin.api.LunarCalendar") return; QVariantMap changedProps = qdbus_cast(arguments.at(1).value()); foreach (const QString &prop, changedProps.keys()) { const QMetaObject *self = metaObject(); for (int i = self->propertyOffset(); i < self->propertyCount(); ++i) { QMetaProperty p = self->property(i); if (p.name() == prop) { Q_EMIT p.notifySignal().invoke(this); } } } } public: static inline const char *staticInterfaceName() { return "com.deepin.daemon.Calendar.Scheduler"; } public: CSchedulesDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); ~CSchedulesDBus(); QString toconvertIGData(QDateTime date); QDateTime fromconvertiIGData(QString str); static QString createScheduleDtailInfojson(const ScheduleDtailInfo &info); ScheduleDtailInfo parsingScheduleDtailInfojsonID(QJsonObject &obj); private: QString createScheduleTypejson(const ScheduleType &info); ScheduleType parsingScheduleTypejson(QJsonObject &object); static QString createScheduleRRule(const ScheduleDtailInfo &info); void parsingScheduleRRule(QString str, ScheduleDtailInfo &info); static QString createScheduleRemind(const ScheduleDtailInfo &info); void parsingScheduleRemind(QString str, ScheduleDtailInfo &info); static QString toconvertData(QDateTime date); QDateTime fromconvertData(QString str); public Q_SLOTS: // METHODS qint64 CreateJob(const ScheduleDtailInfo &info); bool GetJobs(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay, QVector &out); bool GetJob(qint64 jobId, ScheduleDtailInfo &out); bool UpdateJob(const ScheduleDtailInfo &info); bool DeleteJob(qint64 jobId); bool QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QVector &out); bool QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QString &out); bool QueryJobsWithLimit(QDateTime starttime, QDateTime endtime, qint32 maxNum, QVector &out); bool QueryJobsWithRule(QDateTime starttime, QDateTime endtime, QString rule, QVector &out); bool GetTypes(QVector &out); bool GetType(qint64 jobId, ScheduleType &out); qint64 CreateType(const ScheduleType &info); bool DeleteType(qint64 jobId); bool UpdateType(const ScheduleType &info); Q_SIGNALS: // SIGNALS // begin property changed signals }; #endif dde-calendar-5.7.0.23/schedule-plugin/src/globaldef.h000066400000000000000000000157401375021633200222310ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 GLOBALDEF_H #define GLOBALDEF_H #define PLUGIN_TITLE_NAME "日历" #define LOG_FILENAME "/home/uniontech/.cache/deepin/dde-calendar/scheduleplugin.log" #define SERVICE_NAME "scheduleX" #define DBUS_SERVICE "com.deepin.daemon.Calendar" #define DBUS_PATCH "/com/deepin/daemon/Calendar/Scheduler" #define DBUS_CALENDAR_SERVICE "com.deepin.Calendar" #define DBUS_CALENDAR_PATCH "/com/deepin/Calendar" #define DBUS_CALENDAR_INTFACE "com.deepin.Calendar" #define NEW_SCHEDULE "新建日程" #define DATETIME_FRAME "yyyyMMdd hh:mm:ss" //日期格式 #define DATEFORMAT "yyyy-MM-dd" //时间格式 #define TIMEFORMAT "hh:mm:ss" #define PROCESS_OPEN_CALENDAR "dbus-send --print-reply --dest=com.deepin.Calendar /com/deepin/Calendar com.deepin.Calendar.RaiseWindow" //日程重复类型 //每天 #define DBUS_RRUL_EVED "FREQ=DAILY" //每周 #define DBUS_RRUL_EVEW "FREQ=WEEKLY" //每月 #define DBUS_RRUL_EVEM "FREQ=MONTHLY" //每年 #define DBUS_RRUL_EVEY "FREQ=YEARLY" //每个工作日 #define DBUS_RRUL_WORK "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR" //日程json关键字 #define JSON_CREATE "CREATE" #define JSON_VIEW "VIEW" #define JSON_CANCEL "CANCEL" #define JSON_CHANGE "CHANGE" #define JSON_NO_INTENT "NO_INTENT" #define JSON_YES_INTENT "YES_INTENT" //日程json槽位关键字 #define JSON_NAME "name" #define JSON_CONTENT "content" #define JSON_REPEAT "repeat" #define JSON_DATETIME "datetime" #define JSON_VALUE "value" #define JSON_NORMVALUE "normValue" #define JSON_PROPERTY "property" #define JSON_NEXT "next" #define JSON_LAST "last" #define JSON_FROMDATETIME "fromTime" #define JSON_TODATETIME "toTime" #define JSON_TOPLACE "toPlace" #define JSON_ALL "all" #define JSON_THIS "this" #define JSON_POSRANK_OFFSET "posRank.offset" #define JOSN_DATE_DELIMITER "/" #define JSON_DATETIME_DELIMITER "T" //每天多少秒 #define ONE_DAY_SECS 60 * 60 * 24 //widget show #define CONFIRM_BUTTON_STRING "确定" #define CANCEL_BUTTON_STRING "取消" #define DELETE_BUTTON_STRING "删除日程" #define DELETEALL_BUTTON_STRING "删除全部" #define ONLY_DELETE_THIS_BUTTON_STRING "仅删除此日程" #define CHANGE_ALL_BUTTON_STRING "修改全部" #define CHANGE_ONLYL_BUTTON_STRING "仅修改此日程" #define CREATE_ERR_TTS "新建功能不支持此说法" #define CANCEL_ERR_TTS "查询功能不支持此说法" //没有对应日程的回复语 #define QUERY_ERR_TTS "您还没有日程提醒,无法寻找对应的日程!" //修改日程初始状态错误回复语 #define CHANGE_INI_ERR_TSS "当前场景不支持这个操作哦。请问您要将什么日程修改到什么时间或修改到什么内容?" //修改日程询问回复语 #define CHANGE_TO_TTS "请问您要将此日程修改到什么时间或修改到什么内容?" //错误操作回复语 #define G_ERR_TTS "当前场景不支持这个操作哦。" //取消删除日程回复语 #define CANCEL_DELETION_TTS "已为您取消删除日程。" //确认删除日程回复语 #define CONFIRM_DELETION_TTS "已为您删除日程。" //取消修改日程回复语 #define CANCEL_CHANGE_TTS "已为您取消修改日程。" //确认修改日程回复语 #define CONFIRM_CHANGE_TTS "已为您修改日程。" //没有日程提醒回复语 #define NO_SCHEDULE_TTS "您还没有日程提醒。" //删除重复日程询问回复语 #define REPEST_SCHEDULE_CANCEL_TTS "该日程是循环的日程,请问是删除当前日程还是所有日程?" //删除普通日程询问回复语 #define CONFIRM_SCHEDULE_CANCEL_TTS "我要帮您取消这个日程吗?操作后将在日历中同步删除。" //删除选择日程回复语 #define CANCEL_SELECT_TTS "这是您的所有日程,您要删除哪一个日程?" //选择修改回复语 #define SELECT_CHANGE_TTS "这是您的所有日程,您要修改哪一个日程?" //修改重复日程询问回复语 #define REPEST_SCHEDULE_CHANGE_TTS "该日程是循环的日程,请问是修改当前日程还是所有日程?" //修改普通日程询问回复语 #define CONFIRM_SCHEDULE_CHANGE_TTS "我要帮您修改这个日程吗?操作后将在日历中同步修改。" //修改到的时间不在规定时间范围内 #define CHANGE_TIME_OUT_TTS "修改日程的时间范围为未来半年哦。" #define ALL_DAY "全天" //修改或取消时间不在未来半年的回复语 #define OVERTIME_TTS "只能取消或修改未来半年的日程!" //新建日程开始时间不在规定时间范围内 #define CREATE_TIME_OUT_TTS "只能创建未来半年的日程" //新建每周末提醒的日程的回复语 #define EVERY_WEEKEND_TTS "好的,每周六到周日的%1我都会提醒您。" //跨天日程,开始日期小于当前时间的回复语 #define BEGINDATETIME_LATER_THAN_CURRENTDATETIME_ACROSS_THE_DAY_TTS "好的,%1我会提醒您。" //查询日期过期 #define VIEW_DATE_IS_OVERDUE_TTS "抱歉,不能查询过期的提醒" //查询日程时间不再规定范围内 #define VIEW_DATETIME_OUT_TTS "只能查询未来半年的日程" //没有查询到日程 #define NO_SCHEDULE_VIEWED_TTS "没有找到对应的日程" //查找到n个日程 #define VIEW_SCHEDULE_TTS "找到%1个日程" //半年天数 #define MAXIMUM_DAYS_IN_THE_FUTURE 183 //不带窗口的回复宏定义 #define REPLY_ONLY_TTS(reply, msgtts, dsptts, isEnd) \ reply.setReplyType(Reply::RT_STRING_TTS | Reply::RT_STRING_DISPLAY); \ reply.ttsMessage(msgtts); \ reply.displayMessage(dsptts); \ reply.code(0); \ reply.setShouldEndSession(isEnd); \ //带窗口的回复宏定义 #define REPLY_WIDGET_TTS(reply, widget, msgtts, dsptts, isEnd) \ reply.setReplyType(Reply::RT_INNER_WIDGET | Reply::RT_STRING_TTS | Reply::RT_STRING_DISPLAY); \ reply.setReplyWidget(widget); \ reply.ttsMessage(msgtts); \ reply.displayMessage(dsptts); \ reply.code(0); \ reply.setShouldEndSession(isEnd); \ //未来半年开始时间和结束时间 #define TIME_FRAME_IN_THE_NEXT_SIX_MONTHT \ QDateTime beginTime = QDateTime::currentDateTime(); \ QDateTime endTime = QDateTime::currentDateTime().addDays(180); //modifyScheduleItem #define MODIFY_ITEM_HEIGHT 48 //item圆角 #define ITEM_RADIUS 8 //最多显示10个item #define ITEM_SHOW_NUM 10 #define OPENCALENDAR_WIDGET_TITLE "在“日历”中查看所有%1个结果..." #define OPENCALENDAR_WDIGET_HEIGHT 17 #endif // GLOBALDEF_H dde-calendar-5.7.0.23/schedule-plugin/src/interface/000077500000000000000000000000001375021633200220725ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/interface/reply.h000066400000000000000000000114511375021633200234000ustar00rootroot00000000000000#ifndef REPLY_H #define REPLY_H #include #include #include #include enum IRet { ERR_SUCCESS = (0), /* 一切正常 */ ERR_FAIL = (-1), /* 常规错误 */ ERR_PARAM = (-2), /* 函数入参异常 */ ERR_CONFIG = (-3), /* 配置错误 */ ERR_NOT_FOUND = (-4), /* 未找到对应项 */ ERR_UNSUPPORT_SERVICE = (-20), /* 不支持的服务 */ ERR_UNSUPPORT_INTENT = (-21), /* 不支持的操作 */ ERR_UNSUPPORT_SLOTS = (-22), /* 不支持的槽位 */ ERR_UNSUPPORT_ABILITY = (-23), /* 不支持的能力 */ ERR_UNSUPPORT_EXPRESS = (-24), /* 不支持的说法 */ ERR_CLOUD_SERVICE = (-100), /* 云端服务内容异常 */ ERR_CLOUD_INTENT = (-101), /* 云端意图内容异常 */ ERR_CLOUD_SLOTS = (-102) /* 云端参数内容异常 */ }; class Reply { public: enum ReplyType { RT_NONE = 0, RT_STRING_DISPLAY = 1, RT_STRING_TTS = 2, RT_POP_WIDGET = 4, RT_INNER_WIDGET = 8 }; public: Reply() : messageCode(ERR_FAIL) , messageDisplay() , messageTTS() , m_widget(nullptr) , m_replyType(RT_NONE) , m_shouldEndSession(true) { } Reply(int msgCode, const QString &message, int type = RT_STRING_TTS | RT_STRING_DISPLAY) : messageCode(msgCode) , messageDisplay(message) , messageTTS(message) , m_widget(nullptr) , m_replyType(type) , m_shouldEndSession(true) { } Reply(int msgCode, const QString &msgDisplay, const QString &msgSynthesis, int type, QWidget *parent) : messageCode(msgCode) , messageDisplay(msgDisplay) , messageTTS(msgSynthesis) , m_widget(parent) , m_replyType(type) , m_shouldEndSession(true) { } Reply(const Reply &reply) : messageCode(reply.messageCode) , messageDisplay(reply.messageDisplay) , messageTTS(reply.messageTTS) , m_widget(reply.m_widget) , m_replyType(reply.m_replyType) , m_shouldEndSession(reply.m_shouldEndSession) { } Reply &operator=(const Reply &reply) { this->messageCode = reply.messageCode; this->messageDisplay = reply.messageDisplay; this->messageTTS = reply.messageTTS; this->m_widget = reply.m_widget; this->m_replyType = reply.m_replyType; m_shouldEndSession = reply.m_shouldEndSession; return *this; } int code() { if (messageCode.isValid()) { return messageCode.toInt(); } else { return ERR_SUCCESS; } } void code(int msgCode) { this->messageCode = msgCode; } const QString displayMessage() { if (messageDisplay.isValid()) { return messageDisplay.toString(); } else { return ""; } } void displayMessage(const QString &msgDisplay) { this->messageDisplay = msgDisplay; } const QString ttsMessage() { if (messageTTS.isValid()) { return messageTTS.toString(); } else { return ""; } } void ttsMessage(const QString &msgSynthesis) { this->messageTTS = msgSynthesis; } void update(int msgCode) { this->messageCode = msgCode; } void update(int msgCode, const QString &message, int replyType = RT_STRING_TTS | RT_STRING_DISPLAY) { this->messageCode = msgCode; this->messageDisplay = message; this->messageTTS = message; this->m_replyType = replyType; } void update(int msgCode, const QString &msgDisplay, const QString &msgSynthesis, int replyType = RT_STRING_TTS | RT_STRING_DISPLAY) { this->messageCode = msgCode; this->messageDisplay = msgDisplay; this->messageTTS = msgSynthesis; this->m_replyType = replyType; } operator int() { return messageCode.toInt(); } bool isCodeValid() { return messageCode.isValid(); } bool isDisplayMessageValid() { return messageDisplay.isValid(); } bool isSynthesisMessageValid() { return messageTTS.isValid(); } QWidget *getReplyWidget() { return m_widget; } void setReplyWidget(QWidget *w) { m_widget = w; } int getReplyType() { return m_replyType; } void setReplyType(int type) { m_replyType = type; } int getShouldEndSession() { return m_shouldEndSession; } void setShouldEndSession(bool bShouldEndSession) { m_shouldEndSession = bShouldEndSession; } private: QVariant messageCode; QVariant messageDisplay; QVariant messageTTS; QWidget *m_widget; int m_replyType; bool m_shouldEndSession; }; #endif // REPLY_H dde-calendar-5.7.0.23/schedule-plugin/src/interface/service.h000066400000000000000000000014411375021633200237030ustar00rootroot00000000000000#ifndef SERVICE_H #define SERVICE_H #include #include "reply.h" /* 服务优先级: * SeriesIgnore表示该service可忽略 * ServicePriorityPatch表示服务修复代码,直接覆盖旧的服务 */ enum ServicePriority { ServicePriorityIgnore = -10, ServicePriorityLow = 0, SerivcePriorityNormal = 10, SerivcePriorityHigh = 50, SerivcePriorityPatch = 127 }; class IService : public QObject // IReplyHandler { Q_OBJECT public: virtual ~IService() {} virtual QString serviceName() = 0; virtual int servicePriority() = 0; virtual bool canHandle(const QString &s) = 0; virtual IRet service(const QString &semantic) = 0; virtual Reply &getServiceReply() = 0; signals: void signalSendShowMessage(Reply reply); }; #endif // SERVICE_H dde-calendar-5.7.0.23/schedule-plugin/src/interface/systemsemanticplugin.h000066400000000000000000000027341375021633200265400ustar00rootroot00000000000000#ifndef SYSTEM_SEMANTIC_PLUGIN_H #define SYSTEM_SEMANTIC_PLUGIN_H #include #include "service.h" #if defined(SYSTEM_SEMANTIC_LIBRARY) #define SYSTEMSEMANTICSHARED_EXPORT Q_DECL_EXPORT #else #define SYSTEMSEMANTICSHARED_EXPORT Q_DECL_IMPORT #endif #define AIAPluginProtocolVersion 1 class SYSTEMSEMANTICSHARED_EXPORT IServicePlugin { typedef std::function replyCallback; public: virtual ~IServicePlugin() {} virtual int init() = 0; /* 加载配置,初始化整个插件或服务 */ virtual void uninit() = 0; /* 插件逆向初始化 */ virtual QStringList getSupportService() = 0; virtual IService *createService(const QString &service) = 0; /* 获取一个服务,为多线程考量新建服务 */ virtual void releaseService(IService *service) = 0; /* 释放一个服务 */ virtual bool needRunInDifferentThread() { return true; /*当前线程是否需要在单独的线程中运行*/ } virtual bool isAutoDetectSession() { return true; /*是否自动检测多轮对话*/ } virtual int getPluginProtocolVersion() { return AIAPluginProtocolVersion; } virtual void setMessageHandle(replyCallback callback) { m_messageHandle = callback; } protected: replyCallback m_messageHandle; }; #define PluginInterface_iid "com.deepin.iflytek.aiassistant.3" Q_DECLARE_INTERFACE(IServicePlugin, PluginInterface_iid) #endif // SYSTEM_SEMANTIC_PLUGIN_H dde-calendar-5.7.0.23/schedule-plugin/src/scheduleplugin.cpp000066400000000000000000000044611375021633200236560ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "scheduleplugin.h" #include "scheduleservice.h" #include "globaldef.h" #include "task/schedulemanagetask.h" Scheduleplugin::Scheduleplugin(QObject *parent) { Q_UNUSED(parent); } Scheduleplugin::~Scheduleplugin() { ScheduleManageTask::releaseInstance(); } int Scheduleplugin::init() { return 0; } void Scheduleplugin::uninit() { } QStringList Scheduleplugin::getSupportService() { return QStringList {SERVICE_NAME}; } IService *Scheduleplugin::createService(const QString &service) { if (!getSupportService().contains(service)) { return nullptr; } QMutexLocker lock(&m_ServiceLock); auto pService = new scheduleservice(); connect(pService->getScheduleManageTask(), &ScheduleManageTask::signaleSendMessage, this, &Scheduleplugin::slotSendMessage, Qt::UniqueConnection); m_ServiceSet.insert(pService); return pService; } void Scheduleplugin::releaseService(IService *service) { QMutexLocker lock(&m_ServiceLock); for (auto iter = m_ServiceSet.begin(); iter != m_ServiceSet.end(); iter++) { if (service && service == *iter) { m_ServiceSet.erase(iter); break; } } if (service) { delete service; } } bool Scheduleplugin::needRunInDifferentThread() { return false; } bool Scheduleplugin::isAutoDetectSession() { //设置为不自动检测是否多论 return false; } void Scheduleplugin::slotSendMessage(Reply reply) { if (this->m_messageHandle) this->m_messageHandle(this, reply); } dde-calendar-5.7.0.23/schedule-plugin/src/scheduleplugin.h000066400000000000000000000034211375021633200233160ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULEPLUGIN_H #define SCHEDULEPLUGIN_H #include "interface/systemsemanticplugin.h" #include "interface/reply.h" #include class Scheduleplugin : public QObject , public IServicePlugin { Q_OBJECT Q_INTERFACES(IServicePlugin) Q_PLUGIN_METADATA(IID PluginInterface_iid) public: explicit Scheduleplugin(QObject *parent = nullptr); ~Scheduleplugin() override; int init() override; void uninit() override; QStringList getSupportService() override; IService *createService(const QString &service) override; void releaseService(IService *service) override; bool needRunInDifferentThread() override; /** * @brief isAutoDetectSession 是否自动检测多轮对话 * @return true 检测 false不检测由插件设置 */ bool isAutoDetectSession() override; public slots: void slotSendMessage(Reply reply); private: QSet m_ServiceSet; QMutex m_ServiceLock; }; #endif // SCHEDULEPLUGIN_H dde-calendar-5.7.0.23/schedule-plugin/src/scheduleservice.cpp000066400000000000000000000033771375021633200240250ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "scheduleservice.h" #include "globaldef.h" #include "task/schedulemanagetask.h" #include "task/semanticanalysistask.h" scheduleservice::scheduleservice() { } scheduleservice::~scheduleservice() { } QString scheduleservice::serviceName() { return SERVICE_NAME; } int scheduleservice::servicePriority() { return 0; } bool scheduleservice::canHandle(const QString &s) { Q_UNUSED(s); return true; } IRet scheduleservice::service(const QString &semantic) { //解析云端返回的数据,进行业务处理 QString str = semantic; semanticAnalysisTask task; if (!task.resolveTaskJson(str)) { return ERR_FAIL; } ScheduleManageTask::getInstance()->process(task); return ERR_SUCCESS; } Reply &scheduleservice::getServiceReply() { m_reply = ScheduleManageTask::getInstance()->getReply(); return m_reply; } ScheduleManageTask *scheduleservice::getScheduleManageTask() const { return ScheduleManageTask::getInstance(); } dde-calendar-5.7.0.23/schedule-plugin/src/scheduleservice.h000066400000000000000000000025141375021633200234620ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULESERVICE_H #define SCHEDULESERVICE_H #include "interface/service.h" class ScheduleManageTask; class scheduleservice : public IService { Q_OBJECT public: scheduleservice(); ~scheduleservice() override; QString serviceName() override; int servicePriority() override; bool canHandle(const QString &s) override; IRet service(const QString &semantic) override; Reply &getServiceReply() override; ScheduleManageTask *getScheduleManageTask() const; private: Reply m_reply; }; #endif // SCHEDULESERVICE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/000077500000000000000000000000001375021633200212525ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/state/confirwfeedbackstate.cpp000066400000000000000000000035421375021633200261370ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "confirwfeedbackstate.h" #include "../globaldef.h" #include "../task/schedulebasetask.h" #include "../data/clocaldata.h" #include "../data/changejsondata.h" confirwFeedbackState::confirwFeedbackState(CSchedulesDBus *dbus, scheduleBaseTask *task) : scheduleState(dbus, task) { } Reply confirwFeedbackState::getReplyByIntent(bool isOK) { return m_Task->confirmInfo(isOK); } scheduleState::Filter_Flag confirwFeedbackState::eventFilter(const JsonData *jsonData) { if (jsonData->getPropertyStatus() == JsonData::NEXT) { return Fileter_Init; } if (jsonData->getPropertyStatus() == JsonData::LAST || jsonData->offset() > 0) { return Fileter_Err; } Filter_Flag result = changeDateErrJudge(jsonData,Fileter_Init); return result; } Reply confirwFeedbackState::ErrEvent() { Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } Reply confirwFeedbackState::normalEvent(const JsonData *jsonData) { Q_UNUSED(jsonData); return m_Task->confirwScheduleHandle(m_localData->SelectInfo()); } dde-calendar-5.7.0.23/schedule-plugin/src/state/confirwfeedbackstate.h000066400000000000000000000023711375021633200256030ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CONFIRWFEEDBACKSTATE_H #define CONFIRWFEEDBACKSTATE_H #include "schedulestate.h" class confirwFeedbackState : public scheduleState { public: confirwFeedbackState(CSchedulesDBus *dbus, scheduleBaseTask *task); Reply getReplyByIntent(bool isOK) override; protected: Filter_Flag eventFilter(const JsonData *jsonData) override; Reply ErrEvent() override; Reply normalEvent(const JsonData *jsonData) override; }; #endif // CONFIRWFEEDBACKSTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/getchangedatastate.cpp000066400000000000000000000070001375021633200255730ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "getchangedatastate.h" #include "../globaldef.h" #include "../data/changejsondata.h" #include "../task/changescheduletask.h" getChangeDataState::getChangeDataState(CSchedulesDBus *dbus, scheduleBaseTask *task) :scheduleState(dbus,task) { } Reply getChangeDataState::getReplyByIntent(bool isOK) { Q_UNUSED(isOK); return ErrEvent(); } scheduleState::Filter_Flag getChangeDataState::eventFilter(const JsonData *jsonData) { //如果语义包含全部关键字则为修改初始状态 if (jsonData->getPropertyStatus() == JsonData::ALL //如果语义包含下一个关键字则为修改初始状态 || jsonData->getPropertyStatus() == JsonData::NEXT || jsonData->isVaild() //如果语义包含时间则为修改初始状态 || jsonData->getDateTime().suggestDatetime.size()>0 // 如果语义包含内容则为修改初始状态 || !jsonData->TitleName().isEmpty() //如果语义包含重复类型则为修改初始状态 || jsonData->getRepeatStatus() != JsonData::NONE) { return Filter_Flag::Fileter_Init; } if (jsonData->getPropertyStatus() == JsonData::LAST) return Fileter_Err; if (jsonData->offset() > 0) { return Fileter_Err; } //类型转换 JsonData *queryData = const_cast(jsonData); changejsondata *mchangeJsonData = dynamic_cast(queryData); //如果存在form信息则表示一个新的修改 if(mchangeJsonData->fromDateTime().suggestDatetime.size() > 0){ return Fileter_Init; } //如果存在修改的信息则为正常状态 if (mchangeJsonData->toDateTime().suggestDatetime.size() > 0 || !mchangeJsonData->toPlaceStr().isEmpty()) { return Fileter_Normal; }else { return Fileter_Err; } } Reply getChangeDataState::ErrEvent() { Reply reply; //返回错误输入的回复语 REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } Reply getChangeDataState::normalEvent(const JsonData *jsonData) { //类型转换 JsonData *queryData = const_cast(jsonData); changejsondata *mchangeJsonData = dynamic_cast(queryData); //如果有修改时间的信息则赋值 if(mchangeJsonData->toDateTime().suggestDatetime.size()>0){ m_localData->setToTime(mchangeJsonData->toDateTime().dateTime); } //如果有修改内容的信息则获取 if(!mchangeJsonData->toPlaceStr().isEmpty()){ m_localData->setToTitleName(mchangeJsonData->toPlaceStr()); } return m_Task->getReplyBySelectSchedule(m_localData->SelectInfo()); } dde-calendar-5.7.0.23/schedule-plugin/src/state/getchangedatastate.h000066400000000000000000000035361375021633200252520ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 GETCHANGEDATASTATE_H #define GETCHANGEDATASTATE_H #include "schedulestate.h" /** * @brief The getChangeDataState class 获取修改信息状态 */ class getChangeDataState : public scheduleState { public: getChangeDataState(CSchedulesDBus *dbus, scheduleBaseTask *task); /** * @brief getReplyByIntent 根据意图判断回复 * @param isOK 确认 或 取消 * @return 回复 */ Reply getReplyByIntent(bool isOK) override; protected: /** * @brief eventFilter 根据json过滤事件 * @param jsonData json对象 * @return 返回过滤结果 初始化,错误 或正常 */ Filter_Flag eventFilter(const JsonData *jsonData) override; /** * @brief ErrEvent 错误事件处理 * @return 给助手的回复 */ Reply ErrEvent() override; /** * @brief normalEvent 正常事件处理 * @param jsonData 需要处理的json数据 * @return 给助手的回复 */ Reply normalEvent(const JsonData *jsonData) override; }; #endif // GETCHANGEDATASTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/queryschedulestate.cpp000066400000000000000000000054541375021633200257110ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "queryschedulestate.h" #include "../task/queryscheduleproxy.h" #include "../task/schedulebasetask.h" #include "../data/schedulestructs.h" #include "../data/changejsondata.h" #include "../globaldef.h" #include "../data/clocaldata.h" queryScheduleState::queryScheduleState(CSchedulesDBus *dbus, scheduleBaseTask *task) : scheduleState(dbus, task) { } Reply queryScheduleState::getReplyByIntent(bool isOK) { Q_UNUSED(isOK); return ErrEvent(); } Reply queryScheduleState::ErrEvent() { Reply reply; REPLY_ONLY_TTS(reply, CHANGE_INI_ERR_TSS, CHANGE_INI_ERR_TSS, false) return reply; } Reply queryScheduleState::normalEvent(const JsonData *jsonData) { QVector m_scheduleInfo {}; JsonData *queryData = const_cast(jsonData); queryScheduleProxy m_querySchedule(queryData, m_dbus); m_scheduleInfo = m_querySchedule.querySchedule(); if (m_querySchedule.getTimeIsExpired()) { return m_Task->overdueScheduleProcess(); } else { changejsondata *mchangeJsonData = dynamic_cast(queryData); if (mchangeJsonData != nullptr) { if (m_localData == nullptr) m_localData = new CLocalData(); if (mchangeJsonData->toDateTime().suggestDatetime.size() > 0) { m_localData->setToTime(mchangeJsonData->toDateTime().dateTime); } if (!mchangeJsonData->toPlaceStr().isEmpty()) m_localData->setToTitleName(mchangeJsonData->toPlaceStr()); } return m_Task->getFeedbackByQuerySchedule(m_scheduleInfo); } } scheduleState::Filter_Flag queryScheduleState::eventFilter(const JsonData *jsonData) { if (jsonData->getPropertyStatus() == JsonData::LAST || jsonData->getPropertyStatus() == JsonData::PRO_THIS) return Fileter_Err; if (jsonData->offset() > -1 && jsonData->getPropertyStatus() == JsonData::PRO_NONE) return Fileter_Err; Filter_Flag result = changeDateErrJudge(jsonData,Fileter_Normal); return result; } dde-calendar-5.7.0.23/schedule-plugin/src/state/queryschedulestate.h000066400000000000000000000023731375021633200253530ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 QUERYSCHEDULESTATE_H #define QUERYSCHEDULESTATE_H #include "schedulestate.h" class queryScheduleState : public scheduleState { public: queryScheduleState(CSchedulesDBus *dbus, scheduleBaseTask *task); Reply getReplyByIntent(bool isOK) override; protected: Filter_Flag eventFilter(const JsonData *jsonData) override; Reply ErrEvent() override; Reply normalEvent(const JsonData *jsonData) override; protected: }; #endif // QUERYSCHEDULESTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/repeatfeedbackstate.cpp000066400000000000000000000051601375021633200257460ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "repeatfeedbackstate.h" #include "../globaldef.h" #include "../task/schedulebasetask.h" #include "../data/clocaldata.h" #include "../data/changejsondata.h" repeatfeedbackstate::repeatfeedbackstate(CSchedulesDBus *dbus, scheduleBaseTask *task) : scheduleState(dbus, task) { } Reply repeatfeedbackstate::getReplyByIntent(bool isOK) { if (isOK) { Q_UNUSED(isOK) Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } else { return m_Task->InitState(nullptr); } } scheduleState::Filter_Flag repeatfeedbackstate::eventFilter(const JsonData *jsonData) { if (jsonData->getPropertyStatus() == JsonData::NEXT //如果语义包含时间则为修改初始状态 || jsonData->getDateTime().suggestDatetime.size()>0 // 如果语义包含内容则为修改初始状态 || !jsonData->TitleName().isEmpty() //如果语义包含重复类型则为修改初始状态 || jsonData->getRepeatStatus() != JsonData::NONE) { return Fileter_Init; } if (jsonData->getPropertyStatus() == JsonData::ALL || jsonData->getPropertyStatus() == JsonData::PRO_THIS) { return Fileter_Normal; } if (jsonData->getPropertyStatus() == JsonData::LAST || jsonData->offset() > 0) { return Fileter_Err; } Filter_Flag result = changeDateErrJudge(jsonData,Fileter_Init); return result; } Reply repeatfeedbackstate::ErrEvent() { Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } Reply repeatfeedbackstate::normalEvent(const JsonData *jsonData) { bool isOnlyOne = true; if (jsonData->getPropertyStatus() == JsonData::ALL) { isOnlyOne = false; } return m_Task->repeatScheduleHandle(m_localData->SelectInfo(), isOnlyOne); } dde-calendar-5.7.0.23/schedule-plugin/src/state/repeatfeedbackstate.h000066400000000000000000000023631375021633200254150ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 REPEATFEEDBACKSTATE_H #define REPEATFEEDBACKSTATE_H #include "schedulestate.h" class repeatfeedbackstate : public scheduleState { public: repeatfeedbackstate(CSchedulesDBus *dbus, scheduleBaseTask *task); Reply getReplyByIntent(bool isOK) override; protected: Filter_Flag eventFilter(const JsonData *jsonData) override; Reply ErrEvent() override; Reply normalEvent(const JsonData *jsonData) override; }; #endif // REPEATFEEDBACKSTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/schedulestate.cpp000066400000000000000000000057601375021633200246230ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "schedulestate.h" #include "../task/schedulebasetask.h" #include "../data/changejsondata.h" scheduleState::scheduleState(CSchedulesDBus *dbus, scheduleBaseTask *task) : m_dbus(dbus) , m_Task(task) { } scheduleState::~scheduleState() { if (m_localData != nullptr) delete m_localData; } Reply scheduleState::process(const JsonData *jsonData) { Reply reply; switch (eventFilter(jsonData)) { case Fileter_Err: { reply = ErrEvent(); } break; case Fileter_Normal: { reply = normalEvent(jsonData); } break; case Fileter_Init: { reply = initEvent(jsonData); } break; } return reply; } void scheduleState::setNextState(scheduleState *nextState) { m_nextState = nextState; } scheduleState *scheduleState::getNextState() const { return m_nextState; } void scheduleState::setLocalData(CLocalData *localData) { if (m_localData == localData) { return; } if (m_localData != nullptr) { delete m_localData; m_localData = nullptr; } if (localData == nullptr) return; m_localData = localData; } CLocalData *scheduleState::getLocalData() const { return m_localData; } Reply scheduleState::initEvent(const JsonData *jsonData) { return m_Task->InitState(jsonData); } scheduleState::Filter_Flag scheduleState::changeDateErrJudge(const JsonData *jsonData, const scheduleState::Filter_Flag &defaultflag) { Filter_Flag resultFlag {defaultflag}; //如果只有修改信息没有被修改信息返回错误 JsonData *queryData = const_cast(jsonData); changejsondata *mchangeJsonData = dynamic_cast(queryData); if (mchangeJsonData != nullptr) { //是否含有修改信息 bool hasChangeToData = !mchangeJsonData->toPlaceStr().isEmpty()|| mchangeJsonData->toDateTime().suggestDatetime.size() >0; //是否不包含需要修改的信息 bool noChangeDate = mchangeJsonData->fromDateTime().suggestDatetime.size() == 0 &&mchangeJsonData->TitleName().isEmpty(); if (hasChangeToData &&noChangeDate ) { resultFlag = Filter_Flag::Fileter_Err; } } return resultFlag; } dde-calendar-5.7.0.23/schedule-plugin/src/state/schedulestate.h000066400000000000000000000044331375021633200242640ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULESTATE_H #define SCHEDULESTATE_H #include "../data/jsondata.h" #include "../interface/reply.h" #include "../data/clocaldata.h" class JsonData; class CSchedulesDBus; class scheduleBaseTask; class scheduleState { public: enum Filter_Flag { Fileter_Err, Fileter_Normal, Fileter_Init }; public: scheduleState(CSchedulesDBus *dbus, scheduleBaseTask *task); virtual ~scheduleState(); Reply process(const JsonData *jsonData); void setNextState(scheduleState *nextState); scheduleState *getNextState() const; void setLocalData(CLocalData *localData); CLocalData *getLocalData() const; virtual Reply getReplyByIntent(bool isOK) = 0; protected: virtual Filter_Flag eventFilter(const JsonData *jsonData) = 0; virtual Reply ErrEvent() = 0; virtual Reply normalEvent(const JsonData *jsonData) = 0; Reply initEvent(const JsonData *jsonData); /** * @brief changeDateErrJudge 修改数据错误判断,在非获取修改数据状态下,输入“修改到xxx”返回错误信息 * @param jsonData json数据 * @param defaultflag 默认返回标志 * @return 过滤标志 */ Filter_Flag changeDateErrJudge(const JsonData *jsonData,const Filter_Flag &defaultflag); protected: CSchedulesDBus *m_dbus {nullptr}; scheduleBaseTask *m_Task {nullptr}; scheduleState *m_nextState {nullptr}; CLocalData *m_localData {nullptr}; }; #endif // SCHEDULESTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/selectandquerystate.cpp000066400000000000000000000105161375021633200260520ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "selectandquerystate.h" #include "../globaldef.h" #include "../task/schedulebasetask.h" #include "../data/changejsondata.h" SelectAndQueryState::SelectAndQueryState(CSchedulesDBus *dbus, scheduleBaseTask *task) : scheduleState(dbus, task) { } Reply SelectAndQueryState::getReplyByIntent(bool isOK) { Q_UNUSED(isOK) Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } scheduleState::Filter_Flag SelectAndQueryState::eventFilter(const JsonData *jsonData) { //如果语义包含全部关键字则为修改初始状态 if (jsonData->getPropertyStatus() == JsonData::ALL //如果语义包含下一个关键字则为修改初始状态 || jsonData->getPropertyStatus() == JsonData::NEXT || jsonData->isVaild() //如果语义包含时间则为修改初始状态 || jsonData->getDateTime().suggestDatetime.size()>0 // 如果语义包含内容则为修改初始状态 || !jsonData->TitleName().isEmpty() //如果语义包含重复类型则为修改初始状态 || jsonData->getRepeatStatus() != JsonData::NONE) { return Filter_Flag::Fileter_Init; } if (jsonData->getPropertyStatus() == JsonData::LAST) return Fileter_Normal; JsonData *queryData = const_cast(jsonData); changejsondata *mchangeJsonData = dynamic_cast(queryData); if (mchangeJsonData->fromDateTime().suggestDatetime.size() > 0) { return Filter_Flag::Fileter_Init; } //根据列表编号判断 if (m_localData->getOffet() < 0 && jsonData->offset() < 0) { return Fileter_Err; } bool showOpenWidget = m_localData->scheduleInfoVector().size() > ITEM_SHOW_NUM; const int showcount = showOpenWidget ? ITEM_SHOW_NUM : m_localData->scheduleInfoVector().size(); if (jsonData->offset() > showcount) { return Fileter_Err; } return Fileter_Normal; } Reply SelectAndQueryState::ErrEvent() { Reply reply; REPLY_ONLY_TTS(reply, QUERY_ERR_TTS, QUERY_ERR_TTS, true) return reply; } Reply SelectAndQueryState::normalEvent(const JsonData *jsonData) { bool showOpenWidget = m_localData->scheduleInfoVector().size() > ITEM_SHOW_NUM; const int showcount = showOpenWidget ? ITEM_SHOW_NUM : m_localData->scheduleInfoVector().size(); int offset = 0; //获取第N个日程 if (jsonData->getPropertyStatus() == JsonData::LAST) { offset = showcount; }else { offset = jsonData->offset(); } if(offset > 0){ m_localData->setOffset(offset); m_localData->setSelectInfo(m_localData->scheduleInfoVector().at(offset - 1)); ScheduleDtailInfo info = m_localData->SelectInfo(); //如果语义为“第xx个修改到xxx”,添加对修改信息的获取 //类型转换 JsonData *queryData = const_cast(jsonData); changejsondata *mchangeJsonData = dynamic_cast(queryData); //如果有修改时间的信息则赋值 if(mchangeJsonData->toDateTime().suggestDatetime.size()>0){ m_localData->setToTime(mchangeJsonData->toDateTime().dateTime); } //如果有修改内容的信息则获取 if(!mchangeJsonData->toPlaceStr().isEmpty()){ m_localData->setToTitleName(mchangeJsonData->toPlaceStr()); } return m_Task->getReplyBySelectSchedule(m_localData->SelectInfo()); }else { qDebug()<<"offset <=0"; Reply reply; REPLY_ONLY_TTS(reply,G_ERR_TTS,G_ERR_TTS,false); return reply; } } dde-calendar-5.7.0.23/schedule-plugin/src/state/selectandquerystate.h000066400000000000000000000023641375021633200255210ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SELECTANDQUERYSTATE_H #define SELECTANDQUERYSTATE_H #include "schedulestate.h" class SelectAndQueryState : public scheduleState { public: SelectAndQueryState(CSchedulesDBus *dbus, scheduleBaseTask *task); Reply getReplyByIntent(bool isOK) override; protected: Filter_Flag eventFilter(const JsonData *jsonData) override; Reply ErrEvent() override; Reply normalEvent(const JsonData *jsonData) override; }; #endif // SELECTANDQUERYSTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/state/selectinquirystate.cpp000066400000000000000000000053561375021633200257300ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "selectinquirystate.h" #include "../globaldef.h" #include "../widget/repeatschedulewidget.h" #include "../task/schedulebasetask.h" selectInquiryState::selectInquiryState(CSchedulesDBus *dbus, scheduleBaseTask *task) : scheduleState(dbus, task) { } Reply selectInquiryState::getReplyByIntent(bool isOK) { Q_UNUSED(isOK) Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } scheduleState::Filter_Flag selectInquiryState::eventFilter(const JsonData *jsonData) { if (jsonData->getPropertyStatus() == JsonData::ALL || jsonData->getPropertyStatus() == JsonData::NEXT || jsonData->isVaild() || jsonData->getRepeatStatus() != JsonData::NONE) { return Filter_Flag::Fileter_Init; } if (jsonData->getPropertyStatus() == JsonData::LAST) return Fileter_Normal; if (jsonData->getDateTime().suggestDatetime.size() > 0 || !jsonData->TitleName().isEmpty()) { return Fileter_Init; } bool showOpenWidget = m_localData->scheduleInfoVector().size() > ITEM_SHOW_NUM; const int showcount = showOpenWidget ? ITEM_SHOW_NUM : m_localData->scheduleInfoVector().size(); if (jsonData->offset() > showcount) { return Fileter_Err; } return Fileter_Normal; } Reply selectInquiryState::ErrEvent() { Reply reply; REPLY_ONLY_TTS(reply, QUERY_ERR_TTS, QUERY_ERR_TTS, true) return reply; } Reply selectInquiryState::normalEvent(const JsonData *jsonData) { bool showOpenWidget = m_localData->scheduleInfoVector().size() > ITEM_SHOW_NUM; const int showcount = showOpenWidget ? ITEM_SHOW_NUM : m_localData->scheduleInfoVector().size(); int offset = 0; if (jsonData->getPropertyStatus() == JsonData::LAST) { offset = showcount; } else { offset = jsonData->offset(); } Reply m_reply; ScheduleDtailInfo info = m_localData->scheduleInfoVector().at(offset - 1); return m_Task->getReplyBySelectSchedule(info); } dde-calendar-5.7.0.23/schedule-plugin/src/state/selectinquirystate.h000066400000000000000000000024361375021633200253710ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SELECTINQUIRYSTATE_H #define SELECTINQUIRYSTATE_H #include "schedulestate.h" #include "../data/schedulestructs.h" class selectInquiryState : public scheduleState { public: selectInquiryState(CSchedulesDBus *dbus, scheduleBaseTask *task); Reply getReplyByIntent(bool isOK) override; protected: Filter_Flag eventFilter(const JsonData *jsonData) override; Reply ErrEvent() override; Reply normalEvent(const JsonData *jsonData) override; private: }; #endif // SELECTINQUIRYSTATE_H dde-calendar-5.7.0.23/schedule-plugin/src/task/000077500000000000000000000000001375021633200210745ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/task/cancelscheduletask.cpp000066400000000000000000000213711375021633200254310ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "cancelscheduletask.h" #include "../data/canceljsondata.h" #include "../globaldef.h" #include "../widget/schedulelistwidget.h" #include "../widget/repeatschedulewidget.h" #include "queryscheduleproxy.h" #include "../state/queryschedulestate.h" #include "../state/selectinquirystate.h" #include "../state/repeatfeedbackstate.h" #include "../data/clocaldata.h" #include "../state/confirwfeedbackstate.h" cancelScheduleTask::cancelScheduleTask(CSchedulesDBus *dbus) : scheduleBaseTask(dbus, new queryScheduleState(dbus, this)) { } void cancelScheduleTask::slotSelectScheduleIndex(int index) { scheduleState *currentState = getCurrentState(); CLocalData *localData = currentState->getLocalData(); if (!(localData->scheduleInfoVector().size() < index)) { Reply reply = getReplyBySelectSchedule(localData->scheduleInfoVector().at(index - 1)); updateState(); emit signaleSendMessage(reply); } } void cancelScheduleTask::slotButtonCheckNum(int index, const QString &text, const int buttonCount) { Q_UNUSED(text); Reply reply; scheduleState *currentState = getCurrentState(); if (buttonCount == 2) { if (index == 1) { reply = confirwScheduleHandle(currentState->getLocalData()->SelectInfo()); } } if (buttonCount == 3) { if (index == 1) { reply = repeatScheduleHandle(currentState->getLocalData()->SelectInfo(), false); } if (index == 2) { reply = repeatScheduleHandle(currentState->getLocalData()->SelectInfo(), true); } } if (index == 0) { reply = InitState(nullptr, true); } else { InitState(nullptr, true); } emit signaleSendMessage(reply); } scheduleState *cancelScheduleTask::getCurrentState() { scheduleState *currentState = m_State; while (currentState->getNextState() != nullptr) { currentState = currentState->getNextState(); } return currentState; } Reply cancelScheduleTask::getFeedbackByQuerySchedule(const QVector &infoVector) { Reply m_reply; scheduleState *nextState = nullptr; scheduleState *currentState = getCurrentState(); if (infoVector.size() == 0) { QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = NO_SCHEDULE_TTS; m_DisplyMessage = NO_SCHEDULE_TTS; REPLY_ONLY_TTS(m_reply, m_TTSMessage, m_DisplyMessage, true); currentState->setNextState(nextState); } else if (infoVector.size() == 1) { m_reply = getReplyBySelectSchedule(infoVector.at(0)); } else { nextState = new selectInquiryState(m_dbus, this); CLocalData *m_Data = new CLocalData(); m_Data->setScheduleInfoVector(infoVector); nextState->setLocalData(m_Data); m_reply = getListScheduleReply(infoVector); currentState->setNextState(nextState); } return m_reply; } Reply cancelScheduleTask::getReplyBySelectSchedule(const ScheduleDtailInfo &info) { Reply m_reply; CLocalData *m_Data = new CLocalData(); scheduleState *nextState = nullptr; scheduleState *currentState = getCurrentState(); m_Data->setSelectInfo(info); if (info.rpeat == 0) { nextState = new confirwFeedbackState(m_dbus, this); m_reply = getConfirwScheduleReply(info); } else { nextState = new repeatfeedbackstate(m_dbus, this); m_reply = getRepeatReply(info); } nextState->setLocalData(m_Data); currentState->setNextState(nextState); return m_reply; } Reply cancelScheduleTask::InitState(const JsonData *jsonData, bool isUpdateState) { Reply m_reply; scheduleState *nextState = new queryScheduleState(m_dbus, this); scheduleState *currentState = getCurrentState(); currentState->setNextState(nextState); if (jsonData != nullptr) { m_reply = nextState->process(jsonData); } else { REPLY_ONLY_TTS(m_reply, CANCEL_DELETION_TTS, CANCEL_DELETION_TTS, true); } if (isUpdateState) { updateState(); } return m_reply; } Reply cancelScheduleTask::repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne) { deleteRepeatSchedule(info, isOnlyOne); Reply reply; REPLY_ONLY_TTS(reply, CONFIRM_DELETION_TTS, CONFIRM_DELETION_TTS, true); scheduleState *nextState = new queryScheduleState(m_dbus, this); scheduleState *currentState = getCurrentState(); currentState->setNextState(nextState); return reply; } Reply cancelScheduleTask::confirwScheduleHandle(const ScheduleDtailInfo &info) { deleteOrdinarySchedule(info); Reply reply; REPLY_ONLY_TTS(reply, CONFIRM_DELETION_TTS, CONFIRM_DELETION_TTS, true); scheduleState *nextState = new queryScheduleState(m_dbus, this); scheduleState *currentState = getCurrentState(); currentState->setNextState(nextState); return reply; } Reply cancelScheduleTask::confirmInfo(bool isOK) { if (isOK) { scheduleState *currentState = getCurrentState(); return confirwScheduleHandle(currentState->getLocalData()->SelectInfo()); } else { return InitState(nullptr); } } QWidget *cancelScheduleTask::createRepeatWidget(const ScheduleDtailInfo &info) { repeatScheduleWidget *repeatWidget = new repeatScheduleWidget(repeatScheduleWidget::Operation_Cancel, repeatScheduleWidget::Widget_Repeat); repeatWidget->setSchedule(info); connect(repeatWidget, &repeatScheduleWidget::signalButtonCheckNum, this, &cancelScheduleTask::slotButtonCheckNum); return repeatWidget; } QWidget *cancelScheduleTask::createConfirmWidget(const ScheduleDtailInfo &info) { repeatScheduleWidget *cwidget = new repeatScheduleWidget(repeatScheduleWidget::Operation_Cancel, repeatScheduleWidget::Widget_Confirm); cwidget->setSchedule(info); connect(cwidget, &repeatScheduleWidget::signalButtonCheckNum, this, &cancelScheduleTask::slotButtonCheckNum); return cwidget; } Reply cancelScheduleTask::getListScheduleReply(const QVector &infoVector) { scheduleListWidget *m_viewWidget = new scheduleListWidget(); m_viewWidget->setScheduleInfoVector(infoVector); connect(m_viewWidget, &scheduleListWidget::signalSelectScheduleIndex, this, &cancelScheduleTask::slotSelectScheduleIndex); QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = CANCEL_SELECT_TTS; m_DisplyMessage = CANCEL_SELECT_TTS; Reply reply; REPLY_WIDGET_TTS(reply, m_viewWidget, m_TTSMessage, m_DisplyMessage, false); return reply; } Reply cancelScheduleTask::getConfirwScheduleReply(const ScheduleDtailInfo &info) { QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = CONFIRM_SCHEDULE_CANCEL_TTS; m_DisplyMessage = CONFIRM_SCHEDULE_CANCEL_TTS; QWidget *m_confirwWidget = createConfirmWidget(info); Reply reply; REPLY_WIDGET_TTS(reply, m_confirwWidget, m_TTSMessage, m_DisplyMessage, false); return reply; } Reply cancelScheduleTask::getRepeatReply(const ScheduleDtailInfo &info) { QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = REPEST_SCHEDULE_CANCEL_TTS; m_DisplyMessage = REPEST_SCHEDULE_CANCEL_TTS; QWidget *m_repeatReply = createRepeatWidget(info); Reply reply; REPLY_WIDGET_TTS(reply, m_repeatReply, m_TTSMessage, m_DisplyMessage, false); return reply; } void cancelScheduleTask::deleteRepeatSchedule(const ScheduleDtailInfo &info, bool isOnlyOne) { if (isOnlyOne) { ScheduleDtailInfo newschedule; m_dbus->GetJob(info.id, newschedule); newschedule.ignore.append(info.beginDateTime); m_dbus->UpdateJob(newschedule); } else { if (info.RecurID == 0) { m_dbus->DeleteJob(info.id); } else { ScheduleDtailInfo newschedule; m_dbus->GetJob(info.id, newschedule); newschedule.enddata.type = 2; newschedule.enddata.date = info.beginDateTime.addDays(-1); m_dbus->UpdateJob(newschedule); } } } void cancelScheduleTask::deleteOrdinarySchedule(const ScheduleDtailInfo &info) { m_dbus->DeleteJob(info.id); } dde-calendar-5.7.0.23/schedule-plugin/src/task/cancelscheduletask.h000066400000000000000000000042371375021633200251000ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CANCELSCHEDULETASK_H #define CANCELSCHEDULETASK_H #include "schedulebasetask.h" class scheduleState; class cancelScheduleTask : public scheduleBaseTask { Q_OBJECT public: cancelScheduleTask(CSchedulesDBus *dbus); Reply getFeedbackByQuerySchedule(const QVector &infoVector) override; Reply getReplyBySelectSchedule(const ScheduleDtailInfo &info) override; Reply InitState(const JsonData *jsonData, bool isUpdateState = false) override; Reply repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne) override; Reply confirwScheduleHandle(const ScheduleDtailInfo &info) override; Reply confirmInfo(bool isOK) override; public slots: void slotSelectScheduleIndex(int index); void slotButtonCheckNum(int index, const QString &text, const int buttonCount); private: scheduleState *getCurrentState(); QWidget *createRepeatWidget(const ScheduleDtailInfo &info); QWidget *createConfirmWidget(const ScheduleDtailInfo &info); Reply getListScheduleReply(const QVector &infoVector); Reply getConfirwScheduleReply(const ScheduleDtailInfo &info); Reply getRepeatReply(const ScheduleDtailInfo &info); void deleteRepeatSchedule(const ScheduleDtailInfo &info, bool isOnlyOne = true); void deleteOrdinarySchedule(const ScheduleDtailInfo &info); private: }; #endif // CANCELSCHEDULETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/changescheduletask.cpp000066400000000000000000000373321375021633200254350ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "changescheduletask.h" #include "../data/changejsondata.h" #include "../globaldef.h" #include "../widget/schedulelistwidget.h" #include "../widget/repeatschedulewidget.h" #include "queryscheduleproxy.h" #include "../state/selectandquerystate.h" #include "../state/confirwfeedbackstate.h" #include "../state/queryschedulestate.h" #include "../state/repeatfeedbackstate.h" #include "../state/getchangedatastate.h" changeScheduleTask::changeScheduleTask(CSchedulesDBus *dbus) : scheduleBaseTask(dbus, new queryScheduleState(dbus, this)) { } Reply changeScheduleTask::getFeedbackByQuerySchedule(const QVector &infoVector) { Reply m_reply; scheduleState *nextState = nullptr; scheduleState *currentState = getCurrentState(); if (infoVector.size() == 0) { QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = NO_SCHEDULE_TTS; m_DisplyMessage = NO_SCHEDULE_TTS; REPLY_ONLY_TTS(m_reply, m_TTSMessage, m_DisplyMessage, true); currentState->setNextState(nextState); } else if (infoVector.size() == 1) { currentState->getLocalData()->setSelectInfo(infoVector.at(0)); m_reply = getReplyBySelectSchedule(infoVector.at(0)); } else { nextState = new SelectAndQueryState(m_dbus, this); CLocalData *m_Data = new CLocalData(); m_Data->getDataByPoint(currentState->getLocalData()); m_Data->setScheduleInfoVector(infoVector); nextState->setLocalData(m_Data); m_reply = getListScheduleReply(infoVector); currentState->setNextState(nextState); } return m_reply; } void changeScheduleTask::slotSelectScheduleIndex(int index) { scheduleState *currentState = getCurrentState(); CLocalData *localData = currentState->getLocalData(); if (!(localData->scheduleInfoVector().size() < index)) { localData->setSelectInfo(localData->scheduleInfoVector().at(index - 1)); Reply reply = getReplyBySelectSchedule(localData->scheduleInfoVector().at(index - 1)); updateState(); emit signaleSendMessage(reply); } } void changeScheduleTask::slotButtonCheckNum(int index, const QString &text, const int buttonCount) { Q_UNUSED(text); Reply reply; scheduleState *currentState = getCurrentState(); if (buttonCount == 2) { if (index == 1) { reply = confirwScheduleHandle(currentState->getLocalData()->SelectInfo()); } } if (buttonCount == 3) { if (index == 1) { reply = repeatScheduleHandle(currentState->getLocalData()->SelectInfo(), false); } if (index == 2) { reply = repeatScheduleHandle(currentState->getLocalData()->SelectInfo(), true); } } if (index == 0) { reply = InitState(nullptr, true); } else { InitState(nullptr, true); } emit signaleSendMessage(reply); } scheduleState *changeScheduleTask::getCurrentState() { scheduleState *currentState = m_State; while (currentState->getNextState() != nullptr) { currentState = currentState->getNextState(); } return currentState; } Reply changeScheduleTask::getReplyBySelectSchedule(const ScheduleDtailInfo &info) { Reply m_reply; scheduleState *nextState = nullptr; CLocalData *m_Data = new CLocalData(); scheduleState *currentState = getCurrentState(); m_Data->getDataByPoint(currentState->getLocalData()); m_Data->setSelectInfo(info); if (m_Data->getOffet() < 0) { m_Data->setOffset(1); } if (m_Data->getToTime().size() == 0 && m_Data->getToTitleName() == "") { QWidget *infoWidget = createInquiryWidget(info); REPLY_WIDGET_TTS(m_reply, infoWidget, CHANGE_TO_TTS, CHANGE_TO_TTS, false); //添加获取修改信息状态 nextState = new getChangeDataState(m_dbus, this); nextState->setLocalData(m_Data); } else { //获取下一个状态 nextState = getNextStateBySelectScheduleInfo(info,m_Data,m_reply); } currentState->setNextState(nextState); return m_reply; } Reply changeScheduleTask::InitState(const JsonData *jsonData, bool isUpdateState) { Reply m_reply; scheduleState *nextState = new queryScheduleState(m_dbus, this); scheduleState *currentState = getCurrentState(); currentState->setNextState(nextState); if (jsonData != nullptr) { if (currentState->getLocalData() != nullptr) { currentState->setLocalData(nullptr); } m_reply = nextState->process(jsonData); } else { REPLY_ONLY_TTS(m_reply, CANCEL_CHANGE_TTS, CANCEL_CHANGE_TTS, true); } if (isUpdateState) { updateState(); } return m_reply; } Reply changeScheduleTask::repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne) { changeRepeatSchedule(info, isOnlyOne); Reply reply; REPLY_ONLY_TTS(reply, CONFIRM_CHANGE_TTS, CONFIRM_CHANGE_TTS, true); scheduleState *nextState = new queryScheduleState(m_dbus, this); scheduleState *currentState = getCurrentState(); currentState->setNextState(nextState); return reply; } Reply changeScheduleTask::confirwScheduleHandle(const ScheduleDtailInfo &info) { Q_UNUSED(info); scheduleState *currentState = getCurrentState(); changeOrdinarySchedule(currentState->getLocalData()->getNewInfo()); Reply reply; REPLY_ONLY_TTS(reply, CONFIRM_CHANGE_TTS, CONFIRM_CHANGE_TTS, true); scheduleState *nextState = new queryScheduleState(m_dbus, this); currentState->setNextState(nextState); return reply; } Reply changeScheduleTask::confirmInfo(bool isOK) { scheduleState *currentState = getCurrentState(); if (isOK) { Q_UNUSED(isOK) changeOrdinarySchedule(currentState->getLocalData()->getNewInfo()); Reply reply; REPLY_ONLY_TTS(reply, CONFIRM_CHANGE_TTS, CONFIRM_CHANGE_TTS, true) return reply; } else { return InitState(nullptr); } } QWidget *changeScheduleTask::createRepeatWidget(const ScheduleDtailInfo &info) { repeatScheduleWidget *repeatWidget = new repeatScheduleWidget(repeatScheduleWidget::Operation_Change, repeatScheduleWidget::Widget_Repeat); repeatWidget->setSchedule(info); connect(repeatWidget, &repeatScheduleWidget::signalButtonCheckNum, this, &changeScheduleTask::slotButtonCheckNum); return repeatWidget; } QWidget *changeScheduleTask::createConfirmWidget(const ScheduleDtailInfo &info) { repeatScheduleWidget *cwidget = new repeatScheduleWidget(repeatScheduleWidget::Operation_Change, repeatScheduleWidget::Widget_Confirm); cwidget->setSchedule(info); connect(cwidget, &repeatScheduleWidget::signalButtonCheckNum, this, &changeScheduleTask::slotButtonCheckNum); return cwidget; } QWidget *changeScheduleTask::createInquiryWidget(const ScheduleDtailInfo &info) { repeatScheduleWidget *infoWidget = new repeatScheduleWidget(repeatScheduleWidget::Operation_Change, repeatScheduleWidget::Widget_Confirm, false); infoWidget->setSchedule(info); return infoWidget; } Reply changeScheduleTask::getListScheduleReply(const QVector &infoVector) { scheduleListWidget *m_viewWidget = new scheduleListWidget(); connect(m_viewWidget, &scheduleListWidget::signalSelectScheduleIndex, this, &changeScheduleTask::slotSelectScheduleIndex); m_viewWidget->setScheduleInfoVector(infoVector); QString m_TTSMessage; QString m_DisplyMessage; m_TTSMessage = SELECT_CHANGE_TTS; m_DisplyMessage = SELECT_CHANGE_TTS; Reply reply; REPLY_WIDGET_TTS(reply, m_viewWidget, m_TTSMessage, m_DisplyMessage, false); return reply; } scheduleState *changeScheduleTask::getNextStateBySelectScheduleInfo(const ScheduleDtailInfo &info, CLocalData *localData, Reply &reply) { QString m_TTSMessage; QString m_DisplyMessage; //获取当前状态 scheduleState *currentState = getCurrentState(); //下一个状态 scheduleState *nextState{nullptr}; //如果修改的新日程时间在范围内则正常提醒 if(getNewInfo()){ //需要显示的窗口 QWidget *_showWidget; if (info.rpeat == 0) { m_TTSMessage = CONFIRM_SCHEDULE_CHANGE_TTS; m_DisplyMessage = CONFIRM_SCHEDULE_CHANGE_TTS; _showWidget = createConfirmWidget(currentState->getLocalData()->getNewInfo()); //设置下一个状态为普通日程确认状态 nextState = new confirwFeedbackState(m_dbus, this); } else { m_TTSMessage = REPEST_SCHEDULE_CHANGE_TTS; m_DisplyMessage = REPEST_SCHEDULE_CHANGE_TTS; _showWidget = createRepeatWidget(currentState->getLocalData()->getNewInfo()); //设置下一个状态为重复日程确认状态 nextState = new repeatfeedbackstate(m_dbus, this); } //设置修改的日程信息 localData->setNewInfo(currentState->getLocalData()->getNewInfo()); //设置存储数据 nextState->setLocalData(localData); REPLY_WIDGET_TTS(reply, _showWidget, m_TTSMessage, m_DisplyMessage, false); }else { //如果修改的日程不在正常范围内则回复错误,并设置下一个状态为询问查询状态 m_TTSMessage = CHANGE_TIME_OUT_TTS; m_DisplyMessage = CHANGE_TIME_OUT_TTS; REPLY_ONLY_TTS(reply,m_TTSMessage,m_DisplyMessage,true); nextState = new queryScheduleState(m_dbus, this); }; return nextState; } bool changeScheduleTask::getNewInfo() { scheduleState *currentState = getCurrentState(); ScheduleDtailInfo m_NewInfo = currentState->getLocalData()->SelectInfo(); m_NewInfo.allday = false; m_NewInfo.remind = true; m_NewInfo.remindData.n = 0; if (!currentState->getLocalData()->getToTitleName().isEmpty()) m_NewInfo.titleName = currentState->getLocalData()->getToTitleName(); QVector m_ToTime = currentState->getLocalData()->getToTime(); if (m_ToTime.size() > 0) { if (m_ToTime.size() == 1) { //如果存在日期信息 if(m_ToTime.at(0).hasDate){ //设置修改的开始日期 m_NewInfo.beginDateTime.setDate(m_ToTime.at(0).m_Date); //设置修改的结束日期 m_NewInfo.endDateTime.setDate(m_ToTime.at(0).m_Date); } //如果修改的DateTime带时间则设置该时间,否则保持原来的时间点 if(m_ToTime.at(0).hasTime){ m_NewInfo.beginDateTime.setTime(m_ToTime.at(0).m_Time); m_NewInfo.endDateTime = m_NewInfo.beginDateTime.addSecs(3600); } } if (m_ToTime.size() == 2) { //如果存在日期信息 if(m_ToTime.at(0).hasDate){ //设置修改的开始日期 m_NewInfo.beginDateTime.setDate(m_ToTime.at(0).m_Date); } //如果修改的DateTime带时间则设置该时间,否则保持原来的时间点 if(m_ToTime.at(0).hasTime){ m_NewInfo.beginDateTime.setTime(m_ToTime.at(0).m_Time); } //如果存在日期信息 if(m_ToTime.at(1).hasDate){ //设置修改的结束日期 m_NewInfo.endDateTime.setDate(m_ToTime.at(1).m_Date); } //如果修改的DateTime带时间则设置该时间,否则保持原来的时间点 if (m_ToTime.at(1).hasTime) m_NewInfo.endDateTime.setTime(m_ToTime.at(1).m_Time); //如果开始时间大于结束时间则设置结束时间为开始时间往后一小时 if (m_NewInfo.endDateTime < m_NewInfo.beginDateTime) { m_NewInfo.endDateTime = m_NewInfo.beginDateTime.addSecs(3600); } } } currentState->getLocalData()->setNewInfo(m_NewInfo); return changeDateTimeIsInNormalRange(m_NewInfo); } void changeScheduleTask::changeRepeatSchedule(const ScheduleDtailInfo &info, bool isOnlyOne) { if (isOnlyOne) { changeOnlyInfo(info); } else { changeAllInfo(info); } } void changeScheduleTask::changeOnlyInfo(const ScheduleDtailInfo &info) { scheduleState *currentState = getCurrentState(); ScheduleDtailInfo newschedule = currentState->getLocalData()->getNewInfo(); newschedule.rpeat = 0; newschedule.RecurID = 0; newschedule.id = 0; newschedule.ignore.clear(); m_dbus->CreateJob(newschedule); ScheduleDtailInfo updatescheduleData; m_dbus->GetJob(info.id, updatescheduleData); updatescheduleData.ignore.append(info.beginDateTime); m_dbus->UpdateJob(updatescheduleData); } void changeScheduleTask::changeAllInfo(const ScheduleDtailInfo &info) { scheduleState *currentState = getCurrentState(); ScheduleDtailInfo newinfo = currentState->getLocalData()->getNewInfo(); if (info.RecurID == 0) { ScheduleDtailInfo scheduleDtailInfo = newinfo; if (scheduleDtailInfo.enddata.type == 1 && scheduleDtailInfo.enddata.tcount < 1) { scheduleDtailInfo.enddata.type = 0; } else if (scheduleDtailInfo.enddata.type == 2 && scheduleDtailInfo.beginDateTime.daysTo(scheduleDtailInfo.enddata.date) < 0) { scheduleDtailInfo.enddata.type = 0; scheduleDtailInfo.rpeat = 0; } m_dbus->UpdateJob(scheduleDtailInfo); } else { ScheduleDtailInfo newschedule = newinfo; newschedule.RecurID = 0; newschedule.id = 0; if (newschedule.enddata.type == 1) { newschedule.enddata.tcount = qAbs(newinfo.enddata.tcount - newinfo.RecurID); if (newschedule.enddata.tcount < 1) { newschedule.enddata.type = 0; newschedule.rpeat = 0; } } m_dbus->CreateJob(newschedule); ScheduleDtailInfo updatescheduleData; m_dbus->GetJob(info.id, updatescheduleData); if (updatescheduleData.enddata.type == 1) { updatescheduleData.enddata.tcount = newinfo.RecurID - 1; if (updatescheduleData.enddata.tcount < 1) { updatescheduleData.enddata.type = 0; updatescheduleData.rpeat = 0; } } else if (updatescheduleData.enddata.type == 2) { updatescheduleData.enddata.type = 2; updatescheduleData.enddata.date = info.beginDateTime.addDays(-1); } m_dbus->UpdateJob(updatescheduleData); } } void changeScheduleTask::changeOrdinarySchedule(const ScheduleDtailInfo &info) { m_dbus->UpdateJob(info); } bool changeScheduleTask::changeDateTimeIsInNormalRange(const ScheduleDtailInfo &info) { bool result {true}; //当前时间 QDateTime currentDateTime {QDateTime::currentDateTime()}; //最大时间 QDateTime maxDateTime = currentDateTime.addMonths(6); //如果开始时间为过期时间则为false if(info.beginDateTimemaxDateTime ||info.endDateTime > maxDateTime){ result = false; } return result; } dde-calendar-5.7.0.23/schedule-plugin/src/task/changescheduletask.h000066400000000000000000000063201375021633200250730ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CHANGESCHEDULETASK_H #define CHANGESCHEDULETASK_H #include "schedulebasetask.h" class CLocalData; class changeScheduleTask : public scheduleBaseTask { Q_OBJECT public: changeScheduleTask(CSchedulesDBus *dbus); Reply getFeedbackByQuerySchedule(const QVector &infoVector) override; Reply getReplyBySelectSchedule(const ScheduleDtailInfo &info) override; Reply InitState(const JsonData *jsonData, bool isUpdateState = false) override; Reply repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne) override; Reply confirwScheduleHandle(const ScheduleDtailInfo &info) override; Reply confirmInfo(bool isOK) override; public slots: void slotSelectScheduleIndex(int index); void slotButtonCheckNum(int index, const QString &text, const int buttonCount); private: scheduleState *getCurrentState(); QWidget *createRepeatWidget(const ScheduleDtailInfo &info); QWidget *createConfirmWidget(const ScheduleDtailInfo &info); QWidget *createInquiryWidget(const ScheduleDtailInfo &info); Reply getListScheduleReply(const QVector &infoVector); /** * @brief getNextStateBySelectScheduleInfo 根据选择的日程获取下一个修改状态 * @param info 选择的日程信息 * @param localData 当前状态的存储数据 * @param reply 修改的回复 * @return 下一个状态 */ scheduleState *getNextStateBySelectScheduleInfo(const ScheduleDtailInfo &info,CLocalData *localData,Reply &reply); /** * @brief getNewInfo 根据修改信息获取新的日程信息 * @return 在时间范围内返回true */ bool getNewInfo(); void changeRepeatSchedule(const ScheduleDtailInfo &info, bool isOnlyOne); void changeOnlyInfo(const ScheduleDtailInfo &info); void changeAllInfo(const ScheduleDtailInfo &info); void changeOrdinarySchedule(const ScheduleDtailInfo &info); /** * @brief changeDateTimeIsInRange 判断修改的日期在正确的时间范围内 * @param info 修改过的日程 * @return 在正常范围内则返回true */ bool changeDateTimeIsInNormalRange(const ScheduleDtailInfo &info); private: QVector m_scheduleInfo; }; #endif // CHANGESCHEDULETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/createscheduletask.cpp000066400000000000000000001041411375021633200254440ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "createscheduletask.h" #include "../globaldef.h" createScheduleTask::createScheduleTask(CSchedulesDBus *dbus) : scheduleBaseTask(dbus) { } Reply createScheduleTask::SchedulePress(semanticAnalysisTask &semanticTask) { //创建 CreateJsonData *createJsonData = dynamic_cast(semanticTask.getJsonData()); //如果转换失败则返回错误消息 if (createJsonData == nullptr) return errorMessage(); //查询日程 Reply m_reply; if (createJsonData->getPropertyStatus() != JsonData::PRO_NONE || createJsonData->offset() > -1) { REPLY_ONLY_TTS(m_reply, CREATE_ERR_TTS, CREATE_ERR_TTS, true); return m_reply; } m_widget = new createSchedulewidget(); //设置日程时间 setDateTime(createJsonData); qDebug() << "beginDateTimeIsinHalfYear" << beginDateTimeIsinHalfYear() << "ShouldEndSession" << createJsonData->ShouldEndSession(); //判断日程开始时间是否在半年以内 if (beginDateTimeIsinHalfYear() || m_begintime.date() == QDate::currentDate()) { //判断多伦标志 if (createJsonData->ShouldEndSession()) { //设置日程titlename setScheduleTitleName(createJsonData); //创建日程和插件 creareScheduleUI(createScheduleWithRepeatStatus(createJsonData)); //带有插件的回复语 REPLY_WIDGET_TTS(m_reply, m_widget, getReply(createJsonData), getReply(createJsonData), true); } else { //开始date为今天,没有给time(默认为00:00,小于当前time),需要进行多轮,设置默认回复语 //只有回复语 REPLY_ONLY_TTS(m_reply, createJsonData->SuggestMsg(), createJsonData->SuggestMsg(), false); } } else { if (beginDateTimeBeforeCurrent()) { //"我现在有点慌,因为我还不会制定过去的提醒" REPLY_ONLY_TTS(m_reply, createJsonData->SuggestMsg(), createJsonData->SuggestMsg(), true); } else if (beginDateTimeOutHalfYear()) { //"只能创建未来半年的日程" REPLY_ONLY_TTS(m_reply, CREATE_TIME_OUT_TTS, CREATE_TIME_OUT_TTS, true); } } return m_reply; } void createScheduleTask::setDateTime(CreateJsonData *createJsonData) { if (createJsonData->getDateTime().suggestDatetime.size() > 0) { //用户有输入时间,则设置开始时间 m_begintime = createJsonData->getDateTime().suggestDatetime.at(0).datetime; if (!createJsonData->getDateTime().suggestDatetime.at(0).hasTime) { //如果没有time,设置当前time m_begintime.setTime(QTime::currentTime()); } if (createJsonData->getDateTime().suggestDatetime.size() == 2 && m_begintime < QDateTime::currentDateTime()) { if (m_begintime.time() > QTime::currentTime()) { //跨天日程,如果日程开始时间大于当前时间,则开始时间为当天 m_begintime.setDate(m_begintime.date().addDays(m_begintime.date().daysTo(QDate::currentDate()))); } else { //跨天日程,如果日程开始时间小于等于当前时间,则开始时间加一天 m_begintime.setDate(m_begintime.date().addDays(m_begintime.date().daysTo(QDate::currentDate()) + 1)); } } } else { //用户没有输入时间,则日程开始时间设置为当前时间 m_begintime = QDateTime::currentDateTime(); } if (createJsonData->getDateTime().suggestDatetime.size() <= 1) { //如果只有开始时间,则结束时间默认为开始时间后一个小时 m_endtime = m_begintime.addSecs(60 * 60); } else if (createJsonData->getDateTime().suggestDatetime.size() == 2) { //如果有结束时间,则设置结束时间 m_endtime = createJsonData->getDateTime().suggestDatetime.at(1).datetime; if (!createJsonData->getDateTime().suggestDatetime.at(1).hasTime) { //如果用户没有输入结束时间,则默认为当天23:59:59 m_endtime.setTime(QTime(23, 59, 59)); } } qDebug() << "m_begintime = " << m_begintime << ", m_endtime = " << m_endtime; } void createScheduleTask::setScheduleTitleName(CreateJsonData *createJsonData) { if (createJsonData->TitleName().isEmpty()) //如果没有titlename,默认为:新建日程 m_widget->setTitleName(NEW_SCHEDULE); else //设置日程titlename m_widget->setTitleName(createJsonData->TitleName()); } QVector createScheduleTask::createScheduleWithRepeatStatus(CreateJsonData *createJsonData) { //创建的日程信息 QVector schedule; //重复日程的时间 QVector getDayNum = createJsonData->getRepeatNum(); //根据不同类型分别创建日程 switch (createJsonData->getRepeatStatus()) { case CreateJsonData::NONE: { //非重复日程,不能创建过期日程 if (m_begintime > QDateTime::currentDateTime() && m_begintime < QDateTime::currentDateTime().addMonths(6)) schedule = getNotRepeatDaySchedule(); } break; case CreateJsonData::EVED: //每天重复日程 schedule = getEveryDaySchedule(); break; case CreateJsonData::EVEW: { //每周重复日程 schedule = getEveryWeekSchedule(getDayNum); } break; case CreateJsonData::EVEM: { //每月重复日程 schedule = getEveryMonthSchedule(getDayNum); } break; case CreateJsonData::EVEY: { //每年重复日程,不能创建过期或者超过半年的日程 if (m_begintime > QDateTime::currentDateTime() && m_begintime < QDateTime::currentDateTime().addMonths(6)) schedule = getEveryYearSchedule(); } break; case CreateJsonData::WORKD: //工作日 schedule = getEveryWorkDaySchedule(); break; case CreateJsonData::RESTD: { //休息日 schedule = getEveryRestDaySchedule(); } break; } return schedule; } void createScheduleTask::creareScheduleUI(QVector schedule) { if (!schedule.isEmpty()) { //日程信息不为空,创建插件 qDebug() << "creatUI" << getFirstSchedule(schedule).beginDateTime << getFirstSchedule(schedule).endDateTime << m_begintime.daysTo(m_endtime); //设置日程时间 setDateTimeAndGetSchedule(getFirstSchedule(schedule).beginDateTime, getFirstSchedule(schedule).endDateTime); //设置dbus m_widget->setScheduleDbus(m_dbus); m_widget->scheduleEmpty(true); //更新界面 m_widget->updateUI(); } } QString createScheduleTask::getReply(CreateJsonData *createJsonData) { QString str_reply; //为特殊情况拼接回复语 if (createJsonData->getRepeatStatus() == CreateJsonData::RESTD && createJsonData->getDateTime().suggestDatetime.at(0).hasTime) { //如果为休息日,并且有开始时间,拼接回复语 str_reply = QString(EVERY_WEEKEND_TTS).arg(m_begintime.toString("hh:mm")); } else if (createJsonData->getRepeatStatus() == CreateJsonData::NONE && createJsonData->getDateTime().suggestDatetime.at(0).hasTime && createJsonData->getDateTime().suggestDatetime.at(0).datetime < QDateTime::currentDateTime() && createJsonData->getDateTime().suggestDatetime.size() == 2 && createJsonData->ShouldEndSession()) { //对于跨天日程,开始datetime小于当前datetime,则开始date增加一天,为其拼接回复语 str_reply = QString(BEGINDATETIME_LATER_THAN_CURRENTDATETIME_ACROSS_THE_DAY_TTS).arg(m_begintime.toString("hh:mm")); } else { //没有特殊情况使用默认回复语 str_reply = createJsonData->SuggestMsg(); } return str_reply; } bool createScheduleTask::beginDateTimeIsinHalfYear() { //判断日程开始时间是否在半年内 if (m_begintime < QDateTime::currentDateTime() || m_begintime > QDateTime::currentDateTime().addMonths(6)) return false; else return true; } bool createScheduleTask::beginDateTimeOutHalfYear() { //日程开始时间不在半年范围内 if (m_begintime > QDateTime::currentDateTime().addMonths(6)) return true; else return false; } bool createScheduleTask::beginDateTimeBeforeCurrent() { //日程开始时间早于当前时间 if (m_begintime < QDateTime::currentDateTime()) return true; else return false; } QVector createScheduleTask::getNotRepeatDaySchedule() { QVector schedule; //设置重复类型 m_widget->setRpeat(0); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(m_begintime, m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(m_begintime, m_endtime)); return schedule; } QVector createScheduleTask::getEveryDaySchedule() { QVector schedule; //设置重复类型 m_widget->setRpeat(1); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(m_begintime, m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(m_begintime, m_endtime)); //设置完成后,将everyDayState设置为false everyDayState = false; return schedule; } QVector createScheduleTask::getEveryWeekSchedule(QVector dateRange) { QVector beginDateTime {}; QVector schedule; //每天重复 if (everyDayState) return getEveryDaySchedule(); //设置重复类型 m_widget->setRpeat(3); //获取解析时间 beginDateTime = analysisEveryWeekDate(dateRange); for (int i = 0; i < beginDateTime.count(); i++) { //设置日程结束时间 m_endtime.setDate(beginDateTime.at(i).date()); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); } return schedule; } QVector createScheduleTask::getEveryMonthSchedule(QVector dateRange) { QVector beginDateTime {}; QVector schedule; //每天重复 if (everyDayState) return getEveryDaySchedule(); //设置重复类型 m_widget->setRpeat(4); //获取解析日期 beginDateTime = analysisEveryMonthDate(dateRange); for (int i = 0; i < beginDateTime.count(); i++) { //设置日程结束时间 m_endtime.setDate(beginDateTime.at(i).date()); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); } return schedule; } QVector createScheduleTask::getEveryYearSchedule() { QVector schedule; //设置重复类型 m_widget->setRpeat(5); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(m_begintime, m_endtime)); //将多有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(m_begintime, m_endtime)); return schedule; } QVector createScheduleTask::getEveryWorkDaySchedule() { QVector beginDateTime {}; QVector schedule; //获取解析日期 beginDateTime = analysisWorkDayDate(); //设置重复类型 m_widget->setRpeat(2); for (int i = 0; i < beginDateTime.count(); i++) { //设置日程结束时间 m_endtime.setDate(beginDateTime.at(i).date()); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); } return schedule; } QVector createScheduleTask::getEveryRestDaySchedule() { QVector beginDateTime {}; QVector schedule; //设置重复类型 m_widget->setRpeat(3); //获取解析的时间 beginDateTime = analysisRestDayDate(); for (int i = 0; i < beginDateTime.count(); i++) { //设置日程结束时间 m_endtime.setDate(beginDateTime.at(i).date()); //创建日程 m_dbus->CreateJob(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); //将所有日程添加到日程容器中 schedule.append(setDateTimeAndGetSchedule(beginDateTime.at(i), m_endtime)); } return schedule; } ScheduleDtailInfo createScheduleTask::getFirstSchedule(QVector scheduleInfo) { //第一个日程的时间 QDate earlyDate = scheduleInfo.at(0).beginDateTime.date(); //第一个日程的索引 int index = 0; for (int i = 1; i < scheduleInfo.count(); i++) { if (earlyDate > scheduleInfo.at(i).beginDateTime.date()) { earlyDate = scheduleInfo.at(i).beginDateTime.date(); index = i; } } return scheduleInfo.at(index); } int createScheduleTask::getCreatesDays(int firstDay, int secondday, bool containsToday) { if (containsToday) //如果包含今天+1 return secondday - firstDay + 1; else //不包含今天 return secondday - firstDay; } QVector createScheduleTask::getNoneWeekNumDate() { QVector beginDateTime {}; if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当天时间 m_begintime.setDate(QDate::currentDate()); } else { //日程开始时间小于等于当天时间 m_begintime.setDate(QDate::currentDate().addDays(1)); } beginDateTime.append(m_begintime); return beginDateTime; } QVector createScheduleTask::getOneWeekNumDate(int firstWeekNum) { QVector beginDateTime {}; int currentDayofWeek = QDate::currentDate().dayOfWeek(); if (firstWeekNum >= currentDayofWeek) { //开始周数大于等于今天所在周数 if (firstWeekNum == currentDayofWeek && m_begintime.time() <= QTime::currentTime()) { //开始周数等于今天所在周数,并且日程开始时间小于等于当前时间 m_begintime.setDate(QDate::currentDate().addDays(firstWeekNum + 7 - currentDayofWeek)); } else { //日程开始时间大于当前时间 m_begintime.setDate(QDate::currentDate().addDays(firstWeekNum - currentDayofWeek)); } } else { //开始周数小于今天所在周数 m_begintime.setDate(QDate::currentDate().addDays(firstWeekNum + 7 - currentDayofWeek)); } beginDateTime.append(m_begintime); return beginDateTime; } QVector createScheduleTask::getTwoWeekNumDate(int firstWeekNum, int secondWeekNum) { QVector beginDateTime {}; if (firstWeekNum == secondWeekNum || secondWeekNum - firstWeekNum == 6) { //开始周数等于结束周数,或者结束周数是7开始周数是1,为每天 everyDayState = true; return beginDateTime; } else if (firstWeekNum < secondWeekNum) { //开始周数小于结束周数 beginDateTime = firstWeekNumLessThanSecond(firstWeekNum, secondWeekNum); } else { //开始周数大于结束周数 if (firstWeekNum - secondWeekNum == 1) { //开始周数比结束周数大1,为每天 everyDayState = true; return beginDateTime; } else { //除去每天的其他情况 firstWeekNumGreaterThanSecondButEveryDay(firstWeekNum, secondWeekNum); } } return beginDateTime; } QVector createScheduleTask::firstWeekNumLessThanSecond(int firstWeekNum, int secondWeekNum) { //对于工作日和休息日的情况,助手已自动区分,此处不再讨论 //对获取到的时间范围分情况讨论 QVector beginDateTime {}; int currentDayofWeek = QDate::currentDate().dayOfWeek(); //当前日期所在周数小于开始的周数 if (currentDayofWeek < firstWeekNum) { beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(firstWeekNum - currentDayofWeek), firstWeekNum, secondWeekNum)); } else if (currentDayofWeek >= firstWeekNum && currentDayofWeek <= secondWeekNum) { if (m_begintime.time() > QTime::currentTime()) { //开始时间大于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate(), secondWeekNum, true)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), firstWeekNum, false)); } else { //开始时间小于等于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate().addDays(1), secondWeekNum, false)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), firstWeekNum, true)); } } else if (currentDayofWeek > secondWeekNum) { beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(firstWeekNum + 7 - currentDayofWeek), firstWeekNum, secondWeekNum)); } return beginDateTime; } QVector createScheduleTask::firstWeekNumGreaterThanSecondButEveryDay(int firstWeekNum, int secondWeekNum) { QVector beginDateTime {}; int currentDayofWeek = QDate::currentDate().dayOfWeek(); if (currentDayofWeek >= firstWeekNum) { //今天所在周数大于等于开始周数 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate(), 7, true)); beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(1 + 7 - currentDayofWeek), 1, secondWeekNum)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), firstWeekNum, false)); } else { //日程开始时间小于等于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate().addDays(1), 7, false)); beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(1 + 7 - currentDayofWeek), 1, secondWeekNum)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), firstWeekNum, true)); } } else if (currentDayofWeek < firstWeekNum && currentDayofWeek > secondWeekNum) { //今天所在周数小于开始周数,大于结束周数 beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(firstWeekNum - currentDayofWeek),firstWeekNum, 7)); beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(1 + 7 - currentDayofWeek), 1, secondWeekNum)); } else if (currentDayofWeek <= secondWeekNum) { //今天所在周数小于等于结束周数 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate(), secondWeekNum, true)); beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(firstWeekNum - currentDayofWeek), firstWeekNum, 7)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), 1, false)); } else { //日程开始时间小于等于当前时间 beginDateTime.append(getWeekBackPartDateTime(QDate::currentDate().addDays(1), secondWeekNum, false)); beginDateTime.append(getWeekAllDateTime(QDate::currentDate().addDays(firstWeekNum - currentDayofWeek), firstWeekNum, 7)); beginDateTime.append(getWeekFrontPartDateTime(QDate::currentDate(), 1, true)); } } return beginDateTime; } QVector createScheduleTask::getWeekAllDateTime(QDate BeginDate, int firstWeekNum, int secondWeekNum) { QVector beginDateTime; for (int i = 0; i < secondWeekNum - firstWeekNum + 1; i ++) { m_begintime.setDate(BeginDate.addDays(i)); beginDateTime.append(m_begintime); } return beginDateTime; } QVector createScheduleTask::getWeekFrontPartDateTime(QDate BeginDate, int firstWeekNum, bool containsToday) { QVector beginDateTime {}; int currentDayofWeek = QDate::currentDate().dayOfWeek(); int addDays = getCreatesDays(firstWeekNum, currentDayofWeek, containsToday); for (int i = 0; i < addDays; i++) { m_begintime.setDate(BeginDate.addDays(firstWeekNum + 7 - currentDayofWeek + i)); beginDateTime.append(m_begintime); } return beginDateTime; } QVector createScheduleTask::getWeekBackPartDateTime(QDate BeginDate, int secondWeekNum, bool containsToday) { QVector beginDateTime {}; int currentDayofWeek = QDate::currentDate().dayOfWeek(); int addDays = getCreatesDays(currentDayofWeek, secondWeekNum, containsToday); for (int i = 0; i < addDays; i++) { m_begintime.setDate(BeginDate.addDays(i)); beginDateTime.append(m_begintime); } return beginDateTime; } ScheduleDtailInfo createScheduleTask::setDateTimeAndGetSchedule(QDateTime beginDateTime, QDateTime endDateTime) { m_widget->setDateTime(beginDateTime, endDateTime); m_widget->setschedule(); return m_widget->getScheduleDtailInfo(); } QVector createScheduleTask::analysisWorkDayDate() { QVector beginDateTime {}; if (m_begintime.date().dayOfWeek() == 6) m_begintime.setDate(m_begintime.date().addDays(2)); if (m_begintime.date().dayOfWeek() == 7) m_begintime.setDate(m_begintime.date().addDays(1)); beginDateTime.append(m_begintime); return beginDateTime; } QDate createScheduleTask::getValidDate(QDate viewDate, int viewDateDay) { //设置一个无效时间 QDate validDate(QDate(0,0,0)); //初始化年 int month = viewDate.month(); //判断未来半年的时间是否合法 for (int i = month; i <= month + 6; i++) { //设置月 validDate = viewDate.addMonths(i - month); //设置时间 validDate.setDate(validDate.year(), validDate.month(), viewDateDay); //判断日期是否合法 if (validDate.isValid()) return validDate; } //返回判断时间 return validDate; } QVector createScheduleTask::analysisEveryWeekDate(QVector dateRange) { QVector beginDateTime {}; switch (dateRange.size()) { case 0: { //每周重复日程,没有具体周数 beginDateTime = getNoneWeekNumDate(); } break; case 1: { //每周重复日程,只有一个周数 beginDateTime = getOneWeekNumDate(dateRange[0]); } break; case 2: { //每周重复日程,有两个周数 beginDateTime = getTwoWeekNumDate(dateRange[0], dateRange[1]); } break; } return beginDateTime; } QVector createScheduleTask::analysisEveryMonthDate(QVector dateRange) { QVector beginDateTime {}; switch (dateRange.size()) { case 0: { //每月重复日程,没有具体日期 beginDateTime = getNoneMonthNumDate(); } break; case 1: { //每月重复日程,只有一个日期 beginDateTime = getOneMonthNumDate(dateRange[0]); } break; case 2: { //每月重复日程,有两个日期 beginDateTime = getTwoMonthNumDate(dateRange[0], dateRange[1]); } break; } return beginDateTime; } QVector createScheduleTask::getNoneMonthNumDate() { QVector beginDateTime {}; if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 m_begintime.setDate(QDate::currentDate()); } else { //日程开始时间小于等于当前时间 m_begintime.setDate(QDate::currentDate().addDays(1)); } beginDateTime.append(m_begintime); return beginDateTime; } QVector createScheduleTask::getOneMonthNumDate(int firstMonthNum) { QVector beginDateTime {}; //今天 int currentDayofMonth = QDate::currentDate().day(); if (currentDayofMonth < firstMonthNum) { //今天小于开始日期 //获取合法日期 QDate validDate = getValidDate(QDate::currentDate(),firstMonthNum); //日期合法,设置日期 if (validDate.isValid()) m_begintime.setDate(validDate); } else if (currentDayofMonth > firstMonthNum) { //获取合法日期 QDate validDate = getValidDate(QDate::currentDate().addMonths(1),firstMonthNum); //日期合法,设置日期 if (validDate.isValid()) m_begintime.setDate(validDate); } else { //当前日期等于开始日期 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 m_begintime.setDate(QDate::currentDate()); } else { //日程开始时间小于等于当前时间 m_begintime.setDate(QDate::currentDate().addMonths(1)); } } beginDateTime.append(m_begintime); return beginDateTime; } QVector createScheduleTask::getTwoMonthNumDate(int firstMonthNum, int secondMonthNum) { QVector beginDateTime {}; if (firstMonthNum == secondMonthNum) { //开始日期等于结束日期,为每天 getEveryDaySchedule(); return beginDateTime; } else if (firstMonthNum < secondMonthNum) { //开始日期小于结束日期 beginDateTime.append(firstMonthNumLessThanSecond(firstMonthNum, secondMonthNum)); } else { //开始日期大于结束日期 if (firstMonthNum - secondMonthNum == 1) { //开始日期和结束日期差一天,为每天 getEveryDaySchedule(); return beginDateTime; } else { //开始日期大于结束日期的其他情况 beginDateTime.append(firstMonthNumGreaterThanSecondButEveryDay(firstMonthNum, secondMonthNum)); } } return beginDateTime; } QVector createScheduleTask::firstMonthNumLessThanSecond(int firstMonthNum, int secondWMonthNum) { QVector beginDateTime {}; int currentDayofMonth = QDate::currentDate().day(); if (currentDayofMonth < firstMonthNum) { //今天的日期小于开始日期 beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(firstMonthNum - currentDayofMonth), firstMonthNum, secondWMonthNum)); } else if (currentDayofMonth >= firstMonthNum && currentDayofMonth <= secondWMonthNum) { //今天的日期大于等于开始日期,小于等于结束日期 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate(), secondWMonthNum, true)); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), firstMonthNum, false)); } else { //日程开始时间小于等于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate().addDays(1), secondWMonthNum, false)); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), firstMonthNum, true)); } } else if (currentDayofMonth > secondWMonthNum) { //今天的日程大于结束日期 beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(firstMonthNum - currentDayofMonth).addMonths(1), firstMonthNum, secondWMonthNum)); } return beginDateTime; } QVector createScheduleTask::getMonthAllDateTime(QDate BeginDate, int firstMonthNum, int secondMonthNum) { QVector beginDateTime; //设置日期 for (int i = firstMonthNum; i <= secondMonthNum; i++) { //日期是否合法 QDate validDate = getValidDate(BeginDate, i); //合法日期,设置日期 if (validDate.isValid()) { m_begintime.setDate(validDate); beginDateTime.append(m_begintime); } } return beginDateTime; } QVector createScheduleTask::getMonthFrontPartDateTime(QDate BeginDate, int firstMonthNum, bool containsToday) { QVector beginDateTime {}; int currentDayofMonth = QDate::currentDate().day(); //包含今天 if (containsToday) currentDayofMonth +=1; //设置日期 for (int i = firstMonthNum; i < currentDayofMonth; i++) { //获取合法日期 QDate validDate = getValidDate(BeginDate.addDays(firstMonthNum - currentDayofMonth).addMonths(1), i); //合法日期 if (validDate.isValid()) { m_begintime.setDate(validDate); beginDateTime.append(m_begintime); } } return beginDateTime; } QVector createScheduleTask::getMonthBackPartDateTime(QDate BeginDate, int secondMonthNum, bool containsToday) { QVector beginDateTime {}; int currentDayofMonth = QDate::currentDate().day(); //不包含今天 if (!containsToday) currentDayofMonth +=1; //设置日期 for (int i = currentDayofMonth; i < secondMonthNum + 1; i++) { //获取合法日期 QDate validDate = getValidDate(BeginDate, i); //日期合法 if (validDate.isValid()) { m_begintime.setDate(validDate); beginDateTime.append(m_begintime); } } return beginDateTime; } QVector createScheduleTask::firstMonthNumGreaterThanSecondButEveryDay(int firstMonthNum, int secondMonthNum) { QVector beginDateTime {}; int currentDayofMonth = QDate::currentDate().day(); if (currentDayofMonth >= firstMonthNum) { //今天的日期大于等于开始的日期 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate(), QDate::currentDate().daysInMonth(), true)); beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(1 - currentDayofMonth), 1, secondMonthNum)); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), firstMonthNum, false)); } else { //日程开始时间小于等于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate().addDays(1), QDate::currentDate().daysInMonth(), false)); beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(1 - currentDayofMonth), 1, secondMonthNum)); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), firstMonthNum, true)); } } else if (currentDayofMonth < firstMonthNum && currentDayofMonth > secondMonthNum) { //今天的日期小于开始日期,大于结束日期 beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(firstMonthNum - currentDayofMonth), firstMonthNum, QDate::currentDate().daysInMonth())); beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(1 - currentDayofMonth).addMonths(1), 1, secondMonthNum)); } else if (currentDayofMonth <= secondMonthNum) { //今天的日期小于等于结束日期 if (m_begintime.time() > QTime::currentTime()) { //日程开始时间大于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate(), secondMonthNum, true)); beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(firstMonthNum - currentDayofMonth), firstMonthNum, QDate::currentDate().daysInMonth())); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), 1, false)); } else { //日程开始时间小于等于当前时间 beginDateTime.append(getMonthBackPartDateTime(QDate::currentDate().addDays(1), secondMonthNum, false)); beginDateTime.append(getMonthAllDateTime(QDate::currentDate().addDays(firstMonthNum - currentDayofMonth), firstMonthNum, QDate::currentDate().daysInMonth())); beginDateTime.append(getMonthFrontPartDateTime(QDate::currentDate(), 1, true)); } } return beginDateTime; } QVector createScheduleTask::analysisRestDayDate() { QVector beginDateTime {}; //周六的日程开始时间 QDateTime beginDateTimeSat = m_begintime; //周日的日程开始时间 QDateTime beginDateTimeSun = m_begintime; int currentDayofWeek = QDate::currentDate().dayOfWeek(); //设置周六的时间 beginDateTimeSat.setDate(QDate::currentDate().addDays(6 - currentDayofWeek)); //设置周日的时间 beginDateTimeSun.setDate(QDate::currentDate().addDays(7 - currentDayofWeek)); //如果周六的时间小于当前时间,设置日程开始时间为下一周的周六 if (beginDateTimeSat < QDateTime::currentDateTime()) beginDateTimeSat.setDate(beginDateTimeSat.date().addDays(7)); //如果周日的时间小于当前时间,设置日程开始时间为下一周的周日 if (beginDateTimeSun < QDateTime::currentDateTime()) beginDateTimeSun.setDate(beginDateTimeSun.date().addDays(7)); //将周末的日程开始时间放到时间容器里面 beginDateTime.append(beginDateTimeSat); beginDateTime.append(beginDateTimeSun); return beginDateTime; } dde-calendar-5.7.0.23/schedule-plugin/src/task/createscheduletask.h000066400000000000000000000252531375021633200251170ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CREATESCHEDULETASK_H #define CREATESCHEDULETASK_H #include "schedulebasetask.h" #include "../data/createjsondata.h" #include "../widget/createschedulewidget.h" class createScheduleTask : public scheduleBaseTask { Q_OBJECT public: createScheduleTask(CSchedulesDBus *dbus); Reply SchedulePress(semanticAnalysisTask &semanticTask) override; private: /** * @brief setDateTime 设置查询的开始结束时间 * @param queryJsonData jsondata句柄 */ void setDateTime(CreateJsonData *createJsonData); /** * @brief setScheduleTitleName 设置日程的titlename * @param createJsonData jsondata句柄 */ void setScheduleTitleName(CreateJsonData *createJsonData); /** * @brief createScheduleWithRepeatStatus 新建日程 * @param createJsonData jsondata句柄 * @return 日程信息 */ QVector createScheduleWithRepeatStatus(CreateJsonData *createJsonData); /** * @brief creareScheduleUI 新建日程插件 * @param schedule 日程信息 */ void creareScheduleUI(QVector schedule); /** * @brief getReply 获取回复语 * @param createJsonData jsondata句柄 * @return 回复语 */ QString getReply(CreateJsonData *createJsonData); /** * @brief beginDateTimeIsinHalfYear 判断时间是否合法 * @return 时间是否合法 */ bool beginDateTimeIsinHalfYear(); /** * @brief beginDateTimeOutHalfYear 日程开始时间超过半年范围 * @return true or false */ bool beginDateTimeOutHalfYear(); /** * @brief buginDateTimeBeforeCurrent 日程开始时间早于当前时间 * @return true or false */ bool beginDateTimeBeforeCurrent(); /** * @brief setNotRepeatDay 获取非重复的日程 * @return 日程信息 */ QVector getNotRepeatDaySchedule(); /** * @brief getEveryDaySchedule 获取每天重复的日程 * @return 日程信息 */ QVector getEveryDaySchedule(); /** * @brief getEveryWeekSchedule 获取每周重复的日程 * @param dateRange 开始和结束的周数 * @return 日程信息 */ QVector getEveryWeekSchedule(QVector dateRange); /** * @brief getEveryMonthSchedule 获取每月重复的日程 * @param dateRange 开始和结束的日期数 * @return 日程信息 */ QVector getEveryMonthSchedule(QVector dateRange); /** * @brief getEveryDYearSchedule 获取每年重复的日程 * @return 日程信息 */ QVector getEveryYearSchedule(); /** * @brief getEveryWorkDaySchedule 获取工作日的日程 * @return 日程信息 */ QVector getEveryWorkDaySchedule(); /** * @brief getEveryRestDaySchedule 获取休息日的日程 * @return 日程信息 */ QVector getEveryRestDaySchedule(); /** * @brief getFirstSchedule 获取第一个日程 * @param scheduleInfo 所有日程信息的容器 * @return 第一个日程的日程信息 */ ScheduleDtailInfo getFirstSchedule(QVector scheduleInfo); /** * @brief getCreatesDays 获取新建日程的天数 * @param firstDay 开始日期 * @param secondday 结束日期 * @param containsToday 是否包含今天 * @return 总天数 */ int getCreatesDays(int firstDay, int secondday, bool containsToday); /** * @brief getNoneWeekNumDate 获取没有周数的重复日程的日期 * @return 日期容器 */ QVector getNoneWeekNumDate(); /** * @brief getOneWeekNumDate 获取有一个周数的重复日程的日期 * @param firstWeekNum 这个周数是周几 * @return 日期容器 */ QVector getOneWeekNumDate(int firstWeekNum); /** * @brief getTwoWeekNumDate 获取有两个周数的重复日程的日期 * @param firstWeekNum 第一个周数是周几 * @param secondWeekNum 第二个周数是周几 * @return 日期容器 */ QVector getTwoWeekNumDate(int firstWeekNum, int secondWeekNum); /** * @brief firstWeekNumLessThanSecond 获取第一个周数小于第二个周数的日程的日期 * @param firstWeekNum 第一个周数 * @param secondWeekNum 第二个周数 * @return 日期容器 */ QVector firstWeekNumLessThanSecond(int firstWeekNum, int secondWeekNum); /** * @brief firstWeekNumGreaterThanSecondButEveryDay 获取第一个周数大于第二个周数但不包含全天日程的日程 * @param firstWeekNum 第一个周数 * @param secondWeekNum 第二个周数 * @return 日期容器 */ QVector firstWeekNumGreaterThanSecondButEveryDay(int firstWeekNum, int secondWeekNum); /** * @brief getWeekAllDateTime 获取所有的周重复日程的时间 * @param BeginDate 日程开始的时间 * @param firstDayofWeek 获取到的第一个周数 * @param secondDayofWeek 获取到的第二个周数 * @return DateTime容器 */ QVector getWeekAllDateTime(QDate BeginDate, int firstWeekNum, int secondWeekNum); /** * @brief getWeekFrontPartDateTime 获取当前时间之前的日程时间 * @param BeginDate 日程开始的时间 * @param firstDate 获取到的第一个周数 * @param containsToday 是否包含今天 * @return DateTime容器 */ QVector getWeekFrontPartDateTime(QDate BeginDate, int firstWeekNum, bool containsToday); /** * @brief getWeekBackPartDateTime 获取当前时间之后的日程时间 * @param BeginDate 日程开始时间 * @param secondDayofWeek 获取到的第二个周数 * @param containsToday 是否包含今天 * @return DateTime容器 */ QVector getWeekBackPartDateTime(QDate BeginDate, int secondWeekNum, bool containsToday); /** * @brief analysisEveryWeekDate 解析每周重复日程的日期 * @param dateRange 周数范围 * @return 日期容器 */ QVector analysisEveryWeekDate(QVector dateRange); /** * @brief analysisEveryMonthDate 解析每月重复日程的日期 * @param dateRange 日期范围 * @return 日期容器 */ QVector analysisEveryMonthDate(QVector dateRange); /** * @brief getNoneMonthNumDate 获取没有日期的每月重复日程的日期 * @return 日期容器 */ QVector getNoneMonthNumDate(); /** * @brief getOneMonthNumDate 获取有一个日期的每月重复日程的日期 * @param firstMonthNum 第一个日期是几号 * @return 日期容器 */ QVector getOneMonthNumDate(int firstMonthNum); /** * @brief getTwoMonthNumDate 获取有两个日期的每月重复日程的日程 * @param firstMonthNum 第一个日期是几号 * @param secondMonthNum 第二个日期是几号 * @return 日期容器 */ QVector getTwoMonthNumDate(int firstMonthNum, int secondMonthNum); /** * @brief getMonthAllDateTime 获取每月重复日程的日期 * @param BeginDate 开始时间 * @param firstMonthNum 第一个日期 * @param secondMonthNum 第二个日期 * @return 日期容器 */ QVector getMonthAllDateTime(QDate BeginDate, int firstMonthNum, int secondMonthNum); /** * @brief getMonthFrontPartDateTime 获取当前时间之前的日程日期 * @param BeginDate 开始时间 * @param firstMonthNum 第一个日期 * @param containsToday 是否包含今天 * @return 日期容器 */ QVector getMonthFrontPartDateTime(QDate BeginDate, int firstMonthNum, bool containsToday); /** * @brief getMonthBackPartDateTime 获取当前时间之后的日程日期 * @param BeginDate 开始时间 * @param secondMonthNum 第二个日期 * @param containsToday 是否包含今天 * @return 日期容器 */ QVector getMonthBackPartDateTime(QDate BeginDate, int secondMonthNum, bool containsToday); /** * @brief firstMonthNumLessThanSecond 第一个日期小于第二个日期的日程的日期 * @param firstMonthNum 第一个日期 * @param secondWMonthNum 第二个日期 * @return 日期容器 */ QVector firstMonthNumLessThanSecond(int firstMonthNum, int secondWMonthNum); /** * @brief firstMonthNumGreaterThanSecondButEveryDay 第一个日期大于第二个日期但不包含每天的日程的日期 * @param firstMonthNum 第一个日期 * @param secondMonthNum 第二个日期 * @return 日期容器 */ QVector firstMonthNumGreaterThanSecondButEveryDay(int firstMonthNum, int secondMonthNum); /** * @brief analysisRestDayDate 解析休息日的日程的日期 * @return 日期容器 */ QVector analysisRestDayDate(); /** * @brief setDateTimeAndGetSchedule 设置日程开始结束时间,并获取日程信息 * @param beginDateTime 日程开始时间 * @param endDateTime 日程结束时间 * @return 日程信息 */ ScheduleDtailInfo setDateTimeAndGetSchedule(QDateTime beginDateTime, QDateTime endDateTime); /** * @brief analysisWorkDayDate 解析工作日的日程的日期 * @return 日期容器 */ QVector analysisWorkDayDate(); /** * @brief getValidDate 判断是否是合法日期 * @param viewDate 判断的日期 * @param viewDateDay 判断哪一天 * @return 日期 */ QDate getValidDate(QDate viewDate, int viewDateDay); private: QDateTime m_begintime; QDateTime m_endtime; bool everyDayState = false; createSchedulewidget *m_widget = nullptr; }; #endif // CREATESCHEDULETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/queryscheduleproxy.cpp000066400000000000000000000443321375021633200255720ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "queryscheduleproxy.h" #include "../globaldef.h" #include "../data/changejsondata.h" bool scheduleSort(const ScheduleDtailInfo &s1, const ScheduleDtailInfo &s2) { if (s1.beginDateTime < s2.beginDateTime) { return true; } else if (s1.beginDateTime == s2.beginDateTime) { return s1.endDateTime < s2.endDateTime; } else { return false; } } queryScheduleProxy::queryScheduleProxy(JsonData *jsonData, CSchedulesDBus *dbus) : m_queryJsonData(jsonData) , m_dbus(dbus) { } QVector queryScheduleProxy::querySchedule() { QVector scheduleInfo {}; scheduleInfo.clear(); switch (m_queryJsonData->getRepeatStatus()) { case JsonData::RepeatStatus::NONE: scheduleInfo = queryNonRepeatingSchedule(); break; case JsonData::RepeatStatus::EVED: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT scheduleInfo = queryEveryDaySchedule(beginTime, endTime); if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; case JsonData::RepeatStatus::EVEW: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT int beginW = 0; int endW = 0; if (m_queryJsonData->getRepeatNum().size() == 0) { } else if (m_queryJsonData->getRepeatNum().size() == 1) { beginW = m_queryJsonData->getRepeatNum().at(0); endW = m_queryJsonData->getRepeatNum().at(0); } else { beginW = m_queryJsonData->getRepeatNum().at(0); endW = m_queryJsonData->getRepeatNum().at(1); } scheduleInfo = queryWeeklySchedule(beginTime, endTime, beginW, endW); SemanticsDateTime queryDatetime = getQueryDateTime(m_queryJsonData); TimeLimit fileterTime = getTimeFileterByTimeInfo(queryDatetime); if (!fileterTime.isInvalid) { scheduleInfo = scheduleFileterByTime(scheduleInfo, fileterTime.beginTime, fileterTime.endTime); } if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; case JsonData::RepeatStatus::EVEM: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT int beginM = 0; int endM = 0; if (m_queryJsonData->getRepeatNum().size() == 0) { } else if (m_queryJsonData->getRepeatNum().size() == 1) { beginM = m_queryJsonData->getRepeatNum().at(0); endM = m_queryJsonData->getRepeatNum().at(0); } else { beginM = m_queryJsonData->getRepeatNum().at(0); endM = m_queryJsonData->getRepeatNum().at(1); } scheduleInfo = queryMonthlySchedule(beginTime, endTime, beginM, endM); if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; case JsonData::RepeatStatus::EVEY: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT scheduleInfo = queryEveryYearSchedule(beginTime, endTime); if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; case JsonData::RepeatStatus::RESTD: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT scheduleInfo = queryWeeklySchedule(beginTime, endTime, 6, 7); if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; case JsonData::RepeatStatus::WORKD: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT scheduleInfo = queryWorkingDaySchedule(beginTime, endTime); if (!m_queryJsonData->TitleName().isEmpty()) { scheduleInfo = scheduleFileterByTitleName(scheduleInfo, m_queryJsonData->TitleName()); } } break; } return scheduleInfo; } QVector queryScheduleProxy::queryWeeklySchedule(QDateTime &beginTime, QDateTime &endTime, int beginW, int endW) { QSet weeklySet; if (beginW == endW) { weeklySet.insert(beginW); } else if (beginW < endW) { if (beginW == 1) { if (endW == 5) { //WORK return queryWorkingDaySchedule(beginTime, endTime); } else if (endW == 7) { //EVED return queryEveryDaySchedule(beginTime, endTime); } } for (int i = beginW; i <= endW; ++i) { weeklySet.insert(i); } } else { if (beginW - endW == 1) { //EVED return queryEveryDaySchedule(beginTime, endTime); } int w; for (int i = beginW; i <= endW + 7; ++i) { w = i % 7; w = w ? w : 7; weeklySet.insert(w); } } QVector out {}; m_dbus->QueryJobsWithRule(beginTime, endTime, DBUS_RRUL_EVEW, out); if (beginW == 0 || endW == 0) { weeklySet.clear(); } return WeeklyScheduleFileter(out, weeklySet); } QVector queryScheduleProxy::queryMonthlySchedule(QDateTime &beginTime, QDateTime &endTime, int beginM, int endM) { QVector out {}; m_dbus->QueryJobsWithRule(beginTime, endTime, DBUS_RRUL_EVEM, out); return MonthlyScheduleFileter(out, beginM, endM); } QVector queryScheduleProxy::queryEveryDaySchedule(QDateTime &beginTime, QDateTime &endTime) { QVector out {}; m_dbus->QueryJobsWithRule(beginTime, endTime, DBUS_RRUL_EVED, out); return sortAndFilterSchedule(out); } QVector queryScheduleProxy::queryEveryYearSchedule(QDateTime &beginTime, QDateTime &endTime) { QVector out {}; m_dbus->QueryJobsWithRule(beginTime, endTime, DBUS_RRUL_EVEY, out); return sortAndFilterSchedule(out); } QVector queryScheduleProxy::queryWorkingDaySchedule(QDateTime &beginTime, QDateTime &endTime) { QVector out {}; m_dbus->QueryJobsWithRule(beginTime, endTime, DBUS_RRUL_WORK, out); return sortAndFilterSchedule(out); } QVector queryScheduleProxy::queryNonRepeatingSchedule() { QVector mScheduleInfoVector {}; mScheduleInfoVector.clear(); SemanticsDateTime queryDatetime = getQueryDateTime(m_queryJsonData); //如果开始时间大于结束时间则退出 if(!timeFrameIsValid(queryDatetime)){ return mScheduleInfoVector; } switch (m_queryJsonData->getPropertyStatus()) { case JsonData::PropertyStatus::ALL: { DateTimeLimit timeLimit = getTimeLimitByTimeInfo(queryDatetime); if (!getTimeIsExpired()) { mScheduleInfoVector = queryAllSchedule(m_queryJsonData->TitleName(), timeLimit.beginTime, timeLimit.endTime); } } break; case JsonData::PropertyStatus::NEXT: { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT mScheduleInfoVector = queryNextNumSchedule(beginTime, endTime, 1); } break; case JsonData::PropertyStatus::LAST: { } break; default: { //NONE DateTimeLimit timeLimit = getTimeLimitByTimeInfo(queryDatetime); if (!getTimeIsExpired()) { mScheduleInfoVector = queryAllSchedule(m_queryJsonData->TitleName(), timeLimit.beginTime, timeLimit.endTime); } } break; } return mScheduleInfoVector; } QVector queryScheduleProxy::queryNextNumSchedule(QDateTime &beginTime, QDateTime &endTime, int NextNum) { QVector mScheduleInfoVector {}; QVector out {}; m_dbus->QueryJobsWithLimit(beginTime, endTime, NextNum, out); return sortAndFilterSchedule(out); } QVector queryScheduleProxy::queryAllSchedule(QString key, QDateTime &beginTime, QDateTime &endTime) { QVector out {}; m_dbus->QueryJobs(key, beginTime, endTime, out); return sortAndFilterSchedule(out); } QVector queryScheduleProxy::sortAndFilterSchedule(QVector &out) { QVector scheduleInfo {}; for (int i = 0; i < out.size(); ++i) { for (int j = 0; j < out[i].vData.size(); ++j) { if (!(scheduleInfo.contains(out[i].vData[j]) || out[i].vData[j].type.ID == 4)) { scheduleInfo.append(out[i].vData[j]); } } } std::sort(scheduleInfo.begin(), scheduleInfo.end(), scheduleSort); return scheduleInfo; } QVector queryScheduleProxy::WeeklyScheduleFileter(QVector &out, QSet &weeklySet) { QVector scheduleInfo {}; if (weeklySet.size() == 0) { return sortAndFilterSchedule(out); } else { for (int i = 0; i < out.size(); ++i) { for (int j = 0; j < out[i].vData.size(); ++j) { if (!(scheduleInfo.contains(out[i].vData[j])) && weeklyIsIntersections(out[i].vData[j].beginDateTime, out[i].vData[j].endDateTime, weeklySet)) { scheduleInfo.append(out[i].vData[j]); } } } } return scheduleInfo; } QVector queryScheduleProxy::MonthlyScheduleFileter(QVector &out, int beginM, int endM) { if (beginM == 0 || endM == 0) { return sortAndFilterSchedule(out); } QVector scheduleInfo {}; for (int i = 0; i < out.size(); ++i) { for (int j = 0; j < out[i].vData.size(); ++j) { if (!(scheduleInfo.contains(out[i].vData[j])) && monthlyIsIntersections(out[i].vData[j].beginDateTime, out[i].vData[j].endDateTime, beginM, endM)) { scheduleInfo.append(out[i].vData[j]); } } } return scheduleInfo; } bool queryScheduleProxy::monthlyIsIntersections(QDateTime &beginTime, QDateTime &endTime, int beginM, int endM) { bool b_monthly = false; int beginDay = beginTime.date().day(); int endDay = endTime.date().day(); if (beginM > endM) { b_monthly = beginDay > endM && endDay < beginM ? false : true; } else { b_monthly = (beginM <= beginDay && endM >= beginDay) || (beginM <= endDay && endM >= endDay) || (beginDay <= beginM && endDay >= endM); } return b_monthly; } bool queryScheduleProxy::checkedTimeIsIntersection(QTime &beginTime, QTime &endTime, QTime &fixbeginTime, QTime &fixendTime) { bool b_checked = false; if (beginTime.secsTo(endTime) < 0) { if (fixbeginTime.secsTo(fixendTime) < 0) { b_checked = true; } else { b_checked = endTime.secsTo(fixbeginTime) > 0 && fixendTime.secsTo(beginTime) > 0 ? false : true; } } else { if (fixbeginTime.secsTo(fixendTime) < 0) { b_checked = fixendTime.secsTo(beginTime) > 0 && endTime.secsTo(fixbeginTime) > 0 ? false : true; } else { b_checked = (beginTime.secsTo(fixbeginTime) >= 0 && fixbeginTime.secsTo(endTime) >= 0) || (beginTime.secsTo(fixendTime) >= 0 && fixendTime.secsTo(endTime) >= 0); } } return b_checked; } QVector queryScheduleProxy::scheduleFileterByTime(QVector &scheduleInfo, QTime &fileterBeginTime, QTime &fileterEndTime) { QVector mScheduleFileter {}; qint64 timeoffset_Secs = 0; bool isApppend = false; for (int i = 0; i < scheduleInfo.size(); ++i) { timeoffset_Secs = scheduleInfo.at(i).beginDateTime.secsTo(scheduleInfo.at(i).endDateTime); isApppend = false; if (timeoffset_Secs < ONE_DAY_SECS) { QTime begTime = scheduleInfo.at(i).beginDateTime.time(); QTime endTime = scheduleInfo.at(i).endDateTime.time(); isApppend = checkedTimeIsIntersection(begTime, endTime, fileterBeginTime, fileterEndTime); } else { isApppend = true; } if (isApppend) { mScheduleFileter.append(scheduleInfo.at(i)); } } return mScheduleFileter; } QVector queryScheduleProxy::scheduleFileterByTitleName(QVector &scheduleInfo, const QString &strName) { QVector mScheduleFileter {}; for (int i = 0; i < scheduleInfo.size(); ++i) { if (scheduleInfo.at(i).titleName.contains(strName)) { mScheduleFileter.append(scheduleInfo.at(i)); } } return mScheduleFileter; } bool queryScheduleProxy::weeklyIsIntersections(QDateTime &beginTime, QDateTime &endTime, QSet &weeklySet) { QSet scheduleWeekSet; bool returnValue = false; scheduleWeekSet.clear(); qint64 dayoffset = beginTime.daysTo(endTime); if (dayoffset > 5) { returnValue = true; } else { int beginW = beginTime.date().dayOfWeek(); int w; for (int i = beginW; i <= beginW + dayoffset; ++i) { w = i % 7; w = w ? w : 7; scheduleWeekSet.insert(w); } returnValue = scheduleWeekSet.intersects(weeklySet); } return returnValue; } SemanticsDateTime queryScheduleProxy::getQueryDateTime(JsonData *jsonData) { changejsondata *changedata = dynamic_cast(jsonData); if (changedata != nullptr && changedata->fromDateTime().suggestDatetime.size() > 0) { return changedata->fromDateTime(); } return jsonData->getDateTime(); } queryScheduleProxy::DateTimeLimit queryScheduleProxy::getTimeLimitByTimeInfo(const SemanticsDateTime &timeInfoVect) { DateTimeLimit timeLimit; setTimeIsExpired(false); if (timeInfoVect.suggestDatetime.size() == 0) { TIME_FRAME_IN_THE_NEXT_SIX_MONTHT timeLimit.beginTime = beginTime; timeLimit.endTime = endTime; } else if (timeInfoVect.suggestDatetime.size() == 1) { if (timeInfoVect.suggestDatetime.at(0).datetime.date() < QDateTime::currentDateTime().date() || timeInfoVect.suggestDatetime.at(0).datetime.date() > QDateTime::currentDateTime().addDays(MAXIMUM_DAYS_IN_THE_FUTURE).date()) { setTimeIsExpired(true); return timeLimit; } if (timeInfoVect.suggestDatetime.at(0).hasTime) { if (timeInfoVect.suggestDatetime.at(0).datetime < QDateTime::currentDateTime()) { setTimeIsExpired(true); } else { timeLimit.beginTime = timeInfoVect.suggestDatetime.at(0).datetime; timeLimit.endTime = timeInfoVect.suggestDatetime.at(0).datetime; } } else { if (timeInfoVect.suggestDatetime.at(0).datetime.date() == QDateTime::currentDateTime().date()) { timeLimit.beginTime = QDateTime::currentDateTime(); timeLimit.endTime.setDate(timeLimit.beginTime.date()); timeLimit.endTime.setTime(QTime(23, 59, 59)); } else { timeLimit.beginTime = timeInfoVect.suggestDatetime.at(0).datetime; timeLimit.endTime.setDate(timeLimit.beginTime.date()); timeLimit.endTime.setTime(QTime(23, 59, 59)); } } } else { QDateTime maxDay = QDateTime::currentDateTime().addDays(MAXIMUM_DAYS_IN_THE_FUTURE); if (timeInfoVect.suggestDatetime.at(1).datetime.date() < QDateTime::currentDateTime().date() || timeInfoVect.suggestDatetime.at(0).datetime.date() > maxDay.date()) { setTimeIsExpired(true); return timeLimit; } if (timeInfoVect.suggestDatetime.at(0).datetime < QDateTime::currentDateTime()) { timeLimit.beginTime = QDateTime::currentDateTime(); } else { timeLimit.beginTime = timeInfoVect.suggestDatetime.at(0).datetime; } if (timeInfoVect.suggestDatetime.at(1).hasTime) { timeLimit.endTime = timeInfoVect.suggestDatetime.at(1).datetime; } else { timeLimit.endTime.setDate(timeInfoVect.suggestDatetime.at(1).datetime.date()); timeLimit.endTime.setTime(QTime(23, 59, 59)); } if (timeLimit.endTime.date() > maxDay.date()) { timeLimit.endTime.setDate(maxDay.date()); timeLimit.endTime.setTime(QTime(23, 59, 59)); } } return timeLimit; } queryScheduleProxy::TimeLimit queryScheduleProxy::getTimeFileterByTimeInfo(const SemanticsDateTime &timeInfoVect) { TimeLimit fileterTime; fileterTime.isInvalid = true; if (timeInfoVect.suggestDatetime.size() == 0) { } else if (timeInfoVect.suggestDatetime.size() == 1) { if (timeInfoVect.suggestDatetime.at(0).hasTime) { fileterTime.beginTime = timeInfoVect.suggestDatetime.at(0).datetime.time(); fileterTime.endTime = fileterTime.beginTime; fileterTime.isInvalid = false; } } else { fileterTime.beginTime = timeInfoVect.suggestDatetime.at(0).datetime.time(); fileterTime.endTime = timeInfoVect.suggestDatetime.at(1).datetime.time(); fileterTime.isInvalid = false; } return fileterTime; } bool queryScheduleProxy::getTimeIsExpired() const { return m_TimeIsExpired; } void queryScheduleProxy::setTimeIsExpired(const bool timeisExp) { m_TimeIsExpired = timeisExp; } bool queryScheduleProxy::timeFrameIsValid(const SemanticsDateTime &timeInfoVect) { //如果开始时间大于结束时间则返回false if(timeInfoVect.suggestDatetime.size()>1 && timeInfoVect.suggestDatetime.at(0).datetime>timeInfoVect.suggestDatetime.at(1).datetime){ return false; } return true; } dde-calendar-5.7.0.23/schedule-plugin/src/task/queryscheduleproxy.h000066400000000000000000000073101375021633200252320ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 QUERYSCHEDULEPROXY_H #define QUERYSCHEDULEPROXY_H #include "../data/schedulestructs.h" #include "../data/jsondata.h" #include "../dbus/schedulesdbus.h" class queryScheduleProxy { public: queryScheduleProxy(JsonData *jsonData, CSchedulesDBus *dbus); QVector querySchedule(); bool getTimeIsExpired() const; private: struct DateTimeLimit { QDateTime beginTime; QDateTime endTime; }; struct TimeLimit { QTime beginTime; QTime endTime; bool isInvalid {false}; }; QVector queryWeeklySchedule(QDateTime &beginTime, QDateTime &endTime, int beginW = 0, int endW = 0); QVector queryMonthlySchedule(QDateTime &beginTime, QDateTime &endTime, int beginM = 0, int endM = 0); QVector queryEveryDaySchedule(QDateTime &beginTime, QDateTime &endTime); QVector queryEveryYearSchedule(QDateTime &beginTime, QDateTime &endTime); QVector queryWorkingDaySchedule(QDateTime &beginTime, QDateTime &endTime); QVector queryNonRepeatingSchedule(); QVector queryNextNumSchedule(QDateTime &beginTime, QDateTime &endTime, int NextNum); QVector queryAllSchedule(QString key, QDateTime &beginTime, QDateTime &endTime); QVector sortAndFilterSchedule(QVector &out); QVector WeeklyScheduleFileter(QVector &out, QSet &weeklySet); QVector MonthlyScheduleFileter(QVector &out, int beginM = 0, int endM = 0); bool monthlyIsIntersections(QDateTime &beginTime, QDateTime &endTime, int beginM = 0, int endM = 0); bool checkedTimeIsIntersection(QTime &beginTime, QTime &endTime, QTime &fixbeginTime, QTime &fixendTime); QVector scheduleFileterByTime(QVector &scheduleInfo, QTime &fileterBeginTime, QTime &fileterEndTime); QVector scheduleFileterByTitleName(QVector &scheduleInfo, const QString &strName); bool weeklyIsIntersections(QDateTime &beginTime, QDateTime &endTime, QSet &weeklySet); SemanticsDateTime getQueryDateTime(JsonData *jsonData); DateTimeLimit getTimeLimitByTimeInfo(const SemanticsDateTime &timeInfoVect); TimeLimit getTimeFileterByTimeInfo(const SemanticsDateTime &timeInfoVect); void setTimeIsExpired(const bool timeisExp); /** * @brief timeFrameIsValid 时间范围是否有效,开始时间不能大于结束时间 * @param timeInfoVect 时间范围 * @return 返回false表示开始时间大于结束时间 */ bool timeFrameIsValid(const SemanticsDateTime &timeInfoVect); private: JsonData *m_queryJsonData; CSchedulesDBus *m_dbus {nullptr}; bool m_TimeIsExpired {false}; }; #endif // QUERYSCHEDULEPROXY_H dde-calendar-5.7.0.23/schedule-plugin/src/task/queryscheduletask.cpp000066400000000000000000000400421375021633200253450ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "queryscheduletask.h" #include "../globaldef.h" queryScheduleTask::queryScheduleTask(CSchedulesDBus *dbus) : scheduleBaseTask(dbus) { } Reply queryScheduleTask::SchedulePress(semanticAnalysisTask &semanticTask) { QueryJsonData *queryJsonData = dynamic_cast(semanticTask.getJsonData()); //如果转换失败则返回错误消息 if (queryJsonData == nullptr) return errorMessage(); //查询日程 if (queryJsonData->offset() > -1 && queryJsonData->getPropertyStatus() == JsonData::PRO_NONE) { Reply m_reply; REPLY_ONLY_TTS(m_reply, CANCEL_ERR_TTS, CANCEL_ERR_TTS, true); return m_reply; } QString m_queryTitleName = queryJsonData->TitleName(); QVector getDayNum = queryJsonData->getRepeatNum(); viewWidget = new viewschedulewidget(); QVector showdate; TIME_FRAME_IN_THE_NEXT_SIX_MONTHT QVector schedule = getSchedule(m_queryTitleName, beginTime, endTime); setDateTime(queryJsonData); switch (queryJsonData->getRepeatStatus()) { case QueryJsonData::RepeatStatus::EVED: { showdate = getEveryDayOrWorkDaySchedule(queryJsonData, 1); } break; case QueryJsonData::RepeatStatus::WORKD: { showdate = getEveryDayOrWorkDaySchedule(queryJsonData, 2); } break; case QueryJsonData::RepeatStatus::RESTD: { QVector queryRest; queryRest.append(6); queryRest.append(7); showdate = getRestDaySchedule(queryJsonData, queryRest); } break; case QueryJsonData::RepeatStatus::EVEW: { showdate = getEveryWeekSchedule(queryJsonData, getDayNum); } break; case QueryJsonData::RepeatStatus::EVEM: { showdate = getEveryMonthSchedule(queryJsonData, getDayNum); } break; case QueryJsonData::RepeatStatus::EVEY: { showdate = getEveryYearSchedule(queryJsonData); } break; default: { showdate = getNonePropertyStatusSchedule(queryJsonData, schedule); } break; } viewWidget->viewScheduleInfoShow(showdate); Reply m_reply; if (queryJsonData->ShouldEndSession()) { //不进行多轮 if (queryOverDueDate(queryJsonData)) { //过期时间 REPLY_ONLY_TTS(m_reply, VIEW_DATE_IS_OVERDUE_TTS, VIEW_DATE_IS_OVERDUE_TTS, true); } else if (queryJsonData->getDateTime().suggestDatetime.size() > 0 && queryJsonData->getDateTime().suggestDatetime.at(0).datetime > QDateTime::currentDateTime().addMonths(6)) { //超过半年的时间 REPLY_ONLY_TTS(m_reply, VIEW_DATETIME_OUT_TTS, VIEW_DATETIME_OUT_TTS, true); } else { if (viewWidget->getScheduleNum(showdate) == 0) { //没有查询的日程 REPLY_ONLY_TTS(m_reply, NO_SCHEDULE_VIEWED_TTS, NO_SCHEDULE_VIEWED_TTS, true); } else { //查询到日程 QString str = QString(VIEW_SCHEDULE_TTS).arg(viewWidget->getScheduleNum(showdate)); REPLY_WIDGET_TTS(m_reply, viewWidget, str, str, true); } } } else { //多轮的情况 REPLY_ONLY_TTS(m_reply, queryJsonData->SuggestMsg(), queryJsonData->SuggestMsg(), false); } return m_reply; } void queryScheduleTask::setDateTime(QueryJsonData *queryJsonData) { switch (queryJsonData->getDateTime().suggestDatetime.size()) { case 1: { m_BeginDateTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime; m_EndDateTime = m_BeginDateTime; //时间处理 if (!queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { if (m_BeginDateTime.date() == QDate::currentDate()) { m_BeginDateTime.setTime(QTime::currentTime()); } else { m_BeginDateTime.setTime(QTime(0, 0, 0)); } m_EndDateTime.setTime(QTime(23, 59, 59)); } } break; case 2: { m_BeginDateTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime; m_EndDateTime = queryJsonData->getDateTime().suggestDatetime.at(1).datetime; if (queryJsonData->getDateTime().suggestDatetime.at(1).datetime < QDateTime::currentDateTime()) { //如果查询结束时间小于当前时间,设置开始结束时间为无效时间 m_BeginDateTime.setDate(QDate(0,0,0)); m_BeginDateTime.setTime(QTime(0,0,0)); m_EndDateTime.setDate(QDate(0,0,0)); m_EndDateTime.setTime(QTime(0,0,0)); break; } else { //最多查询半年的日程 if (queryJsonData->getDateTime().suggestDatetime.at(1).datetime.date() > QDate::currentDate().addMonths(6)) { m_EndDateTime.setDate(QDate::currentDate().addMonths(6)); } //如果没有时间,设置为一天最后的时间 if (!queryJsonData->getDateTime().suggestDatetime.at(1).hasTime) { m_EndDateTime.setTime(QTime(23, 59, 59)); } } if (queryJsonData->getDateTime().suggestDatetime.at(0).datetime <= QDateTime::currentDateTime()) { //开始时间小于当前时间,设置当前时间 m_BeginDateTime = QDateTime::currentDateTime(); } else { if (!queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { //没有time if (queryJsonData->getDateTime().suggestDatetime.at(0).datetime.date() == QDate::currentDate()) //如果是今天,设置当前时间 m_BeginDateTime.setTime(QTime::currentTime()); else //不是今天,设置一天最初的时间 m_BeginDateTime.setTime(QTime(0,0,0)); } } } break; default: { //如果没有时间,设置开始结束时间为无效时间 m_BeginDateTime.setDate(QDate(0,0,0)); m_BeginDateTime.setTime(QTime(0,0,0)); m_EndDateTime.setDate(QDate(0,0,0)); m_EndDateTime.setTime(QTime(0,0,0)); } break; } } QVector queryScheduleTask::getSchedule(QString titleName, QDateTime beginDatetime, QDateTime endDateTime) { QVector schedule; //使用dbus查询日程 m_dbus->QueryJobs(titleName, beginDatetime, endDateTime, schedule); //设置查询的日程 viewWidget->setScheduleDateRangeInfo(schedule); //返回过滤后的日程 return viewWidget->getAllScheduleInfo(); } QVector queryScheduleTask::getEveryDayOrWorkDaySchedule(QueryJsonData *queryJsonData, int repeat) { QTime m_BTime; QTime m_ETime; QVector schedule; schedule = viewWidget->getAllRpeatScheduleInfo(repeat); if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = m_BeginDateTime.time(); m_ETime = m_EndDateTime.time(); schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } return schedule; } QVector queryScheduleTask::getRestDaySchedule(QueryJsonData *queryJsonData, QVector queryWeek) { QVector schedule; QTime m_BTime; QTime m_ETime; //查询所有周重复的日程 schedule = viewWidget->getAllRpeatScheduleInfo(3); //查询周几-周几的重复日程 schedule = viewWidget->queryScheduleWithWeek(schedule, queryWeek); //如果有时间,则再按照时间进行过滤 if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); m_ETime = m_BTime; schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } return schedule; } QVector queryScheduleTask::getEveryWeekSchedule(QueryJsonData *queryJsonData, QVector repeatNum) { QTime m_BTime; QTime m_ETime; QVector schedule; //查询所有周重复的日程 schedule = viewWidget->getAllRpeatScheduleInfo(3); if (repeatNum.size() == 1) { QVector queryWeek; queryWeek.append(repeatNum[0]); schedule = viewWidget->queryScheduleWithWeek(schedule, queryWeek); if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); m_ETime = m_BTime; schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } } else if (repeatNum.size() == 2) { int start = repeatNum[0]; int end = repeatNum[1]; QVector queryWeek; if (start == end) { return viewWidget->getAllRpeatScheduleInfo(1); } else if (start < end) { if (start == 1 && end == 5) { return viewWidget->getAllRpeatScheduleInfo(2); } else if (end - start == 6) { return viewWidget->getAllRpeatScheduleInfo(1); } else { for (int i = start; i <= end; i++) { queryWeek.append(i); } } } else { if (start - end == 1) { return viewWidget->getAllRpeatScheduleInfo(1); } else { for (int i = 0; i <= 7 - start; i++) { queryWeek.append(i + start); } for (int i = 0; i < end; i++) { queryWeek.append(i + 1); } } } //查询周几-周几的重复日程 schedule = viewWidget->queryScheduleWithWeek(schedule, queryWeek); if (queryJsonData->getDateTime().suggestDatetime.size() == 1) { if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = QTime(0, 0, 0); m_ETime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); schedule = viewWidget->queryScheduleWithWeek(schedule, queryWeek, end, m_BTime, m_ETime); } } } return schedule; } QVector queryScheduleTask::getEveryMonthSchedule(QueryJsonData *queryJsonData, QVector repeatNum) { QTime m_BTime; QTime m_ETime; QVector schedule; //查询所有月重复的日程 schedule = viewWidget->getAllRpeatScheduleInfo(4); if (repeatNum.size() == 1) { QVector queryMonth; queryMonth.append(repeatNum[0]); schedule = viewWidget->queryScheduleWithMonth(schedule, queryMonth); if (queryJsonData->getDateTime().suggestDatetime.size() == 1) { if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); m_ETime = m_BTime; schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } } else if (queryJsonData->getDateTime().suggestDatetime.size() == 2) { m_BTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); m_ETime = queryJsonData->getDateTime().suggestDatetime.at(1).datetime.time(); schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } } else if (repeatNum.size() == 2) { int start = repeatNum[0]; int end = repeatNum[1]; QVector queryMonth; if (start == end) { return viewWidget->getAllRpeatScheduleInfo(1); } else if (start < end) { for (int i = start; i <= end; i++) { queryMonth.append(i); } } schedule = viewWidget->queryScheduleWithMonth(schedule, queryMonth); } else { if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { m_BTime = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); m_ETime = m_BTime; schedule = viewWidget->queryScheduleWithTime(schedule, m_BTime, m_ETime); } } return schedule; } QVector queryScheduleTask::getEveryYearSchedule(QueryJsonData *queryJsonData) { Q_UNUSED(queryJsonData) QVector schedule; if (queryJsonData->getDateTime().suggestDatetime.size() == 1) { //查询所有年重复的日程 schedule = viewWidget->getAllRpeatScheduleInfo(5); //设置查询的开始结束日期 QDate m_beginD = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.date(); QDate m_endD = m_beginD; //按照日期查询日程 schedule = viewWidget->queryScheduleWithDate(schedule, m_beginD, m_endD); //如果有时间,则按照时间查询 if (queryJsonData->getDateTime().suggestDatetime.at(0).hasTime) { QTime m_beginT = queryJsonData->getDateTime().suggestDatetime.at(0).datetime.time(); QTime m_endT = m_beginT; schedule = viewWidget->queryScheduleWithTime(schedule, m_beginT, m_endT); } } return schedule; } QVector queryScheduleTask::getNonePropertyStatusSchedule(QueryJsonData *queryJsonData, QVector schedule) { QVector scheduleInfo; scheduleInfo.clear(); switch (queryJsonData->getPropertyStatus()) { case QueryJsonData::PropertyStatus::ALL: { //查询所有的日程,因此不需要对已查询到的日程进行过滤操作 return schedule; } case QueryJsonData::PropertyStatus::NEXT: { if (schedule.isEmpty()) { //如果半年内没有日程,返回空容器 return scheduleInfo; } else { schedule.clear(); scheduleInfo = viewWidget->getNextScheduleInfo(); } //返回下一个日程信息 return scheduleInfo; } case QueryJsonData::PropertyStatus::LAST: break; default: { if (m_BeginDateTime.isValid()) { qDebug() << m_BeginDateTime << m_EndDateTime; //返回过滤的日程 return getSchedule(queryJsonData->TitleName(), m_BeginDateTime, m_EndDateTime); } } } //如果以上情况都没有返回半年所有日程 return schedule; } bool queryScheduleTask::queryOverDueDate(QueryJsonData *queryJsonData) { bool overduedate = false; int datenum; if (queryJsonData->getDateTime().suggestDatetime.size() > 0) { if (queryJsonData->getDateTime().suggestDatetime.size() == 1) datenum = 0; else datenum = 1; if (queryJsonData->getDateTime().suggestDatetime.at(datenum).datetime.date() < QDate::currentDate()) { overduedate = true; } else if (queryJsonData->getDateTime().suggestDatetime.at(datenum).datetime.date() == QDate::currentDate() && queryJsonData->getDateTime().suggestDatetime.at(datenum).hasTime && queryJsonData->getDateTime().suggestDatetime.at(datenum).datetime.time() < QTime::currentTime()) { overduedate = true; } else { overduedate = false; } } else { overduedate = false; } return overduedate; } #ifdef LOG_PRINT void queryScheduleTask::logPrint(const JsonData *jsonData) { Q_UNUSED(jsonData) } #endif dde-calendar-5.7.0.23/schedule-plugin/src/task/queryscheduletask.h000066400000000000000000000076641375021633200250270ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 QUERYSCHEDULETASK_H #define QUERYSCHEDULETASK_H #include "schedulebasetask.h" #include "../data/queryjsondata.h" #include "../widget/viewschedulewidget.h" class queryScheduleTask : public scheduleBaseTask { Q_OBJECT public: queryScheduleTask(CSchedulesDBus *dbus); Reply SchedulePress(semanticAnalysisTask &semanticTask) override; private: /** * @brief setDateTime 设置查询的开始结束时间 * @param queryJsonData jsondata句柄 */ void setDateTime(QueryJsonData *queryJsonData); /** * @brief getHalfAYearSchedule 获取半年的日程信息 * @param titleName 日程titlename * @param beginDatetime 查询开始时间 * @param endDateTime 查询结束时间 * @return 日程信息 */ QVector getSchedule(QString titleName, QDateTime beginDatetime, QDateTime endDateTime); /** * @brief getEveryDayOrWorkDaySchedule 获取每天或者工作日的日程信息 * @param queryJsonData jsondatajubing * @param repeat 重复类型 * @return 日程信息 */ QVector getEveryDayOrWorkDaySchedule(QueryJsonData *queryJsonData, int repeat); /** * @brief getRestDaySchedule 获取休息日的日程信息 * @param queryJsonData jsondata句柄 * @param queryWeek 需要查询周几的容器 * @return 日程信息 */ QVector getRestDaySchedule(QueryJsonData *queryJsonData, QVector queryWeek); /** * @brief getEveryWeekSchedule 获取每周的日程信息 * @param queryJsonData jsondata句柄 * @param repeatNum 需要查询每周几-周几的容器 * @return 日程信息 */ QVector getEveryWeekSchedule(QueryJsonData *queryJsonData, QVector repeatNum); /** * @brief getEveryMonthSchedule 获取每月的日程信息 * @param queryJsonData jsondata句柄 * @param repeatNum 需要查询每月几号-几号的容器 * @return 日程信息 */ QVector getEveryMonthSchedule(QueryJsonData *queryJsonData, QVector repeatNum); /** * @brief getEveryYearSchedule 获取每年的日程信息 * @param queryJsonData jsondata句柄 * @return 日程信息 */ QVector getEveryYearSchedule(QueryJsonData *queryJsonData); /** * @brief getNonePropertyStatusSchedule 查询不是重复类型的日程 * @param queryJsonData jsondata句柄 * @param schedule 获取到的半年的日程信息 * @return 日程信息 */ QVector getNonePropertyStatusSchedule(QueryJsonData *queryJsonData, QVector schedule); /** * @brief queryOverDueDate 是否查询的是过去的日程 * @param queryJsonData jsondata句柄 * @return bool */ bool queryOverDueDate(QueryJsonData *queryJsonData); private: QDateTime m_BeginDateTime; QDateTime m_EndDateTime; viewschedulewidget *viewWidget = nullptr; protected: #ifdef LOG_PRINT void logPrint(const JsonData *jsonData) override; #endif }; #endif // QUERYSCHEDULETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/schedulebasetask.cpp000066400000000000000000000063521375021633200251200ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "schedulebasetask.h" #include "../state/schedulestate.h" #include "../globaldef.h" scheduleBaseTask::scheduleBaseTask(CSchedulesDBus *dbus, scheduleState *state) : QObject() , m_dbus(dbus) , m_State(state) { } scheduleBaseTask::~scheduleBaseTask() { if (m_State == nullptr) { delete m_State; m_State = nullptr; } } Reply scheduleBaseTask::SchedulePress(semanticAnalysisTask &semanticTask) { #ifdef LOG_PRINT logPrint(semanticTask.getJsonData()); #endif Reply reply; if (m_State != nullptr) { if (semanticTask.Intent() == JSON_NO_INTENT) { reply = m_State->getReplyByIntent(false); } else if (semanticTask.Intent() == JSON_YES_INTENT) { reply = m_State->getReplyByIntent(true); } else { reply = m_State->process(semanticTask.getJsonData()); } updateState(); } return reply; } Reply scheduleBaseTask::getFeedbackByQuerySchedule(const QVector &info) { Q_UNUSED(info); return Reply(); } Reply scheduleBaseTask::getReplyBySelectSchedule(const ScheduleDtailInfo &info) { Q_UNUSED(info); return Reply(); } Reply scheduleBaseTask::InitState(const JsonData *jsonData, bool isUpdateState) { Q_UNUSED(jsonData); Q_UNUSED(isUpdateState); return Reply(); } Reply scheduleBaseTask::repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne) { Q_UNUSED(info); Q_UNUSED(isOnlyOne); return Reply(); } Reply scheduleBaseTask::confirwScheduleHandle(const ScheduleDtailInfo &info) { Q_UNUSED(info); return Reply(); } Reply scheduleBaseTask::confirmInfo(bool isOK) { Q_UNUSED(isOK); return Reply(); } scheduleState *scheduleBaseTask::getState() const { return m_State; } Reply scheduleBaseTask::overdueScheduleProcess() { Reply reply; REPLY_ONLY_TTS(reply, OVERTIME_TTS, OVERTIME_TTS, true); return reply; } void scheduleBaseTask::updateState() { do { scheduleState *nextState = m_State->getNextState(); if (nextState != nullptr) { delete m_State; m_State = nextState; } else { break; } } while (1); } /** * @brief scheduleBaseTask::errorMessage 用户输入无法匹配返回错误消息提示 * @return 关于无法处理该关键字的答复 */ Reply scheduleBaseTask::errorMessage() { //答复 Reply reply; REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true) return reply; } dde-calendar-5.7.0.23/schedule-plugin/src/task/schedulebasetask.h000066400000000000000000000043211375021633200245570ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULEBASETASK_H #define SCHEDULEBASETASK_H #include "semanticanalysistask.h" #include "../interface/reply.h" #include "../dbus/schedulesdbus.h" #include "../data/schedulestructs.h" #include class scheduleState; class scheduleBaseTask : public QObject { Q_OBJECT public: scheduleBaseTask(CSchedulesDBus *dbus, scheduleState *state = nullptr); virtual ~scheduleBaseTask(); virtual Reply SchedulePress(semanticAnalysisTask &semanticTask); virtual Reply getFeedbackByQuerySchedule(const QVector &info); virtual Reply getReplyBySelectSchedule(const ScheduleDtailInfo &info); virtual Reply InitState(const JsonData *jsonData, bool isUpdateState = false); virtual Reply repeatScheduleHandle(const ScheduleDtailInfo &info, bool isOnlyOne); virtual Reply confirwScheduleHandle(const ScheduleDtailInfo &info); virtual Reply confirmInfo(bool isOK); scheduleState *getState() const; Reply overdueScheduleProcess(); signals: void signaleSendMessage(Reply reply); protected: #ifdef LOG_PRINT virtual void logPrint(const JsonData *jsonData) = 0; #endif void updateState(); /** * @brief errorMessage 用户输入无法匹配返回错误消息提示 * @return 关于无法处理该关键字的答复 */ Reply errorMessage(); protected: CSchedulesDBus *m_dbus {nullptr}; scheduleState *m_State {nullptr}; }; #endif // SCHEDULEBASETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/schedulemanagetask.cpp000066400000000000000000000104241375021633200254310ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "schedulemanagetask.h" #include "../dbus/schedulesdbus.h" #include "../globaldef.h" #include "../widget/schedulelistwidget.h" #include "../data/createjsondata.h" #include "../data/queryjsondata.h" #include "../data/canceljsondata.h" #include "../data/changejsondata.h" #include "../widget/viewschedulewidget.h" #include "createscheduletask.h" #include "queryscheduletask.h" #include "cancelscheduletask.h" #include "changescheduletask.h" DWIDGET_USE_NAMESPACE ScheduleManageTask *ScheduleManageTask::m_scheduleManageTask = nullptr; ScheduleManageTask::ScheduleManageTask(QObject *parent) : QObject(parent) , m_dbus(new CSchedulesDBus(DBUS_SERVICE, DBUS_PATCH, QDBusConnection::sessionBus(), this)) { m_scheduleTaskMap[JSON_CREATE] = new createScheduleTask(m_dbus); m_scheduleTaskMap[JSON_VIEW] = new queryScheduleTask(m_dbus); m_scheduleTaskMap[JSON_CANCEL] = new cancelScheduleTask(m_dbus); m_scheduleTaskMap[JSON_CHANGE] = new changeScheduleTask(m_dbus); QMap::Iterator inter = m_scheduleTaskMap.begin(); for (; inter != m_scheduleTaskMap.end(); ++inter) { scheduleBaseTask *task = inter.value(); connect(task, &scheduleBaseTask::signaleSendMessage, this, &ScheduleManageTask::signaleSendMessage); } } ScheduleManageTask::~ScheduleManageTask() { QMap::Iterator inter = m_scheduleTaskMap.begin(); for (; inter != m_scheduleTaskMap.end(); ++inter) { scheduleBaseTask *task = inter.value(); delete task; } m_scheduleTaskMap.clear(); } ScheduleManageTask *ScheduleManageTask::getInstance() { if (m_scheduleManageTask == nullptr) { m_scheduleManageTask = new ScheduleManageTask(); } return m_scheduleManageTask; } void ScheduleManageTask::releaseInstance() { if (m_scheduleManageTask != nullptr) { delete m_scheduleManageTask; m_scheduleManageTask = nullptr; } } void ScheduleManageTask::process(semanticAnalysisTask &semanticTask) { if (m_scheduleTaskMap.contains(semanticTask.Intent())) { if (m_preScheduleTask != m_scheduleTaskMap[semanticTask.Intent()]) { if (m_preScheduleTask != nullptr) m_preScheduleTask->InitState(nullptr, true); m_preScheduleTask = m_scheduleTaskMap[semanticTask.Intent()]; } } Reply reply; if (m_preScheduleTask == nullptr){ REPLY_ONLY_TTS(reply, G_ERR_TTS, G_ERR_TTS, true); } else { reply =m_preScheduleTask->SchedulePress(semanticTask); connectHideEventToInitState(reply); } setReply(reply); } void ScheduleManageTask::slotReceivce(QVariant data, Reply *reply) { Q_UNUSED(data); Q_UNUSED(reply); } void ScheduleManageTask::slotWidgetHideInitState() { if (m_preScheduleTask != nullptr) m_preScheduleTask->InitState(nullptr, true); } void ScheduleManageTask::connectHideEventToInitState(Reply reply) { //判断回复内容是否有回复窗口 if(reply.getReplyWidget() !=nullptr){ //转换为IconDFrame窗口 IconDFrame *_iconWidget = qobject_cast(reply.getReplyWidget()); if(_iconWidget != nullptr){ //如果转换成功则关联 connect(_iconWidget, &IconDFrame::widgetIsHide, this, &ScheduleManageTask::slotWidgetHideInitState, Qt::UniqueConnection); } } } Reply ScheduleManageTask::getReply() const { return m_Reply; } void ScheduleManageTask::setReply(const Reply &reply) { m_Reply = reply; } dde-calendar-5.7.0.23/schedule-plugin/src/task/schedulemanagetask.h000066400000000000000000000043311375021633200250760ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULEMANAGETASK_H #define SCHEDULEMANAGETASK_H #include #include "../interface/reply.h" #include "semanticanalysistask.h" #include "../dbus/schedulesdbus.h" #include "../widget/icondframe.h" #include "../data/schedulestructs.h" #include "../widget/createschedulewidget.h" #include "../interface/reply.h" #include "schedulebasetask.h" //class widgetStrategy; class CSchedulesDBus; class ScheduleManageTask : public QObject { Q_OBJECT public: static ScheduleManageTask *getInstance(); static void releaseInstance(); void process(semanticAnalysisTask &semanticTask); Reply getReply() const; void setReply(const Reply &reply); private: explicit ScheduleManageTask(QObject *parent = nullptr); ~ScheduleManageTask(); signals: void signaleSendMessage(Reply reply); public slots: void slotReceivce(QVariant data, Reply *reply); /** * @brief slotWidgetHideInitState 窗口隐藏时状态初始化 */ void slotWidgetHideInitState(); private: static ScheduleManageTask *m_scheduleManageTask; /** * @brief connectHideEventToInitState 窗口隐藏绑定状态初始化 * @param reply 回复 */ void connectHideEventToInitState(Reply reply); private: CSchedulesDBus *m_dbus {nullptr}; QMap m_scheduleTaskMap; Reply m_Reply; scheduleBaseTask *m_preScheduleTask {nullptr}; }; #endif // SCHEDULEMANAGETASK_H dde-calendar-5.7.0.23/schedule-plugin/src/task/semanticanalysistask.cpp000066400000000000000000000113151375021633200260330ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "semanticanalysistask.h" #include #include #include #include "../data/createjsondata.h" #include "../data/queryjsondata.h" #include "../data/canceljsondata.h" #include "../data/changejsondata.h" #include "../globaldef.h" semanticAnalysisTask::semanticAnalysisTask(QObject *parent) : QObject(parent) { } semanticAnalysisTask::~semanticAnalysisTask() { deleteJsonData(); } bool semanticAnalysisTask::resolveTaskJson(const QString &semantic) { setIntent(""); deleteJsonData(); QJsonParseError jsonError; QJsonDocument doc = QJsonDocument::fromJson(semantic.toUtf8(), &jsonError); if (!doc.isNull() && (jsonError.error == QJsonParseError::NoError)) { auto rootObject = doc.object(); if (!(rootObject.contains("intent") && rootObject["intent"].isObject())) { return false; } auto intentObject = rootObject["intent"].toObject(); if (intentObject.empty()) { return false; } if (intentObject.contains("semantic") && intentObject["semantic"].isArray()) { auto semanticObjArr = intentObject["semantic"].toArray(); for (int i = 0; i < semanticObjArr.size(); ++i) { auto semanticObj = semanticObjArr[i].toObject(); if (semanticObj.contains("intent") && semanticObj["intent"].isString()) { setIntent(semanticObj["intent"].toString()); } m_JsonData = createJsonDataFactory(Intent()); if (m_JsonData != nullptr) { m_JsonData->JosnResolve(semanticObj); } } } if (intentObject.contains("voice_answer") && intentObject["voice_answer"].isArray()) { auto voiceAnsObjArr = intentObject["voice_answer"].toArray(); for (int i = 0; i < voiceAnsObjArr.size(); ++i) { auto voiceAnsObj = voiceAnsObjArr[i].toObject(); if (voiceAnsObj.contains("type") && voiceAnsObj["type"].isString()) { if (voiceAnsObj["type"] != "TTS") { continue; } if (voiceAnsObj.contains("content") && voiceAnsObj["content"].isString()) { //语音播报的文本 if (m_JsonData != nullptr) { m_JsonData->setSuggestMsg(voiceAnsObj["content"].toString()); } break; } } } } if (intentObject.contains("shouldEndSession") && intentObject["shouldEndSession"].isBool()) { setShouldEndSession(intentObject["shouldEndSession"].toBool()); } else { setShouldEndSession(true); } } else { return false; } return true; } QString semanticAnalysisTask::Intent() const { return m_Intent; } void semanticAnalysisTask::setIntent(const QString &Intent) { m_Intent = Intent; } JsonData *semanticAnalysisTask::getJsonData() const { return m_JsonData; } void semanticAnalysisTask::deleteJsonData() { if (m_JsonData != nullptr) { delete m_JsonData; m_JsonData = nullptr; } } JsonData *semanticAnalysisTask::createJsonDataFactory(const QString &Intent) { if (Intent == JSON_CREATE) { //创建 return new CreateJsonData(); } else if (Intent == JSON_VIEW) { //查询 return new QueryJsonData(); } else if (Intent == JSON_CANCEL) { //取消 return new cancelJsonData(); } else if (Intent == JSON_CHANGE) { //改变 return new changejsondata(); } return nullptr; } void semanticAnalysisTask::setShouldEndSession(bool isEnd) { if (m_JsonData != nullptr) { m_JsonData->setShouldEndSession(isEnd); } } void semanticAnalysisTask::setJsonData(JsonData *JsonData) { m_JsonData = JsonData; } dde-calendar-5.7.0.23/schedule-plugin/src/task/semanticanalysistask.h000066400000000000000000000030531375021633200255000ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SEMANTICANALYSISTASK_H #define SEMANTICANALYSISTASK_H #include #include #include "../data/jsondata.h" class QJsonObject; class semanticAnalysisTask : public QObject { Q_OBJECT public: explicit semanticAnalysisTask(QObject *parent = nullptr); ~semanticAnalysisTask(); bool resolveTaskJson(const QString &semantic); QString Intent() const; void setIntent(const QString &Intent); JsonData *getJsonData() const; void setJsonData(JsonData *JsonData); private: void deleteJsonData(); JsonData *createJsonDataFactory(const QString &Intent); void setShouldEndSession(bool isEnd); signals: public slots: private: QString m_Intent; JsonData *m_JsonData {nullptr}; }; #endif // SEMANTICANALYSISTASK_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/000077500000000000000000000000001375021633200214155ustar00rootroot00000000000000dde-calendar-5.7.0.23/schedule-plugin/src/widget/buttonwidget.cpp000066400000000000000000000053371375021633200246500ustar00rootroot00000000000000#include "buttonwidget.h" #include #include #include #include buttonwidget::buttonwidget(QWidget *parent) : DWidget(parent) , buttonLayout(new QHBoxLayout()) { buttonLayout->setMargin(0); buttonLayout->setContentsMargins(BTWidget::BUTTON_LAYOUT_LEFT_MARGIN, BTWidget::BUTTON_LAYOUT_TOP_MARGIN, BTWidget::BUTTON_LAYOUT_RIGHT_MARGIN, BTWidget::BUTTON_LAYOUT_BOTTOM_MARGIN); setLayout(buttonLayout); } int buttonwidget::addbutton(const QString &text, bool isDefault, buttonwidget::ButtonType type) { int index = buttonCount(); insertButton(index, text, isDefault, type); return index; } void buttonwidget::insertButton(int index, const QString &text, bool isDefault, buttonwidget::ButtonType type) { QAbstractButton *button; switch (type) { case ButtonWarning: button = new DWarningButton(this); break; case ButtonRecommend: button = new DSuggestButton(this); break; default: button = new DPushButton(this); break; } button->setText(text); button->setObjectName("ActionButton"); insertButton(index, button, isDefault); } void buttonwidget::insertButton(int index, QAbstractButton *button, bool isDefault) { DVerticalLine *line = new DVerticalLine(this); line->setObjectName("VLine"); line->setFixedHeight(30); buttonLayout->insertWidget(index * 2, line); buttonLayout->insertWidget(index * 2 + 1, button); buttonList << button; line->show(); buttonLayout->itemAt(0)->widget()->hide(); connect(button, &QAbstractButton::clicked, this, &buttonwidget::onButtonClicked); if (isDefault) { QPushButton *pushbutton = qobject_cast(button); pushbutton->setDefault(pushbutton); } const QString &text = button->text(); if (text.count() == 2) { for (const QChar &ch : text) { switch (ch.script()) { case QChar::Script_Han: case QChar::Script_Katakana: case QChar::Script_Hiragana: case QChar::Script_Hangul: break; default: return; } } button->setText(QString().append(text.at(0)).append(QChar::Nbsp).append(text.at(1))); } } int buttonwidget::buttonCount() const { return buttonList.count(); } void buttonwidget::onButtonClicked(bool clicked) { Q_UNUSED(clicked); QAbstractButton *button = qobject_cast(this->sender()); clickedButtonIndex = buttonList.indexOf(button); emit buttonClicked(clickedButtonIndex, button->text()); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/buttonwidget.h000066400000000000000000000022561375021633200243120ustar00rootroot00000000000000#ifndef BUTTONWIDGET_H #define BUTTONWIDGET_H #include #include #include #include DWIDGET_USE_NAMESPACE namespace BTWidget { const int BUTTON_LAYOUT_TOP_MARGIN = 0; const int BUTTON_LAYOUT_BOTTOM_MARGIN = 0; const int BUTTON_LAYOUT_LEFT_MARGIN = 0; const int BUTTON_LAYOUT_RIGHT_MARGIN = 0; } // namespace BTWidget class buttonwidget : public DWidget { Q_OBJECT public: explicit buttonwidget(QWidget *parent = nullptr); enum ButtonType { ButtonNormal, ButtonWarning, ButtonRecommend }; int addbutton(const QString &text, bool isDefault = false, ButtonType type = ButtonNormal); void insertButton(int index, const QString &text, bool isDefault = false, ButtonType type = ButtonNormal); void insertButton(int index, QAbstractButton *button, bool isDefault = false); int buttonCount() const; signals: void buttonClicked(int index, const QString &text); public slots: void onButtonClicked(bool clicked); private: QList buttonList; QSpacerItem *spacer = nullptr; QHBoxLayout *buttonLayout; int clickedButtonIndex; }; #endif // BUTTONWIDGET_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/createschedulewidget.cpp000066400000000000000000000141731375021633200263130ustar00rootroot00000000000000#include "createschedulewidget.h" #include #include #include #include #include "buttonwidget.h" #include "../globaldef.h" createSchedulewidget::createSchedulewidget(QWidget *parent) : IconDFrame(parent) , m_scheduleDtailInfo(ScheduleDtailInfo()) , m_scheduleitemwidget(new scheduleitemwidget(this)) { connect(m_scheduleitemwidget, &scheduleitemwidget::signalItemPress, this, &createSchedulewidget::slotItemPress); // updateUI(); } ScheduleDtailInfo &createSchedulewidget::getScheduleDtailInfo() { return m_scheduleDtailInfo; } void createSchedulewidget::setTitleName(QString titleName) { m_titleName = titleName; } void createSchedulewidget::setDateTime(QDateTime begintime, QDateTime endtime) { m_BeginDateTime = begintime; m_EndDateTime = endtime; } void createSchedulewidget::setRpeat(int rpeat) { m_rpeat = rpeat; } void createSchedulewidget::setschedule() { QDateTime m_beginTime; QDateTime m_endTime; m_beginTime = m_BeginDateTime; m_endTime = m_EndDateTime; m_scheduleDtailInfo.beginDateTime = m_beginTime; m_scheduleDtailInfo.endDateTime = m_endTime; m_scheduleDtailInfo.titleName = m_titleName; m_scheduleDtailInfo.type.ID = 3; m_scheduleDtailInfo.id = 0; m_scheduleDtailInfo.RecurID = 0; m_scheduleDtailInfo.allday = false; m_scheduleDtailInfo.remind = true; m_scheduleDtailInfo.remindData.n = 0; m_scheduleDtailInfo.rpeat = m_rpeat; // if (m_rpeat != 0) { //结束重复于类型为:永不 m_scheduleDtailInfo.enddata.type = 0; // } } void createSchedulewidget::scheduleEmpty(bool isEmpty) { m_scheduleEmpty = isEmpty; } void createSchedulewidget::updateUI() { if (m_scheduleEmpty) { //获取筛选到的日程信息 getCreatScheduleFromDbus(); //如果筛选到的日程不为空,则展示日程插件 if (!m_scheduleInfo.isEmpty()) { QVBoxLayout *mainlayout = new QVBoxLayout(); m_scheduleitemwidget->setScheduleDtailInfo(m_scheduleInfo); m_scheduleitemwidget->addscheduleitem(); mainlayout->addWidget(m_scheduleitemwidget); setCenterLayout(mainlayout); } } else { //是否创建日程 QVBoxLayout *mainlayout = new QVBoxLayout(); buttonwidget *button = new buttonwidget(this); button->addbutton(CANCEL_BUTTON_STRING, false, buttonwidget::ButtonRecommend); button->addbutton(CONFIRM_BUTTON_STRING); connect(button, &buttonwidget::buttonClicked, this, &createSchedulewidget::slotsbuttonchance); m_scheduleitemwidget->setScheduleDtailInfo(m_scheduleInfo); m_scheduleitemwidget->addscheduleitem(); mainlayout->addWidget(m_scheduleitemwidget); mainlayout->addSpacing(4); mainlayout->addWidget(button); setCenterLayout(mainlayout); } } void createSchedulewidget::setScheduleDbus(CSchedulesDBus *dbus) { m_dbus = dbus; } bool createSchedulewidget::buttonclicked() { return m_buttonclicked; } void createSchedulewidget::slotsbuttonchance(int index, const QString &text) { Q_UNUSED(text) if (index == 0) { m_buttonclicked = false; } if (index == 1) { m_buttonclicked = true; } } void createSchedulewidget::slotItemPress(const ScheduleDtailInfo &info) { QProcess proc; proc.startDetached(PROCESS_OPEN_CALENDAR); QThread::msleep(750); QString schedulestr = CSchedulesDBus::createScheduleDtailInfojson(info); QDBusMessage message = QDBusMessage::createMethodCall(DBUS_CALENDAR_SERVICE, DBUS_CALENDAR_PATCH, DBUS_CALENDAR_INTFACE, "OpenSchedule"); message << schedulestr; //发送消息 QDBusMessage response = QDBusConnection::sessionBus().call(message); } void createSchedulewidget::getCreatScheduleFromDbus() { //存放查询的日程信息 QVector out; //存放符合筛选条件的日程信息 QVector scheduleinfo; //清空容器 scheduleinfo.clear(); out.clear(); //通过dbus获取和新建的日程具有相同titlename,beginDateTime,endDateTime的日程 m_dbus->QueryJobs(m_scheduleDtailInfo.titleName, m_scheduleDtailInfo.beginDateTime, m_scheduleDtailInfo.endDateTime, out); //筛选具体日程 for (int i = 0; i < out.count(); i++) { for (int j = 0; j < out.at(i).vData.count(); j++) { //筛选条件 if (out.at(i).vData.at(j).titleName == m_scheduleDtailInfo.titleName && out.at(i).vData.at(j).beginDateTime == m_scheduleDtailInfo.beginDateTime && out.at(i).vData.at(j).endDateTime == m_scheduleDtailInfo.endDateTime && out.at(i).vData.at(j).rpeat == m_scheduleDtailInfo.rpeat && out.at(i).vData.at(j).allday == m_scheduleDtailInfo.allday && out.at(i).vData.at(j).type.ID == m_scheduleDtailInfo.type.ID && out.at(i).vData.at(j).RecurID == m_scheduleDtailInfo.RecurID && out.at(i).vData.at(j).remind == m_scheduleDtailInfo.remind && out.at(i).vData.at(j).remindData.n == m_scheduleDtailInfo.remindData.n) { if (m_scheduleDtailInfo.rpeat > 0 && out.at(i).vData.at(j).enddata.type != m_scheduleDtailInfo.enddata.type) continue; scheduleinfo.append(out.at(i).vData.at(j)); } } } //如果和新建日程具有相同信息的日程有多个,则取id最大的那一个 if (scheduleinfo.count() > 1) { for (int i = 0; i < scheduleinfo.count() - 1; i++) { if (scheduleinfo.at(i).id < scheduleinfo.at(i + 1).id) { m_scheduleInfo.clear(); m_scheduleInfo.append(scheduleinfo.at(i + 1)); } else { m_scheduleInfo.clear(); m_scheduleInfo.append(scheduleinfo.at(i)); } } } else { m_scheduleInfo = scheduleinfo; } } dde-calendar-5.7.0.23/schedule-plugin/src/widget/createschedulewidget.h000066400000000000000000000026031375021633200257530ustar00rootroot00000000000000#ifndef CREATESCHEDULE_H #define CREATESCHEDULE_H #include #include #include #include "../data/schedulestructs.h" #include "icondframe.h" #include "scheduleitemwidget.h" #include "../dbus/schedulesdbus.h" DWIDGET_USE_NAMESPACE class createSchedulewidget : public IconDFrame { Q_OBJECT public: explicit createSchedulewidget(QWidget *parent = nullptr); public: ScheduleDtailInfo &getScheduleDtailInfo(); void setTitleName(QString titleName); void setDateTime(QDateTime begintime, QDateTime endtime); void setRpeat(int rpeat); void setschedule(); void scheduleEmpty(bool isEmpty); void updateUI(); void setScheduleDbus(CSchedulesDBus *dbus); bool buttonclicked(); public slots: void slotsbuttonchance(int index, const QString &text); void slotItemPress(const ScheduleDtailInfo &info); /** * @brief getCreatScheduleFromDbus 通过dbus获取新建的日程信息 */ void getCreatScheduleFromDbus(); private: ScheduleDtailInfo m_scheduleDtailInfo; QDateTime m_BeginDateTime; QDateTime m_EndDateTime; QString m_titleName; int m_rpeat; bool m_scheduleEmpty = false; scheduleitemwidget *m_scheduleitemwidget; QVector m_scheduleInfo; CSchedulesDBus *m_dbus = nullptr; bool m_buttonclicked = false; signals: public slots: }; #endif // CREATESCHEDULE_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/icondframe.cpp000066400000000000000000000104761375021633200242400ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "icondframe.h" #include #include #include #include #include #include "../globaldef.h" #include "../interface/reply.h" IconDFrame::IconDFrame(QWidget *parent) : DFrame(parent) , m_Dayrenderer(new QSvgRenderer()) , m_Weekrenderer(new QSvgRenderer()) , m_Monthrenderer(new QSvgRenderer()) , m_backgroundrenderer(new QSvgRenderer()) { } IconDFrame::~IconDFrame() { delete m_Dayrenderer; m_Dayrenderer = nullptr; delete m_Weekrenderer; m_Weekrenderer = nullptr; delete m_Monthrenderer; m_Monthrenderer = nullptr; delete m_backgroundrenderer; m_backgroundrenderer = nullptr; } void IconDFrame::setCenterLayout(QLayout *layout) { QVBoxLayout *vlayout = new QVBoxLayout(); vlayout->addSpacing(25); vlayout->addLayout(layout); this->setLayout(vlayout); } void IconDFrame::paintEvent(QPaintEvent *event) { setTheMe(DApplicationHelper::instance()->themeType()); DFrame::paintEvent(event); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; paintPixmap(painter); paintTitle(painter); } void IconDFrame::hideEvent(QHideEvent *event) { Q_UNUSED(event); if(isEnabled()){ //如果窗口为启用状态则触发窗口隐藏信号 emit widgetIsHide(); } } void IconDFrame::setTheMe(const int type) { QColor titleColor; if (type == 0 || type == 1) { titleColor.setRgb(0, 0, 0); titleColor.setAlphaF(0.4); } else { titleColor.setRgb(255, 255, 255); titleColor.setAlphaF(0.4); } setTitleColor(titleColor); } void IconDFrame::paintPixmap(QPainter &painter) { QString dayfile = QString(":/resources/DynamicIcon/day%1.svg").arg(QDate::currentDate().day()); m_Dayrenderer->load(dayfile); QString weekfile = QString(":/resources/DynamicIcon/week%1.svg").arg(QDate::currentDate().dayOfWeek()); m_Weekrenderer->load(weekfile); QString monthfile = QString(":/resources/DynamicIcon/month%1.svg").arg(QDate::currentDate().month()); m_Monthrenderer->load(monthfile); QString backgroundfile(":/resources/DynamicIcon/calendar_bg.svg"); m_backgroundrenderer->load(backgroundfile); painter.save(); painter.setRenderHint(QPainter::SmoothPixmapTransform); //draw background QRectF backgroundRect = QRectF(11, 9, 16, 16); m_backgroundrenderer->render(&painter, backgroundRect); //draw month qreal month_x = 13; qreal month_y = 10; qreal month_w = 11; qreal month_h = 4; m_Monthrenderer->render(&painter, QRectF(month_x, month_y, month_w, month_h)); //draw day qreal day_x = 14; qreal day_y = 14; qreal day_w = 9; qreal day_h = 7; m_Dayrenderer->render(&painter, QRectF(day_x, day_y, day_w, day_h)); painter.restore(); } void IconDFrame::paintTitle(QPainter &painter) { QRect rect(34, 7, 24, 17); painter.save(); painter.setPen(TitleColor()); painter.setFont(TitleFont()); painter.drawText(rect, Qt::AlignCenter, tr(PLUGIN_TITLE_NAME)); painter.restore(); } void IconDFrame::slotReceivce(QVariant data, Reply *reply) { Q_UNUSED(data); Q_UNUSED(reply); } QColor IconDFrame::TitleColor() const { return m_TitleColor; } void IconDFrame::setTitleColor(const QColor &TitleColor) { m_TitleColor = TitleColor; } QFont IconDFrame::TitleFont() { m_TitleFont.setPixelSize(12); return m_TitleFont; } dde-calendar-5.7.0.23/schedule-plugin/src/widget/icondframe.h000066400000000000000000000035451375021633200237040ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 ICONDFRAME_H #define ICONDFRAME_H #include class QSvgRenderer; class Reply; DWIDGET_USE_NAMESPACE class IconDFrame : public DFrame { Q_OBJECT public: explicit IconDFrame(QWidget *parent = nullptr); ~IconDFrame() override; void setCenterLayout(QLayout *layout); QColor TitleColor() const; void setTitleColor(const QColor &TitleColor); private: QFont TitleFont(); protected: void paintEvent(QPaintEvent *event) override; void hideEvent(QHideEvent *event) override; private: void setTheMe(const int type); void paintPixmap(QPainter &painter); void paintTitle(QPainter &painter); signals: void signaleSendMessage(QString text); /** * @brief widgetIsHide 窗口隐藏信号 */ void widgetIsHide(); public slots: virtual void slotReceivce(QVariant data, Reply *reply); private: QSvgRenderer *m_Dayrenderer; QSvgRenderer *m_Weekrenderer; QSvgRenderer *m_Monthrenderer; QSvgRenderer *m_backgroundrenderer; QColor m_TitleColor; QFont m_TitleFont; }; #endif // ICONDFRAME_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/itemwidget.cpp000066400000000000000000000140741375021633200242710ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "itemwidget.h" #include ItemWidget::ItemWidget(QWidget *parent) : DWidget(parent) { QFont datetimefont; datetimefont.setPixelSize(12); QFont titlefont; titlefont.setPixelSize(14); setTitleFont(titlefont); setDateTimeFont(datetimefont); } void ItemWidget::paintEvent(QPaintEvent *event) { setTheMe(DApplicationHelper::instance()->themeType()); DWidget::paintEvent(event); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; drawBackground(painter); DrawItem(painter); } void ItemWidget::drawBackground(QPainter &painter) { const int radius = 8; const int diameter = radius * 2; const int RectWidth = this->rect().width(); const int RectHeight = this->rect().height(); painter.save(); painter.setPen(Qt::NoPen); QColor backgroundcolor(getBackgroundColor()); painter.setBrush(backgroundcolor); switch (m_Positon) { case ItemTop: { QPainterPath painterPath; painterPath.moveTo(0, RectHeight); painterPath.lineTo(RectWidth, RectHeight); painterPath.lineTo(RectWidth, diameter); painterPath.arcTo(QRect(RectWidth - diameter, 0, diameter, diameter), 0, 90); painterPath.lineTo(diameter, 0); painterPath.arcTo(QRect(0, 0, diameter, diameter), 90, 90); painterPath.lineTo(0, RectHeight); painterPath.closeSubpath(); painter.drawPath(painterPath); } break; case ItemMiddle: painter.drawRect(this->rect()); break; case ItemBottom: { QPainterPath painterPath; painterPath.moveTo(0, 0); painterPath.lineTo(0, RectHeight - diameter); painterPath.arcTo(QRect(0, RectHeight - diameter, diameter, diameter), 180, 90); painterPath.lineTo(RectWidth - diameter, RectHeight); painterPath.arcTo(QRect(RectWidth - diameter, RectHeight - diameter, diameter, diameter), 270, 90); painterPath.lineTo(RectWidth, 0); painterPath.lineTo(0, 0); painterPath.closeSubpath(); painter.drawPath(painterPath); } break; case ItemOnly: painter.drawRoundedRect(this->rect(), 8, 8); break; } painter.restore(); } QColor ItemWidget::getBackgroundColor() { return m_BackgroundColor; } void ItemWidget::setTheMe(const int type) { m_scheduleColor.setTheMe(type); QColor titleColor; QColor datetimeColor; if (type == 0 || type == 1) { titleColor.setRgb(0, 0, 0); titleColor.setAlphaF(0.8); datetimeColor.setRgb(0, 0, 0); datetimeColor.setAlphaF(0.6); //设置浅色背景色 m_BackgroundColor = "#000000"; m_BackgroundColor.setAlphaF(0.05); } else { titleColor.setRgb(255, 255, 255); titleColor.setAlphaF(1); datetimeColor.setRgb(255, 255, 255); datetimeColor.setAlphaF(0.6); //设置深色背景色 m_BackgroundColor = "#FFFFFF"; m_BackgroundColor.setAlphaF(0.05); } // DPalette palette; // setTitleColor(palette.color(DPalette::Normal, DPalette::BrightText)); setTitleColor(titleColor); setDateTimeColor(datetimeColor); } QColor ItemWidget::ScheduleColor() { return m_scheduleColor.getColorByTypeId(m_scheduleInfo.type.ID).splitColor; } ScheduleDtailInfo ItemWidget::getScheduleInfo() const { return m_scheduleInfo; } void ItemWidget::setDateTimeFont(const QFont &DateTimeFont) { m_DateTimeFont = DateTimeFont; } void ItemWidget::setTitleFont(const QFont &TitleFont) { m_TitleFont = TitleFont; } void ItemWidget::setDateTimeColor(const QColor &DateTimeColor) { m_DateTimeColor = DateTimeColor; } ScheduleDtailInfo ItemWidget::scheduleInfo() const { return m_scheduleInfo; } void ItemWidget::setScheduleInfo(const ScheduleDtailInfo &scheduleInfo) { m_scheduleInfo = scheduleInfo; setScheduleBeginTime(scheduleInfo.beginDateTime); setScheduleEndTime(scheduleInfo.endDateTime); setShowDate(scheduleInfo.beginDateTime.date()); setTitleContent(scheduleInfo.titleName); } void ItemWidget::setTitleColor(const QColor &TitleColor) { m_TitleColor = TitleColor; } QColor ItemWidget::getDateTimeColor() const { return m_DateTimeColor; } QFont ItemWidget::getDateTimeFont() const { return m_DateTimeFont; } QColor ItemWidget::getTitleColor() const { return m_TitleColor; } QFont ItemWidget::getTitleFont() const { return m_TitleFont; } QDateTime ItemWidget::getScheduleEndTime() const { return m_ScheduleEndTime; } void ItemWidget::setScheduleEndTime(const QDateTime &ScheduleEndTime) { m_ScheduleEndTime = ScheduleEndTime; } QDateTime ItemWidget::getScheduleBeginTime() const { return m_ScheduleBeginTime; } void ItemWidget::setScheduleBeginTime(const QDateTime &ScheduleBeginTime) { m_ScheduleBeginTime = ScheduleBeginTime; } QDate ItemWidget::getShowDate() const { return m_ShowDate; } void ItemWidget::setShowDate(const QDate &ShowDate) { m_ShowDate = ShowDate; } QString ItemWidget::getTitleContent() const { return m_TitleContent; } void ItemWidget::setTitleContent(const QString &TitleContent) { m_TitleContent = TitleContent; } void ItemWidget::setPositon(const Item_Position &Positon) { m_Positon = Positon; } void ItemWidget::DrawItem(QPainter &painter) { Q_UNUSED(painter); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/itemwidget.h000066400000000000000000000057101375021633200237330ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 ITEMWIDGET_H #define ITEMWIDGET_H #include "../data/schedulecolourmanage.h" #include "../data/schedulestructs.h" #include #include #include #include DWIDGET_USE_NAMESPACE class ItemWidget : public DWidget { Q_OBJECT public: enum Item_Position { ItemTop, ItemMiddle, ItemBottom, ItemOnly }; public: explicit ItemWidget(QWidget *parent = nullptr); void setPositon(const Item_Position &Positon); virtual void DrawItem(QPainter &painter); void setTitleContent(const QString &TitleContent); QString getTitleContent() const; QDate getShowDate() const; void setShowDate(const QDate &ShowDate); QDateTime getScheduleBeginTime() const; void setScheduleBeginTime(const QDateTime &ScheduleBeginTime); QDateTime getScheduleEndTime() const; void setScheduleEndTime(const QDateTime &ScheduleEndTime); ScheduleDtailInfo scheduleInfo() const; void setScheduleInfo(const ScheduleDtailInfo &scheduleInfo); ScheduleDtailInfo getScheduleInfo() const; protected: QFont getTitleFont() const; QColor getTitleColor() const; QFont getDateTimeFont() const; QColor getDateTimeColor() const; void setTitleColor(const QColor &TitleColor); void setDateTimeColor(const QColor &DateTimeColor); void setTitleFont(const QFont &TitleFont); void setDateTimeFont(const QFont &DateTimeFont); protected: void paintEvent(QPaintEvent *event) override; void drawBackground(QPainter &painter); QColor getBackgroundColor(); virtual void setTheMe(const int type); QColor ScheduleColor(); signals: public slots: private: Item_Position m_Positon {ItemMiddle}; QString m_TitleContent; QDate m_ShowDate; QDateTime m_ScheduleBeginTime; QDateTime m_ScheduleEndTime; QFont m_TitleFont; QColor m_TitleColor; QFont m_DateTimeFont; QColor m_DateTimeColor; /** * @brief m_BackgroundColor 绘制背景色 */ QColor m_BackgroundColor{"#000000"}; ScheduleColourManage m_scheduleColor; ScheduleDtailInfo m_scheduleInfo; }; #endif // ITEMWIDGET_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/modifyscheduleitem.cpp000066400000000000000000000105511375021633200260060ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "modifyscheduleitem.h" #include "../globaldef.h" modifyScheduleItem::modifyScheduleItem(QWidget *parent) : ItemWidget(parent) { setFixedHeight(MODIFY_ITEM_HEIGHT); } void modifyScheduleItem::DrawItem(QPainter &painter) { drawIndex(painter); drawLine(painter); drawTitleContent(painter); drawScheduleColorLine(painter); drawTime(painter); drawDate(painter); } int modifyScheduleItem::getIndex() const { return m_Index; } void modifyScheduleItem::setIndex(int Index) { m_Index = Index; } void modifyScheduleItem::drawIndex(QPainter &painter) { painter.save(); painter.setFont(getTitleFont()); painter.setPen(getDateTimeColor()); const QRect indexRect(m_IndexX, 0, m_IndexWidth, this->rect().height()); painter.drawText(indexRect, Qt::AlignCenter, QString::number(getIndex())); painter.restore(); } void modifyScheduleItem::drawLine(QPainter &painter) { painter.save(); QRect rect(40, 10, 1, 28); painter.setPen(Qt::NoPen); painter.setBrush(LineColor()); painter.drawRect(rect); painter.restore(); } void modifyScheduleItem::drawTitleContent(QPainter &painter) { painter.save(); painter.setFont(getTitleFont()); painter.setPen(getTitleColor()); const int textRectWidth = this->rect().width() - m_TItleRightMargin - m_TitleX; const QRect titleContent(m_TitleX, 0, textRectWidth, this->rect().height()); QFontMetrics metrics(getTitleFont()); painter.drawText(titleContent, Qt::AlignLeft | Qt::AlignVCenter, metrics.elidedText(getTitleContent(), Qt::ElideRight, textRectWidth)); painter.restore(); } void modifyScheduleItem::drawScheduleColorLine(QPainter &painter) { painter.save(); QRect rect(this->width() - m_TItleRightMargin, 0, 2, this->height()); painter.setPen(Qt::NoPen); painter.setBrush(ScheduleColor()); painter.drawRect(rect); painter.restore(); } void modifyScheduleItem::drawTime(QPainter &painter) { painter.save(); QRect rect(this->width() - 75, 10 - m_DateTimeOffset, 65, 17); painter.setPen(getDateTimeColor()); painter.setFont(getDateTimeFont()); QString timestr; if (scheduleInfo().allday) { timestr = ALL_DAY; } else { timestr = QString("%1-%2").arg(getScheduleBeginTime().toString("hh:mm")).arg(getScheduleEndTime().toString("hh:mm")); } painter.drawText(rect, Qt::AlignLeft | Qt::AlignTop, timestr); painter.restore(); } void modifyScheduleItem::drawDate(QPainter &painter) { painter.save(); QRect rect(this->width() - 75, 27 - m_DateTimeOffset, 65, 17); painter.setPen(getDateTimeColor()); painter.setFont(getDateTimeFont()); painter.drawText(rect, Qt::AlignLeft | Qt::AlignTop, getShowDate().toString("yyyy/MM/dd")); painter.restore(); } void modifyScheduleItem::setLineColor(const QColor &LineColor) { m_LineColor = LineColor; } void modifyScheduleItem::mousePressEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { emit signalSendSelectScheduleIndex(getIndex()); } } QColor modifyScheduleItem::LineColor() const { return m_LineColor; } void modifyScheduleItem::setTheMe(const int type) { ItemWidget::setTheMe(type); QColor lineColor; if (type == 0 || type == 1) { lineColor = QColor("#000000"); lineColor.setAlphaF(0.1); } else { //设置深色主题分割线颜色 lineColor = QColor("#FFFFFF"); lineColor.setAlphaF(0.1); } setLineColor(lineColor); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/modifyscheduleitem.h000066400000000000000000000035751375021633200254630ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 MODIFYSCHEDULEITEM_H #define MODIFYSCHEDULEITEM_H #include "itemwidget.h" class modifyScheduleItem : public ItemWidget { Q_OBJECT public: explicit modifyScheduleItem(QWidget *parent = nullptr); int getIndex() const; void setIndex(int Index); protected: QColor LineColor() const; void setLineColor(const QColor &LineColor); protected: void mousePressEvent(QMouseEvent *event) override; private: void setTheMe(const int type) override; void DrawItem(QPainter &painter) override; void drawIndex(QPainter &painter); void drawLine(QPainter &painter); void drawTitleContent(QPainter &painter); void drawScheduleColorLine(QPainter &painter); void drawTime(QPainter &painter); void drawDate(QPainter &painter); signals: void signalSendSelectScheduleIndex(int index); public slots: private: int m_Index {1}; const int m_IndexWidth {16}; const int m_IndexX {14}; QColor m_LineColor {"#000000"}; const int m_TitleX {51}; const int m_TItleRightMargin {97}; const int m_DateTimeOffset = 3; }; #endif // MODIFYSCHEDULEITEM_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/opencalendarwidget.cpp000066400000000000000000000045221375021633200257630ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "opencalendarwidget.h" #include #include #include #include "../globaldef.h" #include OpenCalendarWidget::OpenCalendarWidget(QWidget *parent) : DWidget(parent) { setFixedHeight(OPENCALENDAR_WDIGET_HEIGHT); } void OpenCalendarWidget::paintEvent(QPaintEvent *event) { Q_UNUSED(event); setTheMe(DApplicationHelper::instance()->themeType()); QPainter painter(this); painter.setPen(TitleColor()); painter.setFont(TitleFont()); painter.drawText(this->rect(), Qt::AlignLeft | Qt::AlignVCenter, QString(OPENCALENDAR_WIDGET_TITLE).arg(m_ScheduleCount)); } void OpenCalendarWidget::mousePressEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { QProcess proc; proc.startDetached(PROCESS_OPEN_CALENDAR); } } QColor OpenCalendarWidget::TitleColor() const { return m_TitleColor; } void OpenCalendarWidget::setTitleColor(const QColor &TitleColor) { m_TitleColor = TitleColor; } QFont OpenCalendarWidget::TitleFont() { m_TitleFont.setPixelSize(12); return m_TitleFont; } void OpenCalendarWidget::setTheMe(const int type) { QColor titleColor; if (type == 0 || type == 1) { titleColor.setRgb(0, 0, 0); titleColor.setAlphaF(0.4); } else { titleColor.setRgb(255, 255, 255); titleColor.setAlphaF(0.4); } setTitleColor(titleColor); } void OpenCalendarWidget::setScheduleCount(int ScheduleCount) { m_ScheduleCount = ScheduleCount; update(); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/opencalendarwidget.h000066400000000000000000000027541375021633200254350ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 OPENCALENDARWIDGET_H #define OPENCALENDARWIDGET_H #include #include #include DWIDGET_USE_NAMESPACE class OpenCalendarWidget : public DWidget { Q_OBJECT public: explicit OpenCalendarWidget(QWidget *parent = nullptr); void setScheduleCount(int ScheduleCount); QFont TitleFont(); QColor TitleColor() const; void setTitleColor(const QColor &TitleColor); private: void setTheMe(const int type); protected: void paintEvent(QPaintEvent *event) override; void mousePressEvent(QMouseEvent *event) override; signals: public slots: private: int m_ScheduleCount; QColor m_TitleColor; QFont m_TitleFont; }; #endif // OPENCALENDARWIDGET_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/repeatschedulewidget.cpp000066400000000000000000000061441375021633200263270ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "repeatschedulewidget.h" #include "scheduleitemwidget.h" #include "buttonwidget.h" #include "../globaldef.h" repeatScheduleWidget::repeatScheduleWidget(repeatScheduleWidget::Operation_type operation, repeatScheduleWidget::Widget_type widgetype, bool tocreateBtn, QWidget *parent) : IconDFrame(parent) , m_OperationType(operation) , m_WidgetType(widgetype) , m_createBtnBool(tocreateBtn) { } void repeatScheduleWidget::setSchedule(const ScheduleDtailInfo &info) { m_scheduleInfo.clear(); m_scheduleInfo.append(info); initUI(); } void repeatScheduleWidget::initUI() { m_scheduleitemwidget = new scheduleitemwidget(this); QVBoxLayout *mainlayout = new QVBoxLayout(); m_scheduleitemwidget->setScheduleDtailInfo(m_scheduleInfo); m_scheduleitemwidget->addscheduleitem(); mainlayout->addWidget(m_scheduleitemwidget); if (m_createBtnBool) { buttonwidget *button = new buttonwidget(this); m_buttonCount = 0; switch (m_WidgetType) { case Widget_Confirm: { button->addbutton(CANCEL_BUTTON_STRING); if (m_OperationType == Operation_Cancel) { button->addbutton(CONFIRM_BUTTON_STRING, true, buttonwidget::ButtonWarning); } else { button->addbutton(CONFIRM_BUTTON_STRING, true, buttonwidget::ButtonRecommend); } } break; default: { if (m_OperationType == Operation_Cancel) { button->addbutton(CANCEL_BUTTON_STRING); button->addbutton(DELETEALL_BUTTON_STRING); button->addbutton(ONLY_DELETE_THIS_BUTTON_STRING, true, buttonwidget::ButtonWarning); } else { button->addbutton(CANCEL_BUTTON_STRING); button->addbutton(CHANGE_ALL_BUTTON_STRING); button->addbutton(CHANGE_ONLYL_BUTTON_STRING, true, buttonwidget::ButtonRecommend); } } break; } m_buttonCount = button->buttonCount(); connect(button, &buttonwidget::buttonClicked, this, &repeatScheduleWidget::slotButtonCheckNum); mainlayout->addSpacing(4); mainlayout->addWidget(button); } setCenterLayout(mainlayout); } void repeatScheduleWidget::slotButtonCheckNum(int index, const QString &text) { emit signalButtonCheckNum(index, text, m_buttonCount); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/repeatschedulewidget.h000066400000000000000000000035631375021633200257760ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 REPEATSCHEDULEWIDGET_H #define REPEATSCHEDULEWIDGET_H #include "icondframe.h" #include "../data/schedulestructs.h" class scheduleitemwidget; class repeatScheduleWidget : public IconDFrame { Q_OBJECT public: enum Operation_type { Operation_Cancel, Operation_Change }; enum Widget_type { Widget_Repeat, Widget_Confirm }; public: explicit repeatScheduleWidget(Operation_type operation, Widget_type widgetype, bool tocreateBtn = true, QWidget *parent = nullptr); void setSchedule(const ScheduleDtailInfo &info); private: void initUI(); signals: void signalButtonCheckNum(int index, const QString &text, const int buttonCount); public slots: void slotButtonCheckNum(int index, const QString &text); private: scheduleitemwidget *m_scheduleitemwidget {nullptr}; QVector m_scheduleInfo; Operation_type m_OperationType {Operation_Cancel}; Widget_type m_WidgetType {Widget_Confirm}; int m_buttonCount {0}; bool m_createBtnBool {true}; }; #endif // REPEATSCHEDULEWIDGET_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/scheduleitemwidget.cpp000066400000000000000000000121471375021633200260050ustar00rootroot00000000000000#include "scheduleitemwidget.h" #include #include #include "../globaldef.h" scheduleitemwidget::scheduleitemwidget(QWidget *parent) : DWidget(parent) { } scheduleitemwidget::~scheduleitemwidget() { } void scheduleitemwidget::setScheduleDtailInfo(QVector &scheduleInfo) { m_scheduleInfo = scheduleInfo; sortScheduleWithTime(); } void scheduleitemwidget::addscheduleitem() { QVBoxLayout *mainlayout = new QVBoxLayout(); scheduleitemdate *m_scheduleitemdate = new scheduleitemdate(); mainlayout->setContentsMargins(0, 0, 0, 0); mainlayout->addWidget(m_scheduleitemdate); mainlayout->addSpacing(10); mainlayout->setSpacing(1); if (m_scheduleInfo.count() == 1) { //单个日程 scheduleitem *m_scheduleitem = new scheduleitem(); connect(m_scheduleitem, &scheduleitem::signalItemPress, this, &scheduleitemwidget::signalItemPress); m_scheduleitem->setPositon(ItemWidget::ItemOnly); m_scheduleitemdate->setScheduleDtailInfo(m_scheduleInfo.first()); m_scheduleitem->setScheduleInfo(m_scheduleInfo.first()); mainlayout->addWidget(m_scheduleitem); } else if (m_scheduleInfo.count() > 1) { //多个日程 for (int i = 0; i < m_scheduleInfo.count(); i++) { scheduleitem *m_scheduleitem = new scheduleitem(); connect(m_scheduleitem, &scheduleitem::signalItemPress, this, &scheduleitemwidget::signalItemPress); if (i == 0) { m_scheduleitem->setPositon(ItemWidget::ItemTop); } else if (i == m_scheduleInfo.count() - 1) { m_scheduleitem->setPositon(ItemWidget::ItemBottom); } else { m_scheduleitem->setPositon(ItemWidget::ItemMiddle); } m_scheduleitemdate->setScheduleDtailInfo(m_scheduleInfo[i]); m_scheduleitem->setScheduleInfo(m_scheduleInfo[i]); mainlayout->addWidget(m_scheduleitem); } } this->setLayout(mainlayout); } void scheduleitemwidget::sortScheduleWithTime() { for (int i = 0; i < m_scheduleInfo.count(); i++) { for (int j = 0; j < m_scheduleInfo.count() - i - 1; j++) { if (m_scheduleInfo[j].beginDateTime > m_scheduleInfo[j + 1].beginDateTime) std::swap(m_scheduleInfo[j], m_scheduleInfo[j + 1]); } } } scheduleitem::scheduleitem(QWidget *parent) : ItemWidget(parent) { setFixedHeight(36); } void scheduleitem::DrawItem(QPainter &painter) { drawScheduleColorLine(painter); drawTime(painter); drawDetails(painter); } void scheduleitem::drawScheduleColorLine(QPainter &painter) { painter.save(); QRect rect(m_LineRightMargin, 0, 2, this->height()); painter.setPen(Qt::NoPen); painter.setBrush(ScheduleColor()); painter.drawRect(rect); painter.restore(); } void scheduleitem::drawTime(QPainter &painter) { painter.save(); QRect rect(m_timeLeftMargin, 0, 82, this->rect().height()); painter.setPen(getDateTimeColor()); painter.setFont(getDateTimeFont()); QString timestr; if (scheduleInfo().allday) { timestr = ALL_DAY; } else { timestr = QString("%1-%2").arg(scheduleInfo().beginDateTime.toString("hh:mm")).arg(scheduleInfo().endDateTime.toString("hh:mm")); } painter.drawText(rect, Qt::AlignLeft | Qt::AlignVCenter, timestr); painter.restore(); } void scheduleitem::drawDetails(QPainter &painter) { painter.save(); QRect rect(m_DetailsRightMargin + m_LineRightMargin + 2, 0, m_DetailsWidth, this->rect().height()); painter.setPen(getTitleColor()); painter.setFont(getTitleFont()); QFontMetrics metrics(getTitleFont()); painter.drawText(rect, Qt::AlignLeft | Qt::AlignVCenter, metrics.elidedText(getTitleContent(), Qt::ElideRight, rect.width() - m_EllipsisWidth)); painter.restore(); } void scheduleitem::mousePressEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { emit signalItemPress(getScheduleInfo()); } } scheduleitemdate::scheduleitemdate(QWidget *parent) : QWidget(parent) { setFixedHeight(20); } void scheduleitemdate::setScheduleDtailInfo(ScheduleDtailInfo &scheduelDtailInfo) { m_scheduleDtailInfo = scheduelDtailInfo; } QColor scheduleitemdate::DetailsColor() { int type = DGuiApplicationHelper::instance()->themeType(); if (type == 0 || type == 1) { m_DateTimeColor.setRgb(0, 0, 0); } else { m_DateTimeColor.setRgb(255, 255, 255); } return m_DateTimeColor; } void scheduleitemdate::paintEvent(QPaintEvent *event) { QWidget::paintEvent(event); QPainter painter(this); painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(DetailsColor()); painter.drawText(QRect(m_LeftMargin, 0, this->rect().width(), 20), Qt::AlignLeft | Qt::AlignVCenter, QString("%1 %2").arg(m_scheduleDtailInfo.beginDateTime.date().toString("yyyy年MM月dd日")).arg(m_scheduleDtailInfo.beginDateTime.toString("dddd"))); painter.restore(); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/scheduleitemwidget.h000066400000000000000000000034401375021633200254460ustar00rootroot00000000000000#ifndef CREATSHCEDULEITEM_H #define CREATSHCEDULEITEM_H #include "itemwidget.h" #include "../data/schedulestructs.h" #include "../data/schedulecolourmanage.h" #include class scheduleitemdate; class scheduleitem; class scheduleitemwidget : public DWidget { Q_OBJECT public: explicit scheduleitemwidget(QWidget *parent = nullptr); ~scheduleitemwidget(); void setScheduleDtailInfo(QVector &scheduleInfo); void addscheduleitem(); signals: void signalItemPress(const ScheduleDtailInfo &info); private: void sortScheduleWithTime(); private: ScheduleDtailInfo m_scheduleDtailInfo; QVector m_scheduleInfo; }; class scheduleitem : public ItemWidget { Q_OBJECT public: explicit scheduleitem(QWidget *parent = nullptr); private: void DrawItem(QPainter &painter) override; void drawScheduleColorLine(QPainter &painter); void drawTime(QPainter &painter); void drawDetails(QPainter &painter); protected: void mousePressEvent(QMouseEvent *event) override; signals: void signalItemPress(const ScheduleDtailInfo &info); private: const int m_timeLeftMargin = 13; const int m_timeTopMargin = 9; const int m_LineRightMargin = 84; const int m_DetailsRightMargin = 7; const int m_DetailsTopMargin = 7; const int m_DetailsWidth = 256; const int m_EllipsisWidth = 8; }; class scheduleitemdate : public QWidget { Q_OBJECT public: explicit scheduleitemdate(QWidget *parent = nullptr); void setScheduleDtailInfo(ScheduleDtailInfo &scheduelDtailInfo); QColor DetailsColor(); protected: void paintEvent(QPaintEvent *event); private: ScheduleDtailInfo m_scheduleDtailInfo; QColor m_DateTimeColor; const int m_LeftMargin = 13; }; #endif // CREATSHCEDULEITEM_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/schedulelistwidget.cpp000066400000000000000000000045001375021633200260140ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "schedulelistwidget.h" #include #include "modifyscheduleitem.h" #include "opencalendarwidget.h" #include "../globaldef.h" scheduleListWidget::scheduleListWidget(QWidget *parent) : IconDFrame(parent) { } void scheduleListWidget::setScheduleInfoVector(const QVector &ScheduleInfoVector) { m_ScheduleInfoVector = ScheduleInfoVector; updateUI(); } void scheduleListWidget::updateUI() { QVBoxLayout *layout = new QVBoxLayout(); layout->setSpacing(1); bool showOpenWidget = m_ScheduleInfoVector.size() > ITEM_SHOW_NUM; const int showcount = showOpenWidget ? ITEM_SHOW_NUM : m_ScheduleInfoVector.size(); for (int i = 0; i < showcount; ++i) { modifyScheduleItem *item = new modifyScheduleItem(); if (i == 0) { item->setPositon(ItemWidget::ItemTop); } else if (i == showcount - 1) { item->setPositon(ItemWidget::ItemBottom); } else { item->setPositon(ItemWidget::ItemMiddle); } item->setIndex(i + 1); item->setScheduleInfo(m_ScheduleInfoVector[i]); connect(item, &modifyScheduleItem::signalSendSelectScheduleIndex, this, &scheduleListWidget::signalSelectScheduleIndex); layout->addWidget(item); } if (showOpenWidget) { OpenCalendarWidget *openWidget = new OpenCalendarWidget(); openWidget->setScheduleCount(m_ScheduleInfoVector.size()); layout->addSpacing(6); layout->addWidget(openWidget); } this->setCenterLayout(layout); } dde-calendar-5.7.0.23/schedule-plugin/src/widget/schedulelistwidget.h000066400000000000000000000025111375021633200254610ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SCHEDULELISTWIDGET_H #define SCHEDULELISTWIDGET_H #include #include "../data/schedulestructs.h" #include "icondframe.h" DWIDGET_USE_NAMESPACE class scheduleListWidget : public IconDFrame { Q_OBJECT public: explicit scheduleListWidget(QWidget *parent = nullptr); void setScheduleInfoVector(const QVector &ScheduleInfoVector); void updateUI(); signals: void signalSelectScheduleIndex(int index); private: QVector m_ScheduleInfoVector; }; #endif // SCHEDULELISTWIDGET_H dde-calendar-5.7.0.23/schedule-plugin/src/widget/viewschedulewidget.cpp000066400000000000000000000237161375021633200260250ustar00rootroot00000000000000#include "viewschedulewidget.h" #include "opencalendarwidget.h" #include #include #include "../globaldef.h" #include "../dbus/schedulesdbus.h" viewschedulewidget::viewschedulewidget(QWidget *parent) : IconDFrame(parent) { } viewschedulewidget::~viewschedulewidget() { } void viewschedulewidget::setScheduleDateRangeInfo(QVector &scheduleDateInfo) { m_scheduleDateInfo = scheduleDateInfo; } void viewschedulewidget::viewScheduleInfoShow(QVector m_showdate) { QVBoxLayout *mainlayout = new QVBoxLayout(); mainlayout->setSpacing(10); int scheduleNum = 0; QVector scheduleInfo; for (int i = 0; i < m_showdate.count(); i++) { for (int j = 0; j < m_showdate.at(i).vData.count(); j++) { scheduleInfo.append(m_showdate.at(i).vData.at(j)); scheduleNum++; if (scheduleNum == 10) break; } scheduleitemwidget *item = new scheduleitemwidget(); connect(item, &scheduleitemwidget::signalItemPress, this, &viewschedulewidget::slotItemPress); item->setScheduleDtailInfo(scheduleInfo); item->addscheduleitem(); mainlayout->addWidget(item); scheduleInfo.clear(); if (scheduleNum == 10) break; } if (getScheduleNum(m_showdate) > 10) { OpenCalendarWidget *openWidget = new OpenCalendarWidget(); openWidget->setScheduleCount(getScheduleNum(m_showdate)); mainlayout->addWidget(openWidget); } setCenterLayout(mainlayout); } int viewschedulewidget::getScheduleNum(QVector m_showdate) { int scheduleTotalNum = 0; for (int i = 0; i < m_showdate.count(); i++) { scheduleTotalNum += m_showdate.at(i).vData.count(); } return scheduleTotalNum; } void viewschedulewidget::setQueryBeginDateTime(QDateTime begindatetime) { m_beginDateTime = begindatetime; } void viewschedulewidget::setQueryEndDateTime(QDateTime enddatetime) { m_endDateTime = enddatetime; } QVector viewschedulewidget::getAllRpeatScheduleInfo(int rpeat) { QVector scheduleInfo; ScheduleDateRangeInfo scheduleDtailInfo; for (int i = 0; i < getAllScheduleInfo().count(); i++) { for (int j = 0; j < getAllScheduleInfo().at(i).vData.count(); j++) { if (getAllScheduleInfo().at(i).vData.at(j).rpeat == rpeat) { scheduleDtailInfo.vData.append(getAllScheduleInfo().at(i).vData.at(j)); } } if (scheduleDtailInfo.vData.count() > 0) scheduleInfo.append(scheduleDtailInfo); scheduleDtailInfo.vData.clear(); } return scheduleInfo; } QVector viewschedulewidget::getNextScheduleInfo() { //返回的日程信息 QVector showdate; //下一个日程当天的所有日程 ScheduleDateRangeInfo scheduleinfo; //当天最早的日程 ScheduleDateRangeInfo viewScheduleInfo; //下一个日程的时间 QTime earlyTime; //下一个日程的索引 int index = 0; //下一个日程的id int scheduleid = 0; scheduleinfo = getAllScheduleInfo().first(); earlyTime = scheduleinfo.vData.at(0).beginDateTime.time(); scheduleid = scheduleinfo.vData.at(0).id; //在一天的日程中筛选时间最早(如果时间最早有多个,取id最小的)的日程 for (int i = 1; i < scheduleinfo.vData.count(); i++) { QTime viewTime = scheduleinfo.vData.at(i).beginDateTime.time(); int viewScheduleid = scheduleinfo.vData.at(i).id; if (earlyTime > viewTime) { earlyTime = viewTime; index = i; } else if (earlyTime == viewTime) { if (scheduleid > viewScheduleid) { index = i; } } } //将筛选到的日程信息添加到当天最早的日程容器中 viewScheduleInfo.vData.append(scheduleinfo.vData.at(index)); showdate.append(viewScheduleInfo); return showdate; } void viewschedulewidget::slotItemPress(const ScheduleDtailInfo &info) { QProcess proc; proc.startDetached(PROCESS_OPEN_CALENDAR); QThread::msleep(750); QString schedulestr = CSchedulesDBus::createScheduleDtailInfojson(info); QDBusMessage message = QDBusMessage::createMethodCall(DBUS_CALENDAR_SERVICE, DBUS_CALENDAR_PATCH, DBUS_CALENDAR_INTFACE, "OpenSchedule"); message << schedulestr; //发送消息 QDBusMessage response = QDBusConnection::sessionBus().call(message); } QVector viewschedulewidget::queryScheduleWithTime(QVector &scheduleinfo, QTime beginT, QTime endT) { QVector scheduleDateInfo; ScheduleDateRangeInfo scheduleDInfo; for (int i = 0; i < scheduleinfo.count(); i++) { for (int j = 0; j < scheduleinfo.at(i).vData.count(); j++) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.time() <= endT && scheduleinfo.at(i).vData.at(j).endDateTime.time() >= beginT) { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } } if (scheduleDInfo.vData.count() > 0) scheduleDateInfo.append(scheduleDInfo); scheduleDInfo.vData.clear(); } return scheduleDateInfo; } QVector viewschedulewidget::queryScheduleWithDate(QVector &scheduleinfo, QDate beginD, QDate endD) { QVector scheduleDateInfo; ScheduleDateRangeInfo scheduleDInfo; for (int i = 0; i < scheduleinfo.count(); i++) { for (int j = 0; j < scheduleinfo.at(i).vData.count(); j++) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.date() <= endD && scheduleinfo.at(i).vData.at(j).endDateTime.date() >= beginD) { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } } if (scheduleDInfo.vData.count() > 0) scheduleDateInfo.append(scheduleDInfo); scheduleDInfo.vData.clear(); } return scheduleDateInfo; } QVector viewschedulewidget::queryScheduleWithWeek(QVector &scheduleinfo, QVector weekDay, int dayofweek, QTime beginT, QTime endT) { QVector scheduleDateInfo; ScheduleDateRangeInfo scheduleDInfo; for (int i = 0; i < scheduleinfo.count(); i++) { for (int j = 0; j < scheduleinfo.at(i).vData.count(); j++) { for (int k = 0; k < weekDay.count(); k++) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.date().dayOfWeek() == weekDay[k]) { if (weekDay[k] == dayofweek) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.time() <= endT && scheduleinfo.at(i).vData.at(j).endDateTime.time() >= beginT) { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } } else { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } break; } } } if (scheduleDInfo.vData.count() > 0) scheduleDateInfo.append(scheduleDInfo); scheduleDInfo.vData.clear(); } return scheduleDateInfo; } QVector viewschedulewidget::queryScheduleWithMonth(QVector &scheduleinfo, QVector monthDay, int dayofmonth, QTime beginT, QTime endT) { QVector scheduleDateInfo; ScheduleDateRangeInfo scheduleDInfo; for (int i = 0; i < scheduleinfo.count(); i++) { for (int j = 0; j < scheduleinfo.at(i).vData.count(); j++) { for (int k = 0; k < monthDay.count(); k++) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.date().day() == monthDay[k]) { if (monthDay[k] == dayofmonth) { if (scheduleinfo.at(i).vData.at(j).beginDateTime.time() <= endT && scheduleinfo.at(i).vData.at(j).endDateTime.time() >= beginT) { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } } else { scheduleDInfo.vData.append(scheduleinfo.at(i).vData.at(j)); } break; } } } if (scheduleDInfo.vData.count() > 0) scheduleDateInfo.append(scheduleDInfo); scheduleDInfo.vData.clear(); } return scheduleDateInfo; } QVector viewschedulewidget::getAllScheduleInfo() { //查询到的一天的日程 ScheduleDateRangeInfo showdate; //查询到的所有日程 QVector showDate; //判断查询到的日程是否有重复的 QVector allScheduleInfo; for (int i = 0; i < m_scheduleDateInfo.count(); i++) { for (int j = 0; j < m_scheduleDateInfo.at(i).vData.count(); j++) { if (!(m_scheduleDateInfo[i].vData[j].type.ID == 4 || allScheduleInfo.contains(m_scheduleDateInfo[i].vData[j]))) { //不是节假日并且allScheduleInfo中没有该日程 allScheduleInfo.append(m_scheduleDateInfo.at(i).vData.at(j)); showdate.vData.append(m_scheduleDateInfo.at(i).vData.at(j)); } } if (showdate.vData.count() > 0) { showDate.append(showdate); } showdate.vData.clear(); } for (int i = 0; i < showDate.count(); i++) { for (int j = 0; j < showDate.count() - i - 1; j++) { if (showDate[j].date > showDate[j + 1].date) std::swap(showDate[j], showDate[j + 1]); } } return showDate; } dde-calendar-5.7.0.23/schedule-plugin/src/widget/viewschedulewidget.h000066400000000000000000000036451375021633200254710ustar00rootroot00000000000000#ifndef VIEWSCHEDULEWIDGET_H #define VIEWSCHEDULEWIDGET_H #include #include "icondframe.h" #include "../data/schedulestructs.h" #include "scheduleitemwidget.h" class viewschedulewidget : public IconDFrame { Q_OBJECT public: explicit viewschedulewidget(QWidget *parent = nullptr); ~viewschedulewidget(); void setScheduleDateRangeInfo(QVector &scheduleDateInfo); void viewScheduleInfoShow(QVector m_showdate); int getScheduleNum(QVector m_showdate); void setQueryBeginDateTime(QDateTime begindatetime); void setQueryEndDateTime(QDateTime enddatetime); QVector queryScheduleWithTime(QVector &scheduleinfo, QTime beginT, QTime endT); QVector queryScheduleWithDate(QVector &scheduleinfo, QDate beginD, QDate endD); QVector queryScheduleWithWeek(QVector &scheduleinfo, QVector weekDay, int dayofweek = 0, QTime beginT = QTime(0, 0, 0), QTime endT = QTime(0, 0, 0)); QVector queryScheduleWithMonth(QVector &scheduleinfo, QVector monthDay, int dayofmonth = 0, QTime beginT = QTime(0, 0, 0), QTime endT = QTime(0, 0, 0)); QVector getAllScheduleInfo(); QVector getAllRpeatScheduleInfo(int rpeat); /** * @brief getNextScheduleInfo 获取下一个日程 * @return 下一个日程信息 */ QVector getNextScheduleInfo(); public slots: void slotItemPress(const ScheduleDtailInfo &info); private: QVector m_scheduleInfo; QVector m_scheduleDateInfo; QVector m_showdate; QDateTime m_beginDateTime; QDateTime m_endDateTime; }; #endif // QUERYSCHEDULEWIDGET_H dde-calendar-5.7.0.23/src/000077500000000000000000000000001375021633200150425ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/accessible/000077500000000000000000000000001375021633200171375ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/accessible/accessible.h000066400000000000000000000135031375021633200214070ustar00rootroot00000000000000#ifndef ACCESSIBLE_H #define ACCESSIBLE_H #include "accessibledefine.h" #include "../widget/yearWidget/yearwindow.h" #include "../widget/monthWidget/monthwindow.h" #include "../widget/weekWidget/weekwindow.h" #include "../widget/dayWidget/daywindow.h" #include "../customWidget/SchecduleRemindWidget.h" #include "../view/alldayeventview.h" #include "../view/monthgraphiview.h" #include "../view/graphicsview.h" #include "../customWidget/customframe.h" #include "../customWidget/animationstackedwidget.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE //using namespace DCC_NAMESPACE; SET_FORM_ACCESSIBLE(CYearWindow,"YearWidget"); SET_FORM_ACCESSIBLE(CMonthWindow,"MonthWidget"); SET_FORM_ACCESSIBLE(CWeekWindow,"WeekWidget"); SET_FORM_ACCESSIBLE(CDayWindow,"DayWidget"); SET_FORM_ACCESSIBLE(SchecduleRemindWidget,"ScheduleRemindWidget"); SET_FORM_ACCESSIBLE(CAllDayEventWeekView,"AllDayGraphiview"); SET_FORM_ACCESSIBLE(CMonthGraphiview,"MonthGraphiview"); SET_FORM_ACCESSIBLE(CGraphicsView,"PartTimeGraphiview"); SET_FORM_ACCESSIBLE(CustomFrame,"CustomFrame"); SET_FORM_ACCESSIBLE(AnimationStackedWidget,"AnimationStackedWidget"); // Qt控件 SET_FORM_ACCESSIBLE(QFrame, m_w->objectName().isEmpty() ? "frame" : m_w->objectName()) SET_FORM_ACCESSIBLE(QWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(QPushButton, m_w->text().isEmpty() ? "qpushbutton" : m_w->text()) SET_SLIDER_ACCESSIBLE(QSlider, "qslider") SET_FORM_ACCESSIBLE(QMenu, "qmenu") //SET_LABEL_ACCESSIBLE(QLabel, m_w->text().isEmpty() ? "qlabel" : m_w->text()) // Dtk控件 SET_FORM_ACCESSIBLE(DFrame, m_w->objectName().isEmpty() ? "frame" : m_w->objectName()) SET_FORM_ACCESSIBLE(DWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName()) SET_FORM_ACCESSIBLE(DBackgroundGroup, m_w->objectName().isEmpty() ? "dbackgroundgroup" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DSwitchButton, m_w->text().isEmpty() ? "switchbutton" : m_w->text()) SET_BUTTON_ACCESSIBLE(DFloatingButton, m_w->toolTip().isEmpty() ? "DFloatingButton" : m_w->toolTip()) SET_FORM_ACCESSIBLE(DSearchEdit, m_w->objectName().isEmpty() ? "DSearchEdit" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DPushButton, m_w->objectName().isEmpty() ? "DPushButton" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DIconButton, m_w->objectName().isEmpty() ? "DIconButton" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DCheckBox, m_w->objectName().isEmpty() ? "DCheckBox" : m_w->objectName()) SET_BUTTON_ACCESSIBLE(DCommandLinkButton, "DCommandLinkButton") SET_FORM_ACCESSIBLE(DTitlebar, m_w->objectName().isEmpty() ? "DTitlebar" : m_w->objectName()) //SET_LABEL_ACCESSIBLE(DLabel, m_w->text().isEmpty() ? "DLabel" : m_w->text()) SET_BUTTON_ACCESSIBLE(DToolButton, m_w->objectName().isEmpty() ? "DToolButton" : m_w->objectName()) SET_FORM_ACCESSIBLE(DDialog, m_w->objectName().isEmpty() ? "DDialog" : m_w->objectName()) SET_FORM_ACCESSIBLE(DFileDialog, m_w->objectName().isEmpty() ? "DFileDialog" : m_w->objectName()) QAccessibleInterface *accessibleFactory(const QString &classname, QObject *object) { QAccessibleInterface *interface = nullptr; USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CYearWindow); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CMonthWindow); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CWeekWindow); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CDayWindow); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),SchecduleRemindWidget); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CAllDayEventWeekView); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CMonthGraphiview); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CGraphicsView); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),CustomFrame); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""),AnimationStackedWidget); // Qt 控件 USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QFrame); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QWidget); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QPushButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QSlider); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QMenu); // USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), QLabel); // dtk 控件 USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DFrame); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DWidget); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DBackgroundGroup); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DSwitchButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DFloatingButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DSearchEdit); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DPushButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DIconButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DCheckBox); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DCommandLinkButton); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DTitlebar); // USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DLabel); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DDialog); USE_ACCESSIBLE(QString(classname).replace("dccV20::", ""), DFileDialog); return interface; } #endif // ACCESSIBLE_H dde-calendar-5.7.0.23/src/accessible/accessibledefine.h000066400000000000000000000341341375021633200225650ustar00rootroot00000000000000#ifndef ACCESSIBLEDEFINE_H #define ACCESSIBLEDEFINE_H #include #include #include #include #include #include #include #include #include #include #define SEPARATOR "_" inline QString getAccessibleName(QWidget *w, QAccessible::Role r, const QString &fallback) { const QString lowerFallback = fallback.toLower(); // 避免重复生成 static QMap objnameMap; if (!objnameMap[w].isEmpty()) return objnameMap[w]; static QMap> accessibleMap; QString oldAccessName = w->accessibleName().toLower(); oldAccessName.replace(SEPARATOR, ""); // 按照类型添加固定前缀 QMetaEnum metaEnum = QMetaEnum::fromType(); QByteArray prefix = metaEnum.valueToKeys(r); switch (r) { case QAccessible::Form: prefix = "Form"; break; case QAccessible::Button: prefix = "Btn"; break; case QAccessible::StaticText: prefix = "Label"; break; case QAccessible::EditableText: prefix = "Editable"; break; case QAccessible::Slider: prefix = "Slider"; break; default: break; } // 再加上标识 QString accessibleName = QString::fromLatin1(prefix) + SEPARATOR; accessibleName += oldAccessName.isEmpty() ? lowerFallback : oldAccessName; // 检查名称是否唯一 if (accessibleMap[r].contains(accessibleName)) { // 获取编号,然后+1 int pos = accessibleName.indexOf(SEPARATOR); int id = accessibleName.mid(pos + 1).toInt(); QString newAccessibleName; do { // 一直找到一个不重复的名字 newAccessibleName = accessibleName + SEPARATOR + QString::number(++id); } while (accessibleMap[r].contains(newAccessibleName)); accessibleMap[r].append(newAccessibleName); objnameMap.insert(w, newAccessibleName); QObject::connect(w, &QWidget::destroyed, [=](QObject *obj) { // 对象销毁后移除占用名称 objnameMap.remove(obj); accessibleMap[r].removeOne(newAccessibleName); }); return newAccessibleName; } else { accessibleMap[r].append(accessibleName); objnameMap.insert(w, accessibleName); QObject::connect(w, &QWidget::destroyed, [=](QObject *obj) { // 对象销毁后移除占用名称 objnameMap.remove(obj); accessibleMap[r].removeOne(accessibleName); }); return accessibleName; } } // 公共的功能 #define FUNC_CREATE(classname, accessibletype, accessdescription) \ explicit Accessible##classname(classname *w) \ : QAccessibleWidget(w, accessibletype, #classname) \ , m_w(w) \ , m_description(accessdescription) \ { \ } #define FUNC_TEXT(classname, accessiblename) \ QString Accessible##classname::text(QAccessible::Text t) const \ { \ switch (t) { \ case QAccessible::Name: \ return getAccessibleName(m_w, this->role(), accessiblename); \ case QAccessible::Description: \ return m_description; \ default: \ return QString(); \ } \ } // button控件特有功能 #define FUNC_ACTIONNAMES(classname) \ QStringList Accessible##classname::actionNames() const \ { \ if (!m_w->isEnabled()) \ return QStringList(); \ return QStringList() << pressAction() << showMenuAction(); \ } #define FUNC_DOACTION(classname) \ void Accessible##classname::doAction(const QString &actionName) \ { \ if (actionName == pressAction()) { \ QPointF localPos = m_w->geometry().center(); \ QMouseEvent event(QEvent::MouseButtonPress, localPos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); \ qApp->sendEvent(m_w, &event); \ } else if (actionName == showMenuAction()) { \ QPointF localPos = m_w->geometry().center(); \ QMouseEvent event(QEvent::MouseButtonPress, localPos, Qt::RightButton, Qt::RightButton, Qt::NoModifier); \ qApp->sendEvent(m_w, &event); \ } \ } // Label控件特有功能 #define FUNC_TEXT_(classname) \ QString Accessible##classname::text(int startOffset, int endOffset) const \ { \ Q_UNUSED(startOffset) \ Q_UNUSED(endOffset) \ return m_w->text(); \ } // Slider控件特有功能 #define FUNC_CURRENTVALUE(classname) \ QVariant Accessible##classname::currentValue() const \ { \ return m_w->value(); \ } #define FUNC_SETCURRENTVALUE(classname) \ void Accessible##classname::setCurrentValue(const QVariant &value) \ { \ return m_w->setValue(value.toInt()); \ } #define FUNC_MAXMUMVALUE(classname) \ QVariant Accessible##classname::maximumValue() const \ { \ return QVariant(m_w->maximum()); \ } #define FUNC_FUNC_MINIMUMVALUE(classname) \ QVariant Accessible##classname::minimumValue() const \ { \ return QVariant(m_w->minimum()); \ } #define FUNC_FUNC_MINIMUMSTEPSIZE(classname) \ QVariant Accessible##classname::minimumStepSize() const \ { \ return QVariant(m_w->singleStep()); \ } #define SET_FORM_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, accessdescription) \ class Accessible##classname : public QAccessibleWidget \ { \ public: \ FUNC_CREATE(classname, QAccessible::Form, accessdescription) \ QString text(QAccessible::Text t) const override; \ void *interface_cast(QAccessible::InterfaceType t) override \ { \ switch (t) { \ case QAccessible::ActionInterface: \ return static_cast(this); \ default: \ return nullptr; \ } \ } \ \ private: \ classname *m_w; \ QString m_description; \ }; \ FUNC_TEXT(classname, accessiblename) #define SET_BUTTON_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, accessdescription) \ class Accessible##classname : public QAccessibleWidget \ { \ public: \ FUNC_CREATE(classname, QAccessible::Button, accessdescription) \ QString text(QAccessible::Text t) const override; \ void *interface_cast(QAccessible::InterfaceType t) override \ { \ switch (t) { \ case QAccessible::ActionInterface: \ return static_cast(this); \ default: \ return nullptr; \ } \ } \ QStringList actionNames() const override; \ void doAction(const QString &actionName) override; \ \ private: \ classname *m_w; \ QString m_description; \ }; \ FUNC_TEXT(classname, accessiblename) \ FUNC_ACTIONNAMES(classname) \ FUNC_DOACTION(classname) #define SET_LABEL_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, accessdescription) \ class Accessible##classname : public QAccessibleWidget \ , public QAccessibleTextInterface \ { \ public: \ FUNC_CREATE(classname, QAccessible::StaticText, accessdescription) \ QString text(QAccessible::Text t) const override; \ void *interface_cast(QAccessible::InterfaceType t) override \ { \ switch (t) { \ case QAccessible::ActionInterface: \ return static_cast(this); \ case QAccessible::TextInterface: \ return static_cast(this); \ default: \ return nullptr; \ } \ } \ QString text(int startOffset, int endOffset) const override; \ void selection(int selectionIndex, int *startOffset, int *endOffset) const override {} \ int selectionCount() const override { return 0; } \ void addSelection(int startOffset, int endOffset) override {} \ void removeSelection(int selectionIndex) override {} \ void setSelection(int selectionIndex, int startOffset, int endOffset) override {} \ int cursorPosition() const override { return 0; } \ void setCursorPosition(int position) override {} \ int characterCount() const override { return 0; } \ QRect characterRect(int offset) const override { return QRect(); } \ int offsetAtPoint(const QPoint &point) const override { return 0; } \ void scrollToSubstring(int startIndex, int endIndex) override {} \ QString attributes(int offset, int *startOffset, int *endOffset) const override { return QString(); } \ \ private: \ classname *m_w; \ QString m_description; \ }; \ FUNC_TEXT(classname, accessiblename) \ FUNC_TEXT_(classname) #define SET_SLIDER_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, accessdescription) \ class Accessible##classname : public QAccessibleWidget \ , public QAccessibleValueInterface \ { \ public: \ FUNC_CREATE(classname, QAccessible::Slider, accessdescription) \ QString text(QAccessible::Text t) const override; \ void *interface_cast(QAccessible::InterfaceType t) override \ { \ switch (t) { \ case QAccessible::ActionInterface: \ return static_cast(this); \ case QAccessible::ValueInterface: \ return static_cast(this); \ default: \ return nullptr; \ } \ } \ QVariant currentValue() const override; \ void setCurrentValue(const QVariant &value) override; \ QVariant maximumValue() const override; \ QVariant minimumValue() const override; \ QVariant minimumStepSize() const override; \ \ private: \ classname *m_w; \ QString m_description; \ }; \ FUNC_TEXT(classname, accessiblename) \ FUNC_CURRENTVALUE(classname) \ FUNC_SETCURRENTVALUE(classname) \ FUNC_MAXMUMVALUE(classname) \ FUNC_FUNC_MINIMUMVALUE(classname) \ FUNC_FUNC_MINIMUMSTEPSIZE(classname) #define SET_EDITABLE_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, accessdescription) \ class Accessible##classname : public QAccessibleWidget \ , public QAccessibleEditableTextInterface \ , public QAccessibleTextInterface \ { \ public: \ FUNC_CREATE(classname, QAccessible::EditableText, accessdescription) \ QString text(QAccessible::Text t) const override; \ QAccessibleInterface *child(int index) const override { return nullptr; } \ void *interface_cast(QAccessible::InterfaceType t) override \ { \ switch (t) { \ case QAccessible::ActionInterface: \ return static_cast(this); \ case QAccessible::TextInterface: \ return static_cast(this); \ case QAccessible::EditableTextInterface: \ return static_cast(this); \ default: \ return nullptr; \ } \ } \ QString text(int startOffset, int endOffset) const override; \ void selection(int selectionIndex, int *startOffset, int *endOffset) const override {} \ int selectionCount() const override { return 0; } \ void addSelection(int startOffset, int endOffset) override {} \ void removeSelection(int selectionIndex) override {} \ void setSelection(int selectionIndex, int startOffset, int endOffset) override {} \ int cursorPosition() const override { return 0; } \ void setCursorPosition(int position) override {} \ int characterCount() const override { return 0; } \ QRect characterRect(int offset) const override { return QRect(); } \ int offsetAtPoint(const QPoint &point) const override { return 0; } \ void scrollToSubstring(int startIndex, int endIndex) override {} \ QString attributes(int offset, int *startOffset, int *endOffset) const override { return QString(); } \ void insertText(int offset, const QString &text) override {} \ void deleteText(int startOffset, int endOffset) override {}; \ void replaceText(int startOffset, int endOffset, const QString &text) override {} \ \ private: \ classname *m_w; \ QString m_description; \ }; \ FUNC_TEXT(classname, accessiblename) \ FUNC_TEXT_(classname) #define USE_ACCESSIBLE(classnamestring, classname) \ if (classnamestring == QLatin1String(#classname) && object && object->isWidgetType()) { \ interface = new Accessible##classname(static_cast(object)); \ } // [指定objectname]---适用同一个类,但objectname不同的情况 #define USE_ACCESSIBLE_BY_OBJECTNAME(classnamestring, classname, objectname) \ if (classnamestring == QLatin1String(#classname) && object && (object->objectName() == objectname) && object->isWidgetType()) { \ interface = new Accessible##classname(static_cast(object)); \ } /*******************************************简化使用*******************************************/ #define SET_FORM_ACCESSIBLE(classname, accessiblename) SET_FORM_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") #define SET_BUTTON_ACCESSIBLE(classname, accessiblename) SET_BUTTON_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") #define SET_LABEL_ACCESSIBLE(classname, accessiblename) SET_LABEL_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") #define SET_SLIDER_ACCESSIBLE(classname, accessiblename) SET_SLIDER_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") #define SET_EDITABLE_ACCESSIBLE(classname, accessiblename) SET_EDITABLE_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") #define SET_PROGRESSBAR_ACCESSIBLE(classname, accessiblename) SET_PROGRESSBAR_ACCESSIBLE_WITH_DESCRIPTION(classname, accessiblename, "") /************************************************************************************************/ #endif // ACCESSIBLEDEFINE_H dde-calendar-5.7.0.23/src/configsettings.cpp000066400000000000000000000033641375021633200206020ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Wuhan Deepin Technology Co., Ltd. * * Author: Iceyer * * Maintainer: Iceyer * * 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 * 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 "configsettings.h" #include #include #include #include #include #include #include DCORE_USE_NAMESPACE; QPointer CConfigSettings::m_settings = nullptr; CConfigSettings::CConfigSettings(QObject *parent) : QObject(parent) { } CConfigSettings::~CConfigSettings() { qDebug() << "destory"; } void CConfigSettings::init() { auto configFilepath = DStandardPaths::standardLocations(QStandardPaths::AppConfigLocation).value(0) + "/config.ini"; m_settings = new QSettings(configFilepath, QSettings::IniFormat);; } QPointer CConfigSettings::settings() { return m_settings; } void CConfigSettings::sync() { m_settings->sync(); } QVariant CConfigSettings::value(const QString &key) { return m_settings->value(key); } void CConfigSettings::setOption(const QString &key, const QVariant &value) { m_settings->setValue(key, value); } dde-calendar-5.7.0.23/src/configsettings.h000066400000000000000000000025101375021633200202370ustar00rootroot00000000000000/* * Copyright (C) 2016 ~ 2018 Wuhan Deepin Technology Co., Ltd. * * Author: Iceyer * * Maintainer: Iceyer * * 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 * 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 . */ #pragma once #include "singleton.h" #include class CConfigSettings : public QObject, public DCalendar::DSingleton { Q_OBJECT public: explicit CConfigSettings(QObject *parent = 0); ~CConfigSettings(); static void init(); static QPointer settings(); static void sync(); static QVariant value(const QString &key); static void setOption(const QString &key, const QVariant &value); private: static QPointer m_settings; friend class DCalendar::DSingleton; }; dde-calendar-5.7.0.23/src/constants.h000066400000000000000000000122751375021633200172360ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 CONSTANTS_H #define CONSTANTS_H namespace DDECalendar { static const int HeaderItemWidth = 80; static const int HeaderItemHeight = 40; static const int CellWidth = 106; static const int CellHeight = 70; static const int CellHighlightWidth = 80; static const int CellHighlightHeight = 70; static const int QueryEarliestYear = 1900; static const int QueryLatestYear = 9999; static const int FestivalTypeID = 4; static const int FontSizeEleven = 11; static const int FontSizeTwelve = 12; static const int FontSizeFourteen = 14; static const int FontSizeSixteen = 16; static const int FontSizeTwentyfour = 24; static const int FontSizeTwenty = 20; static const int FontSizeTen = 10; static const int FontSizeOneHundred = 100; static const int CalendarYearWindow = 0; static const int CalendarMonthWindow = 1; static const int CalendarWeekWindow = 2; static const int CalendarDayWindow = 3; static const int ThirtyMinutesWithSec = 1800; static const int AtTimeOfEvent = 0; static const int OnStartDay = 0; static const int FifteenMinutesBefore = 15; static const int ThirtyMinutesBefore = 30; static const int OneHourBefore = 60; static const int OneDayBeforeWithDay = 1; static const int OneDayBeforeWithMinutes = 1440; static const int TwoDayBeforeWithDay = 2; static const int TwoDayBeforeWithMinutes = 2880; static const int OneWeekBeforeWithDay = 7; static const int OneWeekBeforeWithMinutes = 10080; static const int NewSchceduleLabelWidth = 70; static const int QuarterOfAnhourWithMinute = 15; } // namespace DDECalendar namespace DDEYearCalendar { static const int RectSizeofEveyMonth = 42; static const int FrameSizeofEveryYear = 12; static const int YearScheduleListMaxcount = 5; static const int YHeaderItemWidth = 20; static const int YHeaderItemHeight = 16; static const int YCellWidth = 26; static const int YCellHeight = 20; static const int YCellHighlightWidth = 26; static const int YCellHighlightHeight = 20; static const int Y_MLableHeight = 36; static const int Y_YLableHeight = 45; static const int Y_MWindowWidth = 202; static const int Y_MWindowHeight = 159; } // namespace DDEYearCalendar namespace DDEMonthCalendar { static const int ItemSizeofMonthDay = 42; static const int AFewDaysofWeek = 7; static const int LinesNumofMonth = 6; static const int MonthNumofYear = 12; static const int MHeaderItemWidth = 60; static const int MHeaderItemHeight = 33; static const int MEventsItemHeight = 36; static const int MCellWidth = 120; static const int MCellHeight = 74; static const int MCellHighlightWidth = 120; static const int MCellHighlightHeight = 74; static const int MWeekCellWidth = 120; static const int MWeekCellHeight = 54; static const int MDayCellWidth = 36; static const int MDayCellHeight = 36; static const int M_YTopHeight = 76; static const int M_YLableHeight = 36; static const int M_YLunatLabelWindth = 66; static const int M_YLunatLabelHeight = 20; static const int MTodayWindth = 100; static const int MTodayHeight = 36; static const int M_MWindowWidth = 202; static const int M_MWindowHeight = 162; } namespace DDEWeekCalendar { static const int FirstDayofWeekend = 6; static const int AFewDaysofWeek = 7; static const int NumWeeksDisplayed = 10; static const int WCellHeaderItemWidth = 109; static const int WCellHeaderItemHeight = 54; static const int WMCellHeadrWidth = 80; static const int MCellHighlightWidth = 120; static const int MCellHighlightHeight = 74; static const int WWeekCellWidth = 36; static const int WWeekCellHeight = 36; static const int W_YLableHeight = 36; static const int W_YLunatLabelWindth = 66; static const int W_YLunatLabelHeight = 20; static const int WTodayWindth = 100; static const int WTodayHeight = 36; static const int W_MWindowWidth = 202; static const int W_MWindowHeight = 162; } namespace DDEDayCalendar { static const int PainterCellNum = 42; static const int DCellWidth = 35; static const int DCellHeight = 28; static const int DCellHighlightWidth = 33; static const int DCellHighlightHeight = 26; static const int D_MLableHeight = 36; static const int D_YLableHeight = 36; static const int DDLableHeight = 117; static const int DWLableHeight = 22; static const int DHualiInfoLableHeight = 17; static const int DHualiDtailLableHeight = 56; static const int DHualiDtailLableWidth = 330; static const int D_MWindowWidth = 350; static const int D_MWindowHeight = 564; } enum Week { Monday = 6, Tuesday = 5, Wednesday = 4, Thursday = 3, Friday = 2, Saturday = 1, Sunday = 0, }; #endif // CONSTANTS_H dde-calendar-5.7.0.23/src/customWidget/000077500000000000000000000000001375021633200175205ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/customWidget/SchecduleRemindWidget.cpp000066400000000000000000000121651375021633200244330ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "SchecduleRemindWidget.h" #include "constants.h" #include #include #include DGUI_USE_NAMESPACE SchecduleRemindWidget::SchecduleRemindWidget(QWidget *parent) : DArrowRectangle(DArrowRectangle::ArrowLeft, DArrowRectangle::FloatWindow, parent) , m_centerWidget(new CenterWidget(this)) { m_centerWidget->setFixedWidth(207); m_centerWidget->setFixedHeight(57); setContent(m_centerWidget); this->resizeWithContent(); QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, m_centerWidget, &CenterWidget::setTheMe); m_centerWidget->setTheMe(DGuiApplicationHelper::instance()->themeType()); } SchecduleRemindWidget::~SchecduleRemindWidget() { } void SchecduleRemindWidget::setData(const ScheduleDtailInfo &vScheduleInfo, const CSchedulesColor &gcolor) { m_centerWidget->setData(vScheduleInfo, gcolor); m_ScheduleInfo = vScheduleInfo; gdcolor = gcolor; this->setHeight(m_centerWidget->height() + 10); } CenterWidget::CenterWidget(DWidget *parent) : DFrame(parent) { textfont.setWeight(QFont::Medium); } CenterWidget::~CenterWidget() { } void CenterWidget::setData(const ScheduleDtailInfo &vScheduleInfo, const CSchedulesColor &gcolor) { m_ScheduleInfo = vScheduleInfo; gdcolor = gcolor; textfont.setPixelSize(DDECalendar::FontSizeTwelve); UpdateTextList(); update(); } void CenterWidget::setTheMe(const int type) { if (type == 2) { timeColor = QColor("#C0C6D4"); timeColor.setAlphaF(0.7); textColor = QColor("#C0C6D4"); textColor.setAlphaF(1); } else { timeColor = QColor("#414D68"); timeColor.setAlphaF(0.7); textColor = QColor("#414D68"); textColor.setAlphaF(1); } update(); } void CenterWidget::UpdateTextList() { testList.clear(); QFontMetrics metrics(textfont); textwidth = metrics.width(m_ScheduleInfo.titleName); textheight = metrics.height(); const int h_count = qCeil(textwidth / textRectWidth); QString text; if (h_count < 1) { testList.append(m_ScheduleInfo.titleName); } else { const int text_Max_Height = 108; const int text_HeightMaxCount = qFloor(text_Max_Height / textheight); for (int i = 0; i < m_ScheduleInfo.titleName.count(); ++i) { text += m_ScheduleInfo.titleName.at(i); if (metrics.width(text) > textRectWidth) { text.remove(text.count() - 1, 1); testList.append(text); text = ""; if (testList.count() == (text_HeightMaxCount - 1)) { text = m_ScheduleInfo.titleName.right( m_ScheduleInfo.titleName.count() - i ); testList.append(metrics.elidedText(text, Qt::ElideRight, textRectWidth)); break; } --i; } else { if (i + 1 == m_ScheduleInfo.titleName.count()) { testList.append(text); } } } } this->setFixedHeight(testList.count() * textheight + 30 + 8); } void CenterWidget::paintEvent(QPaintEvent *e) { Q_UNUSED(e); int diam = 8; int x = 40 - 13; QFont timeFont; timeFont.setPixelSize(DDECalendar::FontSizeTwelve); QPainter painter(this); //draw time QPen pen; pen.setColor(timeColor); painter.setPen(pen); painter.setFont(timeFont); QString timestr; QLocale locale; timestr = m_ScheduleInfo.beginDateTime.time().toString("AP h:mm"); QFontMetrics metrics(timeFont); if (m_ScheduleInfo.allday) timestr = tr("All Day"); int timewidth = metrics.width(timestr); int timeheight = metrics.height(); painter.drawText(QRect( x + 13, 7, timewidth, timeheight), Qt::AlignLeft | Qt::AlignTop, timestr); painter.setRenderHints(QPainter::Antialiasing); painter.setPen(Qt::NoPen); painter.setBrush(QBrush(gdcolor.dotColor)); painter.drawEllipse(x, 7 + (timeheight - diam) / 2, diam, diam); pen.setColor(textColor); painter.setPen(pen); painter.setFont(textfont); for (int i = 0; i < testList.count(); i++) { painter.drawText( QRect(x, 30 + i * textheight, textRectWidth, textheight), Qt::AlignLeft, testList.at(i)); } painter.end(); } dde-calendar-5.7.0.23/src/customWidget/SchecduleRemindWidget.h000066400000000000000000000042011375021633200240700ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 SchecduleRemindWidget_H #define SchecduleRemindWidget_H #include "schedulestructs.h" #include "scheduledatamanage.h" #include #include #include DWIDGET_USE_NAMESPACE class CenterWidget; class SchecduleRemindWidget : public DArrowRectangle { Q_OBJECT Q_DISABLE_COPY(SchecduleRemindWidget) public: explicit SchecduleRemindWidget(QWidget *parent = nullptr); ~SchecduleRemindWidget() override; void setData(const ScheduleDtailInfo &vScheduleInfo, const CSchedulesColor &gcolor); signals: public slots: private: CenterWidget *m_centerWidget = nullptr; ScheduleDtailInfo m_ScheduleInfo; CSchedulesColor gdcolor; }; class CenterWidget : public DFrame { Q_OBJECT Q_DISABLE_COPY(CenterWidget) public: explicit CenterWidget(DWidget *parent = nullptr); ~CenterWidget() override; void setData(const ScheduleDtailInfo &vScheduleInfo, const CSchedulesColor &gcolor); void setTheMe(const int type = 0); private: void UpdateTextList(); protected: void paintEvent(QPaintEvent *e) override; private: QStringList testList; QFont textfont; int textwidth; int textheight; const int textRectWidth = 165; ScheduleDtailInfo m_ScheduleInfo; CSchedulesColor gdcolor; QColor textColor; QColor timeColor; }; #endif // SchecduleRemindWidget_H dde-calendar-5.7.0.23/src/customWidget/animationstackedwidget.cpp000066400000000000000000000166441375021633200247610ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "animationstackedwidget.h" #include AnimationStackedWidget::AnimationStackedWidget(const AnimationOri ori, QWidget *parent) : QStackedWidget(parent) , m_animationOri(ori) , m_Animation(new QPropertyAnimation(this,"offset")) { setDuration(1000); connect(m_Animation , &QPropertyAnimation::finished , this , &AnimationStackedWidget::animationFinished); } AnimationStackedWidget::~AnimationStackedWidget() { delete m_Animation; } void AnimationStackedWidget::setDuration(int duration) { m_Duration = duration; m_Animation->setEasingCurve(QEasingCurve::InOutQuad); } void AnimationStackedWidget::paintEvent(QPaintEvent *e) { Q_UNUSED(e); if ( m_IsAnimation ) { QPainter paint(this); paintCurrentWidget(paint, currentIndex()); paintNextWidget(paint, m_NextIndex); } } void AnimationStackedWidget::animationFinished() { m_IsAnimation = false; this->widget(currentIndex())->show(); setCurrentIndex(m_NextIndex); emit signalIsFinished(); } void AnimationStackedWidget::setCurrent(int index) { //设置移动方向 m_moveOri = getMoveOrientation(currentIndex(),index); setCurrentWidget(index,getBeginValue()); } void AnimationStackedWidget::setPre() { //获取堆窗口数 const int count = this->count(); switch (m_animationOri) { case LR: { m_moveOri = LeftToRight; } break; case TB: { m_moveOri = TopToBottom; } break; } //获取下一个窗口编号 int nextIndex = currentIndex() - 1; if(nextIndex < 0){ nextIndex = nextIndex + count; } setCurrentWidget(nextIndex,getBeginValue()); } void AnimationStackedWidget::setNext() { //获取堆窗口数 const int count = this->count(); switch (m_animationOri) { case LR: { m_moveOri = RightToLeft; } break; case TB: { m_moveOri = BottomToTop; } break; } //获取下一个窗口编号 int nextIndex = (currentIndex() + 1) % count; setCurrentWidget(nextIndex,getBeginValue()); } void AnimationStackedWidget::setCurrentWidget(int &index,int beginWidth) { //如果正在动画,那么退出 if ( m_IsAnimation ) { return; } //如果索引为当前索引则退出 if(index == currentIndex()){ emit signalIsFinished(); return; } m_IsAnimation = true; m_NextIndex = index; //隐藏当前的widget this->widget(currentIndex())->hide(); m_Animation->setStartValue(beginWidth); m_Animation->setEndValue(0); m_Animation->setDuration(m_Duration); m_Animation->start(); } int AnimationStackedWidget::getBeginValue() { //存储窗口高度或宽度 int value {0}; //获取窗口矩阵 QRect widgetRect = this->rect(); switch (m_animationOri) { case LR: { value = widgetRect.width(); } break; case TB: { value = widgetRect.height(); } } return value; } AnimationStackedWidget::MoveOrientation AnimationStackedWidget::getMoveOrientation(const int currIndex, const int nextIndex) { MoveOrientation moveOri{LeftToRight}; if (nextIndex < currIndex) { switch (m_animationOri) { case LR: { moveOri = LeftToRight; } break; case TB: { moveOri = TopToBottom; } break; } } else if (nextIndex > currIndex) { switch (m_animationOri) { case LR: { moveOri = RightToLeft; } break; case TB: { moveOri = BottomToTop; } break; } } return moveOri; } void AnimationStackedWidget::paintCurrentWidget(QPainter &paint, int currentIndex) { //获得当前页面的Widget QWidget *currentWidget = widget(currentIndex); QPixmap currentPixmap(currentWidget->size()); //将当前窗口绘制到pixmap中 currentWidget->render(¤tPixmap); QRect widgetRect = this->rect(); //绘制当前的Widget double value = m_offset; //窗口宽度 const int widgetWidth = widgetRect.width(); //窗口高度 const int widgetHeigth = widgetRect.height(); QRectF targetRect; QRectF sourceRect; switch (m_moveOri) { case LeftToRight:{ targetRect = QRectF(widgetWidth - value, 0, value, widgetHeigth); sourceRect = QRectF(0.0, 0.0, value, widgetHeigth); } break; case RightToLeft:{ targetRect = QRectF(0.0, 0.0, value, widgetHeigth); sourceRect = QRectF(widgetWidth - value, 0, value, widgetHeigth); } break; case TopToBottom:{ targetRect = QRectF(0.0, widgetHeigth - value, widgetWidth, value); sourceRect = QRectF(0.0, 0.0, widgetWidth, value); } break; case BottomToTop:{ targetRect = QRectF(0.0, 0.0, widgetWidth, value); sourceRect = QRectF( 0, widgetHeigth - value, widgetWidth, value); } break; } paint.drawPixmap(targetRect, currentPixmap, sourceRect); } void AnimationStackedWidget::paintNextWidget(QPainter &paint, int nextIndex) { QWidget *nextWidget = widget(nextIndex); QRect widgetRect = this->rect(); //设置下一个窗口的大小 nextWidget->resize(widgetRect.width(), widgetRect.height()); QPixmap nextPixmap(nextWidget->size()); nextWidget->render(&nextPixmap); double value = m_offset; //窗口宽度 const int widgetWidth = widgetRect.width(); //窗口高度 const int widgetHeigth = widgetRect.height(); QRectF targetRect; QRectF sourceRect; switch (m_moveOri) { case LeftToRight:{ targetRect = QRectF(0.0, 0.0, widgetWidth - value, widgetHeigth); sourceRect = QRectF(value, 0.0, widgetWidth - value, widgetHeigth); } break; case RightToLeft:{ targetRect = QRectF(value, 0.0, widgetWidth - value, widgetHeigth); sourceRect = QRectF(0.0, 0.0, widgetWidth - value, widgetHeigth); } break; case TopToBottom:{ targetRect = QRectF(0.0, 0.0, widgetWidth, widgetHeigth - value); sourceRect = QRectF(0.0, value, widgetWidth, widgetHeigth - value); } break; case BottomToTop:{ targetRect = QRectF(0.0, value, widgetWidth, widgetHeigth - value); sourceRect = QRectF(0.0, 0.0, widgetWidth, widgetHeigth - value); } break; } paint.drawPixmap(targetRect, nextPixmap, sourceRect); } double AnimationStackedWidget::offset() const { return m_offset; } void AnimationStackedWidget::setOffset(double offset) { m_offset = offset; update(); } dde-calendar-5.7.0.23/src/customWidget/animationstackedwidget.h000066400000000000000000000106551375021633200244220ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 AnimationStackedWidget_H #define AnimationStackedWidget_H #include #include #include class AnimationStackedWidget : public QStackedWidget { Q_OBJECT Q_PROPERTY(double offset READ offset WRITE setOffset) public: enum MoveOrientation {LeftToRight, RightToLeft, TopToBottom, BottomToTop}; enum AnimationOri {LR, TB}; //LR:Left Right ,TB:Top Bottom public: explicit AnimationStackedWidget(const AnimationOri ori = LR, QWidget *parent = nullptr); ~AnimationStackedWidget() override; /** * @brief setDuration 设置动画持续时间 * @param duration 动画时间 */ void setDuration(int duration = 500); /** * @brief IsRunning 动画是否正在运行 * @return 动画师傅正在运行 */ bool IsRunning()const { return m_IsAnimation; } /** * @brief offset 获取移动偏移量 * @return 移动偏移量 */ double offset() const; /** * @brief setOffset 设置移动偏移量 * @param offset 移动偏移量 */ void setOffset(double offset); protected: /** * @brief paintEvent 窗口绘制事件 * @param e 绘制事件对象 */ void paintEvent(QPaintEvent *e) override; signals: /** * @brief signalIsFinished 动画结束信号 */ void signalIsFinished(); public slots: /** * @brief animationFinished 动画切换完成 */ void animationFinished(); /** * @brief setCurrent 设置当前窗口 * @param index 索引 */ void setCurrent(int index); /** * @brief setPre 设置上一个索引的窗口 */ void setPre(); /** * @brief setNext 设置下一个索引的窗口 */ void setNext(); private: /** * @brief setCurrentWidget 根据索引设置当前窗口,开启动画绘制 * @param index 索引 * @param beginWidth 动画起始值 */ void setCurrentWidget(int &index,int beginWidth); /** * @brief getBeginValue 获取动画起始值 * @return 返回动画起始值 */ int getBeginValue(); /** * @brief getMoveOrientation 根据当前索引和下一个索引获取动画方向 * @param currIndex 当前索引 * @param nextIndex 设置的索引 * @return 动画绘制方向 */ MoveOrientation getMoveOrientation(const int currIndex,const int nextIndex); /** * @brief paintCurrentWidget获取当前窗口的图片动态绘制 * @param paint 绘制对象 * @param nextIndex 窗口索引 */ void paintCurrentWidget(QPainter &paint, int currentIndex); /** * @brief paintNextWidget 获取下一个窗口的图片动态绘制 * @param paint 绘制对象 * @param nextIndex 窗口索引 */ void paintNextWidget(QPainter &paint, int nextIndex); private: /** * @brief m_animationOri 动画方向--左右还是上下 */ AnimationOri m_animationOri{LR}; /** * @brief m_Animation 动画对象 */ QPropertyAnimation *m_Animation = nullptr; /** * @brief m_Duration 动画时间(ms) */ int m_Duration{0}; /** * @brief m_IsAnimation 是否为动画状态 */ bool m_IsAnimation = false; /** * @brief m_offset 移动偏移量 */ double m_offset = 0; /** * @brief paintNext */ int m_WidgetCount{0}; /** * @brief m_NextIndex 下一个索引 */ int m_NextIndex{0}; /** * @brief m_moveOri 移动方向 */ MoveOrientation m_moveOri = MoveOrientation::LeftToRight; }; #endif // AnimationStackedWidget_H dde-calendar-5.7.0.23/src/customWidget/cdynamicicon.cpp000066400000000000000000000114701375021633200226670ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "cdynamicicon.h" #include #include #include #include #include #define BackgroundRatio 0.9394 #define Month_X_Ratio 0.3203 #define Month_Y_Ratio 0.1690 #define Month_W_Ratio 0.3125 #define Month_H_Ratio 0.15625 #define Day_X_Ratio 0.28125 #define Day_Y_Ratio 0.33333 #define Day_W_Ratio 0.4375 #define Day_H_Ratio 0.4160 #define Week_X_Ratio 0.4375 #define Week_Y_Ratio 0.728515625 #define Week_W_Ratio 0.21875 #define Week_H_Ratio 0.09375 CDynamicIcon *CDynamicIcon::m_Icon = nullptr; CDynamicIcon::CDynamicIcon(int width, int height) : m_pixmap(new QPixmap(QSize(width, height))) , m_Date() , m_Dayrenderer(new QSvgRenderer()) , m_Weekrenderer(new QSvgRenderer()) , m_Monthrenderer(new QSvgRenderer()) , m_backgroundrenderer(new QSvgRenderer()) { m_pixmap->fill(Qt::transparent); m_Date = QDate::currentDate(); setDate(m_Date); } CDynamicIcon::~CDynamicIcon() { delete m_pixmap; m_pixmap = nullptr; delete m_Dayrenderer; m_Dayrenderer = nullptr; delete m_Weekrenderer; m_Weekrenderer = nullptr; delete m_Monthrenderer; m_Monthrenderer = nullptr; delete m_backgroundrenderer; m_backgroundrenderer = nullptr; } CDynamicIcon *CDynamicIcon::getInstance() { if (nullptr == m_Icon) { m_Icon = new CDynamicIcon(512,512); } return m_Icon; } void CDynamicIcon::releaseInstance() { if (m_Icon !=nullptr) { delete m_Icon; m_Icon =nullptr; } } void CDynamicIcon::setDate(const QDate &date) { m_Date = date; QString dayfile = QString(":/resources/DynamicIcon/day%1.svg").arg(date.day()); m_Dayrenderer->load(dayfile); QString weekfile = QString(":/resources/DynamicIcon/week%1.svg").arg(date.dayOfWeek()); m_Weekrenderer->load(weekfile); QString monthfile = QString(":/resources/DynamicIcon/month%1.svg").arg(date.month()); m_Monthrenderer->load(monthfile); QString backgroundfile(":/resources/DynamicIcon/calendar_bg.svg"); m_backgroundrenderer->load(backgroundfile); //draw pixmap paintPixmap(m_pixmap); } void CDynamicIcon::setIcon() { QIcon icon(this->getPixmap()); qApp->setProductIcon(icon); if (qApp->aboutDialog() != nullptr) qApp->aboutDialog()->setProductIcon(icon); m_Titlebar->setIcon(icon); } void CDynamicIcon::setTitlebar(DTitlebar *titlebar) { m_Titlebar = titlebar; } void CDynamicIcon::paintPixmap(QPixmap *pixmap) { QPainter painter(pixmap); //draw background qreal backgroundwidget = pixmap->size().width() * BackgroundRatio; qreal backgroundheigth = pixmap->size().height() * BackgroundRatio; QRectF backgroundRect = QRectF((pixmap->size().width()-backgroundwidget)/2, (pixmap->size().height()-backgroundheigth)/2, backgroundwidget, backgroundheigth); m_backgroundrenderer->render(&painter,backgroundRect); //draw month qreal month_x = pixmap->size().width() * Month_X_Ratio; qreal month_y = pixmap->size().width() * Month_Y_Ratio; qreal month_w = pixmap->size().width() * Month_W_Ratio; qreal month_h = pixmap->size().width() * Month_H_Ratio; m_Monthrenderer->render(&painter,QRectF(month_x,month_y,month_w,month_h)); //draw day qreal day_x = pixmap->size().width() * Day_X_Ratio; qreal day_y = pixmap->size().width() * Day_Y_Ratio; qreal day_w = pixmap->size().width() * Day_W_Ratio; qreal day_h = pixmap->size().width() * Day_H_Ratio; m_Dayrenderer->render(&painter,QRectF(day_x,day_y,day_w,day_h)); //draw week qreal week_x = pixmap->size().width() * Week_X_Ratio; qreal week_y = pixmap->size().width() * Week_Y_Ratio; qreal week_w = pixmap->size().width() * Week_W_Ratio; qreal week_h = pixmap->size().width() * Week_H_Ratio; m_Weekrenderer->render(&painter,QRectF(week_x,week_y,week_w,week_h)); painter.end(); } dde-calendar-5.7.0.23/src/customWidget/cdynamicicon.h000066400000000000000000000034511375021633200223340ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CDYNAMICICON_H #define CDYNAMICICON_H #include #include #include #include #include #include DWIDGET_USE_NAMESPACE DCORE_USE_NAMESPACE class CDynamicIcon { private: CDynamicIcon(int width, int height); ~CDynamicIcon(); public: static CDynamicIcon *getInstance(); static void releaseInstance(); public: void setDate(const QDate &date); QDate getDate() const { return m_Date; } void setIcon(); void setTitlebar(DTitlebar *titlebar); QPixmap getPixmap() const { return *m_pixmap; } public: static CDynamicIcon *m_Icon; private: void paintPixmap(QPixmap *pixmap); private: QPixmap *m_pixmap = nullptr; QDate m_Date; QSvgRenderer *m_Dayrenderer = nullptr; QSvgRenderer *m_Weekrenderer = nullptr; QSvgRenderer *m_Monthrenderer = nullptr; QSvgRenderer *m_backgroundrenderer = nullptr; DTitlebar *m_Titlebar {nullptr}; }; #endif // CDYNAMICICON_H dde-calendar-5.7.0.23/src/customWidget/customframe.cpp000066400000000000000000000114771375021633200225630ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "customframe.h" #include "constants.h" #include #include #include DGUI_USE_NAMESPACE CustomFrame::CustomFrame(QWidget *parent) : QFrame(parent) { m_font.setWeight(QFont::Medium); m_font.setPixelSize(DDECalendar::FontSizeFourteen); this->setAttribute(Qt::WA_TranslucentBackground);//设置窗口背景透明 this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框窗口 setContentsMargins(0, 0, 0, 0); } void CustomFrame::setBColor(QColor normalC) { m_bnormalColor = normalC; m_bflag = true; update(); } void CustomFrame::setRoundState(bool lstate, bool tstate, bool rstate, bool bstate) { m_lstate = lstate; m_tstate = tstate; m_rstate = rstate; m_bstate = bstate; } void CustomFrame::setTextStr(QFont font, QColor tc, QString strc, int flag) { m_font = font; m_tnormalColor = tc; m_text = strc; m_textflag = flag; } void CustomFrame::setTextStr(QString strc) { m_text = strc; if (!m_fixsizeflag) { QFontMetrics fm(m_font); int w = fm.width(m_text); setMinimumWidth(w); } update(); } void CustomFrame::setTextColor(QColor tc) { m_tnormalColor = tc; update(); } void CustomFrame::setTextFont(QFont font) { m_font = font; if (!m_fixsizeflag) { QFontMetrics fm(m_font); int w = fm.width(m_text); setMinimumWidth(w); } } void CustomFrame::setTextAlign(int flag) { m_textflag = flag; } void CustomFrame::setRadius(int radius) { m_radius = radius; } void CustomFrame::setboreder(int framew) { m_borderframew = framew; } void CustomFrame::setFixedSize(int w, int h) { m_fixsizeflag = true; QFrame::setFixedSize(w, h); } void CustomFrame::paintEvent(QPaintEvent *e) { int labelwidth = width() - 2 * m_borderframew; int labelheight = height() - 2 * m_borderframew; QPainter painter(this); QRect fillRect = QRect(m_borderframew, m_borderframew, labelwidth, labelheight); if (m_bflag) { painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(m_bnormalColor)); painter.setPen(Qt::NoPen); QPainterPath painterPath; painterPath.moveTo(m_radius, m_borderframew); if (m_lstate) { painterPath.arcTo(QRect(m_borderframew, m_borderframew, m_radius * 2, m_radius * 2), 90, 90); } else { painterPath.lineTo(m_borderframew, m_borderframew); painterPath.lineTo(m_borderframew, m_radius); } painterPath.lineTo(0, labelheight - m_radius); if (m_bstate) { painterPath.arcTo(QRect(m_borderframew, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 180, 90); } else { painterPath.lineTo(m_borderframew, labelheight); painterPath.lineTo(m_radius, labelheight); } painterPath.lineTo(labelwidth - m_radius, labelheight); if (m_rstate) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 270, 90); } else { painterPath.lineTo(labelwidth, labelheight); painterPath.lineTo(labelwidth, labelheight - m_radius); } painterPath.lineTo(labelwidth, m_radius); if (m_tstate) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, m_borderframew, m_radius * 2, m_radius * 2), 0, 90); } else { painterPath.lineTo(labelwidth, m_borderframew); painterPath.lineTo(labelwidth - m_radius, m_borderframew); } painterPath.lineTo(m_radius, m_borderframew); painterPath.closeSubpath(); painter.drawPath(painterPath); painter.restore(); } if (!m_text.isEmpty()) { painter.save(); painter.setRenderHints(QPainter::HighQualityAntialiasing); painter.setFont(m_font); painter.setPen(m_tnormalColor); painter.drawText(fillRect, m_textflag, m_text); painter.restore(); } QFrame::paintEvent(e); } dde-calendar-5.7.0.23/src/customWidget/customframe.h000066400000000000000000000042541375021633200222230ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 CustomFrame_H #define CustomFrame_H #include class CustomFrame : public QFrame { Q_OBJECT public: CustomFrame(QWidget *parent = nullptr); void setBColor(QColor normalC); void setRoundState(bool lstate, bool tstate, bool rstate, bool bstate); void setTextStr(QFont font, QColor tc, QString strc, int flag = Qt::AlignCenter); void setTextStr(QString strc); void setTextColor(QColor tc); void setTextFont(QFont font); void setTextAlign(int flag = Qt::AlignCenter); void setRadius(int radius = 8); void setboreder(int framew = 0); QString getTextStr() { return m_text; } void setFixedSize(int w, int h); protected: void paintEvent(QPaintEvent *e) override; private: QColor m_bnormalColor = "#FFFFFF"; QColor m_tnormalColor = "#000000"; QFont m_font; bool m_bflag = false; bool m_fixsizeflag = false; int m_textflag = Qt::AlignCenter;//对齐方式 QString m_text; int m_radius = 8; int m_borderframew = 0; bool m_lstate = false; bool m_tstate = false; bool m_rstate = false; bool m_bstate = false; }; #endif // TODYBUTTON_H dde-calendar-5.7.0.23/src/customWidget/scheduleview.cpp000066400000000000000000000457701375021633200227300ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "scheduleview.h" #include "alldayeventview.h" #include "graphicsview.h" #include "schceduledlg.h" #include "schedulecoormanage.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include DGUI_USE_NAMESPACE static int hourTextWidth = 50; static int hourTextHeight = 20; CScheduleView::CScheduleView(QWidget *parent, int viewType) : DFrame(parent) , m_viewType(viewType) { initUI(); initConnection(); setFrameRounded(true); setLineWidth(0); } CScheduleView::~CScheduleView() {} void CScheduleView::setviewMagin(int left, int top, int right, int bttom) { m_leftMagin = left; m_topMagin = top; m_rightmagin = right; m_layout->setContentsMargins(left,0,0,0); m_graphicsView->setMargins(0, 0, right, bttom); m_alldaylist->setMargins(0, 0, 0, 0); } void CScheduleView::setRange(int w, int h, QDate begin, QDate end) { Q_UNUSED(h); if (!(w > 0)) { return; } m_TotalDay = begin.daysTo(end) + 1; m_graphicsView->setRange(w, scheduleViewHegith(), begin, end, m_rightmagin); m_alldaylist->setRange(w, 22, m_beginDate, m_endDate, m_rightmagin); if (m_viewType ==1) m_currteDate = begin; update(); } void CScheduleView::setRange(QDate begin, QDate end) { m_TotalDay = begin.daysTo(end) + 1; m_graphicsView->setRange(begin,end); m_alldaylist->setRange(begin,end); m_beginDate = begin; m_endDate = end; updateSchedule(); } void CScheduleView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; m_graphicsView->setFirstWeekday(weekday); } void CScheduleView::setTheMe(int type) { if (type == 0 || type == 1) { DPalette palette(this->palette()); palette.setColor(DPalette::Background, "#FFFFFF"); this->setPalette(palette); setBackgroundRole(DPalette::Background); m_linecolor = "#000000"; m_linecolor.setAlphaF(0.1); m_ALLDayColor = "#303030"; m_timeColor = "#7D7D7D"; } else if (type == 2) { DPalette palette(this->palette()); QColor tbcolor = "#282828"; palette.setColor(DPalette::Background, tbcolor); this->setPalette(palette); setBackgroundRole(DPalette::Background); m_linecolor = "#000000"; m_linecolor.setAlphaF(0.1); m_ALLDayColor = "#7D7D7D"; m_timeColor = "#7D7D7D"; } m_graphicsView->setTheMe(type); m_alldaylist->setTheMe(type); update(); } void CScheduleView::setLunarVisible(bool state) { Q_UNUSED(state); } void CScheduleView::setTime(QTime time) { m_graphicsView->setTime(time); } void CScheduleView::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { if (scheduleInfo.allday) { m_alldaylist->setSelectSchedule(scheduleInfo); } else { m_graphicsView->setSelectSchedule(scheduleInfo); } } void CScheduleView::updateHigh() { m_graphicsView->updateHigh(); m_alldaylist->updateHigh(); } bool CScheduleView::IsDragging() { return (m_graphicsView->getDragStatus()!=4) || (m_alldaylist->getDragStatus()!=4); } void CScheduleView::slotsupdatescheduleD(QVector &data) { updateAllday(); m_graphicsView->updateInfo(); m_graphicsView->update(); m_graphicsView->scene()->update(); if (m_viewType == 1) { if (QDate::currentDate() == m_beginDate) { m_graphicsView->setTime(QTime::currentTime()); } else { if (data.isEmpty()) { m_graphicsView->setTime(QTime(13, 0)); } else { QVector scheduleInfolist; for (int i = 0; i < data.at(0).vData.count(); i++) { if (data.at(0).vData.at(i).allday) continue; scheduleInfolist.append(data.at(0).vData.at(i)); } if (scheduleInfolist.isEmpty()) { m_graphicsView->setTime(QTime(13, 0)); } else { std::sort(scheduleInfolist.begin(),scheduleInfolist.end(), [](const ScheduleDtailInfo &s1, const ScheduleDtailInfo &s2) ->bool { return s1.beginDateTime < s2.beginDateTime; }); QTime time = scheduleInfolist.at(0).beginDateTime.time(); if (scheduleInfolist.at(0).beginDateTime.date() != m_beginDate) { time = QTime(0, 0); } if (time.hour() + 4 >= 24) { time = QTime(20, 0); } else { time = time.addSecs(14400); } m_graphicsView->setTime(time); } } } } setEnabled(true); } void CScheduleView::setDate(QDate date) { m_currteDate = date; updateAllday(); } void CScheduleView::slotupdateSchedule() { updateSchedule(); emit signalsUpdateShcedule(0); } void CScheduleView::slotPosHours(QVector vPos, QVector vHours, int cuttrnttimetype) { m_vHours = vHours; m_vPos = vPos; m_cuttrnttimetype = cuttrnttimetype; update(); } void CScheduleView::paintEvent(QPaintEvent *event) { Q_UNUSED(event); QPainter painter(this); font.setWeight(QFont::Normal); font.setPixelSize(DDECalendar::FontSizeEleven); if (m_vPos.isEmpty()) return; painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(Qt::NoPen); DPalette backgroundPal; backgroundPal = this->palette(); QBrush backgroundBrush = backgroundPal.background(); painter.setBrush(backgroundBrush); QPainterPath painterpath; painterpath.lineTo(1, this->height() - m_radius); painterpath.arcTo(QRectF(1, this->height() - m_radius * 2, m_radius * 2, m_radius * 2), 180, 90); painterpath.lineTo(75, this->height()); painterpath.lineTo(75, 0); painterpath.lineTo(1, 0); painter.drawPath(painterpath); painter.restore(); QLocale locale; if (locale.language() == QLocale::Chinese) { QRect tinrect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[m_vPos.count() - 1], hourTextWidth, hourTextHeight); if (m_cuttrnttimetype == 0) { painter.save(); painter.setFont(font); painter.setPen(m_timeColor); for (int i = 0; i < m_vPos.size(); i++) { if (m_vHours[i] == 0) continue; if (m_vHours[i] == 24) continue; if (m_topMagin - 8 + m_vPos[i] < m_topMagin) continue; painter.drawText( QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth, hourTextHeight), Qt::AlignCenter, QTime(m_vHours[i], 0).toString("AP h 时")); } painter.restore(); } else { painter.save(); painter.setFont(font); painter.setPen(m_timeColor); for (int i = 0; i < m_vPos.size() - 1; i++) { if (m_vHours[i] == 0) continue; if (m_vHours[i] == 24) continue; if (m_topMagin - 8 + m_vPos[i] < m_topMagin) continue; QRect rr((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth, hourTextHeight); if (rr.intersects(tinrect) && m_viewType == 1 && m_beginDate == QDate::currentDate()) { continue; } painter.drawText( QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth, hourTextHeight), Qt::AlignCenter, QTime(m_vHours[i], 0).toString("AP h 时")); } painter.restore(); if (m_viewType == 1 && m_beginDate == QDate::currentDate()) { painter.save(); painter.setFont(font); painter.setPen(m_currenttimecolor); QString str = QTime::currentTime().toString("AP hh:mm"); painter.drawText(QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[m_vPos.count() - 1], hourTextWidth, hourTextHeight), Qt::AlignCenter, str); painter.restore(); } } } else { if (m_cuttrnttimetype == 0) { painter.save(); painter.setFont(font); painter.setPen(m_timeColor); for (int i = 0; i < m_vPos.size(); i++) { if (m_vHours[i] == 0) continue; if (m_vHours[i] == 24) continue; if (m_topMagin - 8 + m_vPos[i] < m_topMagin) continue; painter.drawText( QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth + 2, hourTextHeight), Qt::AlignCenter, QTime(m_vHours[i], 0).toString("HH:mm")); } painter.restore(); } else { painter.save(); painter.setFont(font); painter.setPen(m_timeColor); QRect tinrect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[m_vPos.count() - 1], hourTextWidth + 2, hourTextHeight); for (int i = 0; i < m_vPos.size() - 1; i++) { if (m_vHours[i] == 0) continue; if (m_vHours[i] == 24) continue; if (m_topMagin - 8 + m_vPos[i] < m_topMagin) continue; QRect rr((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth + 2, hourTextHeight); if (rr.intersects(tinrect) && m_viewType == 1 && m_beginDate == QDate::currentDate()) continue; painter.drawText( QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[i], hourTextWidth + 2, hourTextHeight), Qt::AlignCenter, QTime(m_vHours[i], 0).toString("HH:mm")); } painter.restore(); if (m_viewType == 1 && m_beginDate == QDate::currentDate()) { painter.save(); painter.setFont(font); painter.setPen(m_currenttimecolor); QString str = QTime::currentTime().toString("hh:mm"); if (m_topMagin - 8 + m_vPos[m_vPos.count() - 1] >= m_topMagin) painter.drawText(QRect((m_leftMagin - hourTextWidth) / 2 - 5, m_topMagin - 8 + m_vPos[m_vPos.count() - 1], hourTextWidth + 2, hourTextHeight), Qt::AlignCenter, str); painter.restore(); } } } painter.save(); QFont alldayfont; alldayfont.setWeight(QFont::Medium); alldayfont.setPixelSize(DDECalendar::FontSizeFourteen); painter.setFont(alldayfont); painter.setPen(m_ALLDayColor); painter.drawText(QRect(0, 0, m_leftMagin - 2, m_topMagin - 2), Qt::AlignCenter, tr("ALL DAY")); painter.restore(); //绘制全天与非全天之间的直线 painter.setPen(m_linecolor); //分割线y坐标点 const int point_y = m_topMagin - 2; painter.drawLine(0, point_y, this->width() - m_rightmagin - 2, point_y); painter.end(); } void CScheduleView::resizeEvent(QResizeEvent *event) { if (m_viewType == 0) { m_sMaxNum = ((width() - m_leftMagin) / 7) / 27; } else { } m_graphicsView->setMaxNum(m_sMaxNum); m_graphicsView->setRange(width() - m_leftMagin, scheduleViewHegith(), m_beginDate, m_endDate, m_rightmagin); m_alldaylist->setRange(width() - m_leftMagin, 22, m_beginDate, m_endDate, m_rightmagin); update(); QFrame::resizeEvent(event); updateAllday(); m_graphicsView->updateInfo(); m_graphicsView->keepCenterOnScene(); } void CScheduleView::initUI() { m_layout = new QVBoxLayout; m_layout->setSpacing(0); m_layout->setMargin(0); m_alldaylist = new CAllDayEventWeekView(this, 1); m_layout->addWidget(m_alldaylist); m_layout->addSpacing(1); m_graphicsView = new CGraphicsView(this, m_viewType); const int miniHeight = m_viewType ==0 ? 300 : 380; m_graphicsView->setMinimumHeight(miniHeight); connect(m_graphicsView, SIGNAL(signalsPosHours(QVector, QVector, int)), this, SLOT(slotPosHours(QVector, QVector, int))); m_layout->addWidget(m_graphicsView); setLayout(m_layout); m_graphicsView->scrollBarValueChangedSlot(); m_ScheduleRemindWidget = new SchecduleRemindWidget(this); } void CScheduleView::initConnection() { connect(m_graphicsView, &CGraphicsView::signalsUpdateShcedule, this, &CScheduleView::slotupdateSchedule); connect(m_alldaylist, &CAllDayEventWeekView::signalsUpdateShcedule, this, &CScheduleView::slotupdateSchedule); connect(m_graphicsView, &CGraphicsView::signalsCurrentScheduleDate, this, &CScheduleView::slotCurrentScheduleDate); connect(m_alldaylist, &CAllDayEventWeekView::signalViewtransparentFrame, this, &CScheduleView::signalViewtransparentFrame); connect(m_graphicsView, &CGraphicsView::signalViewtransparentFrame, this, &CScheduleView::signalViewtransparentFrame); connect(m_graphicsView , &CGraphicsView::signalScheduleShow , this, &CScheduleView::slotScheduleShow); connect(m_alldaylist, &CAllDayEventWeekView::signalScheduleShow , this, &CScheduleView::slotScheduleShow); connect(m_alldaylist,&CAllDayEventWeekView::signalUpdatePaint, this,&CScheduleView::slotUpdatePaint); connect(m_alldaylist,&CAllDayEventWeekView::signalSceneUpdate, this,&CScheduleView::slotUpdateScene); connect(m_graphicsView,&CGraphicsView::signalSceneUpdate, this,&CScheduleView::slotUpdateScene); QShortcut *dshortcut = new QShortcut(this); dshortcut->setKey(QKeySequence(QLatin1String("Delete"))); connect(dshortcut, SIGNAL(activated()), this, SLOT(slotDeleteitem())); } void CScheduleView::slotDeleteitem() { m_graphicsView->slotDeleteItem(); m_alldaylist->slotDeleteItem(); } void CScheduleView::slotCurrentScheduleDate(QDate date) { if (m_viewType == 1) return; emit signalsCurrentScheduleDate(date); } void CScheduleView::slotScheduleShow(const bool isShow, const ScheduleDtailInfo &out) { if (isShow) { QPoint pos22 = QCursor::pos(); CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType( out.type.ID); QDesktopWidget *w = QApplication::desktop(); m_ScheduleRemindWidget->setData(out, gdcolor); if ((pos22.x() + m_ScheduleRemindWidget->width() + 15) > w->width()) { m_ScheduleRemindWidget->setArrowDirection(DArrowRectangle::ArrowRight); m_ScheduleRemindWidget->show(pos22.x() - 15, pos22.y()); } else { m_ScheduleRemindWidget->setArrowDirection(DArrowRectangle::ArrowLeft); m_ScheduleRemindWidget->show(pos22.x() + 15, pos22.y()); } } else { m_ScheduleRemindWidget->hide(); } } void CScheduleView::slotUpdatePaint(const int topM) { m_topMagin = topM; update(); } void CScheduleView::slotUpdateScene() { m_graphicsView->slotUpdateScene(); m_alldaylist->slotUpdateScene(); } void CScheduleView::updateSchedule() { m_graphicsView->clearSchdule(); CScheduleDataCtrl *scheduleDataCtrl = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl(); QDateTime bdate = QDateTime(m_beginDate); QDateTime edate = QDateTime(m_endDate); edate.setTime(QTime(23, 59, 59)); QVector data; scheduleDataCtrl->queryScheduleInfo("", bdate, edate, data); QVector allInfo; QVector nonAllInfo; for (int i = 0; i < data.size(); ++i) { for (int j = 0; j< data.at(i).vData.size(); ++j) { if (data.at(i).vData.at(j).allday) { if (!allInfo.contains(data.at(i).vData.at(j))) { allInfo.append(data.at(i).vData.at(j)); } } else { if (!nonAllInfo.contains(data.at(i).vData.at(j))) { nonAllInfo.append(data.at(i).vData.at(j)); } } } } m_alldaylist->setInfo(allInfo); m_graphicsView->setInfo(nonAllInfo); slotsupdatescheduleD(data); } void CScheduleView::updateAllday() { m_alldaylist->updateInfo(); update(); m_graphicsView->resize(m_graphicsView->width(),this->height()-m_alldaylist->height()); } int CScheduleView::checkDay(int weekday) { if (weekday <= 0) return weekday += 7; if (weekday > 7) return weekday -= 7; return weekday; } int CScheduleView::scheduleViewHegith() { qreal mheight = 0; if (m_viewType == 0) { mheight = 24 * (0.0968 * height() + 0.5); } else { mheight = 24 * (0.083 * height() + 0.5); } //现在最小高度为20; mheight = mheight <500? 1035:mheight; int m_minTime = qRound((20.0/mheight)*86400); m_graphicsView->setMinTime(m_minTime); return qRound(mheight); } dde-calendar-5.7.0.23/src/customWidget/scheduleview.h000066400000000000000000000073611375021633200223670ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULEVIEW_H #define SCHEDULEVIEW_H #include "schedulestructs.h" #include "SchecduleRemindWidget.h" #include #include DWIDGET_USE_NAMESPACE class CGraphicsView; class CAllDayEventWeekView; class QVBoxLayout; class CScheduleView : public DFrame { Q_OBJECT public: CScheduleView(QWidget *parent = nullptr, int viewType = 0); ~CScheduleView() override; void setviewMagin(int left, int top, int right, int bttom); void setRange(int w, int h, QDate begin, QDate end); void setRange(QDate begin, QDate end); void setFirstWeekday(int weekday); void setTheMe(int type = 0); void setLunarVisible(bool state); void setTime(QTime time); void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); void updateHigh(); bool IsDragging(); public slots: void slotsupdatescheduleD( QVector &data); signals: void signalsupdatescheduleD(QWidget *w, QDate begin, QDate end); signals: void signalsUpdateShcedule(int id = 0); void signalsCurrentScheduleDate(QDate date); void signalViewtransparentFrame(int type); public slots: void slotPosHours(QVector vPos, QVector vHours, int cuttrnttimetype = 0); void setDate(QDate date); void slotupdateSchedule(); void slotDeleteitem(); void slotCurrentScheduleDate(QDate date); void slotScheduleShow(const bool isShow, const ScheduleDtailInfo &out = ScheduleDtailInfo()); void slotUpdatePaint(const int topM); void slotUpdateScene(); protected: void paintEvent(QPaintEvent *event) override; void resizeEvent(QResizeEvent *event) override; private: void initUI(); void initConnection(); void updateSchedule(); void updateAllday(); int checkDay(int weekday); int scheduleViewHegith(); private: CGraphicsView *m_graphicsView = nullptr; QVector m_vPos; QVector m_vHours; CAllDayEventWeekView *m_alldaylist = nullptr; QVector m_vListSchedule; int m_leftMagin; int m_topMagin; int m_rightmagin = 0; qint64 m_TotalDay; QDate m_currteDate; int m_firstWeekDay; QDate m_beginDate; QDate m_endDate; int m_viewType = 0; int m_sMaxNum = 4; QColor m_linecolor = Qt::lightGray; QColor m_ALLDayColor = "#303030"; QColor m_timeColor = "#7D7D7D"; QColor m_currenttimecolor = "#F74444"; int m_cuttrnttimetype = 0; QVBoxLayout *m_layout = nullptr; SchecduleRemindWidget *m_ScheduleRemindWidget = nullptr; int m_minTime; //最小高度对应的最小时间 QFont font; const int m_radius = 8; }; #endif // SCHEDULEVIEW_H dde-calendar-5.7.0.23/src/customWidget/timeedit.cpp000077500000000000000000000055351375021633200220430ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "timeedit.h" #include #include CTimeEdit::CTimeEdit(QWidget *parent) : DComboBox(parent) { initUI(); initConnection(); setFocus(Qt::MouseFocusReason); } CTimeEdit::~CTimeEdit() {} void CTimeEdit::setTime(QTime time) { m_time = time; m_timeEdit->setText(m_time.toString("hh:mm")); } QTime CTimeEdit::getTime() { //获取显示的text QString timetext = m_timeEdit->lineEdit()->displayText(); //将text转换为时间 m_time = QTime::fromString(timetext, "hh:mm"); return m_time; } void CTimeEdit::initUI() { m_timeEdit = new DLineEdit(this); m_timeEdit->lineEdit()->setInputMask("00:00;0"); m_timeEdit->setClearButtonEnabled(false); QRegExpValidator *validator = nullptr; QRegExp rx("0[0-9]:[0-5][0-9]|1[0-9]:[0-5][0-9]|2[0-3]:[0-5][0-9]"); validator = new QRegExpValidator(rx, this); m_timeEdit->lineEdit()->setValidator(validator); setLineEdit(m_timeEdit->lineEdit()); QStringList list; for (int i = 0; i < 24; i++) { list << QString("%1:%2").arg(i, 2, 10, QLatin1Char('0')).arg(0, 2, 10, QLatin1Char('0')); list << QString("%1:%2").arg(i, 2, 10, QLatin1Char('0')).arg(30); } this->addItems(list); } void CTimeEdit::initConnection() { m_timeEdit->disconnect(SIGNAL(returnPressed())); m_timeEdit->disconnect(SIGNAL(editingFinished())); m_timeEdit->disconnect(SIGNAL(selectionChanged())); m_timeEdit->disconnect(SIGNAL(textChanged(const QString &))); m_timeEdit->disconnect(SIGNAL(textEdited(const QString &))); m_timeEdit->disconnect(SIGNAL(cursorPositionChanged(int, int))); disconnect(SIGNAL(activated(int))); disconnect(SIGNAL(activated(const QString &))); disconnect(SIGNAL(currentIndexChanged(int))); disconnect(SIGNAL(currentIndexChanged(const QString &))); disconnect(SIGNAL(currentTextChanged(const QString &))); disconnect(SIGNAL(editTextChanged(const QString &))); disconnect(SIGNAL(highlighted(int))); disconnect(SIGNAL(highlighted(const QString &))); } dde-calendar-5.7.0.23/src/customWidget/timeedit.h000066400000000000000000000023741375021633200215030ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ #pragma once #include #include #include #include #include DWIDGET_USE_NAMESPACE class CTimeEdit : public DComboBox { Q_OBJECT public: CTimeEdit(QWidget *parent = nullptr); ~CTimeEdit(); void setTime(QTime time); QTime getTime(); private: void initUI(); void initConnection(); private: DLineEdit *m_timeEdit = nullptr; int m_type = 0; // 0 h,1 m int m_pos = 0; QTime m_time; }; dde-calendar-5.7.0.23/src/customWidget/todybutton.cpp000066400000000000000000000067221375021633200224460ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "todybutton.h" #include "constants.h" #include #include DGUI_USE_NAMESPACE CTodyButton::CTodyButton(QWidget *parent) : DPushButton(parent) { m_font.setWeight(QFont::Medium); m_font.setPixelSize(DDECalendar::FontSizeFourteen); } void CTodyButton::setBColor(QColor normalC, QColor hoverC, QColor pressc, QColor normalC1, QColor hoverC1, QColor pressc1) { m_bnormalColor = normalC; m_bhoverColor = hoverC; m_bPressColor = pressc; m_dbnormalColor = normalC1; m_dbhoverColor = hoverC1; m_dbPressColor = pressc1; m_shadowColor = m_bnormalColor; } void CTodyButton::setTColor(QColor normalC, QColor hoverC, QColor pressc) { m_tnormalColor = normalC; m_thoverColor = hoverC; m_tPressColor = pressc; } void CTodyButton::setshadowColor(QColor sc) { m_shadowColor = sc; } void CTodyButton::mousePressEvent(QMouseEvent *event) { DPalette todaypa = palette(); todaypa.setColor(DPalette::ButtonText, m_tPressColor); todaypa.setColor(DPalette::Dark, m_dbPressColor); todaypa.setColor(DPalette::Light, m_bPressColor); todaypa.setColor(DPalette::Shadow, m_shadowColor); setPalette(todaypa); DPushButton::mousePressEvent(event); } void CTodyButton::mouseReleaseEvent(QMouseEvent *event) { DPalette todaypa = palette(); todaypa.setColor(DPalette::ButtonText, m_tnormalColor); todaypa.setColor(DPalette::Dark, m_dbnormalColor); todaypa.setColor(DPalette::Light, m_bnormalColor); todaypa.setColor(DPalette::Shadow, m_shadowColor); setPalette(todaypa); DPushButton::mouseReleaseEvent(event); } void CTodyButton::focusOutEvent(QFocusEvent *event) { DPalette todaypa = palette(); todaypa.setColor(DPalette::ButtonText, m_tnormalColor); todaypa.setColor(DPalette::Dark, m_dbnormalColor); todaypa.setColor(DPalette::Light, m_bnormalColor); todaypa.setColor(DPalette::Shadow, m_shadowColor); setPalette(todaypa); DPushButton::focusOutEvent(event); } void CTodyButton::enterEvent(QEvent *event) { DPalette todaypa = palette(); todaypa.setColor(DPalette::ButtonText, m_thoverColor); todaypa.setColor(DPalette::Dark, m_dbhoverColor); todaypa.setColor(DPalette::Light, m_bhoverColor); todaypa.setColor(DPalette::Shadow, m_shadowColor); setPalette(todaypa); DPushButton::enterEvent(event); } void CTodyButton::leaveEvent(QEvent *event) { DPalette todaypa = palette(); todaypa.setColor(DPalette::ButtonText, m_tnormalColor); todaypa.setColor(DPalette::Dark, m_dbnormalColor); todaypa.setColor(DPalette::Light, m_bnormalColor); todaypa.setColor(DPalette::Shadow, m_shadowColor); setPalette(todaypa); DPushButton::leaveEvent(event); } dde-calendar-5.7.0.23/src/customWidget/todybutton.h000066400000000000000000000042531375021633200221100ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 TODYBUTTON_H #define TODYBUTTON_H #include DWIDGET_USE_NAMESPACE class CTodyButton : public DPushButton { Q_OBJECT public: CTodyButton(QWidget *parent = nullptr); void setBColor(QColor normalC, QColor hoverC, QColor pressc, QColor normalC1, QColor hoverC1, QColor pressc1); void setTColor(QColor normalC, QColor hoverC, QColor pressc); void setshadowColor(QColor sc); protected: void mousePressEvent(QMouseEvent *event) override; void mouseReleaseEvent(QMouseEvent *event) override; void focusOutEvent(QFocusEvent *event) override; void enterEvent(QEvent *event) override; void leaveEvent(QEvent *event) override; private: QColor m_bnormalColor = "#FFFFFF"; QColor m_bhoverColor = "#FFFFFF"; QColor m_bPressColor = "#FFFFFF"; QColor m_dbnormalColor = "#FFFFFF"; QColor m_dbhoverColor = "#FFFFFF"; QColor m_dbPressColor = "#FFFFFF"; QColor m_tnormalColor = "#000000"; QColor m_thoverColor = "#000000"; QColor m_tPressColor = "#000000"; QColor m_shadowColor = "#FFFFFF"; QFont m_font; bool m_pressstate = false; bool m_hovertate = false; }; #endif // TODYBUTTON_H dde-calendar-5.7.0.23/src/dataManage/000077500000000000000000000000001375021633200170645ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/dataManage/schedulecoormanage.cpp000077500000000000000000000204761375021633200234340ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "schedulecoormanage.h" #include CScheduleCoorManage::CScheduleCoorManage() { } CScheduleCoorManage::~CScheduleCoorManage() { } void CScheduleCoorManage::setRange( int w, int h, QDate begindate, QDate enddate, int rightmagin) { m_width = w; m_height = h; m_rightmagin = rightmagin; m_begindate = begindate; m_enddate = enddate; m_totalDay = begindate.daysTo(enddate) + 1; } void CScheduleCoorManage::setDateRange( QDate begindate, QDate enddate ) { m_begindate = begindate; m_enddate = enddate; m_totalDay = begindate.daysTo(enddate) + 1; } QRectF CScheduleCoorManage::getDrawRegion( QDateTime begintime, QDateTime endtime ) { QRectF rect; QString bb = begintime.toString("yyyyMMddhhmmsszzz"); QString ee = endtime.toString("yyyyMMddhhmmsszzz"); if (begintime > endtime) return rect; QDate begindate = begintime.date(); QDate enddate = endtime.date(); QTime beginzero(0, 0, 0); QTime beginScheduleT = begintime.time(); QTime endScheduleT = endtime.time(); if (begindate < m_begindate || enddate > m_enddate) return rect; qint64 beginday = m_begindate.daysTo(begindate) + 1; qint64 day = begindate.daysTo(enddate) + 1; int ScheduleBT = beginzero.secsTo(beginScheduleT); int ScheduleET = beginzero.secsTo(endScheduleT); qreal rWidth = m_width * (1.0 * day / m_totalDay); qreal rHeight = m_height * ((ScheduleET - ScheduleBT) / 86400.0); qreal posX = m_width * (1.0 * (beginday - 1) / m_totalDay); qreal posY = m_height * (ScheduleBT / 86400.0); rect = QRectF(posX, posY, rWidth, rHeight); return rect; } QRectF CScheduleCoorManage::getDrawRegion(QDateTime begintime, QDateTime endtime, int index, int coount) { QRectF rect; QString bb = begintime.toString("yyyyMMddhhmmsszzz"); QString ee = endtime.toString("yyyyMMddhhmmsszzz"); if (begintime > endtime) return rect; QDate begindate = begintime.date(); QDate enddate = endtime.date(); QTime beginzero(0, 0, 0); QTime beginScheduleT = begintime.time(); QTime endScheduleT = endtime.time(); if (begindate < m_begindate || enddate > m_enddate) return rect; qint64 beginday = m_begindate.daysTo(begindate) + 1; qint64 day = begindate.daysTo(enddate) + 1; int ScheduleBT = beginzero.secsTo(beginScheduleT); int ScheduleET = beginzero.secsTo(endScheduleT); qreal rWidth = m_width * (1.0 * day / m_totalDay) / coount; qreal rHeight = m_height * ((ScheduleET - ScheduleBT) / 86400.0); qreal posX = m_width * (1.0 * (beginday - 1) / m_totalDay) + (index - 1) * rWidth; qreal posY = m_height * (ScheduleBT / 86400.0); rect = QRectF(posX, posY, rWidth, rHeight); return rect; } QRectF CScheduleCoorManage::getDrawRegion(QDate date, QDateTime begintime, QDateTime endtime, int index, int coount, int maxnum, int type) { QRectF rect; QString bb = begintime.toString("yyyyMMddhhmmsszzz"); QString ee = endtime.toString("yyyyMMddhhmmsszzz"); if (begintime > endtime) return rect; QDate begindate = begintime.date(); QDate enddate = endtime.date(); QTime beginzero(0, 0, 0); QTime beginScheduleT = begintime.time(); QTime endScheduleT = endtime.time(); if (begindate < date) { begindate = date; beginScheduleT = beginzero; } if (enddate > date) { enddate = date; endScheduleT = QTime(23, 59, 59); } qint64 beginday = m_begindate.daysTo(begindate) + 1; qint64 day = begindate.daysTo(enddate) + 1; int ScheduleBT = beginzero.secsTo(beginScheduleT); int ScheduleET = beginzero.secsTo(endScheduleT); qreal rWidth = m_width * (1.0 * day / m_totalDay) / coount; qreal rHeight = m_height * ((ScheduleET - ScheduleBT) / 86400.0); qreal posX = m_width * (1.0 * (beginday - 1) / m_totalDay) + (index - 1) * rWidth; qreal posY = m_height * (ScheduleBT / 86400.0); if (coount > maxnum && type == 0) { qreal sscale = 27.0 / (m_width * (1.0 * day / m_totalDay)); if (index < maxnum + 1) { rWidth = m_width * (1.0 * day / m_totalDay) * sscale + 0.5; posX = m_width * (1.0 * (beginday - 1) / m_totalDay) + (index - 1) * rWidth; } else { qreal trWidth = m_width * (1.0 * day / m_totalDay) * sscale + 0.5; rWidth = m_width * (1.0 * day / m_totalDay) - (index - 1) * trWidth; posX = m_width * (1.0 * (beginday - 1) / m_totalDay) + (index - 1) * trWidth; } } if (rHeight < 20) { if (posY + 20 > m_height) posY = m_height - 20; rHeight = 20; } if (posX < 1) { posX = 1; rWidth = rWidth - posX; } rect = QRectF(posX, posY, rWidth, rHeight); return rect; } QRectF CScheduleCoorManage::getDrawRegionF( QDateTime begintime, QDateTime endtime ) { QRectF rectf; if (begintime > endtime) return rectf; QDate begindate = begintime.date(); QDate enddate = endtime.date(); QTime beginzero(0, 0, 0); QTime beginScheduleT = begintime.time(); QTime endScheduleT = endtime.time(); if (begindate < m_begindate || enddate > m_enddate) return rectf; qint64 beginday = m_begindate.daysTo(begindate) + 1; qint64 day = begindate.daysTo(enddate) + 1; int ScheduleBT = beginzero.secsTo(beginScheduleT); int ScheduleET = beginzero.secsTo(endScheduleT); qreal rWidth = m_width * (1.0 * day / m_totalDay); qreal rHeight = m_height * ((ScheduleET - ScheduleBT) / 86400.0); qreal posX = m_width * (1.0 * (beginday - 1) / m_totalDay); qreal posY = m_height * (ScheduleBT / 86400.0); rectf = QRectF(posX, posY, rWidth, rHeight); return rectf; } QRectF CScheduleCoorManage::getAllDayDrawRegion(QDate begin, QDate end) { QRectF rect; if (begin > end) return rect; QDate begindate = begin; QDate enddate = end; if (begindate < m_begindate) begindate = m_begindate; if (enddate > m_enddate) enddate = m_enddate; qint64 beginday = m_begindate.daysTo(begindate); qint64 day = begindate.daysTo(enddate) + 1; qreal rWidth = m_width * (1.0 * day / m_totalDay) - 12; qreal rHeight = m_height; qreal posX = m_width * (1.0 * beginday / m_totalDay); qreal posY = 0; rect = QRectF(posX + 6, posY, rWidth - m_rightmagin, rHeight); return rect; } QDateTime CScheduleCoorManage::getDate(QPointF pos) { QDateTime begintime; qint64 day = static_cast((1.0 * pos.x() / m_width) * m_totalDay); if (day <0) { day = 0; } else if (day >=m_totalDay) { day = m_totalDay-1; } int time =static_cast((1.0 * pos.y() / m_height) * 86400.0); int hours = time / 3600; int minutes = (time - 3600 * hours) / 60; int secss = time - 3600 * hours - 60 * minutes; QDate date = m_begindate.addDays(day); begintime.setDate(date); begintime.setTime(QTime(hours, minutes, secss)); return begintime; } QDate CScheduleCoorManage::getsDate(QPointF pos) { qint64 day = static_cast((1.0 * pos.x() / m_width) * m_totalDay); if (day <0) { day = 0; } else if (day >=m_totalDay) { day = m_totalDay-1; } QDate date = m_begindate.addDays(day); return date; } float CScheduleCoorManage::getHeight(QTime time) { QTime beginzero(0, 0, 0); int ScheduleBT = beginzero.secsTo(time); float posY = static_cast(m_height * (ScheduleBT / 86400.0)); return posY; } dde-calendar-5.7.0.23/src/dataManage/schedulecoormanage.h000066400000000000000000000037701375021633200230740ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULECOORMANAGE_H #define SCHEDULECOORMANAGE_H #include #include #include class CScheduleCoorManage { public: CScheduleCoorManage(); ~CScheduleCoorManage(); void setRange(int w, int h, QDate begindate, QDate enddate, int rightmagin); void setDateRange(QDate begindate, QDate enddate); int getRightMagin()const { return m_rightmagin; } QRectF getDrawRegion(QDateTime begintime, QDateTime endtime); QRectF getDrawRegion(QDateTime begintime, QDateTime endtime, int index, int coount); QRectF getDrawRegion(QDate date, QDateTime begintime, QDateTime endtime, int index, int coount, int maxNum, int type = 0); QRectF getDrawRegionF(QDateTime begintime, QDateTime endtime); QRectF getAllDayDrawRegion(QDate begin, QDate end); QDateTime getDate(QPointF pos); QDate getsDate(QPointF pos); float getHeight(QTime time); QDate getBegindate() { return m_begindate; } private: int m_width; int m_height; QDate m_begindate; QDate m_enddate; qint64 m_totalDay; int m_rightmagin = 0; }; #endif // SCHEDULECOORMANAGE_H dde-calendar-5.7.0.23/src/dataManage/scheduledatamanage.cpp000066400000000000000000000576551375021633200234110ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "scheduledatamanage.h" #include "schedulesdbus.h" #include "calendardbus.h" CScheduleDataManage *CScheduleDataManage::m_vscheduleDataManage = new CScheduleDataManage; CScheduleDataCtrl *CScheduleDataManage::getscheduleDataCtrl() { return m_scheduleDataCtrl; } CHuangliDayDataManage *CScheduleDataManage::getHuangliDayDataManage() { return m_HuangliDayDataManage; } CSchedulesColor CScheduleDataManage::getScheduleColorByType(int type) { CSchedulesColor color; color.type = -1; for (int i = 0; i < m_vScheduleColor.count(); i++) { if (m_vScheduleColor.at(i).type == type) { color = m_vScheduleColor.at(i); break; } } return color; } QColor CScheduleDataManage::getSystemActiveColor() { return DGuiApplicationHelper::instance()->applicationPalette().highlight().color(); } void CScheduleDataManage::setSearchResult(QVector &vData) { m_vScheduleInfo = vData; } bool CScheduleDataManage::getSearchResult(ScheduleDtailInfo info) { QDateTime date = QDateTime::currentDateTime(); QDateTime bdate = date.addMonths(-6); if (!bdate.isValid()) { QDateTime tdate = date; tdate.setDate(QDate(date.date().year(), date.date().month(), 1)); bdate = tdate.addMonths(-6); } QDateTime edate = date.addMonths(6); if (!edate.isValid()) { QDateTime tdate = date; tdate.setDate(QDate(date.date().year(), date.date().month(), 1)); edate = tdate.addMonths(7); edate = edate.addDays(-1); } for (int i = 0; i < m_vScheduleInfo.size(); i++) { QVector &scheduleInfolist = m_vScheduleInfo[i].vData; for (int j = 0; j < scheduleInfolist.count(); j++) { if (scheduleInfolist.at(j) == info) { if (bdate < info.beginDateTime && edate > info.endDateTime) return true; } } } return false; } bool CScheduleDataManage::getSearchResult(QDate date) { for (int i = 0; i < m_vScheduleInfo.size(); i++) { QVector &scheduleInfolist = m_vScheduleInfo[i].vData; if (m_vScheduleInfo[i].date == date && !scheduleInfolist.isEmpty()) { return true; } } return false; } void CScheduleDataManage::setTheMe(int type) { m_theme = type; m_vScheduleColor.clear(); if (type == 0 || type == 1) { CSchedulesColor workC; workC.type = 1; workC.dotColor = "#FB2525"; workC.dotColor.setAlphaF(0.5); workC.gradientFromC = "#FBCEB7"; workC.gradientFromC.setAlphaF(0.7); workC.gradientToC = "#FA9D9A"; workC.gradientToC.setAlphaF(0.7); workC.Purecolor = "#F85566"; workC.Purecolor.setAlphaF(0.2); workC.shadowcolor = "#FB2525"; workC.shadowcolor.setAlphaF(0.5); workC.textColor = "#000000"; workC.timeColor = "#B54A4B"; workC.hightlightgradientFromC = "#FFD0B8"; workC.hightlightgradientToC = "#FF908D"; QColor workP("#F9AEB8"); workC.hightlightPurecolor = workP; workC.splitColor = "#FB2525"; workC.splitColor.setAlphaF(0.5); workC.hovergradientFromC = "#FFD0B8"; workC.hovergradientFromC.setAlphaF(0.95); workC.hovergradientToC = "#FF9D9A"; workC.hovergradientToC.setAlphaF(0.95); QColor workhP("#FFB6BD"); workhP.setAlphaF(0.8); workC.hoverPurecolor = workhP; workC.pressgradientToC = workC.gradientToC; workC.pressgradientFromC = workC.gradientFromC; workC.pressPurecolor = workC.Purecolor; workC.pressgradientToC.setAlphaF(0.8); workC.pressgradientFromC.setAlphaF(0.8); workC.pressPurecolor.setAlphaF(0.2); m_vScheduleColor.append(workC); CSchedulesColor lifeC; lifeC.type = 2; lifeC.dotColor = "#82D245"; lifeC.dotColor.setAlphaF(1); lifeC.gradientFromC = "#B7E6FB"; lifeC.gradientFromC.setAlphaF(0.7); lifeC.gradientToC = "#D4FFB3"; lifeC.gradientToC.setAlphaF(0.7); lifeC.Purecolor = "#6FFF00"; lifeC.Purecolor.setAlphaF(0.2); lifeC.shadowcolor = "#82D245"; lifeC.textColor = "#000000"; lifeC.timeColor = "#53A316"; lifeC.hightlightgradientFromC = "#9AE5FF"; lifeC.hightlightgradientToC = "#C7FF94"; QColor lifeP("#C7FF94"); lifeC.hightlightPurecolor = lifeP; lifeC.hovergradientFromC = "#A8E9FF"; lifeC.hovergradientToC = "#D5FFAF"; lifeC.hovergradientFromC.setAlphaF(0.95); lifeC.hovergradientToC.setAlphaF(0.95); QColor lifehP("#C4FF98"); lifehP.setAlphaF(0.8); lifeC.hoverPurecolor = lifehP; lifeC.splitColor = "#82D245"; lifeC.pressgradientToC = lifeC.gradientToC; lifeC.pressgradientFromC = lifeC.gradientFromC; lifeC.pressPurecolor = lifeC.Purecolor; lifeC.pressgradientToC.setAlphaF(0.8); lifeC.pressgradientFromC.setAlphaF(0.8); lifeC.pressPurecolor.setAlphaF(0.2); m_vScheduleColor.append(lifeC); CSchedulesColor otherC; otherC.type = 3; otherC.dotColor = "#BA60FA"; otherC.dotColor.setAlphaF(1); otherC.gradientFromC = "#FBE9B7"; otherC.gradientFromC.setAlphaF(0.7); otherC.gradientToC = "#DFB3FF"; otherC.gradientToC.setAlphaF(0.7); otherC.Purecolor = "#D191FF"; otherC.Purecolor.setAlphaF(0.2); otherC.shadowcolor = "#BA60FA"; otherC.textColor = "#000000"; otherC.timeColor = "#8548B1"; otherC.hightlightgradientFromC = "#FFE8AC"; otherC.hightlightgradientToC = "#FBA5FF"; QColor otherP("#EAC4FF"); otherC.hightlightPurecolor = otherP; otherC.hovergradientFromC = "#FFE8AC"; otherC.hovergradientToC = "#E2A5FF"; otherC.hovergradientFromC.setAlphaF(0.95); otherC.hovergradientToC.setAlphaF(0.95); QColor otherhP("#E6C5FF"); otherhP.setAlphaF(0.8); otherC.hoverPurecolor = otherhP; otherC.splitColor = "#BA60FA"; otherC.pressgradientToC = otherC.gradientToC; otherC.pressgradientFromC = otherC.gradientFromC; otherC.pressPurecolor = otherC.Purecolor; otherC.pressgradientToC.setAlphaF(0.8); otherC.pressgradientFromC.setAlphaF(0.8); otherC.pressPurecolor.setAlphaF(0.2); m_vScheduleColor.append(otherC); CSchedulesColor solar; solar.type = 4; solar.dotColor = "#FF7272"; solar.dotColor.setAlphaF(1); solar.gradientFromC = "#FF7272"; solar.gradientFromC.setAlphaF(0.3); solar.gradientToC = "#FF7272"; solar.gradientToC.setAlphaF(0.3); solar.Purecolor = "#FF7272"; solar.Purecolor.setAlphaF(0.3); solar.shadowcolor = "#BA60FA"; solar.textColor = "#000000"; solar.timeColor = "#8548B1"; solar.hightlightgradientFromC = "#F9AAAA"; solar.hightlightgradientFromC.setAlphaF(1); solar.hightlightgradientToC = "#F9AAAA"; solar.hightlightgradientToC.setAlphaF(1); solar.hightlightPurecolor = "#F9AAAA"; solar.hightlightPurecolor.setAlphaF(1); solar.hovergradientFromC = "#FFB0B1"; solar.hovergradientToC = "#FFB0B1"; solar.hovergradientFromC.setAlphaF(0.95); solar.hovergradientToC.setAlphaF(0.95); solar.hoverPurecolor = "#FF7272"; solar.splitColor = "#FF7272"; solar.pressgradientFromC = "#FF7272"; solar.pressgradientFromC.setAlphaF(0.3); solar.pressgradientToC = "#FF7272"; solar.pressgradientToC.setAlphaF(0.3); solar.pressPurecolor = solar.Purecolor; solar.pressgradientToC.setAlphaF(0.4); solar.pressgradientFromC.setAlphaF(0.4); solar.pressPurecolor.setAlphaF(0.1); m_vScheduleColor.append(solar); } else if (type == 2) { CSchedulesColor workC; workC.type = 1; workC.dotColor = "#F85566"; workC.dotColor.setAlphaF(0.5); workC.gradientFromC = "#965A26"; workC.gradientToC = "#8B2521"; workC.gradientToC.setAlphaF(0.5); workC.gradientFromC.setAlphaF(0.5); workC.Purecolor = "#F85566"; workC.Purecolor.setAlphaF(0.1); workC.shadowcolor = "#FB2525"; workC.shadowcolor.setAlphaF(0.5); workC.textColor = "#C0C6D4"; workC.timeColor = "#B54A4B"; workC.hightlightgradientToC = "#992D2A"; workC.hightlightgradientToC.setAlphaF(0.8); workC.hightlightgradientFromC = "#8B521F"; workC.hightlightgradientFromC.setAlphaF(0.8); QColor workP("#77373E"); workP.setAlphaF(0.8); workC.hightlightPurecolor = workP; workC.hovergradientFromC = "#965A26"; workC.hovergradientToC = "#8B2521"; workC.hovergradientFromC.setAlphaF(0.65); workC.hovergradientToC.setAlphaF(0.65); QColor workhP("#F85566"); workhP.setAlphaF(0.2); workC.hoverPurecolor = workhP; workC.splitColor = "#F85566"; workC.splitColor.setAlphaF(0.5); workC.pressgradientToC = workC.gradientToC; workC.pressgradientFromC = workC.gradientFromC; workC.pressPurecolor = workC.Purecolor; workC.pressgradientToC.setAlphaF(0.4); workC.pressgradientFromC.setAlphaF(0.4); workC.pressPurecolor.setAlphaF(0.15); m_vScheduleColor.append(workC); CSchedulesColor lifeC; lifeC.type = 2; lifeC.dotColor = "#59F88D"; lifeC.dotColor.setAlphaF(0.5); lifeC.gradientFromC = "#2D6883"; lifeC.gradientToC = "#5D7D44"; lifeC.gradientToC.setAlphaF(0.5); lifeC.gradientFromC.setAlphaF(0.5); lifeC.Purecolor = "#59F88D"; lifeC.Purecolor.setAlphaF(0.1); lifeC.shadowcolor = "#25FA6B"; lifeC.shadowcolor.setAlphaF(0.5); lifeC.textColor = "#C0C6D4"; lifeC.timeColor = "#38A35B"; lifeC.hightlightgradientFromC = "#2D6883"; lifeC.hightlightgradientFromC.setAlphaF(0.8); lifeC.hightlightgradientToC = "#5D7D44"; lifeC.hightlightgradientToC.setAlphaF(0.8); QColor lifeP("#337044"); lifeP.setAlphaF(0.8); lifeC.hightlightPurecolor = lifeP; lifeC.splitColor = "#25FA6B"; lifeC.splitColor.setAlphaF(0.3); lifeC.hovergradientFromC = "#2D6883"; lifeC.hovergradientToC = "#5D7D44"; lifeC.hovergradientFromC.setAlphaF(0.65); lifeC.hovergradientToC.setAlphaF(0.65); QColor lifehP("#59F88D"); lifehP.setAlphaF(0.2); lifeC.hoverPurecolor = lifehP; lifeC.pressgradientToC = lifeC.gradientToC; lifeC.pressgradientFromC = lifeC.gradientFromC; lifeC.pressPurecolor = lifeC.Purecolor; lifeC.pressgradientToC.setAlphaF(0.4); lifeC.pressgradientFromC.setAlphaF(0.4); lifeC.pressPurecolor.setAlphaF(0.15); m_vScheduleColor.append(lifeC); CSchedulesColor otherC; otherC.type = 3; otherC.dotColor = "#C155F8"; otherC.dotColor.setAlphaF(0.7); otherC.gradientFromC = "#8C4E2C"; otherC.gradientToC = "#7D37AF"; otherC.gradientToC.setAlphaF(0.5); otherC.gradientFromC.setAlphaF(0.5); otherC.Purecolor = "#C155F8"; otherC.Purecolor.setAlphaF(0.1); otherC.shadowcolor = "#BE3DFF"; otherC.shadowcolor.setAlphaF(0.5); otherC.textColor = "#C0C6D4"; otherC.timeColor = "#9857C8"; otherC.hightlightgradientFromC = "#8C4E2C"; otherC.hightlightgradientFromC.setAlphaF(0.8); otherC.hightlightgradientToC = "#803BAE"; otherC.hightlightgradientToC.setAlphaF(0.8); QColor otherP("#613776"); otherP.setAlphaF(0.8); otherC.hightlightPurecolor = otherP; otherC.hovergradientFromC = "#8C4E2C"; otherC.hovergradientToC = "#7D37AF"; otherC.hovergradientFromC.setAlphaF(0.65); otherC.hovergradientToC.setAlphaF(0.65); QColor otherhP("#C155F8"); otherhP.setAlphaF(0.2); otherC.hoverPurecolor = otherhP; otherC.splitColor = "#BA32FF"; otherC.splitColor.setAlphaF(0.5); otherC.pressgradientToC = otherC.gradientToC; otherC.pressgradientFromC = otherC.gradientFromC; otherC.pressPurecolor = otherC.Purecolor; otherC.pressgradientToC.setAlphaF(0.4); otherC.pressgradientFromC.setAlphaF(0.4); otherC.pressPurecolor.setAlphaF(0.15); m_vScheduleColor.append(otherC); CSchedulesColor solar; solar.type = 4; solar.dotColor = "#FF7272"; solar.dotColor.setAlphaF(0.8); solar.gradientFromC = "#FF7272"; solar.gradientFromC.setAlphaF(0.3); solar.gradientToC = "#FF7272"; solar.gradientToC.setAlphaF(0.3); solar.Purecolor = "#FF7272"; solar.Purecolor.setAlphaF(0.3); solar.shadowcolor = "#BA60FA"; solar.textColor = "#C0C6D4"; solar.timeColor = "#8548B1"; solar.hightlightgradientFromC = "#A24545"; solar.hightlightgradientFromC.setAlphaF(0.8); solar.hightlightgradientToC = "#A24545"; solar.hightlightgradientToC.setAlphaF(0.8); solar.hightlightPurecolor = "#A24545"; solar.hightlightPurecolor.setAlphaF(0.8); solar.hovergradientFromC = "#E56464"; solar.hovergradientToC = "#E56464"; solar.hovergradientFromC.setAlphaF(0.35); solar.hovergradientToC.setAlphaF(0.35); solar.hoverPurecolor = "#E56464"; solar.splitColor = "#FF7272"; solar.pressgradientFromC = "#FF7272"; solar.pressgradientFromC.setAlphaF(0.3); solar.pressgradientToC = solar.pressgradientFromC; solar.pressPurecolor = solar.Purecolor; solar.pressgradientToC.setAlphaF(0.4); solar.pressgradientFromC.setAlphaF(0.4); solar.pressPurecolor.setAlphaF(0.1); m_vScheduleColor.append(solar); } } CScheduleDataManage *CScheduleDataManage::getScheduleDataManage() { return m_vscheduleDataManage; } void CScheduleDataManage::clear() { delete m_scheduleDataCtrl; } CScheduleDataManage::CScheduleDataManage () { m_scheduleDataCtrl = new CScheduleDataCtrl; m_HuangliDayDataManage = new CHuangliDayDataManage; m_GetAllYearScheduleInfo = new YearScheduleInfo(); CSchedulesColor workC; workC.type = 1; workC.gradientFromC = "#FBCEB7"; workC.gradientToC = "#FA9D9A"; workC.Purecolor = "#F85566"; workC.Purecolor.setAlphaF(0.2); workC.shadowcolor = "#FB2525"; workC.shadowcolor.setAlphaF(0.5); workC.textColor = "#000000"; workC.timeColor = "#B54A4B"; m_vScheduleColor.append(workC); CSchedulesColor lifeC; lifeC.type = 2; lifeC.gradientFromC = "#B7E6FB"; lifeC.gradientToC = "#D4FFB3"; lifeC.Purecolor = "#6FFF00"; lifeC.Purecolor.setAlphaF(0.2); lifeC.shadowcolor = "#82D245"; lifeC.textColor = "#000000"; lifeC.timeColor = "#53A316"; m_vScheduleColor.append(lifeC); CSchedulesColor otherC; otherC.type = 3; otherC.gradientFromC = "#FBE9B7"; otherC.gradientToC = "#DFB3FF"; otherC.Purecolor = "#D191FF"; otherC.Purecolor.setAlphaF(0.2); otherC.shadowcolor = "#BA60FA"; otherC.textColor = "#000000"; otherC.timeColor = "#8548B1"; m_vScheduleColor.append(otherC); CSchedulesColor solar; solar.type = 4; solar.dotColor = "#FF7272"; solar.dotColor.setAlphaF(1); solar.gradientFromC = "#FF7272"; solar.gradientFromC.setAlphaF(0.3); solar.gradientToC = "#FF7272"; solar.gradientToC.setAlphaF(0.3); solar.Purecolor = "#FF7272"; solar.Purecolor.setAlphaF(0.3); solar.shadowcolor = "#BA60FA"; solar.textColor = "#000000"; solar.timeColor = "#8548B1"; m_vScheduleColor.append(solar); } CScheduleDataManage::~CScheduleDataManage() { delete m_scheduleDataCtrl; delete m_HuangliDayDataManage; delete m_GetAllYearScheduleInfo; } YearScheduleInfo *CScheduleDataManage::getGetAllYearScheduleInfo() const { return m_GetAllYearScheduleInfo; } int CScheduleDataManage::getFirstWeekDay() const { return m_firstWeekDay; } void CScheduleDataManage::setFirstWeekDay(int firstWeekDay) { m_firstWeekDay = firstWeekDay; } QDate CScheduleDataManage::getFirstOfMonth(const QDate &date) { const QDate firstDay(date.year(), date.month(), 1); int offset = firstDay.dayOfWeek() % 7 - m_firstWeekDay ; const int day = offset <0 ?offset +7:offset; return firstDay.addDays(0 - day); } void CScheduleDataManage::setCurrentYear(int CurrentYear) { m_CurrentYear = CurrentYear; m_GetAllYearScheduleInfo->m_year = m_CurrentYear; for (int i = 1; i < 13; ++i) { m_GetAllYearScheduleInfo->m_firstDay[i] = getFirstOfMonth(QDate(m_CurrentYear,i,1)); } } ScheduleDtailInfo CScheduleDataManage::getPressSelectInfo() const { return m_PressSelectInfo; } void CScheduleDataManage::setPressSelectInfo(const ScheduleDtailInfo &PressSelectInfo) { m_PressSelectInfo = PressSelectInfo; } CScheduleDataCtrl::CScheduleDataCtrl() { qRegisterMetaType>("QVector"); m_dbus = new CSchedulesDBus("com.deepin.daemon.Calendar", "/com/deepin/daemon/Calendar/Scheduler", QDBusConnection::sessionBus(), this); m_scheduleDateCache = nullptr; if (!m_scheduleDateCache) m_scheduleDateCache = new QMap; m_thread = new CDataProcessThread(m_dbus); connect(m_thread, &CDataProcessThread::signalsDataProcess, this, &CScheduleDataCtrl::slotDataProcess); } CScheduleDataCtrl::~CScheduleDataCtrl() { delete m_scheduleDateCache; delete m_dbus; delete m_thread; } qint64 CScheduleDataCtrl::addSchedule(const ScheduleDtailInfo &scheduledate) { clearData(); return m_dbus->CreateJob(scheduledate); } bool CScheduleDataCtrl::getScheduleInfoById(int id, ScheduleDtailInfo &out) { return m_dbus->GetJob(id, out); } bool CScheduleDataCtrl::getScheduleInfo(const QDate bdate, const QDate edate, QVector &out) { return m_dbus->GetJobs(bdate.year(), bdate.month(), bdate.day(), edate.year(), edate.month(), edate.day(), out); } bool CScheduleDataCtrl::queryScheduleInfo(QString key, QDateTime starttime, QDateTime endtime, QVector &out) { return m_dbus->QueryJobs(key, starttime, endtime, out); } bool CScheduleDataCtrl::queryScheduleInfo(QString key, QDateTime starttime, QDateTime endtime, QString &out) { return m_dbus->QueryJobs(key, starttime, endtime, out); } bool CScheduleDataCtrl::updateScheduleInfo(const ScheduleDtailInfo &scheduledate) { clearData(); return m_dbus->UpdateJob(scheduledate); } bool CScheduleDataCtrl::deleteScheduleInfoById(int id) { clearData(); return m_dbus->DeleteJob(id); } bool CScheduleDataCtrl::GetType(qint64 jobId, ScheduleType &out) { while (m_thread->isRunning()); return m_dbus->GetType(jobId, out); } QString CScheduleDataCtrl::InfoToJson(const ScheduleDtailInfo &scheduledate) { return m_dbus->createScheduleDtailInfojson(scheduledate); } ScheduleDtailInfo CScheduleDataCtrl::JsonObjectToInfo(QJsonObject &obj) { return m_dbus->parsingScheduleDtailInfojsonID(obj); } void CScheduleDataCtrl::slotupdatescheduleD(QWidget *w, QDate begin, QDate end) { m_currentWidget = w; m_begindate = begin; m_enddate = end; m_thread->DataProcessStart(begin, end); } void CScheduleDataCtrl::slotDataProcess(QVector out) { emit signalsupdatescheduleD(m_currentWidget, out); } void CScheduleDataCtrl::clearData() { while (m_thread->isRunning()); m_scheduleDateCache->clear(); } CSchedulesDBus *CScheduleDataCtrl::getDbus() const { return m_dbus; } CDataProcessThread::CDataProcessThread(CSchedulesDBus *_DataManage) : m_DataManage(_DataManage) , m_stopFlag(false) { Q_ASSERT(m_DataManage != nullptr); } CDataProcessThread::~CDataProcessThread() { //防止未运行完 m_mutex.lock(); m_stopFlag = true; m_mutex.unlock(); //是否允许 while (isRunning()) {} } void CDataProcessThread::DataProcessStart(QDate begin, QDate end) { m_mutex.lock(); this->m_stopFlag = true; this->m_begindate = begin; this->m_enddate = end; m_mutex.unlock(); while (isRunning()) {} m_mutex.lock(); m_stopFlag = false; m_mutex.unlock(); start(QThread::NormalPriority); } void CDataProcessThread::run() { forever { //运行 m_mutex.lock(); QDate bdate = m_begindate; QDate edate = m_enddate; bool t_stopFlag = m_stopFlag; m_mutex.unlock(); if (t_stopFlag) return; QVector out; bool flag = m_DataManage->GetJobs(bdate.year(), bdate.month(), bdate.day(), edate.year(), edate.month(), edate.day(), out); if (!flag) return; emit signalsDataProcess(out); break; } } CHuangliDayDataManage::CHuangliDayDataManage() { m_DBusInter = new CalendarDBus("com.deepin.api.LunarCalendar", "/com/deepin/api/LunarCalendar", QDBusConnection::sessionBus(), this); } CHuangliDayDataManage::~CHuangliDayDataManage() { delete m_DBusInter; } bool CHuangliDayDataManage::getSoloDay(QDate date, QString &str) { CaHuangLiDayInfo scurrentDayinfo; if (m_DBusInter->GetHuangLiDayCalendar(date.year(), date.month(), date.day(), scurrentDayinfo)) { if (scurrentDayinfo.mSolarFestival.isEmpty() && scurrentDayinfo.mLunarFestival.isEmpty()) { str = QString(); return false; } else if (!scurrentDayinfo.mSolarFestival.isEmpty() && !scurrentDayinfo.mLunarFestival.isEmpty()) { str = scurrentDayinfo.mSolarFestival + " " + scurrentDayinfo.mLunarFestival; return true; } else { str = scurrentDayinfo.mSolarFestival + scurrentDayinfo.mLunarFestival; return true; } } return false; } QVector CHuangliDayDataManage::getDayFlag(QDate date) { QVector vflag; vflag.resize(42); vflag.fill(false); CaHuangLiMonthInfo out; if (m_DBusInter->GetHuangLiMonthCalendar(date.year(), date.month(), true, out)) { if (out.mCaLunarDayInfo.count() == 42) { for (int i = 0; i < 42; i++) { if (!out.mCaLunarDayInfo.at(i).mSolarFestival.isEmpty() || !out.mCaLunarDayInfo.at(i).mLunarFestival.isEmpty()) { vflag[i] = true; } } } } return vflag; } dde-calendar-5.7.0.23/src/dataManage/scheduledatamanage.h000066400000000000000000000141161375021633200230370ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULEDATAMANAGE_H #define SCHEDULEDATAMANAGE_H #include "calendardbus.h" #include "schedulestructs.h" #include "dbusdatagetthread.h" #include #include #include #include DGUI_USE_NAMESPACE struct CSchedulesColor { int type; QColor gradientFromC; QColor gradientToC; QColor dotColor; QColor Purecolor; QColor shadowcolor; QColor textColor; QColor timeColor; QColor hightlightgradientFromC; QColor hightlightgradientToC; QColor hightlightPurecolor; QColor hovergradientFromC; QColor hovergradientToC; QColor hoverPurecolor; QColor splitColor; QColor pressgradientFromC; QColor pressgradientToC; QColor pressPurecolor; }; class CSchedulesDBus; class CScheduleDataCtrl; class CHuangliDayDataManage; class CaLunarMonthInfo; class CScheduleDataManage { public: static CScheduleDataManage *getScheduleDataManage(); CScheduleDataCtrl *getscheduleDataCtrl(); CHuangliDayDataManage *getHuangliDayDataManage(); CSchedulesColor getScheduleColorByType(int type); QColor getSystemActiveColor(); void setSearchResult(QVector &vData); bool getSearchResult(ScheduleDtailInfo info);//true 高亮 bool getSearchResult(QDate date);//true 高亮 void setTheMe(int type = 0); int getTheme() { return m_theme; } void clear(); ScheduleDtailInfo getPressSelectInfo() const; void setPressSelectInfo(const ScheduleDtailInfo &PressSelectInfo); void setCurrentYear(int CurrentYear); QDate getFirstOfMonth(const QDate &date); int getFirstWeekDay() const; void setFirstWeekDay(int firstWeekDay); YearScheduleInfo *getGetAllYearScheduleInfo() const; private: CScheduleDataManage(); ~CScheduleDataManage(); private: CScheduleDataCtrl *m_scheduleDataCtrl = nullptr; CHuangliDayDataManage *m_HuangliDayDataManage = nullptr; QVector m_vScheduleColor; QVector m_vScheduleInfo; ScheduleDtailInfo m_PressSelectInfo; int m_theme = 0; int m_CurrentYear; int m_firstWeekDay =0; YearScheduleInfo *m_GetAllYearScheduleInfo = nullptr; static CScheduleDataManage *m_vscheduleDataManage; }; class CDataProcessThread : public QThread { Q_OBJECT public: /****** 功能:构造函数 参数:_DataManage 原始数据管理类 返回值:无 ******/ explicit CDataProcessThread(CSchedulesDBus *_DataManage=nullptr); /****** 功能:析构函数 参数:无 返回值:无 ******/ ~CDataProcessThread(); public: /****** 功能:处理数据函数外部调用 返回值:无 ******/ void DataProcessStart(QDate begin, QDate end); signals: /****** 功能:发送信号函数 返回值:无 ******/ void signalsDataProcess(QVector out); protected: /****** 功能:多线程处理函数 参数:无 返回值:无 ******/ void run() override; private: CSchedulesDBus *m_DataManage; //锁 QMutex m_mutex; //更新类型 int m_type; QDate m_begindate; QDate m_enddate; //停止标志 bool m_stopFlag; }; class CScheduleDataCtrl: public QObject { Q_OBJECT public: CScheduleDataCtrl(); ~CScheduleDataCtrl() override; qint64 addSchedule(const ScheduleDtailInfo &scheduledate); bool getScheduleInfoById(int id, ScheduleDtailInfo &out); bool getScheduleInfo(const QDate bdate, const QDate edate, QVector &out); bool queryScheduleInfo(QString key, QDateTime starttime, QDateTime endtime, QVector &out); bool queryScheduleInfo(QString key, QDateTime starttime, QDateTime endtime, QString &out); bool updateScheduleInfo(const ScheduleDtailInfo &scheduledate); bool deleteScheduleInfoById(int id); bool GetType(qint64 jobId, ScheduleType &out); QString InfoToJson(const ScheduleDtailInfo &scheduledate); ScheduleDtailInfo JsonObjectToInfo(QJsonObject &obj); CSchedulesDBus *getDbus() const; public slots: void slotupdatescheduleD(QWidget *w, QDate begin, QDate end); void slotDataProcess(QVector out); signals: void signalsupdatescheduleD(QWidget *w, QVector &data); private: void clearData(); private: CSchedulesDBus *m_dbus; QMap *m_scheduleDateCache; QDate m_begindate; QDate m_enddate; QWidget *m_currentWidget; CDataProcessThread *m_thread; }; class CalendarDBus; class CHuangliDayDataManage: public QObject { public: CHuangliDayDataManage(); ~CHuangliDayDataManage() override; bool getSoloDay(QDate date, QString &str); //获取节日状态 QVector getDayFlag(QDate date); private: CalendarDBus *m_DBusInter; }; #endif // SCHEDULEVIEW_H dde-calendar-5.7.0.23/src/dbus/000077500000000000000000000000001375021633200157775ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/dbus/calendardbus.cpp000077500000000000000000000251751375021633200211470ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #include "calendardbus.h" /* * Implementation of interface class DCalendarDBus */ CalendarDBus::CalendarDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) { QDBusConnection::sessionBus().connect(this->service(), this->path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(__propertyChanged__(QDBusMessage))); CaYearInfo::registerMetaType(); CaLunarDayInfo::registerMetaType(); CaLunarMonthInfo::registerMetaType(); CaSolarMonthInfo::registerMetaType(); CaHuangLiDayInfo::registerMetaType(); CaHuangLiMonthInfo::registerMetaType(); } CalendarDBus::~CalendarDBus() { QDBusConnection::sessionBus().disconnect(service(), path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(propertyChanged(QDBusMessage))); } void CaYearInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaYearInfo &what) { argument << what.mYear << what.mMonth << what.mDay; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaYearInfo &what) { argument.beginStructure(); argument << what.mYear << what.mMonth << what.mDay; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaYearInfo &what) { argument.beginStructure(); argument >> what.mYear >> what.mMonth >> what.mDay; argument.endStructure(); return argument; } void CaLunarDayInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaLunarDayInfo &what) { argument << what.mGanZhiYear << what.mGanZhiMonth << what.mGanZhiDay; argument << what.mLunarMonthName << what.mLunarDayName; argument << what.mLunarLeapMonth; argument << what.mZodiac << what.mTerm; argument << what.mSolarFestival << what.mLunarFestival; argument << what.mWorktime; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaLunarDayInfo &what) { argument.beginStructure(); argument << what.mGanZhiYear << what.mGanZhiMonth << what.mGanZhiDay; argument << what.mLunarMonthName << what.mLunarDayName; argument << what.mLunarLeapMonth; argument << what.mZodiac << what.mTerm; argument << what.mSolarFestival << what.mLunarFestival; argument << what.mWorktime; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaLunarDayInfo &what) { argument.beginStructure(); argument >> what.mGanZhiYear >> what.mGanZhiMonth >> what.mGanZhiDay; argument >> what.mLunarMonthName >> what.mLunarDayName; argument >> what.mLunarLeapMonth; argument >> what.mZodiac >> what.mTerm; argument >> what.mSolarFestival >> what.mLunarFestival; argument >> what.mWorktime; argument.endStructure(); return argument; } void CaLunarMonthInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaLunarMonthInfo &what) { argument << what.mFirstDayWeek << what.mDays; argument << what.mCaLunarDayInfo; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaLunarMonthInfo &what) { argument.beginStructure(); argument << what.mFirstDayWeek << what.mDays; argument << what.mCaLunarDayInfo; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaLunarMonthInfo &what) { argument.beginStructure(); argument >> what.mFirstDayWeek >> what.mDays; argument >> what.mCaLunarDayInfo; argument.endStructure(); return argument; } void CaSolarMonthInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaSolarMonthInfo &what) { argument << what.mFirstDayWeek << what.mDays; argument << what.mCaYearInfo; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaSolarMonthInfo &what) { argument.beginStructure(); argument << what.mFirstDayWeek << what.mDays; argument.endStructure(); argument << what.mCaYearInfo; return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaSolarMonthInfo &what) { argument.beginStructure(); argument >> what.mFirstDayWeek >> what.mDays; argument.endStructure(); argument >> what.mCaYearInfo; return argument; } #if 1 void CaHuangLiDayInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaHuangLiDayInfo &what) { argument << what.mSuit << what.mAvoid; argument << what.mWorktime; argument << what.mLunarFestival << what.mSolarFestival; argument << what.mTerm << what.mZodiac; argument << what.mLunarLeapMonth; argument << what.mLunarDayName << what.mLunarMonthName; argument << what.mGanZhiDay << what.mGanZhiMonth << what.mGanZhiYear ; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiDayInfo &what) { argument.beginStructure(); argument << what.mSuit << what.mAvoid; argument << what.mWorktime; argument << what.mLunarFestival << what.mSolarFestival; argument << what.mTerm << what.mZodiac; argument << what.mLunarLeapMonth; argument << what.mLunarDayName << what.mLunarMonthName; argument << what.mGanZhiDay << what.mGanZhiMonth << what.mGanZhiYear ; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiDayInfo &what) { argument.beginStructure(); argument >> what.mSuit >> what.mAvoid; argument >> what.mWorktime; argument >> what.mLunarFestival >> what.mSolarFestival; argument >> what.mTerm >> what.mZodiac; argument >> what.mLunarLeapMonth; argument >> what.mLunarDayName >> what.mLunarMonthName; argument >> what.mGanZhiDay >> what.mGanZhiMonth >> what.mGanZhiYear ; argument.endStructure(); return argument; } void CaHuangLiMonthInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaHuangLiMonthInfo &what) { argument << what.mDays << what.mFirstDayWeek; argument << what.mCaLunarDayInfo; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiMonthInfo &what) { argument.beginStructure(); argument << what.mDays << what.mFirstDayWeek; argument << what.mCaLunarDayInfo; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiMonthInfo &what) { argument.beginStructure(); argument >> what.mDays >> what.mFirstDayWeek; argument >> what.mCaLunarDayInfo; argument.endStructure(); return argument; } #else void CaHuangLiDayInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaHuangLiDayInfo &what) { argument << what.mGanZhiYear << what.mGanZhiMonth << what.mGanZhiDay; argument << what.mLunarMonthName << what.mLunarDayName; argument << what.mLunarLeapMonth; argument << what.mZodiac << what.mTerm; argument << what.mSolarFestival << what.mLunarFestival; argument << what.mWorktime; argument << what.mAvoid << what.mSuit ; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiDayInfo &what) { argument.beginStructure(); argument << what.mGanZhiYear << what.mGanZhiMonth << what.mGanZhiDay; argument << what.mLunarMonthName << what.mLunarDayName; argument << what.mLunarLeapMonth; argument << what.mZodiac << what.mTerm; argument << what.mSolarFestival << what.mLunarFestival; argument << what.mWorktime; argument << what.mAvoid << what.mSuit ; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiDayInfo &what) { argument.beginStructure(); argument >> what.mGanZhiYear >> what.mGanZhiMonth >> what.mGanZhiDay; argument >> what.mLunarMonthName >> what.mLunarDayName; argument >> what.mLunarLeapMonth; argument >> what.mZodiac >> what.mTerm; argument >> what.mSolarFestival >> what.mLunarFestival; argument >> what.mWorktime; argument >> what.mAvoid >> what.mSuit ; argument.endStructure(); return argument; } void CaHuangLiMonthInfo::registerMetaType() { qRegisterMetaType(); qDBusRegisterMetaType(); } QDebug operator<<(QDebug argument, const CaHuangLiMonthInfo &what) { argument << what.mFirstDayWeek << what.mDays; argument << what.mCaLunarDayInfo; return argument; } QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiMonthInfo &what) { argument.beginStructure(); argument << what.mFirstDayWeek << what.mDays; argument << what.mCaLunarDayInfo; argument.endStructure(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiMonthInfo &what) { argument.beginStructure(); argument >> what.mFirstDayWeek >> what.mDays; argument >> what.mCaLunarDayInfo; argument.endStructure(); return argument; } #endif dde-calendar-5.7.0.23/src/dbus/calendardbus.h000077500000000000000000000471501375021633200206110ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #ifndef CALENDARDBUS_H #define CALENDARDBUS_H #include #include #include #include #include #include #include #include #include #include #include #include #include class CaYearInfo { public: CaYearInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaYearInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaYearInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaYearInfo &what); public: qint32 mYear; qint32 mMonth; qint32 mDay; }; class CaLunarDayInfo { public: CaLunarDayInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaLunarDayInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaLunarDayInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaLunarDayInfo &what); public: QString mGanZhiYear; QString mGanZhiMonth; QString mGanZhiDay; QString mLunarMonthName; QString mLunarDayName; qint32 mLunarLeapMonth; QString mZodiac; QString mTerm; QString mSolarFestival; QString mLunarFestival; qint32 mWorktime; }; class CaLunarMonthInfo { public: CaLunarMonthInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaLunarMonthInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaLunarMonthInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaLunarMonthInfo &what); public: qint32 mFirstDayWeek; qint32 mDays; QList mCaLunarDayInfo; }; class CaSolarMonthInfo { public: CaSolarMonthInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaSolarMonthInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaSolarMonthInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaSolarMonthInfo &what); public: qint32 mFirstDayWeek; qint32 mDays; QList mCaYearInfo; }; class CaHuangLiDayInfo { public: CaHuangLiDayInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaHuangLiDayInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiDayInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiDayInfo &what); public: QString mGanZhiYear; QString mGanZhiMonth; QString mGanZhiDay; QString mLunarMonthName; QString mLunarDayName; qint32 mLunarLeapMonth; QString mZodiac; QString mTerm; QString mSolarFestival; QString mLunarFestival; qint32 mWorktime; QString mSuit; QString mAvoid; }; class CaHuangLiMonthInfo { public: CaHuangLiMonthInfo() {} inline static void registerMetaType(); friend QDebug operator<<(QDebug argument, const CaHuangLiMonthInfo &what); friend QDBusArgument &operator<<(QDBusArgument &argument, const CaHuangLiMonthInfo &what); friend const QDBusArgument &operator>>(const QDBusArgument &argument, CaHuangLiMonthInfo &what); public: qint32 mFirstDayWeek; qint32 mDays; QList mCaLunarDayInfo; }; typedef struct _tagHolidayInfo { QDate date; char status; } HolidayInfo; typedef struct _tagFestivalInfo { QString ID; QString FestivalName; QString description; QString Rest; int month; int year; QVector listHoliday; } FestivalInfo; /* * Proxy class for interface com.deepin.api.LunarCalendar */ class CalendarDBus: public QDBusAbstractInterface { Q_OBJECT Q_SLOT void __propertyChanged__(const QDBusMessage &msg) { QList arguments = msg.arguments(); if (3 != arguments.count()) return; QString interfaceName = msg.arguments().at(0).toString(); if (interfaceName != "com.deepin.api.LunarCalendar") return; QVariantMap changedProps = qdbus_cast(arguments.at(1).value()); foreach (const QString &prop, changedProps.keys()) { const QMetaObject *self = metaObject(); for (int i = self->propertyOffset(); i < self->propertyCount(); ++i) { QMetaProperty p = self->property(i); if (p.name() == prop) { Q_EMIT p.notifySignal().invoke(this); } } } } public: static inline const char *staticInterfaceName() { return "com.deepin.api.LunarCalendar"; } public: CalendarDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); ~CalendarDBus(); public Q_SLOTS: // METHODS inline QDBusPendingReply GetLunarDateBySolar(int in0, int in1, int in2) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); return asyncCallWithArgumentList(QStringLiteral("GetLunarDateBySolar"), argumentList); } inline QDBusReply GetLunarDateBySolar(int in0, int in1, int in2, bool &out1, bool &out2) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetLunarDateBySolar"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 3) { out1 = qdbus_cast(reply.arguments().at(1)); out2 = qdbus_cast(reply.arguments().at(2)); } return reply; } inline QDBusPendingReply GetLunarInfoBySolar(int in0, int in1, int in2) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); return asyncCallWithArgumentList(QStringLiteral("GetLunarInfoBySolar"), argumentList); } inline QDBusReply GetLunarInfoBySolar(qint32 in0, qint32 in1, qint32 in2, bool &out1) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetLunarInfoBySolar"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { out1 = qdbus_cast(reply.arguments().at(1)); } return reply; } inline QDBusPendingReply GetLunarMonthCalendar(int in0, int in1, bool in2) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); return asyncCallWithArgumentList(QStringLiteral("GetLunarMonthCalendar"), argumentList); } inline QDBusReply GetLunarMonthCalendar(int in0, int in1, bool in2, bool &out1) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetLunarMonthCalendar"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { out1 = qdbus_cast(reply.arguments().at(1)); } return reply; } inline QDBusPendingReply GetSolarDateByLunar(int in0, int in1, int in2, bool in3) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2) << QVariant::fromValue(in3); return asyncCallWithArgumentList(QStringLiteral("GetSolarDateByLunar"), argumentList); } inline QDBusReply GetSolarDateByLunar(int in0, int in1, int in2, bool in3, bool &out1) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2) << QVariant::fromValue(in3); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetSolarDateByLunar"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { out1 = qdbus_cast(reply.arguments().at(1)); } return reply; } inline QDBusPendingReply GetSolarMonthCalendar(int in0, int in1, bool in2) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); return asyncCallWithArgumentList(QStringLiteral("GetSolarMonthCalendar"), argumentList); } inline QDBusReply GetSolarMonthCalendar(int in0, int in1, bool in2, bool &out1) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetSolarMonthCalendar"), argumentList); if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) { out1 = qdbus_cast(reply.arguments().at(1)); } return reply; } inline bool GetHuangLiMonthCalendar(int in0, int in1, bool in2, CaHuangLiMonthInfo &out) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetHuangLiMonth"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply huanglimonth = reply; if (!huanglimonth.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(huanglimonth.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject rootObj = jsonDoc.object(); //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("Days")) { out.mDays = rootObj.value("Days").toInt(); } if (rootObj.contains("FirstDayWeek")) { out.mFirstDayWeek = rootObj.value("FirstDayWeek").toInt(); } if (rootObj.contains("Datas")) { QJsonArray subArray = rootObj.value("Datas").toArray(); for (int i = 0; i < subArray.size(); i++) { QJsonObject subObj = subArray.at(i).toObject(); CaHuangLiDayInfo huangliday; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Suit")) { huangliday.mSuit = subObj.value("Suit").toString(); } if (subObj.contains("Avoid")) { huangliday.mAvoid = subObj.value("Avoid").toString(); } if (subObj.contains("Worktime")) { huangliday.mWorktime = subObj.value("Worktime").toInt(); } if (subObj.contains("LunarFestival")) { huangliday.mLunarFestival = subObj.value("LunarFestival").toString(); } if (subObj.contains("SolarFestival")) { huangliday.mSolarFestival = subObj.value("SolarFestival").toString(); } if (subObj.contains("Term")) { huangliday.mTerm = subObj.value("Term").toString(); } if (subObj.contains("Zodiac")) { huangliday.mZodiac = subObj.value("Zodiac").toString(); } if (subObj.contains("LunarLeapMonth")) { huangliday.mLunarLeapMonth = subObj.value("LunarLeapMonth").toInt(); } if (subObj.contains("LunarDayName")) { huangliday.mLunarDayName = subObj.value("LunarDayName").toString(); } if (subObj.contains("LunarMonthName")) { huangliday.mLunarMonthName = subObj.value("LunarMonthName").toString(); } if (subObj.contains("GanZhiDay")) { huangliday.mGanZhiDay = subObj.value("GanZhiDay").toString(); } if (subObj.contains("GanZhiMonth")) { huangliday.mGanZhiMonth = subObj.value("GanZhiMonth").toString(); } if (subObj.contains("GanZhiYear")) { huangliday.mGanZhiYear = subObj.value("GanZhiYear").toString(); } out.mCaLunarDayInfo.append(huangliday); } } return true; } inline bool GetHuangLiDayCalendar(qint32 in0, qint32 in1, qint32 in2, CaHuangLiDayInfo &out) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetHuangLiDay"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply huangliday = reply; if (!huangliday.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(huangliday.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject rootObj = jsonDoc.object(); //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("Suit")) { out.mSuit = rootObj.value("Suit").toString(); } if (rootObj.contains("Avoid")) { out.mAvoid = rootObj.value("Avoid").toString(); } if (rootObj.contains("Worktime")) { out.mWorktime = rootObj.value("Worktime").toInt(); } if (rootObj.contains("LunarFestival")) { out.mLunarFestival = rootObj.value("LunarFestival").toString(); } if (rootObj.contains("SolarFestival")) { out.mSolarFestival = rootObj.value("SolarFestival").toString(); } if (rootObj.contains("Term")) { out.mTerm = rootObj.value("Term").toString(); } if (rootObj.contains("Zodiac")) { out.mZodiac = rootObj.value("Zodiac").toString(); } if (rootObj.contains("LunarLeapMonth")) { out.mLunarLeapMonth = rootObj.value("LunarLeapMonth").toInt(); } if (rootObj.contains("LunarDayName")) { out.mLunarDayName = rootObj.value("LunarDayName").toString(); } if (rootObj.contains("LunarMonthName")) { out.mLunarMonthName = rootObj.value("LunarMonthName").toString(); } if (rootObj.contains("GanZhiDay")) { out.mGanZhiDay = rootObj.value("GanZhiDay").toString(); } if (rootObj.contains("GanZhiMonth")) { out.mGanZhiMonth = rootObj.value("GanZhiMonth").toString(); } if (rootObj.contains("GanZhiYear")) { out.mGanZhiYear = rootObj.value("GanZhiYear").toString(); } return true; } inline bool GetFestivalMonth(int in0, int in1, QVector &out) { QList argumentList; argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetFestivalMonth"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply festivalMonthinfo = reply; if (!festivalMonthinfo.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(festivalMonthinfo.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); FestivalInfo festivalInfoday; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("id")) { festivalInfoday.ID = subObj.value("id").toString(); } if (subObj.contains("name")) { festivalInfoday.FestivalName = subObj.value("name").toString(); } if (subObj.contains("description")) { festivalInfoday.description = subObj.value("description").toString(); } if (subObj.contains("rest")) { festivalInfoday.Rest = subObj.value("rest").toString(); } if (subObj.contains("month")) { festivalInfoday.month = subObj.value("month").toInt(); } if (subObj.contains("list")) { QJsonArray sublistArray = subObj.value("list").toArray(); for (int j = 0; j < sublistArray.size(); j++) { QJsonObject hsubObj = sublistArray.at(j).toObject(); HolidayInfo dayinfo; if (hsubObj.contains("status")) { dayinfo.status = hsubObj.value("status").toInt(); } if (hsubObj.contains("date")) { dayinfo.date = QDate::fromString(hsubObj.value("date").toString(), "yyyy-M-d"); } festivalInfoday.listHoliday.append(dayinfo); } } festivalInfoday.year = in0; out.append(festivalInfoday); } return true; } Q_SIGNALS: // SIGNALS // begin property changed signals }; namespace com { namespace deepin { namespace api { typedef ::CalendarDBus LunarCalendar; } } } Q_DECLARE_METATYPE(CaYearInfo) Q_DECLARE_METATYPE(CaLunarDayInfo) Q_DECLARE_METATYPE(CaLunarMonthInfo) Q_DECLARE_METATYPE(CaSolarMonthInfo) Q_DECLARE_METATYPE(CaHuangLiDayInfo) Q_DECLARE_METATYPE(CaHuangLiMonthInfo) #endif dde-calendar-5.7.0.23/src/dbus/creatorparschedule.cpp000077500000000000000000000236551375021633200224000ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #include "creatorparschedule.h" #include "scheduledatamanage.h" CreatOrParSchedule::CreatOrParSchedule() { } CreatOrParSchedule::~CreatOrParSchedule() { } QString CreatOrParSchedule::createScheduleDtailInfojson(const ScheduleDtailInfo &info) { QJsonObject json; json.insert("ID", info.id); json.insert("AllDay", info.allday); json.insert("Remind", createScheduleRemind(info)); json.insert("RRule", createScheduleRRule(info)); json.insert("Title", info.titleName); json.insert("Description", info.description); json.insert("Type", info.type.ID); json.insert("Start", toconvertData(info.beginDateTime)); json.insert("End", toconvertData(info.endDateTime)); json.insert("RecurID", info.RecurID); QJsonArray jsonarry; for (int i = 0; i < info.ignore.count(); i++) { jsonarry.append(toconvertData(info.ignore.at(i))); } json.insert("Ignore", jsonarry); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } QString CreatOrParSchedule::createScheduleTypejson(const ScheduleType &info) { QJsonObject json; json.insert("ID", info.ID); json.insert("Name", info.typeName); QString colorName = QString("#%1%2%3").arg(info.color.red(), 2, 16, QChar('0')).arg(info.color.green(), 2, 16, QChar('0')).arg(info.color.blue(), 2, 16, QChar('0')); json.insert("Color", info.color.name()); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } ScheduleType CreatOrParSchedule::parsingScheduleTypejson(QJsonObject &object) { ScheduleType type; QJsonObject &rootObj = object; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { type.ID = rootObj.value("ID").toInt(); } if (rootObj.contains("Name")) { type.typeName = rootObj.value("Name").toString(); } if (rootObj.contains("Color")) { QString str = rootObj.value("Color").toString(); type.color = QColor(rootObj.value("Color").toString()); } return type; } ScheduleDtailInfo CreatOrParSchedule::parsingScheduleDtailInfojsonID(QJsonObject &obj) { ScheduleDtailInfo info; QJsonObject &rootObj = obj; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { info.id = rootObj.value("ID").toInt(); } if (rootObj.contains("AllDay")) { info.allday = rootObj.value("AllDay").toBool(); } if (rootObj.contains("Remind")) { parsingScheduleRemind(rootObj.value("Remind").toString(), info); } if (rootObj.contains("Title")) { info.titleName = rootObj.value("Title").toString(); } if (rootObj.contains("Description")) { info.description = rootObj.value("Description").toString(); } if (rootObj.contains("Type")) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType(rootObj.value("Type").toInt(), info.type); } if (rootObj.contains("Start")) { info.beginDateTime = fromconvertData(rootObj.value("Start").toString()); } if (rootObj.contains("End")) { info.endDateTime = fromconvertData(rootObj.value("End").toString()); } if (rootObj.contains("RecurID")) { info.RecurID = rootObj.value("RecurID").toInt(); } if (rootObj.contains("RRule")) { parsingScheduleRRule(rootObj.value("RRule").toString(), info); } if (rootObj.contains("Ignore")) { QJsonArray subArray = rootObj.value("Ignore").toArray(); for (int i = 0; i < subArray.size(); i++) { QString subObj = subArray.at(i).toString(); info.ignore.append(fromconvertData(subObj)); } } return info; } QString CreatOrParSchedule::createScheduleRRule(const ScheduleDtailInfo &info) { if (info.rpeat == 0) return QString(); QString str; switch (info.rpeat) { case 1: { str += "FREQ=DAILY"; } break; case 2: { str += "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"; } break; case 3: { str += "FREQ=WEEKLY"; } break; case 4: { str += "FREQ=MONTHLY"; } break; case 5: { str += "FREQ=YEARLY"; } break; } switch (info.enddata.type) { case 1: { str += QString(";COUNT=%1").arg(info.enddata.tcount + 1); } break; case 2: { QDateTime datetime = info.enddata.date.addDays(-1); str += ";UNTIL=" + datetime.toString("yyyyMMddThhmmss") + "Z"; } break; } return str; } void CreatOrParSchedule::parsingScheduleRRule(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.rpeat = 0; return; } QString rrulestrs = str; QStringList rruleslist = rrulestrs.split(";", QString::SkipEmptyParts); if (rruleslist.count() > 0) { if (rruleslist.contains("FREQ=DAILY") && rruleslist.contains("BYDAY=MO,TU,WE,TH,FR")) info.rpeat = 2; else if (rruleslist.contains("FREQ=DAILY") ) { info.rpeat = 1; } else if (rruleslist.contains("FREQ=WEEKLY") ) { info.rpeat = 3; } else if (rruleslist.contains("FREQ=MONTHLY") ) { info.rpeat = 4; } else if (rruleslist.contains("FREQ=YEARLY") ) { info.rpeat = 5; } info.enddata.type = 0; for (int i = 0; i < rruleslist.count(); i++) { if (rruleslist.at(i).contains("COUNT=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 1; info.enddata.tcount = liststr.at(1).toInt() - 1; } if (rruleslist.at(i).contains("UNTIL=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 2; info.enddata.date = QDateTime::fromString(liststr.at(1).left(liststr.at(1).count() - 1), "yyyyMMddThhmmss"); info.enddata.date = info.enddata.date.addDays(1); } } } } QString CreatOrParSchedule::createScheduleRemind(const ScheduleDtailInfo &info) { if (!info.remind) return QString(); QString str; if (info.allday) { str = QString::number(info.remindData.n) + ";" + info.remindData.time.toString("hh:mm"); } else { str = QString::number(info.remindData.n); } return str; } void CreatOrParSchedule::parsingScheduleRemind(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.remind = false; return; } info.remind = true; if (info.allday) { QStringList liststr = str.split(";", QString::SkipEmptyParts); info.remindData.n = liststr.at(0).toInt(); info.remindData.time = QTime::fromString(liststr.at(1), "hh:mm"); } else { info.remindData.n = str.toInt(); } } QString CreatOrParSchedule::toconvertData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "+" + datetimeutc.toString("hh:mm"); return str; } QDateTime CreatOrParSchedule::fromconvertData(QString str) { QStringList liststr = str.split("+", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } QString CreatOrParSchedule::toconvertIGData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "Z" + datetimeutc.toString("hh:mm"); return str; } QDateTime CreatOrParSchedule::fromconvertiIGData(QString str) { QStringList liststr = str.split("Z", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } QString CreatOrParSchedule::CreateJob(const ScheduleDtailInfo &info) { QString str = createScheduleDtailInfojson(info); return str; } bool CreatOrParSchedule::GetJob(QString str, ScheduleDtailInfo &out) { QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(str.toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject ssubObj = jsonDoc.object(); out = parsingScheduleDtailInfojsonID(ssubObj); return true; } dde-calendar-5.7.0.23/src/dbus/creatorparschedule.h000077500000000000000000000050631375021633200220360ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #ifndef CreatOrParSchedule_H #define CALENDARDBUS_H #include "schedulestructs.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * Proxy class for interface com.deepin.api.LunarCalendar */ class CreatOrParSchedule { public: static QString createScheduleDtailInfojson(const ScheduleDtailInfo &info); static QString createScheduleTypejson(const ScheduleType &info); static ScheduleType parsingScheduleTypejson(QJsonObject &object); static ScheduleDtailInfo parsingScheduleDtailInfojsonID(QJsonObject &obj); static QString createScheduleRRule(const ScheduleDtailInfo &info); static void parsingScheduleRRule(QString str, ScheduleDtailInfo &info); static QString createScheduleRemind(const ScheduleDtailInfo &info); static void parsingScheduleRemind(QString str, ScheduleDtailInfo &info); static QString toconvertData(QDateTime date); static QDateTime fromconvertData(QString str); static QString toconvertIGData(QDateTime date); static QDateTime fromconvertiIGData(QString str); static QString CreateJob(const ScheduleDtailInfo &info); static bool GetJob(QString str, ScheduleDtailInfo &out); private: CreatOrParSchedule(); ~CreatOrParSchedule(); }; #endif dde-calendar-5.7.0.23/src/dbus/dbuscalendar_adaptor.cpp000077500000000000000000000024351375021633200226530ustar00rootroot00000000000000/* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -a dbuscalendar_adaptor -c CalendarAdaptor com.deepin.Calendar.xml * * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd. * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #include "dbuscalendar_adaptor.h" #include "calendarmainwindow.h" #include "scheduledatamanage.h" #include #include #include #include #include #include #include #include /* * Implementation of adaptor class CalendarAdaptor */ CalendarAdaptor::CalendarAdaptor(QObject *parent) : QDBusAbstractAdaptor(parent) { // constructor setAutoRelaySignals(true); } CalendarAdaptor::~CalendarAdaptor() { // destructor } void CalendarAdaptor::ActiveWindow() { // handle method call com.deepin.Calendar.RaiseWindow QMetaObject::invokeMethod(parent(), "ActiveWindow"); } void CalendarAdaptor::RaiseWindow() { QWidget *pp = qobject_cast(parent()); pp->activateWindow(); pp->raise(); } void CalendarAdaptor::OpenSchedule(QString job) { QMetaObject::invokeMethod(parent(), "OpenSchedule", Q_ARG(QString, job)); } dde-calendar-5.7.0.23/src/dbus/dbuscalendar_adaptor.h000077500000000000000000000031271375021633200223170ustar00rootroot00000000000000/* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -a dbuscalendar_adaptor -c CalendarAdaptor com.deepin.Calendar.xml * * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd. * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #ifndef DBUSCALENDAR_ADAPTOR_H #define DBUSCALENDAR_ADAPTOR_H #include "schedulestructs.h" #include #include QT_BEGIN_NAMESPACE class QByteArray; template class QList; template class QMap; class QString; class QStringList; class QVariant; QT_END_NAMESPACE /* * Adaptor class for interface com.deepin.Calendar */ class CalendarAdaptor: public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.deepin.Calendar") Q_CLASSINFO("D-Bus Introspection", "" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "") public: explicit CalendarAdaptor(QObject *parent); virtual ~CalendarAdaptor(); public: // PROPERTIES public Q_SLOTS: // METHODS void ActiveWindow(); void RaiseWindow(); void OpenSchedule(QString job); Q_SIGNALS: // SIGNALS }; #endif dde-calendar-5.7.0.23/src/dbus/dbusdatagetthread.cpp000066400000000000000000000054041375021633200221650ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "dbusdatagetthread.h" #include "schedulesdbus.h" DbusDataGetThread::DbusDataGetThread(CSchedulesDBus *_DataManage, QObject *parent) : QObject(parent) , m_work(new DataGetWork(_DataManage)) { m_work->moveToThread(&workerThread); connect(&workerThread, &QThread::finished, m_work, &QObject::deleteLater); connect(this,&DbusDataGetThread::getScheduleInfo, m_work,&DataGetWork::getScheduleInfo); connect(this,&DbusDataGetThread::getLunarInfo, m_work,&DataGetWork::getLunarInfo); connect(this,&DbusDataGetThread::getFestivalInfo, m_work,&DataGetWork::getFestivalInfo); connect(m_work,&DataGetWork::signalGetScheduleSuccess, this,&DbusDataGetThread::signalGetScheduleSuccess); workerThread.start(); } DbusDataGetThread::~DbusDataGetThread() { workerThread.quit(); workerThread.wait(); } DataGetWork::DataGetWork(CSchedulesDBus *_DataManage) :m_DataManage(_DataManage) { Q_ASSERT(m_DataManage != nullptr); } DataGetWork::~DataGetWork() { } void DataGetWork::getScheduleInfo(YearScheduleInfo *ScheduleInfo) { QDate firstDay = ScheduleInfo->m_firstDay[1]; QDate endDay = firstDay.addDays(41); ScheduleInfo->m_monthInfo.clear(); QVector out; for (int i = 0 ; i < 12 ; ++i) { out.clear(); firstDay = ScheduleInfo->m_firstDay[i+1]; endDay = firstDay.addDays(41); m_DataManage->GetJobs(firstDay.year(), firstDay.month(), firstDay.day(), endDay.year(), endDay.month(), endDay.day(), out); ScheduleInfo->m_monthInfo[i+1] = out; } emit signalGetScheduleSuccess(); } void DataGetWork::getLunarInfo(YearLunar *lunarInfo) { Q_UNUSED(lunarInfo); } void DataGetWork::getFestivalInfo(YearFestival *festivalInfo) { Q_UNUSED(festivalInfo); } dde-calendar-5.7.0.23/src/dbus/dbusdatagetthread.h000066400000000000000000000050271375021633200216330ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 DBUSDATAGETTHREAD_H #define DBUSDATAGETTHREAD_H #include "calendardbus.h" #include "schedulestructs.h" #include #include class CSchedulesDBus; class DataGetWork; class CaLunarMonthInfo; struct YearScheduleInfo { int m_year; QMap m_firstDay; QMap > m_monthInfo; }; Q_DECLARE_METATYPE(YearScheduleInfo); struct YearLunar { int m_year; QMap m_monthLunar; }; struct YearFestival { int m_year; QMap m_dayFestival; //1:xiu 2:ban }; class DbusDataGetThread : public QObject { Q_OBJECT public: explicit DbusDataGetThread(CSchedulesDBus *_DataManage,QObject *parent = nullptr); ~DbusDataGetThread(); signals: //获取日程信息 void getScheduleInfo(YearScheduleInfo *ScheduleInfo); //获取阴历信息 void getLunarInfo(YearLunar *lunarInfo); //获取节假日信息 void getFestivalInfo(YearFestival *festivalInfo); void signalsgetInfo(const QString &str); signals: void signalGetScheduleSuccess(); public slots: private: QThread workerThread; DataGetWork *m_work = nullptr; }; class DataGetWork :public QObject { Q_OBJECT public: explicit DataGetWork(CSchedulesDBus *_DataManage); ~DataGetWork(); public: //获取日程信息 void getScheduleInfo(YearScheduleInfo *ScheduleInfo); //获取阴历信息 void getLunarInfo(YearLunar *lunarInfo); //获取节假日信息 void getFestivalInfo(YearFestival *festivalInfo); signals: void signalGetScheduleSuccess(); private: CSchedulesDBus *m_DataManage = nullptr; }; #endif // DBUSDATAGETTHREAD_H dde-calendar-5.7.0.23/src/dbus/exportedinterface.cpp000066400000000000000000000171771375021633200222330ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "exportedinterface.h" #include "scheduledatamanage.h" #include "calendarmainwindow.h" #include #include #include #include ExportedInterface::ExportedInterface(QObject *parent) : Dtk::Core::DUtil::DExportedInterface(parent) { m_object = parent; } QVariant ExportedInterface::invoke(const QString &action, const QString ¶meters) const { ScheduleDtailInfo info; Exportpara para; QString tstr = parameters; if (!analysispara(tstr, info, para)) { return QVariant(false); } if (action == "CREATE") { qint64 tindex = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->addSchedule(info); if (tindex < 0) { return QVariant(false); } } else if (action == "VIEW") { dynamic_cast(m_object)->viewWindow(para.viewType, para.viewTime); } else if (action == "QUERY") { QString qstr; bool flag = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->queryScheduleInfo(para.ADTitleName, para.ADStartTime, para.ADEndTime, qstr); Q_UNUSED(flag); return QVariant(qstr); } else if (action == "CANCEL") { QVector out; bool flag = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->queryScheduleInfo(para.ADTitleName, para.ADStartTime, para.ADEndTime, out); if (!flag) return QVariant(false); for (int j = 0; j < out.size(); j++) { QVector scheduleInfolist = out.at(j).vData; for (int m = 0; m < scheduleInfolist.count(); m++) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(scheduleInfolist.at(m).id, newschedule); newschedule.ignore.append(scheduleInfolist.at(m).beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } } dynamic_cast(m_object)->UpdateJob(); return QVariant(true); } bool ExportedInterface::analysispara( QString ¶meters, ScheduleDtailInfo &info, Exportpara ¶) const { QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(parameters.toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject rootObj = jsonDoc.object(); //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { info.id = rootObj.value("ID").toInt(); } if (rootObj.contains("AllDay")) { info.allday = rootObj.value("AllDay").toBool(); } if (rootObj.contains("Remind")) { parsingScheduleRemind(rootObj.value("Remind").toString(), info); } if (rootObj.contains("Title")) { info.titleName = rootObj.value("Title").toString(); } if (rootObj.contains("Description")) { info.description = rootObj.value("Description").toString(); } if (rootObj.contains("Type")) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType(rootObj.value("Type").toInt(), info.type); } if (rootObj.contains("Start")) { info.beginDateTime = fromconvertData(rootObj.value("Start").toString()); } if (rootObj.contains("End")) { info.endDateTime = fromconvertData(rootObj.value("End").toString()); } if (rootObj.contains("RecurID")) { info.RecurID = rootObj.value("RecurID").toInt(); } if (rootObj.contains("RRule")) { parsingScheduleRRule(rootObj.value("RRule").toString(), info); } if (rootObj.contains("Ignore")) { QJsonArray subArray = rootObj.value("Ignore").toArray(); for (int i = 0; i < subArray.size(); i++) { QString subObj = subArray.at(i).toString(); info.ignore.append(fromconvertData(subObj)); } } if (rootObj.contains("ViewName")) { para.viewType = rootObj.value("ViewName").toInt(); } if (rootObj.contains("ViewTime")) { para.viewTime = QDateTime::fromString(rootObj.value("ViewTime").toString(), "yyyy-MM-ddThh:mm:ss"); } if (rootObj.contains("ADTitleName")) { para.ADTitleName = rootObj.value("ADTitleName").toString(); } if (rootObj.contains("ADStartTime")) { para.ADStartTime = QDateTime::fromString(rootObj.value("ADStartTime").toString(), "yyyy-MM-ddThh:mm:ss"); } if (rootObj.contains("ADEndTime")) { para.ADEndTime = QDateTime::fromString(rootObj.value("ADEndTime").toString(), "yyyy-MM-ddThh:mm:ss"); } return true; } void ExportedInterface::parsingScheduleRemind(QString str, ScheduleDtailInfo &info) const { if (str.isEmpty()) { info.remind = false; return; } info.remind = true; if (info.allday) { QStringList liststr = str.split(";", QString::SkipEmptyParts); info.remindData.n = liststr.at(0).toInt(); info.remindData.time = QTime::fromString(liststr.at(1), "hh:mm"); } else { info.remindData.n = str.toInt(); } } void ExportedInterface::parsingScheduleRRule(QString str, ScheduleDtailInfo &info) const { if (str.isEmpty()) { info.rpeat = 0; return; } QString rrulestrs = str; QStringList rruleslist = rrulestrs.split(";", QString::SkipEmptyParts); if (rruleslist.count() > 0) { if (rruleslist.contains("FREQ=DAILY") && rruleslist.contains("BYDAY=MO,TU,WE,TH,FR")) info.rpeat = 2; else if (rruleslist.contains("FREQ=DAILY") ) { info.rpeat = 1; } else if (rruleslist.contains("FREQ=WEEKLY") ) { info.rpeat = 3; } else if (rruleslist.contains("FREQ=MONTHLY") ) { info.rpeat = 4; } else if (rruleslist.contains("FREQ=YEARLY") ) { info.rpeat = 5; } info.enddata.type = 0; for (int i = 0; i < rruleslist.count(); i++) { if (rruleslist.at(i).contains("COUNT=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 1; info.enddata.tcount = liststr.at(1).toInt() - 1; } if (rruleslist.at(i).contains("UNTIL=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 2; info.enddata.date = QDateTime::fromString(liststr.at(1).left(liststr.at(1).count() - 1), "yyyyMMddThhmmss"); info.enddata.date = info.enddata.date.addDays(1); } } } } QDateTime ExportedInterface::fromconvertData(QString str) const { QStringList liststr = str.split("+", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } dde-calendar-5.7.0.23/src/dbus/exportedinterface.h000066400000000000000000000034401375021633200216640ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 EXPORTEDINTERFACE_H #define EXPORTEDINTERFACE_H #include "schedulestructs.h" #include #include DCORE_USE_NAMESPACE struct Exportpara { int viewType; //视图名称:year,month,week,day对应年、月、周、日视图类型 QDateTime viewTime; //表示需要查看视图上某个时间 QString ADTitleName; QDateTime ADStartTime; QDateTime ADEndTime; }; class ExportedInterface : public Dtk::Core::DUtil::DExportedInterface { public: explicit ExportedInterface(QObject *parent = nullptr); QVariant invoke(const QString &action, const QString ¶meters) const override; private: bool analysispara( QString ¶meters, ScheduleDtailInfo &info, Exportpara ¶) const; void parsingScheduleRRule(QString str, ScheduleDtailInfo &info) const; void parsingScheduleRemind(QString str, ScheduleDtailInfo &info) const; QDateTime fromconvertData(QString str) const; private: QObject *m_object = nullptr; }; #endif // EXPORTEDINTERFACE_H dde-calendar-5.7.0.23/src/dbus/schedulesdbus.cpp000077500000000000000000000452141375021633200213510ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #include "schedulesdbus.h" #include #include #include /* * Implementation of interface class DCalendarDBus */ CSchedulesDBus::CSchedulesDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) { QDBusConnection::sessionBus().connect(this->service(), this->path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(__propertyChanged__(QDBusMessage))); } CSchedulesDBus::~CSchedulesDBus() { QDBusConnection::sessionBus().disconnect(service(), path(), "org.freedesktop.DBus.Properties", "PropertiesChanged", "sa{sv}as", this, SLOT(propertyChanged(QDBusMessage))); } QString CSchedulesDBus::createScheduleDtailInfojson(const ScheduleDtailInfo &info) { QJsonObject json; json.insert("ID", info.id); json.insert("AllDay", info.allday); json.insert("Remind", createScheduleRemind(info)); json.insert("RRule", createScheduleRRule(info)); json.insert("Title", info.titleName); json.insert("Description", info.description); json.insert("Type", info.type.ID); json.insert("Start", toconvertData(info.beginDateTime)); json.insert("End", toconvertData(info.endDateTime)); json.insert("RecurID", info.RecurID); QJsonArray jsonarry; for (int i = 0; i < info.ignore.count(); i++) { jsonarry.append(toconvertData(info.ignore.at(i))); } json.insert("Ignore", jsonarry); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } QString CSchedulesDBus::createScheduleTypejson(const ScheduleType &info) { QJsonObject json; json.insert("ID", info.ID); json.insert("Name", info.typeName); QString colorName = QString("#%1%2%3").arg(info.color.red(), 2, 16, QChar('0')).arg(info.color.green(), 2, 16, QChar('0')).arg(info.color.blue(), 2, 16, QChar('0')); json.insert("Color", info.color.name()); // 构建 JSON 文档 QJsonDocument document; document.setObject(json); QByteArray byteArray = document.toJson(QJsonDocument::Compact); QString strJson(byteArray); return strJson; } ScheduleType CSchedulesDBus::parsingScheduleTypejson(QJsonObject &object) { ScheduleType type; QJsonObject &rootObj = object; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { type.ID = rootObj.value("ID").toInt(); } if (rootObj.contains("Name")) { type.typeName = rootObj.value("Name").toString(); } if (rootObj.contains("Color")) { QString str = rootObj.value("Color").toString(); type.color = QColor(rootObj.value("Color").toString()); } return type; } ScheduleDtailInfo CSchedulesDBus::parsingScheduleDtailInfojsonID(QJsonObject &obj) { ScheduleDtailInfo info; QJsonObject &rootObj = obj; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (rootObj.contains("ID")) { info.id = rootObj.value("ID").toInt(); } if (rootObj.contains("AllDay")) { info.allday = rootObj.value("AllDay").toBool(); } if (rootObj.contains("Remind")) { parsingScheduleRemind(rootObj.value("Remind").toString(), info); } if (rootObj.contains("Title")) { info.titleName = rootObj.value("Title").toString(); } if (rootObj.contains("Description")) { info.description = rootObj.value("Description").toString(); } if (rootObj.contains("Type")) { GetType(rootObj.value("Type").toInt(), info.type); } if (rootObj.contains("Start")) { info.beginDateTime = fromconvertData(rootObj.value("Start").toString()); } if (rootObj.contains("End")) { info.endDateTime = fromconvertData(rootObj.value("End").toString()); } if (rootObj.contains("RecurID")) { info.RecurID = rootObj.value("RecurID").toInt(); } if (rootObj.contains("RRule")) { parsingScheduleRRule(rootObj.value("RRule").toString(), info); } if (rootObj.contains("Ignore")) { QJsonArray subArray = rootObj.value("Ignore").toArray(); for (int i = 0; i < subArray.size(); i++) { QString subObj = subArray.at(i).toString(); info.ignore.append(fromconvertData(subObj)); } } return info; } QString CSchedulesDBus::createScheduleRRule(const ScheduleDtailInfo &info) { if (info.rpeat == 0) return QString(); QString str; switch (info.rpeat) { case 1: { str += "FREQ=DAILY"; } break; case 2: { str += "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"; } break; case 3: { str += "FREQ=WEEKLY"; } break; case 4: { str += "FREQ=MONTHLY"; } break; case 5: { str += "FREQ=YEARLY"; } break; } switch (info.enddata.type) { case 1: { str += QString(";COUNT=%1").arg(info.enddata.tcount + 1); } break; case 2: { QDateTime datetime = info.enddata.date; str += ";UNTIL=" + datetime.toString("yyyyMMddThhmmss") + "Z"; } break; } return str; } void CSchedulesDBus::parsingScheduleRRule(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.rpeat = 0; return; } QString rrulestrs = str; QStringList rruleslist = rrulestrs.split(";", QString::SkipEmptyParts); if (rruleslist.count() > 0) { if (rruleslist.contains("FREQ=DAILY") && rruleslist.contains("BYDAY=MO,TU,WE,TH,FR")) info.rpeat = 2; else if (rruleslist.contains("FREQ=DAILY") ) { info.rpeat = 1; } else if (rruleslist.contains("FREQ=WEEKLY") ) { info.rpeat = 3; } else if (rruleslist.contains("FREQ=MONTHLY") ) { info.rpeat = 4; } else if (rruleslist.contains("FREQ=YEARLY") ) { info.rpeat = 5; } info.enddata.type = 0; for (int i = 0; i < rruleslist.count(); i++) { if (rruleslist.at(i).contains("COUNT=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 1; info.enddata.tcount = liststr.at(1).toInt() - 1; } if (rruleslist.at(i).contains("UNTIL=")) { QStringList liststr = rruleslist.at(i).split("=", QString::SkipEmptyParts); info.enddata.type = 2; info.enddata.date = QDateTime::fromString(liststr.at(1).left(liststr.at(1).count() - 1), "yyyyMMddThhmmss"); info.enddata.date = info.enddata.date; } } } } QString CSchedulesDBus::createScheduleRemind(const ScheduleDtailInfo &info) { if (!info.remind) return QString(); QString str; if (info.allday) { str = QString::number(info.remindData.n) + ";" + info.remindData.time.toString("hh:mm"); } else { str = QString::number(info.remindData.n); } return str; } void CSchedulesDBus::parsingScheduleRemind(QString str, ScheduleDtailInfo &info) { if (str.isEmpty()) { info.remind = false; return; } info.remind = true; if (info.allday) { QStringList liststr = str.split(";", QString::SkipEmptyParts); info.remindData.n = liststr.at(0).toInt(); info.remindData.time = QTime::fromString(liststr.at(1), "hh:mm"); } else { info.remindData.n = str.toInt(); } } QString CSchedulesDBus::toconvertData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "+" + datetimeutc.toString("hh:mm"); return str; } QDateTime CSchedulesDBus::fromconvertData(QString str) { QStringList liststr = str.split("+", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } QString CSchedulesDBus::toconvertIGData(QDateTime date) { QDateTime datetimeutc11 = date; datetimeutc11.setTimeSpec(Qt::UTC); QString strss = datetimeutc11.toString(Qt::ISODate); datetimeutc11.setTimeSpec(Qt::OffsetFromUTC); strss = datetimeutc11.toString(Qt::ISODateWithMs); QDateTime datetimeutc = QDateTime::fromTime_t(0); QString str = date.toString("yyyy-MM-ddThh:mm:ss") + "Z" + datetimeutc.toString("hh:mm"); return str; } QDateTime CSchedulesDBus::fromconvertiIGData(QString str) { QStringList liststr = str.split("Z", QString::SkipEmptyParts); return QDateTime::fromString(liststr.at(0), "yyyy-MM-ddThh:mm:ss"); } qint64 CSchedulesDBus::CreateJob(const ScheduleDtailInfo &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleDtailInfojson(info)) ; qDebug() << argumentList.at(0); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("CreateJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { qDebug() << reply; return -1; } QDBusReply id = reply; return id.value(); } bool CSchedulesDBus::GetJobs(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay, QVector &out) { QList argumentList; argumentList << QVariant::fromValue(startYear) << QVariant::fromValue(startMonth) << QVariant::fromValue(startDay); argumentList << QVariant::fromValue(endYear) << QVariant::fromValue(endMonth) << QVariant::fromValue(endDay); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::GetJob(qint64 jobId, ScheduleDtailInfo &out) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject ssubObj = jsonDoc.object(); out = parsingScheduleDtailInfojsonID(ssubObj); return true; } bool CSchedulesDBus::UpdateJob(const ScheduleDtailInfo &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleDtailInfojson(info)); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("UpdateJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } return true; } bool CSchedulesDBus::DeleteJob(qint64 jobId) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("DeleteJob"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } return true; } bool CSchedulesDBus::QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QVector &out) { QJsonObject qjson; qjson.insert("Key", key); qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); ScheduleDateRangeInfo info; //因为是预先定义好的JSON数据格式,所以这里可以这样读取 if (subObj.contains("Date")) { info.date = QDate::fromString(subObj.value("Date").toString(), "yyyy-MM-dd"); } if (subObj.contains("Jobs")) { QJsonArray subarry = subObj.value("Jobs").toArray(); for (int j = 0; j < subarry.size(); j++) { QJsonObject ssubObj = subarry.at(j).toObject(); info.vData.append(parsingScheduleDtailInfojsonID(ssubObj)); } } out.append(info); } return true; } bool CSchedulesDBus::QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QString &out) { QJsonObject qjson; qjson.insert("Key", key); qjson.insert("Start", toconvertData(starttime)); qjson.insert("End", toconvertData(endtime)); // 构建 JSON 文档 QJsonDocument qdocument; qdocument.setObject(qjson); QByteArray qbyteArray = qdocument.toJson(QJsonDocument::Compact); QString strJson(qbyteArray); QList argumentList; argumentList << QVariant::fromValue(strJson); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("QueryJobs"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; out = jobs.value().toLocal8Bit(); return true; } bool CSchedulesDBus::GetTypes(QVector &out) { QList argumentList; QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetTypes"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); out.append(parsingScheduleTypejson(subObj)); } return true; } bool CSchedulesDBus::GetType(qint64 jobId, ScheduleType &out) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } QDBusReply jobs = reply; if (!jobs.isValid()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(jobs.value().toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonObject subObj = jsonDoc.object(); out = parsingScheduleTypejson(subObj); return true; } qint64 CSchedulesDBus::CreateType(const ScheduleType &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleTypejson(info)) ; QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("CreateType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return -1; } QDBusReply id = reply; return id.value(); } bool CSchedulesDBus::DeleteType(qint64 jobId) { QList argumentList; argumentList << QVariant::fromValue(jobId); QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("DeleteType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } return true; } bool CSchedulesDBus::UpdateType(const ScheduleType &info) { QList argumentList; argumentList << QVariant::fromValue(createScheduleTypejson(info)) ; QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("UpdateType"), argumentList); if (reply.type() != QDBusMessage::ReplyMessage ) { return false; } return true; } dde-calendar-5.7.0.23/src/dbus/schedulesdbus.h000077500000000000000000000103171375021633200210120ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 . */ /* * This file was generated by qdbusxml2cpp version 0.8 * Command line was: qdbusxml2cpp -c DCalendarDBus -p dcalendardbus com.deepin.api.LunarCalendar.xml * * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). * * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #ifndef SCHEDULESDBUS_H #define SCHEDULESDBUS_H #include "schedulestructs.h" #include #include #include #include #include #include #include #include #include #include #include #include #include /* * Proxy class for interface com.deepin.api.LunarCalendar */ class CSchedulesDBus: public QDBusAbstractInterface { Q_OBJECT Q_SLOT void __propertyChanged__(const QDBusMessage &msg) { QList arguments = msg.arguments(); if (3 != arguments.count()) return; QString interfaceName = msg.arguments().at(0).toString(); if (interfaceName != "com.deepin.api.LunarCalendar") return; QVariantMap changedProps = qdbus_cast(arguments.at(1).value()); foreach (const QString &prop, changedProps.keys()) { const QMetaObject *self = metaObject(); for (int i = self->propertyOffset(); i < self->propertyCount(); ++i) { QMetaProperty p = self->property(i); if (p.name() == prop) { Q_EMIT p.notifySignal().invoke(this); } } } } public: static inline const char *staticInterfaceName() { return "com.deepin.daemon.Calendar.Scheduler"; } public: CSchedulesDBus(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); ~CSchedulesDBus(); QString toconvertIGData(QDateTime date); QDateTime fromconvertiIGData(QString str); QString createScheduleDtailInfojson(const ScheduleDtailInfo &info); ScheduleDtailInfo parsingScheduleDtailInfojsonID(QJsonObject &obj); private: QString createScheduleTypejson(const ScheduleType &info); ScheduleType parsingScheduleTypejson(QJsonObject &object); QString createScheduleRRule(const ScheduleDtailInfo &info); void parsingScheduleRRule(QString str, ScheduleDtailInfo &info); QString createScheduleRemind(const ScheduleDtailInfo &info); void parsingScheduleRemind(QString str, ScheduleDtailInfo &info); QString toconvertData(QDateTime date); QDateTime fromconvertData(QString str); public Q_SLOTS: // METHODS qint64 CreateJob(const ScheduleDtailInfo &info); bool GetJobs(int startYear, int startMonth, int startDay, int endYear, int endMonth, int endDay, QVector &out); bool GetJob(qint64 jobId, ScheduleDtailInfo &out); bool UpdateJob(const ScheduleDtailInfo &info); bool DeleteJob(qint64 jobId); bool QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QVector &out); bool QueryJobs(QString key, QDateTime starttime, QDateTime endtime, QString &out); bool GetTypes(QVector &out); bool GetType(qint64 jobId, ScheduleType &out); qint64 CreateType(const ScheduleType &info); bool DeleteType(qint64 jobId); bool UpdateType(const ScheduleType &info); Q_SIGNALS: // SIGNALS // begin property changed signals }; #endif dde-calendar-5.7.0.23/src/dialog/000077500000000000000000000000001375021633200163015ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/dialog/myschceduleview.cpp000066400000000000000000000274751375021633200222240ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "myschceduleview.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include "schcedulectrldlg.h" #include "cdynamicicon.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CMySchceduleView::CMySchceduleView(const ScheduleDtailInfo &schduleInfo,QWidget *parent) : DDialog(parent) { setContentsMargins(0, 0, 0, 0); m_scheduleInfo = schduleInfo; initUI(); initConnection(); //根据主题type设置颜色 setLabelTextColor(DGuiApplicationHelper::instance()->themeType()); setFixedSize(380, 160); AutoFeed(m_scheduleInfo.titleName); if (m_scheduleInfo.type.ID == DDECalendar::FestivalTypeID) { m_timeLabel->setText(m_scheduleInfo.beginDateTime.toString(("yyyy-MM-dd"))); } else { m_timeLabel->setText(m_scheduleInfo.beginDateTime.toString("yyyy-MM-dd hh:mm") + " ~ " + m_scheduleInfo.endDateTime.toString("yyyy-MM-dd hh:mm")); } } CMySchceduleView::~CMySchceduleView() { emit signalViewtransparentFrame(0); } void CMySchceduleView::AutoFeed(QString text) { QString strText = text; QString resultStr = nullptr; QFont labelF; labelF.setWeight(QFont::Medium); labelF = DFontSizeManager::instance()->get(DFontSizeManager::T6,labelF); QFontMetrics fm(labelF); int titlewidth = fm.width(strText); QStringList strList; QString str; int h = fm.height(); strList.clear(); if (titlewidth < 330) { strList.append(strText); resultStr += strText; } else { for (int i = 0; i < strText.count(); i++) { str += strText.at(i); if (fm.width(str) > 330) { str.remove(str.count() - 1,1); strList.append(str); resultStr += str + "\n"; str.clear(); --i; } } strList.append(str); resultStr += str; } if (strList.count() * h + 140 > 240) { area->setFixedHeight(100); setFixedHeight(250); } else { area->setFixedHeight(strList.count() * h); setFixedHeight(strList.count() * h + 152); } m_schceduleLabel->setText(resultStr); } void CMySchceduleView::setLabelTextColor(const int type) { //标题显示颜色 QColor titleColor; //日程显示颜色 QColor scheduleTitleColor; //时间显示颜色 QColor timeColor; if (type == 2) { titleColor = "#C0C6D4"; scheduleTitleColor = "#FFFFFF"; timeColor = "#FFFFFF"; timeColor.setAlphaF(0.7); } else { titleColor = "#001A2E"; scheduleTitleColor = "#000000"; scheduleTitleColor.setAlphaF(0.9); timeColor = "#000000"; timeColor.setAlphaF(0.7); } //设置颜色 setPaletteTextColor(m_Title,titleColor); setPaletteTextColor(m_schceduleLabel,scheduleTitleColor); setPaletteTextColor(m_timeLabel,timeColor); } void CMySchceduleView::setPaletteTextColor(QWidget *widget, QColor textColor) { //如果为空指针则退出 if(nullptr == widget) return; DPalette palette = widget->palette(); //设置文字显示颜色 palette.setColor(DPalette::WindowText,textColor); widget->setPalette(palette); } void CMySchceduleView::showEvent(QShowEvent *event) { Q_UNUSED(event); emit signalViewtransparentFrame(1); } bool CMySchceduleView::eventFilter(QObject *o, QEvent *e) { Q_UNUSED(o); if (e->type() == QEvent::FontChange) { AutoFeed(m_scheduleInfo.titleName); } return false; } void CMySchceduleView::slotEditBt(int buttonIndex, QString buttonName) { if (buttonIndex != 1 && buttonName != "Edit") return; CSchceduleDlg dlg(0, this); dlg.setData(m_scheduleInfo); if (dlg.exec() == DDialog::Accepted) { accept(); emit signalsEditorDelete(1); } } void CMySchceduleView::slotDeleteBt(int buttonIndex, QString buttonName) { if (buttonIndex != 0 && buttonName != "Delete") return; if (m_scheduleInfo.rpeat == 0) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Are you sure you want to delete this event?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Delete"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(m_scheduleInfo.id); } else { return; } } else { if (m_scheduleInfo.RecurID == 0) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete all occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(m_scheduleInfo.id); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_scheduleInfo.id, newschedule); newschedule.ignore.append(m_scheduleInfo.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else { return; } } else { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete this and all future occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All Future Events")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_scheduleInfo.id, newschedule); newschedule.enddata.type = 2; newschedule.enddata.date = m_scheduleInfo.beginDateTime.addDays(-1); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_scheduleInfo.id, newschedule); newschedule.ignore.append(m_scheduleInfo.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else { return; } } } accept(); emit signalsEditorDelete(1); } void CMySchceduleView::initUI() { //在点击任何对话框上的按钮后不关闭对话框,保证关闭子窗口时不被一起关掉 setOnButtonClickedClose(false); m_Title = new QLabel(this); m_Title->setFixedSize(108, 51); m_Title->setAlignment(Qt::AlignCenter); QFont titleFont; //设置字重 titleFont.setWeight(QFont::Bold); m_Title->setFont(titleFont); DFontSizeManager::instance()->bind(m_Title,DFontSizeManager::T5); //设置日期图标 QIcon t_icon(CDynamicIcon::getInstance()->getPixmap()); setIcon(t_icon); QFont labelTitle; labelTitle.setWeight(QFont::DemiBold); m_Title->setFont(labelTitle); m_Title->setText(tr("My Event")); m_Title->move(137, 0); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->setMargin(0); mainLayout->setSpacing(0); area = new QScrollArea (this); area->setFrameShape(QFrame::NoFrame); area->setFixedWidth(363); area->setBackgroundRole(QPalette::Background); area->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); area->setWidgetResizable(true); area->setAlignment(Qt::AlignCenter); m_schceduleLabel = new QLabel(this); m_schceduleLabel->setTextFormat(Qt::PlainText);//纯文本格式 m_schceduleLabel->installEventFilter(this); m_schceduleLabel->setFixedWidth(330); m_schceduleLabel->setAlignment(Qt::AlignCenter); DFontSizeManager::instance()->bind(m_schceduleLabel,DFontSizeManager::T6); labelF.setWeight(QFont::Medium); m_schceduleLabel->setFont(labelF); area->setWidget(m_schceduleLabel); mainLayout->addWidget(area); m_timeLabel = new DLabel(this); m_timeLabel->setFixedHeight(26); m_timeLabel->setAlignment(Qt::AlignCenter); QFont timeFont; timeFont.setWeight(QFont::Normal); m_timeLabel->setFont(timeFont); mainLayout->addSpacing(6); mainLayout->addWidget(m_timeLabel); if (m_scheduleInfo.type.ID == DDECalendar::FestivalTypeID) { addButton(tr("OK"), false, DDialog::ButtonNormal); QAbstractButton *button_ok = getButton(0); button_ok->setFixedSize(360,36); } else { addButton(tr("Delete"), false, DDialog::ButtonNormal); addButton(tr("Edit"), false, DDialog::ButtonRecommend); for (int i = 0; i < buttonCount(); i++) { QAbstractButton *button = getButton(i); button->setFixedSize(165,36); } } //这种中心铺满的weiget,显示日程标题和时间的控件 DWidget *centerWidget = new DWidget(this); centerWidget->setLayout(mainLayout); //获取widget的调色板 DPalette centerWidgetPalette = centerWidget->palette(); //设置背景色为透明 centerWidgetPalette.setColor(DPalette::Background, Qt::transparent); centerWidget->setPalette(centerWidgetPalette); //添加窗口为剧中对齐 addContent(centerWidget, Qt::AlignCenter); } void CMySchceduleView::initConnection() { //关联主题改变事件 QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CMySchceduleView::setLabelTextColor); if (m_scheduleInfo.type.ID == DDECalendar::FestivalTypeID) { connect(this, &DDialog::buttonClicked, this, &CMySchceduleView::close); } else { connect(this, &DDialog::buttonClicked, this, &CMySchceduleView::slotEditBt); connect(this, &DDialog::buttonClicked, this, &CMySchceduleView::slotDeleteBt); } QShortcut *shortcut = new QShortcut(this); shortcut->setKey(QKeySequence(QLatin1String("ESC"))); connect(shortcut, SIGNAL(activated()), this, SLOT(close())); } dde-calendar-5.7.0.23/src/dialog/myschceduleview.h000066400000000000000000000050571375021633200216610ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MYSCHCEDULEVIEW_H #define MYSCHCEDULEVIEW_H #include "schedulestructs.h" #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CMySchceduleView : public DDialog { Q_OBJECT public: explicit CMySchceduleView(const ScheduleDtailInfo &schduleInfo,QWidget *parent = nullptr); ~CMySchceduleView() override; ScheduleDtailInfo getSchedules() { return m_scheduleInfo; } signals: void signalsEditorDelete(int type = 0); void signalViewtransparentFrame(int type); public slots: void slotEditBt(int buttonIndex, QString buttonName); void slotDeleteBt(int buttonIndex, QString buttonName); private: void initUI(); void initConnection(); void AutoFeed(QString text); /** * @brief setLabelTextColor 设置label文字颜色 * @param type 主题type */ void setLabelTextColor(const int type); /** * @brief setPaletteTextColor 设置调色板颜色 * @param widget 需要设置的widget * @param textColor 显示颜色 */ void setPaletteTextColor(QWidget *widget,QColor textColor); protected: void showEvent(QShowEvent *event) override; bool eventFilter(QObject *o, QEvent *e) override; private: QLabel *m_schceduleLabel = nullptr; QLabel *m_timeLabel = nullptr; DSuggestButton *m_editBt = nullptr; DPushButton *m_deleteBt = nullptr; DPushButton *m_okBt = nullptr; QLabel *m_icon = nullptr; QLabel *m_Title = nullptr; ScheduleDtailInfo m_scheduleInfo; //日程 QScrollArea *area = nullptr; QFont labelF; }; #endif // MYSCHCEDULEVIEW_H dde-calendar-5.7.0.23/src/dialog/schcedulectrldlg.cpp000066400000000000000000000164511375021633200223270ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "schcedulectrldlg.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include "cdynamicicon.h" #include #include #include #include #include #include DGUI_USE_NAMESPACE CSchceduleCtrlDlg::CSchceduleCtrlDlg(QWidget *parent) : DDialog(parent) { setContentsMargins(0, 0, 0, 0); initUI(); initConnection(); resize(380, 260); setFocusPolicy(Qt::ClickFocus); } void CSchceduleCtrlDlg::initUI() { //在点击任何对话框上的按钮后不关闭对话框,保证关闭子窗口时不被一起关掉 setOnButtonClickedClose(false); QIcon t_icon(CDynamicIcon::getInstance()->getPixmap());// = QIcon::fromTheme("dde-calendar"); setIcon(t_icon); m_Title = new QLabel(this); m_Title->setFixedHeight(48); m_Title->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); QFont labelTitle; labelTitle.setWeight(QFont::Bold); labelTitle.setPixelSize(17); m_Title->setFont(labelTitle); m_mainBoxLayout = new QVBoxLayout(); m_mainBoxLayout->setMargin(0); m_mainBoxLayout->setSpacing(0); m_firstLabel = new QLabel(this); m_firstLabel->setAlignment(Qt::AlignCenter); m_firstLabel->setFixedWidth(350); m_firstLabel->setWordWrap(true); labelF.setWeight(QFont::Medium); DFontSizeManager::instance()->bind(m_firstLabel,DFontSizeManager::T6); m_firstLabel->setForegroundRole(DPalette::WindowText); m_firstLabel->setFont(labelF); m_mainBoxLayout->addWidget(m_firstLabel); m_seconLabel = new QLabel(this); m_seconLabel->setFixedWidth(350); m_seconLabel->setAlignment(Qt::AlignCenter); labelTitle.setWeight(QFont::Bold); DFontSizeManager::instance()->bind(m_seconLabel,DFontSizeManager::T6); m_seconLabel->setForegroundRole(DPalette::WindowText); //设置字重 labelT.setWeight(QFont::Normal); m_seconLabel->setFont(labelT); m_seconLabel->setWordWrap(true); m_mainBoxLayout->addSpacing(3); m_mainBoxLayout->addWidget(m_seconLabel); DFrame *gwi = new DFrame(this); gwi->setContentsMargins(0, 0, 0, 0); gwi->setLayout(m_mainBoxLayout); DPalette anipa = gwi->palette(); QColor color = "#F8F8F8"; color.setAlphaF(0.0); anipa.setColor(DPalette::Background, color); gwi->setAutoFillBackground(true); gwi->setPalette(anipa); gwi->setBackgroundRole(DPalette::Background); addContent(gwi, Qt::AlignCenter); setFocus(); } void CSchceduleCtrlDlg::initConnection() { //关联主题信号 QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CSchceduleCtrlDlg::setTheMe); connect(this, &DDialog::buttonClicked, this, &CSchceduleCtrlDlg::buttonJudge); //连接信号和槽 } void CSchceduleCtrlDlg::setTheMe(const int type) { //标题文字颜色 QColor titleColor; //提示内容文字颜色 QColor contentColor; if (type == 2) { titleColor = "#FFFFFF"; contentColor = "#FFFFFF"; contentColor.setAlphaF(0.7); } else { titleColor = "#000000"; titleColor.setAlphaF(0.9); contentColor = "#000000"; contentColor.setAlphaF(0.7); } setPaletteTextColor(m_firstLabel,titleColor); setPaletteTextColor(m_seconLabel,contentColor); } void CSchceduleCtrlDlg::setPaletteTextColor(QWidget *widget, QColor textColor) { //如果为空指针则退出 if(nullptr == widget) return; DPalette palette = widget->palette(); //设置文字显示颜色 palette.setColor(DPalette::WindowText,textColor); widget->setPalette(palette); } void CSchceduleCtrlDlg::changeEvent(QEvent *event) { Q_UNUSED(event) QFont font; QFontMetrics font_button(font); QFontMetrics font_firstLabel(font); QFontMetrics font_seconLabel(font); int height_firstLabel = (font_firstLabel.width(m_firstLabel->text()) / 300 + 1) * font_firstLabel.height(); int height_seconLabel = (font_seconLabel.width(m_seconLabel->text()) / 300 + 1) * font_seconLabel.height(); for (int i = 0; i < buttonCount(); i++) { QAbstractButton *button = getButton(i); QString str = str_btName.at(i); QString text_button = font_button.elidedText(str, Qt::ElideRight, 112); if (str.count() == 2) { button->setText(QString().append(str.at(0)).append(QChar::Nbsp).append(str.at(1))); } else { button->setText(text_button); } } setFixedHeight(36 + 48 + height_firstLabel + height_seconLabel + 30); } void CSchceduleCtrlDlg::buttonJudge(int id) { m_id = id; accept(); } QAbstractButton *CSchceduleCtrlDlg::addPushButton(QString btName, bool type) { addButton(btName, false, DDialog::ButtonNormal); int button_index = getButtonIndexByText(btName); QAbstractButton *button = getButton(button_index); if (type) { button->setFixedHeight(36); button->setFixedWidth(165); } else { button->setFixedHeight(36); button->setFixedWidth(129); } button->setToolTip(btName); str_btName.append(btName); return button; } QAbstractButton *CSchceduleCtrlDlg::addsuggestButton(QString btName, bool type) { addButton(btName,false,DDialog::ButtonRecommend); int button_index = getButtonIndexByText(btName); QAbstractButton *suggestButton = getButton(button_index); if (type) { suggestButton->setFixedHeight(36); suggestButton->setFixedWidth(165); } else { suggestButton->setFixedHeight(36); suggestButton->setFixedWidth(129); } suggestButton->setToolTip(btName); str_btName.append(btName); return suggestButton; } QAbstractButton *CSchceduleCtrlDlg::addWaringButton(QString btName, bool type) { addButton(btName,false,DDialog::ButtonWarning); int button_index = getButtonIndexByText(btName); QAbstractButton *suggestButton = getButton(button_index); if (type) { suggestButton->setFixedHeight(36); suggestButton->setFixedWidth(165); } else { suggestButton->setFixedHeight(36); suggestButton->setFixedWidth(129); } suggestButton->setToolTip(btName); str_btName.append(btName); return suggestButton; } void CSchceduleCtrlDlg::setText(QString str) { m_firstLabel->setText(str); m_firstLabel->setToolTip(str); } void CSchceduleCtrlDlg::setInformativeText(QString str) { m_seconLabel->setText(str); m_seconLabel->setToolTip(str); } int CSchceduleCtrlDlg::clickButton() { if (m_id < 0 || m_id > buttonCount() - 1) return buttonCount(); return m_id; } dde-calendar-5.7.0.23/src/dialog/schcedulectrldlg.h000066400000000000000000000046441375021633200217750ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 CSCHCEDULECTRLDLG_H #define CSCHCEDULECTRLDLG_H #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CSchceduleCtrlDlg : public DDialog { Q_OBJECT public: explicit CSchceduleCtrlDlg(QWidget *parent = nullptr); QAbstractButton *addPushButton(QString btName, bool type = false); QAbstractButton *addsuggestButton(QString btName, bool type = false); QAbstractButton *addWaringButton(QString btName, bool type = false); void setText(QString str); void setInformativeText(QString str); int clickButton(); private: void initUI(); void initConnection(); /** * @brief setTheMe 根据主题type设置颜色 * @param type 主题type */ void setTheMe(const int type); /** * @brief setPaletteTextColor 设置调色板颜色 * @param widget 需要设置的widget * @param textColor 显示颜色 */ void setPaletteTextColor(QWidget *widget,QColor textColor); protected: void changeEvent(QEvent *event) override; private slots: void buttonJudge(int id); private: QLabel *m_firstLabel = nullptr; QLabel *m_seconLabel = nullptr; QLabel *m_icon = nullptr; QLabel *m_Title = nullptr; int m_id = -1; QButtonGroup *m_Buttongroup = nullptr; QVector m_buttonlist; QVBoxLayout *m_mainBoxLayout = nullptr; QHBoxLayout *m_btBoxLayout = nullptr; QFont labelF; QFont labelT; QVector str_btName; }; #endif // MYSCHCEDULEVIEW_H dde-calendar-5.7.0.23/src/dialog/schceduledlg.cpp000066400000000000000000001232441375021633200214410ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "schceduledlg.h" #include "schcedulectrldlg.h" #include "scheduledatamanage.h" #include "timeedit.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CSchceduleDlg::CSchceduleDlg(int type, QWidget *parent, const bool isAllDay) : DDialog(parent) , m_createAllDay(isAllDay) { setContentsMargins(0, 0, 0, 0); m_type = type; initUI(); initConnection(); if (type == 1) { m_titleLabel->setText(tr("New Event")); m_beginDateEdit->setDate(QDate::currentDate()); int hours = QTime::currentTime().hour(); int minnutes = QTime::currentTime().minute() % DDECalendar::QuarterOfAnhourWithMinute; if (minnutes != 0) { minnutes = QTime::currentTime().minute() / DDECalendar::QuarterOfAnhourWithMinute * DDECalendar::QuarterOfAnhourWithMinute + DDECalendar::QuarterOfAnhourWithMinute; } m_beginTimeEdit->setTime(QTime(hours, minnutes)); m_endDateEdit->setDate(QDate::currentDate()); m_endTimeEdit->setTime(QTime(hours, minnutes).addSecs(3600)); } else { m_titleLabel->setText(tr("Edit Event")); } setFocusPolicy(Qt::WheelFocus); setFixedSize(438, 470); } CSchceduleDlg::~CSchceduleDlg() { emit signalViewtransparentFrame(0); } void CSchceduleDlg::setData(const ScheduleDtailInfo &info) { m_scheduleDtailInfo = info; m_typeComBox->setCurrentIndex(info.type.ID - 1); m_textEdit->setPlainText(info.titleName); m_beginDateEdit->setDate(info.beginDateTime.date()); m_beginTimeEdit->setTime(info.beginDateTime.time()); m_endDateEdit->setDate(info.endDateTime.date()); m_endTimeEdit->setTime(info.endDateTime.time()); m_allDayCheckbox->setChecked(info.allday); m_endRepeatDate->setMinimumDate(info.beginDateTime.date()); m_currentDate = info.beginDateTime; m_EndDate = info.endDateTime; slotallDayStateChanged(info.allday); initRmindRpeatUI(); } void CSchceduleDlg::setDate(const QDateTime &date) { m_currentDate = date; int hours = date.time().hour(); int minnutes = 0; if (date.date() == QDate::currentDate()) { minnutes = (date.time().minute() / DDECalendar::QuarterOfAnhourWithMinute + 1) * DDECalendar::QuarterOfAnhourWithMinute; } else { int minnutes = date.time().minute() % DDECalendar::QuarterOfAnhourWithMinute; if (minnutes != 0) { minnutes = (date.time().minute() / DDECalendar::QuarterOfAnhourWithMinute + 1) * DDECalendar::QuarterOfAnhourWithMinute; } } if (minnutes == 60) { if (hours + 1 == 24) { m_currentDate.setTime(QTime(0, 0)); m_currentDate = m_currentDate.addDays(1); } else { m_currentDate.setTime(QTime(hours + 1, 0)); } } else { m_currentDate.setTime(QTime(hours, minnutes)); } m_beginDateEdit->setDate(m_currentDate.date()); m_beginTimeEdit->setTime(m_currentDate.time()); QDateTime datetime = m_currentDate.addSecs(3600); m_EndDate = datetime; m_endDateEdit->setDate(datetime.date()); m_endTimeEdit->setTime(datetime.time()); m_endRepeatDate->setMinimumDate(date.date()); } ScheduleDtailInfo CSchceduleDlg::getScheduleData() { return m_scheduleDtailInfo; } void CSchceduleDlg::setAllDay(bool flag) { m_allDayCheckbox->setChecked(flag); } void CSchceduleDlg::slotCancelBt(int buttonIndex, QString buttonName) { if (buttonIndex != 0 && buttonName != "Cancel") return; reject(); } void CSchceduleDlg::slotOkBt(int buttonIndex, QString buttonName) { if (buttonIndex != 1 && buttonName != "Save") return; int themetype = CScheduleDataManage::getScheduleDataManage()->getTheme(); ScheduleDtailInfo scheduleDtailInfo = m_scheduleDtailInfo; QDateTime beginDateTime, endDateTime; beginDateTime.setDate(m_beginDateEdit->date()); beginDateTime.setTime(m_beginTimeEdit->getTime()); endDateTime.setDate(m_endDateEdit->date()); endDateTime.setTime(m_endTimeEdit->getTime()); if (m_textEdit->toPlainText().isEmpty()) { scheduleDtailInfo.titleName = m_textEdit->placeholderText(); } else { scheduleDtailInfo.titleName = m_textEdit->toPlainText(); } if (scheduleDtailInfo.titleName.isEmpty()) { return; } if (beginDateTime > endDateTime) { DDialog *prompt = new DDialog(this); prompt->setIcon(QIcon(":/resources/icon/warning.svg")); prompt->setMessage(tr("End time must be greater than start time")); prompt->setWindowFlags(prompt->windowFlags() | Qt::WindowStaysOnTopHint); prompt->addButton(tr("OK"), true, DDialog::ButtonNormal); prompt->exec(); return; } if (m_type == 1) scheduleDtailInfo.id = 0; scheduleDtailInfo.allday = m_allDayCheckbox->isChecked(); if (m_rmindCombox->currentIndex() == 0) scheduleDtailInfo.remind = false; else { scheduleDtailInfo.remind = true; } if (scheduleDtailInfo.allday) { if (scheduleDtailInfo.remind) { scheduleDtailInfo.remindData.time = QTime(9, 0); if (m_rmindCombox->currentIndex() == 1) { scheduleDtailInfo.remindData.n = DDECalendar::OnStartDay; } else if (m_rmindCombox->currentIndex() == 2) { scheduleDtailInfo.remindData.n = DDECalendar::OneDayBeforeWithDay; } else if (m_rmindCombox->currentIndex() == 3) { scheduleDtailInfo.remindData.n = DDECalendar::TwoDayBeforeWithDay; } else if (m_rmindCombox->currentIndex() == 4) { scheduleDtailInfo.remindData.n = DDECalendar::OneWeekBeforeWithDay; } } } else { if (scheduleDtailInfo.remind) { if (m_rmindCombox->currentIndex() == 1) { scheduleDtailInfo.remindData.n = DDECalendar::AtTimeOfEvent; } else if (m_rmindCombox->currentIndex() == 2) { scheduleDtailInfo.remindData.n = DDECalendar::FifteenMinutesBefore; } else if (m_rmindCombox->currentIndex() == 3) { scheduleDtailInfo.remindData.n = DDECalendar::ThirtyMinutesBefore; } else if (m_rmindCombox->currentIndex() == 4) { scheduleDtailInfo.remindData.n = DDECalendar::OneHourBefore; } else if (m_rmindCombox->currentIndex() == 5) { scheduleDtailInfo.remindData.n = DDECalendar::OneDayBeforeWithMinutes; } else if (m_rmindCombox->currentIndex() == 6) { scheduleDtailInfo.remindData.n = DDECalendar::TwoDayBeforeWithMinutes; } else if (m_rmindCombox->currentIndex() == 7) { scheduleDtailInfo.remindData.n = DDECalendar::OneWeekBeforeWithMinutes; } } } scheduleDtailInfo.rpeat = m_beginrepeatCombox->currentIndex(); if (scheduleDtailInfo.rpeat != 0) { scheduleDtailInfo.enddata.type = m_endrepeatCombox->currentIndex(); if (m_endrepeatCombox->currentIndex() == 1) { if (m_endrepeattimes->text().isEmpty()) { return; } scheduleDtailInfo.enddata.tcount = m_endrepeattimes->text().toInt(); } else if (m_endrepeatCombox->currentIndex() == 2) { QDateTime endrpeattime = beginDateTime; endrpeattime.setDate(m_endRepeatDate->date()); if (beginDateTime > endrpeattime) { return; } scheduleDtailInfo.enddata.date = endrpeattime; } } CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType( m_typeComBox->currentIndex() + 1, scheduleDtailInfo.type); scheduleDtailInfo.beginDateTime = beginDateTime; scheduleDtailInfo.endDateTime = endDateTime; if (m_type == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->addSchedule( scheduleDtailInfo); } else if (m_type == 0) { if (m_scheduleDtailInfo.rpeat == 0 && m_scheduleDtailInfo.rpeat == scheduleDtailInfo.rpeat) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo( scheduleDtailInfo); } else { if (m_scheduleDtailInfo.allday != scheduleDtailInfo.allday) { CSchceduleCtrlDlg msgBox; msgBox.setText( tr("All occurrences of a repeating event must have the same all-day status.")); msgBox.setInformativeText(tr("Do you want to change all occurrences?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Change All"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->updateScheduleInfo(scheduleDtailInfo); } } else if (m_scheduleDtailInfo.rpeat != scheduleDtailInfo.rpeat) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are changing the repeating rule of this event.")); msgBox.setInformativeText(tr("Do you want to change all occurrences?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Change All"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->updateScheduleInfo(scheduleDtailInfo); } } else { ChangeRecurInfo(this,scheduleDtailInfo,m_scheduleDtailInfo,themetype); } } } accept(); emit signalScheduleUpdate(); } void CSchceduleDlg::slotTextChange() { QTextCursor cursor = m_textEdit->textCursor(); QString textContent = m_textEdit->toPlainText(); int length = textContent.count(); QString tStitlename = textContent; if (tStitlename.contains("\n")) { tStitlename.replace("\n", ""); m_textEdit->setText(tStitlename); cursor.movePosition(QTextCursor::End); m_textEdit->setTextCursor(cursor); return; } int maxLength = 256; // 最大字符数 if (length > maxLength) { m_textEdit->setText(m_context); cursor.movePosition(QTextCursor::End); m_textEdit->setTextCursor(cursor); } m_context = m_textEdit->toPlainText(); } void CSchceduleDlg::slotendrepeatTextchange() { QAbstractButton *m_OkBt = getButton(1); if (m_endrepeattimes->text().isEmpty()) m_OkBt->setEnabled(false); else m_OkBt->setEnabled(true); } void CSchceduleDlg::slotBDateEidtInfo(const QDate &date) { m_beginDateEdit->setDate(date); m_endRepeatDate->setMinimumDate(date); m_endDateEdit->setMinimumDate(date); QDateTime beginDateTime, endDateTime; beginDateTime.setDate(m_beginDateEdit->date()); beginDateTime.setTime(m_beginTimeEdit->getTime()); endDateTime.setDate(m_endDateEdit->date()); endDateTime.setTime(m_endTimeEdit->getTime()); if (endDateTime < beginDateTime) { m_endTimeEdit->setTime(m_beginTimeEdit->getTime().addSecs(3600)); } } void CSchceduleDlg::slotallDayStateChanged(int state) { m_rmindCombox->clear(); if (!state) { m_rmindCombox->addItem(tr("Never")); m_rmindCombox->addItem(tr("At time of event")); m_rmindCombox->addItem(tr("15 minutes before")); m_rmindCombox->addItem(tr("30 minutes before")); m_rmindCombox->addItem(tr("1 hour before")); m_rmindCombox->addItem(tr("1 day before")); m_rmindCombox->addItem(tr("2 days before")); m_rmindCombox->addItem(tr("1 week before")); m_beginTimeEdit->setVisible(true); m_endTimeEdit->setVisible(true); if (m_type == 0) { m_beginDateEdit->setDate(m_scheduleDtailInfo.beginDateTime.date()); m_beginTimeEdit->setTime(m_scheduleDtailInfo.beginDateTime.time()); m_endDateEdit->setDate(m_scheduleDtailInfo.endDateTime.date()); m_endTimeEdit->setTime(m_scheduleDtailInfo.endDateTime.time()); } else { m_beginDateEdit->setDate(m_currentDate.date()); m_beginTimeEdit->setTime(m_currentDate.time()); m_endDateEdit->setDate(m_EndDate.date()); m_endTimeEdit->setTime(m_EndDate.time()); } } else { m_rmindCombox->addItem(tr("Never")); m_rmindCombox->addItem(tr("On start day (9:00 AM)")); m_rmindCombox->addItem(tr("1 day before")); m_rmindCombox->addItem(tr("2 days before")); m_rmindCombox->addItem(tr("1 week before")); m_beginTimeEdit->setVisible(false); m_endTimeEdit->setVisible(false); if (m_type == 0) { m_beginDateEdit->setDate(m_scheduleDtailInfo.beginDateTime.date()); m_beginTimeEdit->setTime(QTime(0, 0)); m_endDateEdit->setDate(m_scheduleDtailInfo.endDateTime.date()); m_endTimeEdit->setTime(QTime(23, 59)); } else { m_beginDateEdit->setDate(m_currentDate.date()); m_endDateEdit->setDate(m_EndDate.date()); m_beginTimeEdit->setTime(QTime(0, 0)); m_endTimeEdit->setTime(QTime(23, 59)); m_rmindCombox->setCurrentIndex(2); } } } void CSchceduleDlg::slotbRpeatactivated(int index) { if (index > 0) { m_endrepeatWidget->setVisible(true); setFixedSize(438, 506); } else { m_endrepeatWidget->setVisible(false); setFixedSize(438, 470); } } void CSchceduleDlg::sloteRpeatactivated(int index) { if (index == 0) { m_endrepeattimesWidget->setVisible(false); m_endRepeatDate->setVisible(false); } else if (index == 1) { m_endrepeattimesWidget->setVisible(true); m_endRepeatDate->setVisible(false); } else { m_endrepeattimesWidget->setVisible(false); m_endRepeatDate->setVisible(true); } } bool CSchceduleDlg::eventFilter(QObject *obj, QEvent *pEvent) { if (obj == m_textEdit) { if (pEvent->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(pEvent); if (keyEvent->key() == Qt::Key_Return || keyEvent->key() == Qt::Key_Enter) { return true; } if (keyEvent->key() == Qt::Key_Tab) return true; } if (m_type == 1) { if (pEvent->type() == QEvent::FocusIn) { //清空编辑框默认占位符 m_textEdit->setPlaceholderText(""); } else if (pEvent->type() == QEvent::FocusOut) { //设置编辑框默认占位符 m_textEdit->setPlaceholderText(tr("New event")); } } } return QDialog::eventFilter(obj, pEvent); } void CSchceduleDlg::showEvent(QShowEvent *event) { Q_UNUSED(event); emit signalViewtransparentFrame(1); } void CSchceduleDlg::changeEvent(QEvent *event) { Q_UNUSED(event); QFont mlabelF; mlabelF.setWeight(QFont::Medium); QFontMetrics fontWidth_typeLabel(mlabelF); QString str_typelabel = fontWidth_typeLabel.elidedText(tr("Type:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_typeLabel->setText(str_typelabel); QFontMetrics fontWidth_contentlabel(mlabelF); QString str_contentlabel = fontWidth_contentlabel.elidedText(tr("Description:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_contentLabel->setText(str_contentlabel); QFontMetrics fontWidth_allDayLabel(mlabelF); QString str_allDayLabel = fontWidth_allDayLabel.elidedText(tr("All Day:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_adllDayLabel->setText(str_allDayLabel); QFontMetrics fontWidth_beginTimeLabel(mlabelF); QString str_beginTimeLabel = fontWidth_beginTimeLabel.elidedText(tr("Starts:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_beginTimeLabel->setText(str_beginTimeLabel); QFontMetrics fontWidth_endTimeLabel(mlabelF); QString str_endTimeLabel = fontWidth_endTimeLabel.elidedText(tr("Ends:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_endTimeLabel->setText(str_endTimeLabel); QFontMetrics fontWidth_remindSetLabel(mlabelF); QString str_remindSetLabel = fontWidth_remindSetLabel.elidedText(tr("Remind Me:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_remindSetLabel->setText(str_remindSetLabel); QFontMetrics fontWidth_beginRepeatLabel(mlabelF); QString str_beginRepeatLabel = fontWidth_beginRepeatLabel.elidedText(tr("Repeat:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_beginrepeatLabel->setText(str_beginRepeatLabel); QFontMetrics fontWidth_endrepeatLabel(mlabelF); QString str_endrepeatLabel = fontWidth_endrepeatLabel.elidedText(tr("End Repeat:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_endrepeatLabel->setText(str_endrepeatLabel); } void CSchceduleDlg::initUI() { //设置对象名称和辅助显示名称 this->setObjectName("ScheduleEditDialog"); this->setAccessibleName("ScheduleEditDialog"); //在点击任何对话框上的按钮后不关闭对话框,保证关闭子窗口时不被一起关掉 setOnButtonClickedClose(false); m_titleLabel = new QLabel(this); QFont titlelabelF; titlelabelF.setWeight(QFont::DemiBold); titlelabelF.setPixelSize(17); m_titleLabel->setFixedSize(148, 51); m_titleLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); m_titleLabel->move(145, 0); m_titleLabel->setFont(titlelabelF); setSpacing(0); QFont mlabelF; mlabelF.setWeight(QFont::Medium); QVBoxLayout *maintlayout = new QVBoxLayout; maintlayout->setMargin(0); maintlayout->setSpacing(10); QHBoxLayout *typelayout = new QHBoxLayout; typelayout->setSpacing(0); typelayout->setMargin(0); m_typeLabel = new QLabel(); m_typeLabel->setToolTip(tr("Type")); DFontSizeManager::instance()->bind(m_typeLabel,DFontSizeManager::T6); QFontMetrics fontWidth_typeLabel(mlabelF); QString str_typelabel = fontWidth_typeLabel.elidedText(tr("Type:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_typeLabel->setText(str_typelabel); m_typeLabel->setFont(mlabelF); m_typeLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_typeLabel->setFixedSize(78, 36); m_typeComBox = new DComboBox(); //设置对象名称和辅助显示名称 m_typeComBox->setObjectName("ScheduleTypeCombobox"); m_typeComBox->setAccessibleName("ScheduleTypeCombobox"); m_typeComBox->setFixedSize(319, 36); m_typeComBox->setIconSize(QSize(24,24)); m_typeComBox->insertItem(0, QIcon(DHiDPIHelper::loadNxPixmap(":/resources/icon/icon_type_work.svg") .scaled(QSize(24, 24) * devicePixelRatioF())), tr("Work")); m_typeComBox->insertItem(1, QIcon(DHiDPIHelper::loadNxPixmap(":/resources/icon/icon_type_life.svg") .scaled(QSize(24, 24) * devicePixelRatioF())), tr("Life")); m_typeComBox->insertItem( 2, QIcon(DHiDPIHelper::loadNxPixmap(":/resources/icon/icon_type_other.svg") .scaled(QSize(24, 24) * devicePixelRatioF())), tr("Other")); typelayout->addWidget(m_typeLabel); typelayout->addWidget(m_typeComBox); maintlayout->addLayout(typelayout); QHBoxLayout *contentLabellayout = new QHBoxLayout; contentLabellayout->setSpacing(0); contentLabellayout->setMargin(0); QVBoxLayout *conttelabellayout = new QVBoxLayout; conttelabellayout->setSpacing(0); conttelabellayout->setMargin(0); m_contentLabel = new QLabel(); DFontSizeManager::instance()->bind(m_contentLabel,DFontSizeManager::T6); QFontMetrics fontWidth_contentlabel(mlabelF); QString str_contentlabel = fontWidth_contentlabel.elidedText(tr("Description:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_contentLabel->setText(str_contentlabel); m_contentLabel->setFont(mlabelF); m_contentLabel->setToolTip(tr("Description")); m_contentLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_contentLabel->setFixedWidth(78); conttelabellayout->addWidget(m_contentLabel); conttelabellayout->addStretch(); m_textEdit = new DTextEdit(this); //设置对象名称和辅助显示名称 m_textEdit->setObjectName("ScheduleTitleEdit"); m_textEdit->setAccessibleName("ScheduleTitleEdit"); m_textEdit->setFixedSize(319, 86); m_textEdit->setAcceptRichText(false); m_textEdit->setPlaceholderText(tr("New Event")); //设置关联控件,用于QTextEdit控件捕获MouseButtonPress等事件 QWidget *mpContentWidget = m_textEdit->viewport(); //设置事件过滤器 m_textEdit->installEventFilter(this); mpContentWidget->installEventFilter(this); contentLabellayout->addLayout(conttelabellayout); contentLabellayout->addWidget(m_textEdit); maintlayout->addLayout(contentLabellayout); QHBoxLayout *alldayLabellayout = new QHBoxLayout; alldayLabellayout->setSpacing(0); alldayLabellayout->setMargin(0); m_adllDayLabel = new QLabel(); m_adllDayLabel->setToolTip(tr("All Day")); DFontSizeManager::instance()->bind(m_adllDayLabel,DFontSizeManager::T6); QFontMetrics fontWidth_allDayLabel(mlabelF); QString str_allDayLabel = fontWidth_allDayLabel.elidedText(tr("All Day:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_adllDayLabel->setText(str_allDayLabel); m_adllDayLabel->setFont(mlabelF); m_adllDayLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_adllDayLabel->setFixedWidth(78); m_allDayCheckbox = new DCheckBox(this); //设置对象名称和辅助显示名称 m_allDayCheckbox->setObjectName("AllDayCheckBox"); m_allDayCheckbox->setAccessibleName("AllDayCheckBox"); alldayLabellayout->addWidget(m_adllDayLabel); alldayLabellayout->addWidget(m_allDayCheckbox); maintlayout->addLayout(alldayLabellayout); QHBoxLayout *beginLabellayout = new QHBoxLayout; beginLabellayout->setSpacing(0); beginLabellayout->setMargin(0); m_beginTimeLabel = new QLabel(); m_beginTimeLabel->setToolTip(tr("Starts")); DFontSizeManager::instance()->bind(m_beginTimeLabel,DFontSizeManager::T6); QFontMetrics fontWidth_beginTimeLabel(mlabelF); QString str_beginTimeLabel = fontWidth_beginTimeLabel.elidedText(tr("Starts:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_beginTimeLabel->setText(str_beginTimeLabel); m_beginTimeLabel->setFont(mlabelF); m_beginTimeLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_beginTimeLabel->setFixedSize(78, 36); m_beginDateEdit = new QDateEdit(this); //设置对象名称和辅助显示名称 m_beginDateEdit->setObjectName("ScheduleBeginDateEdit"); m_beginDateEdit->setAccessibleName("ScheduleBeginDateEdit"); m_beginDateEdit->setFixedSize(175, 36); m_beginTimeEdit = new CTimeEdit(this); //设置对象名称和辅助显示名称 m_beginTimeEdit->setObjectName("ScheduleBeginTimeEdit"); m_beginTimeEdit->setAccessibleName("ScheduleBeginTimeEdit"); m_beginTimeEdit->setFixedSize(141, 36); m_beginDateEdit->setCalendarPopup(true); m_beginDateEdit->setDisplayFormat("yyyy-MM-dd"); beginLabellayout->addWidget(m_beginTimeLabel); beginLabellayout->addWidget(m_beginDateEdit); beginLabellayout->addSpacing(8); beginLabellayout->addWidget(m_beginTimeEdit); beginLabellayout->addStretch(); maintlayout->addLayout(beginLabellayout); QHBoxLayout *enQLabellayout = new QHBoxLayout; enQLabellayout->setSpacing(0); enQLabellayout->setMargin(0); m_endTimeLabel = new QLabel(); m_endTimeLabel->setToolTip(tr("Ends")); DFontSizeManager::instance()->bind(m_endTimeLabel,DFontSizeManager::T6); QFontMetrics fontWidth_endTimeLabel(mlabelF); QString str_endTimeLabel = fontWidth_endTimeLabel.elidedText(tr("Ends:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_endTimeLabel->setText(str_endTimeLabel); m_endTimeLabel->setFont(mlabelF); m_endTimeLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_endTimeLabel->setFixedSize(78, 36); m_endDateEdit = new QDateEdit(this); //设置对象名称和辅助显示名称 m_endDateEdit->setObjectName("ScheduleEndDateEdit"); m_endDateEdit->setAccessibleName("ScheduleEndDateEdit"); m_endDateEdit->setFixedSize(175, 36); m_endTimeEdit = new CTimeEdit(this); //设置对象名称和辅助显示名称 m_endTimeEdit->setObjectName("ScheduleEndTimeEdit"); m_endTimeEdit->setAccessibleName("ScheduleEndTimeEdit"); m_endTimeEdit->setFixedSize(141, 36); m_endDateEdit->setCalendarPopup(true); m_endDateEdit->setDisplayFormat("yyyy-MM-dd"); enQLabellayout->addWidget(m_endTimeLabel); enQLabellayout->addWidget(m_endDateEdit); enQLabellayout->addSpacing(8); enQLabellayout->addWidget(m_endTimeEdit); enQLabellayout->addStretch(); maintlayout->addLayout(enQLabellayout); QHBoxLayout *rminQLabellayout = new QHBoxLayout; rminQLabellayout->setSpacing(0); rminQLabellayout->setMargin(0); m_remindSetLabel = new QLabel(); DFontSizeManager::instance()->bind(m_remindSetLabel,DFontSizeManager::T6); QFontMetrics fontWidth_remindSetLabel(mlabelF); QString str_remindSetLabel = fontWidth_remindSetLabel.elidedText(tr("Remind Me:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_remindSetLabel->setToolTip(tr("Remind Me")); m_remindSetLabel->setText(str_remindSetLabel); m_remindSetLabel->setFont(mlabelF); m_remindSetLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_remindSetLabel->setFixedWidth(78); m_rmindCombox = new DComboBox(); //设置对象名称和辅助显示名称 m_rmindCombox->setObjectName("RmindComboBox"); m_rmindCombox->setAccessibleName("RmindComboBox"); m_rmindCombox->setFixedSize(175, 36); m_rmindCombox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); rminQLabellayout->addWidget(m_remindSetLabel); rminQLabellayout->addWidget(m_rmindCombox); rminQLabellayout->addStretch(); maintlayout->addLayout(rminQLabellayout); QHBoxLayout *repeatLabellayout = new QHBoxLayout; repeatLabellayout->setSpacing(0); repeatLabellayout->setMargin(0); m_beginrepeatLabel = new QLabel(); m_beginrepeatLabel->setToolTip(tr("Repeat")); DFontSizeManager::instance()->bind(m_beginrepeatLabel,DFontSizeManager::T6); QFontMetrics fontWidth_beginRepeatLabel(mlabelF); QString str_beginRepeatLabel = fontWidth_beginRepeatLabel.elidedText(tr("Repeat:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_beginrepeatLabel->setText(str_beginRepeatLabel); m_beginrepeatLabel->setFont(mlabelF); m_beginrepeatLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_beginrepeatLabel->setFixedWidth(78); m_beginrepeatCombox = new DComboBox(); //设置对象名称和辅助显示名称 m_beginrepeatCombox->setObjectName("BeginRepeatComboBox"); m_beginrepeatCombox->setAccessibleName("BeginRepeatComboBox"); m_beginrepeatCombox->setFixedSize(175, 36); m_beginrepeatCombox->addItem(tr("Never")); m_beginrepeatCombox->addItem(tr("Daily")); m_beginrepeatCombox->addItem(tr("Weekdays")); m_beginrepeatCombox->addItem(tr("Weekly")); m_beginrepeatCombox->addItem(tr("Monthly")); m_beginrepeatCombox->addItem(tr("Yearly")); repeatLabellayout->addWidget(m_beginrepeatLabel); repeatLabellayout->addWidget(m_beginrepeatCombox); repeatLabellayout->addStretch(); maintlayout->addLayout(repeatLabellayout); QHBoxLayout *endrepeatLabellayout = new QHBoxLayout; endrepeatLabellayout->setSpacing(0); endrepeatLabellayout->setMargin(0); m_endrepeatLabel = new QLabel(); DFontSizeManager::instance()->bind(m_endrepeatLabel,DFontSizeManager::T6); QFontMetrics fontWidth_endrepeatLabel(mlabelF); QString str_endrepeatLabel = fontWidth_endrepeatLabel.elidedText(tr("End Repeat:"), Qt::ElideRight, DDECalendar::NewSchceduleLabelWidth); m_endrepeatLabel->setToolTip(tr("End Repeat")); m_endrepeatLabel->setText(str_endrepeatLabel); m_endrepeatLabel->setFont(mlabelF); m_endrepeatLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); m_endrepeatLabel->setFixedWidth(78); m_endrepeatCombox = new DComboBox(); //设置对象名称和辅助显示名称 m_endrepeatCombox->setObjectName("EndRepeatComboBox"); m_endrepeatCombox->setAccessibleName("EndRepeatComboBox"); m_endrepeatCombox->setFixedSize(175, 36); m_endrepeatCombox->addItem(tr("Never")); m_endrepeatCombox->addItem(tr("After")); m_endrepeatCombox->addItem(tr("On")); endrepeatLabellayout->addWidget(m_endrepeatLabel); endrepeatLabellayout->addWidget(m_endrepeatCombox); endrepeatLabellayout->addSpacing(8); QHBoxLayout *endrepeattimeslayout = new QHBoxLayout; endrepeattimeslayout->setSpacing(0); endrepeattimeslayout->setMargin(0); endrepeattimeslayout->setContentsMargins(10, 0, 0, 0); m_endrepeattimes = new DLineEdit(this); //设置对象名称和辅助显示名称 m_endrepeattimes->setObjectName("EndRepeatTimeEidt"); m_endrepeattimes->setAccessibleName("EndRepeatTimeEidt"); m_endrepeattimes->setFixedSize(71, 36); m_endrepeattimes->setText(QString::number(10)); m_endrepeattimes->setClearButtonEnabled(false); QRegExp rx("^[1-9]\\d{0,2}$"); QValidator *validator = new QRegExpValidator(rx, this); m_endrepeattimes->lineEdit()->setValidator(validator); m_endrepeattimesLabel = new QLabel(tr("time(s)")); m_endrepeattimesLabel->setFont(mlabelF); m_endrepeattimesLabel->setFixedHeight(36); endrepeattimeslayout->addWidget(m_endrepeattimes); endrepeattimeslayout->addWidget(m_endrepeattimesLabel); m_endrepeattimesWidget = new DWidget; //设置对象名称和辅助显示名称 m_endrepeattimesWidget->setObjectName("EndRepeatTimeWidget"); m_endrepeattimesWidget->setAccessibleName("EndRepeatTimeWidget"); m_endrepeattimesWidget->setLayout(endrepeattimeslayout); m_endrepeattimesWidget->setVisible(false); endrepeatLabellayout->addWidget(m_endrepeattimesWidget); m_endRepeatDate = new DDateEdit; //设置对象名称和辅助显示名称 m_endRepeatDate->setObjectName("EndRepeatDateEdit"); m_endRepeatDate->setAccessibleName("EndRepeatDateEdit"); m_endRepeatDate->setCalendarPopup(true); m_endRepeatDate->setFixedSize(141, 36); m_endRepeatDate->setDate(QDate::currentDate()); m_endRepeatDate->setDisplayFormat("yyyy-MM-dd"); m_endRepeatDate->setCurrentSectionIndex(2); QFont enddatefont; enddatefont.setWeight(QFont::Medium); m_endRepeatDate->setFont(enddatefont); endrepeatLabellayout->addWidget(m_endRepeatDate); endrepeatLabellayout->addStretch(); m_endRepeatDate->setVisible(false); m_endrepeatWidget = new DWidget; //设置对象名称和辅助显示名称 m_endrepeatWidget->setObjectName("EndRepeatDateWidget"); m_endrepeatWidget->setAccessibleName("EndRepeatDateWidget"); m_endrepeatWidget->setLayout(endrepeatLabellayout); maintlayout->addWidget(m_endrepeatWidget); m_endrepeatWidget->setVisible(false); addButton(tr("Cancel")); addButton(tr("Save"), false, DDialog::ButtonRecommend); for (int i = 0; i < buttonCount(); i++) { QAbstractButton *button = getButton(i); button->setFixedSize(189, 36); } m_gwi = new DFrame(this); m_gwi->setFrameShape(QFrame::NoFrame); m_gwi->setLayout(maintlayout); DPalette anipa = m_gwi->palette(); QColor color = "#F8F8F8"; color.setAlphaF(0.0); anipa.setColor(DPalette::Background, color); addContent(m_gwi, Qt::AlignCenter); initDateEdit(); if (m_type == 1) slotallDayStateChanged(0); setFocus(); } void CSchceduleDlg::initConnection() { QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CSchceduleDlg::setTheMe); connect(this, &DDialog::buttonClicked, this, &CSchceduleDlg::slotCancelBt); connect(this, &DDialog::buttonClicked, this, &CSchceduleDlg::slotOkBt); connect(m_textEdit, &DTextEdit::textChanged, this, &CSchceduleDlg::slotTextChange); connect(m_endrepeattimes,&DLineEdit::textChanged, this, &CSchceduleDlg::slotendrepeatTextchange); connect(m_allDayCheckbox, &DCheckBox::stateChanged, this, &CSchceduleDlg::slotallDayStateChanged); connect(m_beginrepeatCombox, QOverload::of(&QComboBox::activated), this, &CSchceduleDlg::slotbRpeatactivated); connect(m_endrepeatCombox, QOverload::of(&QComboBox::activated), this, &CSchceduleDlg::sloteRpeatactivated); connect(m_beginDateEdit, &DDateEdit::userDateChanged, this, &CSchceduleDlg::slotBDateEidtInfo); QShortcut *shortcut = new QShortcut(this); shortcut->setKey(QKeySequence(QLatin1String("ESC"))); connect(shortcut, SIGNAL(activated()), this, SLOT(close())); } void CSchceduleDlg::initDateEdit() { m_beginDateEdit->setMinimumDate(QDate(DDECalendar::QueryEarliestYear, 1, 1)); // 0天 m_beginDateEdit->setMaximumDate(QDate(DDECalendar::QueryLatestYear, 12, 31)); m_endDateEdit->setMinimumDate(QDate(DDECalendar::QueryEarliestYear, 1, 1)); // 0天 m_endDateEdit->setMaximumDate(QDate(DDECalendar::QueryLatestYear, 12, 31)); return; } void CSchceduleDlg::initRmindRpeatUI() { if (m_scheduleDtailInfo.allday) { if (m_scheduleDtailInfo.remind) { if (m_scheduleDtailInfo.remindData.n == DDECalendar::OnStartDay) { m_rmindCombox->setCurrentIndex(1); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::OneDayBeforeWithDay) { m_rmindCombox->setCurrentIndex(2); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::TwoDayBeforeWithDay) { m_rmindCombox->setCurrentIndex(3); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::OneWeekBeforeWithDay) { m_rmindCombox->setCurrentIndex(4); } } else { m_rmindCombox->setCurrentIndex(0); } } else { if (m_scheduleDtailInfo.remind) { if (m_scheduleDtailInfo.remindData.n == DDECalendar::AtTimeOfEvent) { m_rmindCombox->setCurrentIndex(1); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::FifteenMinutesBefore) { m_rmindCombox->setCurrentIndex(2); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::ThirtyMinutesBefore) { m_rmindCombox->setCurrentIndex(3); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::OneHourBefore) { m_rmindCombox->setCurrentIndex(4); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::OneDayBeforeWithMinutes) { m_rmindCombox->setCurrentIndex(5); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::TwoDayBeforeWithMinutes) { m_rmindCombox->setCurrentIndex(6); } else if (m_scheduleDtailInfo.remindData.n == DDECalendar::OneWeekBeforeWithMinutes) { m_rmindCombox->setCurrentIndex(7); } } else { m_rmindCombox->setCurrentIndex(0); } } slotbRpeatactivated(m_scheduleDtailInfo.rpeat); m_beginrepeatCombox->setCurrentIndex(m_scheduleDtailInfo.rpeat); if (m_scheduleDtailInfo.rpeat != 0) { if (m_scheduleDtailInfo.enddata.type == 0) { m_endrepeatCombox->setCurrentIndex(0); } else if (m_scheduleDtailInfo.enddata.type == 1) { m_endrepeatCombox->setCurrentIndex(1); m_endrepeattimes->setText(QString::number(m_scheduleDtailInfo.enddata.tcount)); } else if (m_scheduleDtailInfo.enddata.type == 2) { m_endrepeatCombox->setCurrentIndex(2); m_endRepeatDate->setDate(m_scheduleDtailInfo.enddata.date.date()); } m_endrepeatWidget->show(); sloteRpeatactivated(m_scheduleDtailInfo.enddata.type); } else { m_endrepeatWidget->hide(); } } void CSchceduleDlg::setTheMe(const int type) { //日程标题编辑框文字颜色 QColor titleColor; if (type == 2) { titleColor = "#C0C6D4"; } else { titleColor = "#414D68"; } DPalette pa = m_textEdit->palette(); //设置颜色 pa.setColor(DPalette::Text,titleColor); m_textEdit->setPalette(pa); } void CSchceduleDlg::ChangeRecurInfo(QWidget *parent, const ScheduleDtailInfo &newinfo, const ScheduleDtailInfo &oldinfo, int m_themetype) { Q_UNUSED(m_themetype); Q_UNUSED(parent); if (newinfo.RecurID == 0) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are changing a repeating event.")); msgBox.setInformativeText( tr("Do you want to change only this occurrence of the event, or all " "occurrences?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("All")); msgBox.addsuggestButton(tr("Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo scheduleDtailInfo = newinfo; if (scheduleDtailInfo.enddata.type ==1 &&scheduleDtailInfo.enddata.tcount<1) { scheduleDtailInfo.enddata.type =0; } else if (scheduleDtailInfo.enddata.type ==2 && scheduleDtailInfo.beginDateTime.daysTo( scheduleDtailInfo.enddata.date)<0) { scheduleDtailInfo.enddata.type =0; scheduleDtailInfo.rpeat = 0; } CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->updateScheduleInfo(scheduleDtailInfo); } else if (msgBox.clickButton() == 2) { ChangeOnlyInfo(newinfo,oldinfo); } } else { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are changing a repeating event.")); msgBox.setInformativeText( tr("Do you want to change only this occurrence of the event, or this and " "all future occurrences?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("All Future Events")); msgBox.addsuggestButton(tr("Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo newschedule = newinfo; newschedule.RecurID = 0; newschedule.id = 0; if (newschedule.enddata.type ==1) { newschedule.enddata.tcount = qAbs(newinfo.enddata.tcount - newinfo.RecurID); if (newschedule.enddata.tcount <1) { newschedule.enddata.type =0; newschedule.rpeat = 0; } } CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->addSchedule(newschedule); ScheduleDtailInfo updatescheduleData; CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->getScheduleInfoById(oldinfo.id, updatescheduleData); if (updatescheduleData.enddata.type == 1) { updatescheduleData.enddata.tcount = newinfo.RecurID -1; if (updatescheduleData.enddata.tcount <1) { updatescheduleData.enddata.type =0; updatescheduleData.rpeat = 0; } } else { //如果结束类型为永不或结束于日期 updatescheduleData.enddata.type = 2; updatescheduleData.enddata.date = oldinfo.beginDateTime.addDays(-1); } CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->updateScheduleInfo(updatescheduleData); } else if (msgBox.clickButton() == 2) { ChangeOnlyInfo(newinfo,oldinfo); } } } void CSchceduleDlg::ChangeOnlyInfo(const ScheduleDtailInfo &newinfo, const ScheduleDtailInfo &oldinfo) { ScheduleDtailInfo newschedule = newinfo; newschedule.rpeat = 0; newschedule.RecurID = 0; newschedule.id = 0; newschedule.ignore.clear(); CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->addSchedule(newschedule); ScheduleDtailInfo updatescheduleData; CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->getScheduleInfoById(oldinfo.id, updatescheduleData); updatescheduleData.ignore.append(oldinfo.beginDateTime); CScheduleDataManage::getScheduleDataManage() ->getscheduleDataCtrl() ->updateScheduleInfo(updatescheduleData); } dde-calendar-5.7.0.23/src/dialog/schceduledlg.h000066400000000000000000000076761375021633200211200ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHCEDULEDLG_H #define SCHCEDULEDLG_H #include "schedulestructs.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CTimeEdit; class CSchceduleDlg : public DDialog { Q_OBJECT public: CSchceduleDlg(int type, QWidget *parent = nullptr, const bool isAllDay = true); ~CSchceduleDlg() override; void setData(const ScheduleDtailInfo &info); void setDate(const QDateTime &date); ScheduleDtailInfo getScheduleData(); void setAllDay(bool flag); signals: void signalViewtransparentFrame(int type); void signalScheduleUpdate(int id = 0); public slots: void slotCancelBt(int buttonIndex, QString buttonName); void slotOkBt(int buttonIndex, QString buttonName); void slotTextChange(); void slotendrepeatTextchange(); void slotBDateEidtInfo(const QDate &date); void slotallDayStateChanged(int state); void slotbRpeatactivated(int index); void sloteRpeatactivated(int index); protected: bool eventFilter(QObject *obj, QEvent *pEvent) override; void showEvent(QShowEvent *event) override; void changeEvent(QEvent *event) override; private: void initUI(); void initConnection(); void initDateEdit(); void initRmindRpeatUI(); /** * @brief setTheMe 根据主题type设置颜色 * @param type 主题type */ void setTheMe(const int type); public: static void ChangeRecurInfo(QWidget *parent,const ScheduleDtailInfo &newinfo, const ScheduleDtailInfo &oldinfo,int m_themetype); static void ChangeOnlyInfo(const ScheduleDtailInfo &newinfo, const ScheduleDtailInfo &oldinfo); private: QLabel *m_typeLabel = nullptr; DComboBox *m_typeComBox = nullptr; QLabel *m_contentLabel = nullptr; DTextEdit *m_textEdit = nullptr; QLabel *m_beginTimeLabel = nullptr; DDateEdit *m_beginDateEdit = nullptr; CTimeEdit *m_beginTimeEdit = nullptr; QLabel *m_endTimeLabel = nullptr; DDateEdit *m_endDateEdit = nullptr; CTimeEdit *m_endTimeEdit = nullptr; QLabel *m_adllDayLabel = nullptr; DCheckBox *m_allDayCheckbox = nullptr; QLabel *m_remindSetLabel = nullptr; DComboBox *m_rmindCombox = nullptr; QLabel *m_beginrepeatLabel = nullptr; DComboBox *m_beginrepeatCombox = nullptr; QLabel *m_endrepeatLabel = nullptr; DComboBox *m_endrepeatCombox = nullptr; DLineEdit *m_endrepeattimes = nullptr; QLabel *m_endrepeattimesLabel = nullptr; DWidget *m_endrepeattimesWidget; DDateEdit *m_endRepeatDate = nullptr; DWidget *m_endrepeatWidget = nullptr; DFrame *m_gwi = nullptr; QLabel *m_titleLabel = nullptr; QString m_context; const bool m_createAllDay; private: //日程 ScheduleDtailInfo m_scheduleDtailInfo; int m_type; // 1新建 0 编辑日程 QDateTime m_currentDate; QDateTime m_EndDate; }; #endif // SHCEDULEDLG_H dde-calendar-5.7.0.23/src/main.cpp000066400000000000000000000145441375021633200165020ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "environments.h" #include "calendarmainwindow.h" #include "exportedinterface.h" #include "configsettings.h" #include "accessible/accessible.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE DCORE_USE_NAMESPACE /**********************复制部分**************************/ static QString g_appPath;//全局路径 /**********************复制部分**************************/ /**********************复制部分**************************/ //获取配置文件主题类型,并重新设置 DGuiApplicationHelper::ColorType getThemeTypeSetting() { //需要找到自己程序的配置文件路径,并读取配置,这里只是用home路径下themeType.cfg文件举例,具体配置文件根据自身项目情况 QString t_appDir = g_appPath + QDir::separator() + "themetype.cfg"; QFile t_configFile(t_appDir); t_configFile.open(QIODevice::ReadOnly | QIODevice::Text); QByteArray t_readBuf = t_configFile.readAll(); int t_readType = QString(t_readBuf).toInt(); //获取读到的主题类型,并返回设置 switch (t_readType) { case 0: // 跟随系统主题 return DGuiApplicationHelper::UnknownType; case 1: // 浅色主题 return DGuiApplicationHelper::LightType; case 2: // 深色主题 return DGuiApplicationHelper::DarkType; default: // 跟随系统主题 return DGuiApplicationHelper::UnknownType; } } /**********************复制部分**************************/ /**********************复制部分**************************/ //保存当前主题类型配置文件 void saveThemeTypeSetting(int type) { //需要找到自己程序的配置文件路径,并写入配置,这里只是用home路径下themeType.cfg文件举例,具体配置文件根据自身项目情况 QString t_appDir = g_appPath + QDir::separator() + "themetype.cfg"; QFile t_configFile(t_appDir); t_configFile.open(QIODevice::WriteOnly | QIODevice::Text); //直接将主题类型保存到配置文件,具体配置key-value组合根据自身项目情况 QString t_typeStr = QString::number(type); t_configFile.write(t_typeStr.toUtf8()); t_configFile.close(); } QString GetStyleSheetContent() { QFile file(":/resources/dde-calendar.qss"); bool result = file.open(QFile::ReadOnly); if (result) { QString content(file.readAll()); file.close(); return content; } else { return ""; } } #include "schedulesdbus.h" int main(int argc, char *argv[]) { QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //适配deepin-turbo启动加速 DApplication *app = nullptr; #if(DTK_VERSION < DTK_VERSION_CHECK(5,4,0,0)) app = new DApplication(argc,argv); #else app = DApplication::globalApplication(argc,argv); #endif QAccessible::installFactory(accessibleFactory); g_appPath = QDir::homePath() + QDir::separator() + "." + qApp->applicationName(); QDir t_appDir; t_appDir.mkpath(g_appPath); app->setOrganizationName("deepin"); app->setApplicationName("dde-calendar"); app->loadTranslator(); app->setApplicationVersion(VERSION); // meta information that necessary to create the about dialog. app->setProductName(QApplication::translate("CalendarWindow", "Calendar")); QIcon t_icon = QIcon::fromTheme("dde-calendar"); app->setProductIcon(t_icon); app->setApplicationDescription(QApplication::translate("CalendarWindow", "Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. ")); app->setApplicationAcknowledgementPage("https://www.deepin.org/acknowledgments/dde-calendar"); DGuiApplicationHelper::setSingleInstanceInterval(-1); if (!DGuiApplicationHelper::instance()->setSingleInstance( app->applicationName(), DGuiApplicationHelper::UserScope)) { qDebug() << "there's an dde-calendar instance running."; QProcess::execute("dbus-send --print-reply --dest=com.deepin.Calendar " "/com/deepin/Calendar com.deepin.Calendar.RaiseWindow"); return 0; } app->setAutoActivateWindows(true); CConfigSettings::init(); // set theme bool isOk = false; int viewtype = CConfigSettings::value("base.view").toInt(&isOk); if (!isOk) viewtype = 2; DLogManager::registerConsoleAppender(); DLogManager::registerFileAppender(); // 应用已保存的主题设置 DGuiApplicationHelper::instance()->setPaletteType(getThemeTypeSetting()); Calendarmainwindow ww; ExportedInterface einterface(&ww); einterface.registerAction("CREATE", "create a new schedule"); einterface.registerAction("VIEW", "check a date on calendar"); einterface.registerAction("QUERY", "find a schedule information"); einterface.registerAction("CANCEL", "cancel a schedule"); QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.registerService("com.deepin.Calendar"); dbus.registerObject("/com/deepin/Calendar", &ww); ww.slotTheme(getThemeTypeSetting()); ww.viewWindow(viewtype, QDateTime::currentDateTime()); ww.show(); //监听当前应用主题切换事件 QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::paletteTypeChanged, [] (DGuiApplicationHelper::ColorType type) { qDebug() << type; // 保存程序的主题设置 type : 0,系统主题, 1,浅色主题, 2,深色主题 saveThemeTypeSetting(type); DGuiApplicationHelper::instance()->setPaletteType(type); }); return app->exec(); } dde-calendar-5.7.0.23/src/schedulestructs.h000077500000000000000000000126341375021633200204500ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULESTURCTS_H #define SCHEDULESTURCTS_H #include #include #include #include typedef struct _tagScheduleInfo { int id; QDateTime beginDateTime; QDateTime endDateTime; QString titleName; QString description; int remind; //0 当天 1 一天前 2 三天前 3 一周前 int repeat; //0 一次 1每天 2 每周 3每月 4每年 char allday; //1全天 int infotype; //0工作 1 生活 2其他 } ScheduleInfo; typedef struct _tagScheduleRemindInfo { int id; QDateTime remindDateTime; int times; _tagScheduleRemindInfo() { times = 1; } } ScheduleRemindInfo; typedef struct _tagScheduleRemindData { int n; //全天代表天数 非全天代表分钟 QTime time; //全天该变量才有效 } ScheduleRemindData; typedef struct _tagScheduleEndRepeatData { int type; //0 永不 1 多少次结束 2 结束日期 QDateTime date; //为2时才有效 int tcount;//1时有效 } ScheduleEndRepeatData; typedef struct _tagScheduleType { QString typeName; //work life other QColor color; //颜色 int ID; } ScheduleType; typedef struct _tagScheduleDtailInfo { int id; QDateTime beginDateTime; QDateTime endDateTime; QVector ignore; QString titleName; QString description; bool allday; //1全天 ScheduleType type; //1工作 2 生活 3其他 int RecurID; //0 代表原始 大于0 代表克隆 bool remind; //0无 1 提醒 ScheduleRemindData remindData; int rpeat; //0 无 1 每天 2 每个工作日 3 每周 4每月 5每年 ScheduleEndRepeatData enddata; bool IsMoveInfo = false; //只在拖拽使用 explicit _tagScheduleDtailInfo() { type.ID = -1; } bool operator ==(const _tagScheduleDtailInfo &info)const { if (info.type.ID ==4) { return this->id == info.id &&this->RecurID == info.RecurID && titleName == info.titleName && beginDateTime ==info.beginDateTime; } else { return this->id == info.id &&this->RecurID == info.RecurID && titleName == info.titleName; } } bool operator <(const _tagScheduleDtailInfo &info)const { if (beginDateTime.date() != endDateTime.date() && info.beginDateTime.date() == info.endDateTime.date()) { return true; } else if (beginDateTime.date() == endDateTime.date() && info.beginDateTime.date() != info.endDateTime.date()) { return false; } else if (beginDateTime.date() != endDateTime.date() && info.beginDateTime.date() != info.endDateTime.date()) { if (beginDateTime.date() == info.beginDateTime.date()) { return beginDateTime.daysTo(endDateTime) > info.beginDateTime.daysTo(info.endDateTime); } return beginDateTime.date() < info.beginDateTime.date(); } else { if (type.ID == 4) return true; if (info.type.ID == 4) return false; if (beginDateTime == info.beginDateTime) { if (titleName == info.titleName) { return id vData; } ScheduleDateRangeInfo; typedef struct _tagMScheduleDateRangeInfo { QDate bdate; QDate edate; bool state; int num; ScheduleDtailInfo tData; bool operator <(const _tagMScheduleDateRangeInfo &info)const { if (bdate == info.bdate) { if (bdate.daysTo(edate)==info.bdate.daysTo(info.edate)) { return tDatainfo.bdate.daysTo(info.edate); } } else { return bdate * * 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 * 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 "shortcut.h" Shortcut::Shortcut(QObject *parent) : QObject(parent) { ShortcutGroup group1; ShortcutGroup group2; ShortcutGroup group3; ShortcutGroup group4; group1.groupName = ""; group1.groupItems << ShortcutItem(tr("Help"), "F1") << ShortcutItem(tr("Delete event"), "Delete"); group2.groupName = ""; group2.groupItems << ShortcutItem(tr("Copy"), "Ctrl+C") << ShortcutItem(tr("Cut"), "Ctrl+X") << ShortcutItem(tr("Paste"), "Ctrl+V") ; group3.groupName = ""; group3.groupItems << ShortcutItem(tr("Delete"), "Delete") << ShortcutItem(tr("Select all"), "Ctrl+A"); m_shortcutGroups << group1 << group2 << group3; //convert to json object QJsonArray jsonGroups; for (auto scg : m_shortcutGroups) { QJsonObject jsonGroup; QJsonArray jsonGroupItems; for (auto sci : scg.groupItems) { QJsonObject jsonItem; jsonItem.insert("name", sci.name); jsonItem.insert("value", sci.value); jsonGroupItems.append(jsonItem); } jsonGroup.insert("groupItems", jsonGroupItems); jsonGroups.append(jsonGroup); } m_shortcutObj.insert("shortcut", jsonGroups); } QString Shortcut::toStr() { QJsonDocument doc(m_shortcutObj); return doc.toJson().data(); } dde-calendar-5.7.0.23/src/shortcut.h000066400000000000000000000024401375021633200170660ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Maintainer: Peng Hui * * 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 * 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 SHORTCUT_H #define SHORTCUT_H #include #include #include #include struct ShortcutItem { QString name; QString value; ShortcutItem(QString n, QString v): name(n), value(v) {} }; struct ShortcutGroup { QString groupName; QList groupItems; }; class Shortcut : public QObject { Q_OBJECT public: explicit Shortcut(QObject *parent = 0); QString toStr(); private: QJsonObject m_shortcutObj; QList m_shortcutGroups; }; #endif // SHORTCUT_H dde-calendar-5.7.0.23/src/singleton.h000066400000000000000000000023071375021633200172170ustar00rootroot00000000000000/* * Copyright (C) 2016 ~ 2018 Wuhan Deepin Technology Co., Ltd. * * Author: Iceyer * * Maintainer: Iceyer * * 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 * 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 . */ #pragma once #include using namespace std; namespace DCalendar { template class DSingleton { public: static inline T *instance() { static T *_instance = new T; return _instance; } protected: DSingleton(void) {} ~DSingleton(void) {} DSingleton(const DSingleton &) {} DSingleton &operator= (const DSingleton &) { return *this; } }; } // namespace DCalendar dde-calendar-5.7.0.23/src/view/000077500000000000000000000000001375021633200160145ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/view/alldayeventview.cpp000066400000000000000000000475721375021633200217420ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "alldayeventview.h" #include "schedulecoormanage.h" #include "schcedulectrldlg.h" #include "schceduledlg.h" #include "myschceduleview.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CAllDayEventWidgetItem::CAllDayEventWidgetItem(QRectF rect, QGraphicsItem *parent, int edittype) : DragInfoItem(rect, parent) { Q_UNUSED(edittype); } bool CAllDayEventWidgetItem::hasSelectSchedule(const ScheduleDtailInfo &info) { return info == m_vScheduleInfo; } void CAllDayEventWidgetItem::paintBackground(QPainter *painter, const QRectF &rect, const int isPixMap) { Q_UNUSED(isPixMap); m_font = DFontSizeManager::instance()->get(m_sizeType, m_font); painter->setRenderHints(QPainter::Antialiasing); CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType(m_vScheduleInfo.type.ID); QRectF drawrect = rect; QLinearGradient linearGradient(drawrect.topLeft().x(), 0, drawrect.topRight().x(), 0); QColor color1 = gdcolor.gradientFromC; QColor color2 = gdcolor.gradientToC; QColor textcolor = gdcolor.textColor; m_vHighflag = CScheduleDataManage::getScheduleDataManage()->getSearchResult(m_vScheduleInfo); if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo() == m_vScheduleInfo ) { if (m_vScheduleInfo.IsMoveInfo == CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().IsMoveInfo) { m_vHighflag = true; } else { painter->setOpacity(0.4); textcolor.setAlphaF(0.4); } m_vSelectflag = m_press; } int themetype = CScheduleDataManage::getScheduleDataManage()->getTheme(); if (m_vHoverflag) { color1 = gdcolor.hovergradientFromC; color2 = gdcolor.hovergradientToC; } else if (m_vHighflag) { color1 = gdcolor.hightlightgradientFromC; color2 = gdcolor.hightlightgradientToC; } if (m_vSelectflag) { color1 = gdcolor.pressgradientFromC; color2 = gdcolor.pressgradientToC; textcolor.setAlphaF(0.4); } linearGradient.setColorAt(0, color1); linearGradient.setColorAt(1, color2); QRectF fillRect = QRectF(drawrect.x(), drawrect.y(), drawrect.width(), drawrect.height() - 2); //将直线开始点设为0,终点设为1,然后分段设置颜色 painter->setBrush(linearGradient); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, rect.height() / 3, rect.height() / 3); painter->setFont(m_font); painter->setPen(textcolor); QFontMetrics fm = painter->fontMetrics(); QString tStitlename = m_vScheduleInfo.titleName; tStitlename.replace("\n", ""); QString str = tStitlename; QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= fillRect.width() - 13) { tstr.chop(2); break; } } if (tstr != str) { tstr = tstr + "..."; } painter->drawText(QRectF(fillRect.topLeft().x() + 13, fillRect.y(), fillRect.width(), fillRect.height()), Qt::AlignLeft | Qt::AlignVCenter, tstr); if (m_vHoverflag && !m_vSelectflag) { QRectF trect = QRectF(fillRect.x() + 0.5, fillRect.y() + 0.5, fillRect.width() - 1, fillRect.height() - 1); painter->save(); QPen pen; QColor selcolor; if (themetype == 2) { selcolor = "#FFFFFF"; } else { selcolor = "#000000"; } selcolor.setAlphaF(0.08); pen.setColor(selcolor); pen.setWidthF(1); pen.setStyle(Qt::SolidLine); painter->setBrush(Qt::NoBrush); painter->setPen(pen); painter->drawRoundedRect(trect, rect.height() / 3, rect.height() / 3); painter->restore(); } if (m_vSelectflag) { QColor selcolor = "#000000"; selcolor.setAlphaF(0.05); painter->setBrush(selcolor); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, rect.height() / 3, rect.height() / 3); } } void CAllDayEventWeekView::setTheMe(int type) { m_themetype=type; if (type == 0 || type == 1) { m_weekColor = "#00429A"; m_weekColor.setAlphaF(0.05); } else { m_weekColor = "#4F9BFF"; m_weekColor.setAlphaF(0.1); } updateDateShow(); } void CAllDayEventWeekView::changeEvent(QEvent *event) { if (event->type() == QEvent::FontChange) { updateItemHeightByFontSize(); updateInfo(); } } bool CAllDayEventWeekView::MeetCreationConditions(const QDateTime &date) { return qAbs(date.daysTo(m_PressDate)<7); } void CAllDayEventWeekView::slotCreate(const QDateTime &date) { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); dlg.setDate(date); dlg.setAllDay(true); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); } emit signalViewtransparentFrame(0); } bool CAllDayEventWeekView::IsEqualtime(const QDateTime &timeFirst, const QDateTime &timeSecond) { return timeFirst.date() == timeSecond.date(); } bool CAllDayEventWeekView::JudgeIsCreate(const QPointF &pos) { return qAbs(pos.x()-m_PressPos.x())>20 || qAbs(m_PressDate.date().daysTo(m_coorManage->getsDate(mapFrom(this,pos.toPoint()))))>0; } void CAllDayEventWeekView::RightClickToCreate(QGraphicsItem *listItem, const QPoint &pos) { Q_UNUSED(listItem); m_rightMenu->clear(); m_rightMenu->addAction(m_createAction); m_createDate.setDate(m_coorManage->getsDate(mapFrom(this, pos))); m_createDate.setTime(QTime::currentTime()); m_rightMenu->exec(QCursor::pos()); } void CAllDayEventWeekView::MoveInfoProcess(ScheduleDtailInfo &info, const QPointF &pos) { Q_UNUSED(pos); if (info.allday) { qint64 offset = m_PressDate.daysTo(m_MoveDate); info.beginDateTime = info.beginDateTime.addDays(offset); info.endDateTime = info.endDateTime.addDays(offset); } else { qint64 offset = info.beginDateTime.daysTo(info.endDateTime); info.allday = true; info.remind = true; info.remindData.time = QTime(9, 0); info.remindData.n = 1; m_DragScheduleInfo.beginDateTime = QDateTime(m_MoveDate.date(),QTime(0,0,0)); m_DragScheduleInfo.endDateTime = QDateTime(m_MoveDate.addDays(offset).date(),QTime(23,59,59)); } info.IsMoveInfo = true; upDateInfoShow(ChangeWhole,info); } QDateTime CAllDayEventWeekView::getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) { return moveDateTime.daysTo(m_InfoEndTime)<0 ? QDateTime(m_InfoEndTime.date(),QTime(0,0,0)): QDateTime(moveDateTime.date(),QTime(0,0,0)); } QDateTime CAllDayEventWeekView::getDragScheduleInfoEndTime(const QDateTime &moveDateTime) { return m_InfoBeginTime.daysTo(m_MoveDate)<0? QDateTime(m_InfoBeginTime.date(),QTime(23,59,0)): QDateTime(moveDateTime.date(),QTime(23,59,0)); } void CAllDayEventWeekView::setRange(int w, int h, QDate begindate, QDate enddate, int rightmagin) { m_MoveDate.setDate(begindate.addMonths(-2)); m_beginDate = begindate; m_endDate = enddate; w -=2; m_coorManage->setRange(w, h, begindate, enddate, rightmagin); m_Scene->setSceneRect(0, 0, w, h); m_rightmagin = rightmagin; updateDateShow(); } void CAllDayEventWeekView::setRange(QDate begin, QDate end) { m_MoveDate.setDate(begin.addMonths(-2)); m_beginDate = begin; m_endDate = end; getCoorManage()->setDateRange(begin, end); } void CAllDayEventWeekView::updateHigh() { for (int i = 0; i < m_baseShowItem.count(); i++) { m_baseShowItem.at(i)->update(); } } void CAllDayEventWeekView::setSelectSchedule(const ScheduleDtailInfo &info) { for (int i = 0; i < m_baseShowItem.size(); ++i) { CAllDayEventWidgetItem *item = m_baseShowItem.at(i); if (item->hasSelectSchedule(info)) { QRectF rect = item->rect(); centerOn(0, rect.y()); setTransformationAnchor(QGraphicsView::AnchorViewCenter); item->setStartValue(0); item->setEndValue(4); item->startAnimation(); } } } void CAllDayEventWeekView::setMargins(int left, int top, int right, int bottom) { setViewportMargins(QMargins(left, top, right, bottom)); } void CAllDayEventWeekView::updateInfo() { switch (m_DragStatus) { case IsCreate: upDateInfoShow(IsCreate,m_DragScheduleInfo); break; default: upDateInfoShow(); break; } } void CAllDayEventWeekView::upDateInfoShow(const DragStatus &status, const ScheduleDtailInfo &info) { QVector vListData; vListData = m_scheduleInfo; switch (status) { case NONE: Q_UNUSED(info); break; case ChangeBegin: case ChangeEnd: { int index = vListData.indexOf(info); if (index >=0) vListData[index] = info; } break; case ChangeWhole: vListData.append(info); break; case IsCreate: vListData.append(info); break; } std::sort(vListData.begin(), vListData.end()); QVector vMDaySchedule; for (int i = 0; i < vListData.count(); i++) { QDate tbegindate = vListData.at(i).beginDateTime.date(); QDate tenddate = vListData.at(i).endDateTime.date(); if (tbegindate < m_beginDate) tbegindate = m_beginDate; if (tenddate > m_endDate) tenddate = m_endDate; MScheduleDateRangeInfo sinfo; sinfo.bdate = tbegindate; sinfo.edate = tenddate; sinfo.tData = vListData.at(i); sinfo.state = false; vMDaySchedule.append(sinfo); } QVector > vCfillSchedule; vCfillSchedule.resize(vListData.count()); int tNum = static_cast(m_beginDate.daysTo(m_endDate) + 1); for (int i = 0; i < vListData.count(); i++) { vCfillSchedule[i].resize(tNum); vCfillSchedule[i].fill(-1); } //首先填充跨天日程 for (int i = 0; i < vMDaySchedule.count(); i++) { if (vMDaySchedule[i].state) continue; int bindex = static_cast(m_beginDate.daysTo(vMDaySchedule[i].bdate)); int eindex = static_cast(m_beginDate.daysTo(vMDaySchedule[i].edate)); int c = -1; for (int k = 0; k < vListData.count(); k++) { int t = 0; for (t = bindex; t <= eindex; t++) { if (vCfillSchedule[k][t] != -1) { break; } } if (t == eindex + 1) { c = k; break; } } if (c == -1) continue; bool flag = false; for (int sd = bindex; sd <= eindex; sd++) { if (vCfillSchedule[c][sd] != -1) continue; vCfillSchedule[c][sd] = i; flag = true; } if (flag) vMDaySchedule[i].state = true; } QVector > vResultData; for (int i = 0; i < vListData.count(); i++) { QVector vId; for (int j = 0; j < tNum; j++) { if (vCfillSchedule[i][j] != -1) { int k = 0; for (; k < vId.count(); k++) { if (vId[k] == vCfillSchedule[i][j]) break; } if (k == vId.count()) vId.append(vCfillSchedule[i][j]); } } QVector tData; for (int j = 0; j < vId.count(); j++) { tData.append(vMDaySchedule[vId[j]].tData); } if (!tData.isEmpty()) vResultData.append(tData); } int m_topMagin; if (vResultData.count() < 2) { m_topMagin = 32; } else if (vResultData.count() < 6) { m_topMagin = 31 + (vResultData.count() - 1) * (itemHeight+1); } else { m_topMagin = 123; } setFixedHeight(m_topMagin - 3); setDayData(vResultData); update(); emit signalUpdatePaint(m_topMagin); } CAllDayEventWeekView::CAllDayEventWeekView(QWidget *parent, int edittype) : DragInfoGraphicsView (parent) { m_editType = edittype; updateItemHeightByFontSize(); m_coorManage = new CScheduleCoorManage; } CAllDayEventWeekView::~CAllDayEventWeekView() { delete m_coorManage; m_coorManage = nullptr; } void CAllDayEventWeekView::setDayData(const QVector > &vlistData) { m_vlistData = vlistData; updateDateShow(); } void CAllDayEventWeekView::setInfo(const QVector &info) { m_scheduleInfo = info; } void CAllDayEventWeekView::slotDoubleEvent() { m_updateDflag = true; emit signalsUpdateShcedule(); } void CAllDayEventWeekView::mouseDoubleClickEvent(QMouseEvent *event) { if (event->button() == Qt::RightButton) { return; } emit signalScheduleShow(false); DGraphicsView::mouseDoubleClickEvent(event); CAllDayEventWidgetItem *item = dynamic_cast(itemAt(event->pos())); if (item == nullptr) { m_createDate.setDate(m_coorManage->getsDate(mapFrom(this, event->pos()))); m_createDate.setTime(QTime::currentTime()); slotCreate(m_createDate); } else { emit signalViewtransparentFrame(1); m_updateDflag = false; CMySchceduleView dlg(item->getData(), this); connect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CAllDayEventWeekView::slotDoubleEvent); dlg.exec(); emit signalViewtransparentFrame(0); disconnect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CAllDayEventWeekView::slotDoubleEvent); if (item == nullptr) { return; } } } void CAllDayEventWeekView::wheelEvent(QWheelEvent *event) { //若滚轮事件为左右方向则退出 if(event->orientation() == Qt::Orientation::Horizontal){ return; } emit signalScheduleShow(false); DGraphicsView::wheelEvent(event); } void CAllDayEventWeekView::paintEvent(QPaintEvent *event) { QPainter painter(viewport()); //绘制背景 paintBackground(painter); painter.end(); QGraphicsView::paintEvent(event); } void CAllDayEventWeekView::updateDateShow() { m_Scene->setSceneRect(0, 0, m_Scene->width(), (itemHeight + 1)*m_vlistData.size()); for (int i = 0; i < m_baseShowItem.count(); i++) { delete m_baseShowItem[i]; } m_baseShowItem.clear(); for (int i = 0; i < m_vlistData.size(); ++i) { createItemWidget(i); } } void CAllDayEventWeekView::createItemWidget(int index, bool average) { Q_UNUSED(average) for (int i = 0; i < m_vlistData[index].size(); ++i) { const ScheduleDtailInfo &info = m_vlistData[index].at(i); QRectF drawrect = m_coorManage->getAllDayDrawRegion(info.beginDateTime.date(), info.endDateTime.date()); drawrect.setY(2 + (itemHeight + 1) * index); drawrect.setHeight(itemHeight); CAllDayEventWidgetItem *gwi = new CAllDayEventWidgetItem(drawrect, nullptr, m_editType); gwi->setData(m_vlistData[index].at(i)); m_Scene->addItem(gwi); m_baseShowItem.append(gwi); } } void CAllDayEventWeekView::updateItemHeightByFontSize() { QFont font; DFontSizeManager::instance()->setFontGenericPixelSize( static_cast(DFontSizeManager::instance()->fontPixelSize(qGuiApp->font()))); font = DFontSizeManager::instance()->t8(font); QFontMetrics fm(font); int h = fm.height(); if (itemHeight != h) { itemHeight = h; } } void CAllDayEventWeekView::paintBackground(QPainter &painter) { // 绘制Rect的宽度 const int t_width = viewport()->width() - 2; // 需要处理的天数 const qint64 m_TotalDay = m_beginDate.daysTo(m_endDate) + 1; // 左边距 const int m_leftMagin = 0; // 每天的宽度 const qreal intenval = 1.0 * (t_width - m_leftMagin) / m_TotalDay; // 每天X坐标点偏移 const qreal XPointOffset = 1.5; // 分割线颜色 QColor m_linecolor = "#000000"; m_linecolor.setAlphaF(0.1); if (m_TotalDay > 1) { painter.save(); painter.setPen(Qt::SolidLine); painter.setPen(m_linecolor); //绘制分割线 for (int i = 1; i < 7; ++i) { painter.drawLine(QPointF(i * intenval + m_leftMagin + XPointOffset, 1), QPointF(i * intenval + m_leftMagin + XPointOffset, this->height())); } painter.restore(); painter.save(); //绘制周六周日背景色 painter.setBrush(m_weekColor); painter.setPen(Qt::NoPen); painter.setRenderHint(QPainter::Antialiasing); for (int i = 0; i != 7; ++i) { int d = m_beginDate.addDays(i).dayOfWeek(); if (d == 7 || d == 6) { painter.drawRect( QRectF(m_leftMagin + i * intenval + XPointOffset, 0, intenval, this->height())); } } painter.restore(); } } CAllDayEventWeekView::PosInItem CAllDayEventWeekView::getPosInItem(const QPoint &p, const QRectF &itemRect) { QPointF scenePos = this->mapToScene(p); QPointF itemPos = QPointF(scenePos.x()-itemRect.x(), scenePos.y()-itemRect.y()); double bottomy = itemRect.width()- itemPos.x(); if (itemPos.x()<5) { return LEFT; } if (bottomy <5) { return RIGHT; } return MIDDLE; } QDateTime CAllDayEventWeekView::getPosDate(const QPoint &p) { return QDateTime(m_coorManage->getsDate(mapFrom(this, p)), QTime(0,0,0)); } void CAllDayEventWeekView::slotDeleteItem() { if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID <0) { return; } if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID != DDECalendar::FestivalTypeID) { DeleteItem(CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo()); } CScheduleDataManage::getScheduleDataManage()->setPressSelectInfo(ScheduleDtailInfo()); } void CAllDayEventWeekView::slotUpdateScene() { this->scene()->update(); } dde-calendar-5.7.0.23/src/view/alldayeventview.h000066400000000000000000000114341375021633200213730ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 ALLDAYEVENTVIEW_H #define ALLDAYEVENTVIEW_H #include "draginfoitem.h" #include "draginfographicsview.h" #include "schedulestructs.h" #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class QDrag; class CAllDayEventWidgetItem; class CScheduleCoorManage; class SchecduleRemindWidget; class CAllDayEventWeekView : public DragInfoGraphicsView { Q_OBJECT public: CAllDayEventWeekView(QWidget *parent = nullptr, int edittype = 0); ~CAllDayEventWeekView() override; void setDayData(const QVector > &vlistData); void setInfo(const QVector &info); QVector > &getListData() { return m_vlistData; } void setRange(int w, int h, QDate begindate, QDate enddate, int rightmagin); void setRange(QDate begin, QDate end); CScheduleCoorManage *getCoorManage() { return m_coorManage; } void updateHigh(); void setSelectSchedule(const ScheduleDtailInfo &info); void setMargins(int left, int top, int right, int bottom); void updateInfo(); signals: void signalUpdatePaint(const int topM); void signalSceneUpdate(); public slots: void slotDeleteItem(); void slotUpdateScene(); private slots: void slotDoubleEvent(); public: void setTheMe(int type = 0) override; private: void changeEvent(QEvent *event) override; bool MeetCreationConditions(const QDateTime &date) override; void slotCreate(const QDateTime &date) override; //判断时间是否相等 bool IsEqualtime(const QDateTime &timeFirst,const QDateTime &timeSecond) override; //根据鼠标移动的距离判断是否创建日程 bool JudgeIsCreate(const QPointF &pos) override; void RightClickToCreate(QGraphicsItem *listItem,const QPoint &pos) override; void MoveInfoProcess(ScheduleDtailInfo &info,const QPointF &pos) override; QDateTime getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) override; QDateTime getDragScheduleInfoEndTime(const QDateTime &moveDateTime) override; PosInItem getPosInItem(const QPoint &p,const QRectF &itemRect)override; QDateTime getPosDate(const QPoint &p)override; void upDateInfoShow(const DragStatus &status = NONE,const ScheduleDtailInfo &info =ScheduleDtailInfo())override; protected: void mouseDoubleClickEvent(QMouseEvent *event) override; void wheelEvent(QWheelEvent *event) override; /** * @brief paintEvent 绘制事件 * @param event 绘制事件的事件参数 */ void paintEvent(QPaintEvent *event) override; private: void updateDateShow(); void createItemWidget(int index, bool average = false); void updateItemHeightByFontSize(); /** * @brief paintBackground 绘制背景--周试图周六周天的背景色和每天的分割线 * @param painter painter对象 */ void paintBackground(QPainter &painter); private: int itemHeight = 22; QVector > m_vlistData; QVector m_scheduleInfo; QVector m_baseShowItem; int m_editType = 0; CScheduleCoorManage *m_coorManage = nullptr; QDate m_dianjiDay; int m_rightmagin = 0; bool m_updateDflag = false; QDate m_beginDate; QDate m_endDate; /** * @brief m_weekColor 周六周日背景色 */ QColor m_weekColor = "#E6EEF2"; }; class CAllDayEventWidgetItem : public DragInfoItem { Q_OBJECT public: explicit CAllDayEventWidgetItem(QRectF rect, QGraphicsItem *parent = nullptr, int edittype = 0); bool hasSelectSchedule(const ScheduleDtailInfo &info); protected: void paintBackground(QPainter *painter,const QRectF &rect,const int isPixMap = false) override; }; #endif // CSHCEDULEDAYVIEW_H dde-calendar-5.7.0.23/src/view/draginfographicsview.cpp000066400000000000000000000456351375021633200227420ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "draginfographicsview.h" #include "schceduledlg.h" #include "schcedulectrldlg.h" #include "myschceduleview.h" #include "constants.h" #include #include #include #include #include DragInfoGraphicsView::DragInfoGraphicsView(DWidget *parent) : DGraphicsView(parent) , m_Scene(new QGraphicsScene(this)) , m_rightMenu(new DMenu(this)) , m_MoveDate(QDateTime::currentDateTime()) { setFrameShape(QFrame::NoFrame); setScene(m_Scene); setContentsMargins(0, 0, 0, 0); m_editAction = new QAction(tr("Edit"), this); m_deleteAction = new QAction(tr("Delete"), this); m_createAction = new QAction(tr("New event"), this); connect(m_createAction, &QAction::triggered, this, static_cast(&DragInfoGraphicsView::slotCreate)); this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); this->setViewportMargins(0, 0, 0, 0); setMouseTracking(true); viewport()->setMouseTracking(true); setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); setAlignment(Qt::AlignLeft | Qt::AlignTop); setViewportUpdateMode(QGraphicsView::FullViewportUpdate); m_Drag = new QDrag(this); } DragInfoGraphicsView::~DragInfoGraphicsView() { } void DragInfoGraphicsView::mousePressEvent(QMouseEvent *event) { if (event->button() != Qt::LeftButton) { return; } setPressSelectInfo(ScheduleDtailInfo()); QGraphicsItem *listItem =itemAt(event->localPos().toPoint()); DragInfoItem *infoitem = dynamic_cast(listItem); if (infoitem != nullptr) { setPressSelectInfo(infoitem->getData()); m_press = true; DragInfoItem::setPressFlag(true); } else { emit signalScheduleShow(false); } DragPressEvent(event->pos(),infoitem); update(); } void DragInfoGraphicsView::mouseReleaseEvent(QMouseEvent *event) { if (event->button() ==Qt::RightButton) { return; } mouseReleaseScheduleUpdate(); } void DragInfoGraphicsView::mouseMoveEvent(QMouseEvent *event) { DGraphicsView::mouseMoveEvent(event); if (m_press) { emit signalScheduleShow(false); m_press = false; DragInfoItem::setPressFlag(false); } DragInfoItem *item = dynamic_cast(itemAt(event->pos())); if (item != nullptr) { if (item->getData().type.ID != DDECalendar::FestivalTypeID) { if (m_DragStatus == NONE) { switch (getPosInItem(event->pos(),item->rect())) { case LEFT: case RIGHT: setCursor(Qt::SplitHCursor); break; case TOP: case BOTTOM: setCursor(Qt::SplitVCursor); break; default: setCursor(Qt::ArrowCursor); break; } } } } else { if (m_DragStatus == NONE) { setCursor(Qt::ArrowCursor); } } QDateTime gDate = getPosDate(event->pos()); switch (m_DragStatus) { case IsCreate: m_isCreate = JudgeIsCreate(event->pos()); if (m_isCreate) { if (!IsEqualtime(m_MoveDate,gDate)) { m_MoveDate = gDate; m_DragScheduleInfo = getScheduleInfo(m_PressDate,m_MoveDate); upDateInfoShow(IsCreate,m_DragScheduleInfo); setPressSelectInfo(m_DragScheduleInfo); } } break; case ChangeBegin: if (!IsEqualtime(m_MoveDate,gDate)) { m_MoveDate = gDate; m_DragScheduleInfo.beginDateTime = getDragScheduleInfoBeginTime(m_MoveDate); m_DragScheduleInfo.endDateTime = m_InfoEndTime; upDateInfoShow(ChangeBegin,m_DragScheduleInfo); } break; case ChangeEnd: if (!IsEqualtime(m_MoveDate,gDate)) { m_MoveDate = gDate; m_DragScheduleInfo.endDateTime = getDragScheduleInfoEndTime(m_MoveDate); m_DragScheduleInfo.beginDateTime =m_InfoBeginTime; upDateInfoShow(ChangeEnd,m_DragScheduleInfo); } break; case ChangeWhole: { if (!m_PressRect.contains(event->pos())) { Qt::DropAction dropaction = m_Drag->exec( Qt::MoveAction); Q_UNUSED(dropaction); m_Drag = nullptr; m_DragStatus = NONE; setCursor(Qt::ArrowCursor); m_DragScheduleInfo.IsMoveInfo = false; setPressSelectInfo(m_DragScheduleInfo); emit signalsUpdateShcedule(); } } break; default: break; } } void DragInfoGraphicsView::wheelEvent(QWheelEvent *event) { DGraphicsView::wheelEvent(event); } void DragInfoGraphicsView::contextMenuEvent(QContextMenuEvent *event) { DGraphicsView::contextMenuEvent(event); if (m_DragStatus ==IsCreate) { return; } emit signalScheduleShow(false); m_press = false; m_DragStatus =NONE; QGraphicsItem *listItem = itemAt(event->pos()); DragInfoItem *infoitem = dynamic_cast(listItem); if (infoitem !=nullptr) { if (infoitem->getData().type.ID != DDECalendar::FestivalTypeID) { m_rightMenu->clear(); m_rightMenu->addAction(m_editAction); m_rightMenu->addAction(m_deleteAction); QAction *action_t = m_rightMenu->exec(QCursor::pos()); if (action_t == m_editAction) { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(0, this); dlg.setData(infoitem->getData()); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); } emit signalViewtransparentFrame(0); } else if (action_t == m_deleteAction) { DeleteItem(infoitem->getData()); } } else { emit signalViewtransparentFrame(1); CMySchceduleView dlg(infoitem->getData(), this); dlg.exec(); emit signalViewtransparentFrame(0); } } else { RightClickToCreate(listItem,event->pos()); } } void DragInfoGraphicsView::dragEnterEvent(QDragEnterEvent *event) { if (event->mimeData()->hasFormat("Info")) { QJsonParseError json_error; QString str = event->mimeData()->data("Info"); QJsonDocument jsonDoc(QJsonDocument::fromJson(str.toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { event->ignore(); } QJsonObject rootobj = jsonDoc.object(); ScheduleDtailInfo info = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->JsonObjectToInfo(rootobj); if ((event->source() != this && info.rpeat > 0) || info.type.ID == DDECalendar::FestivalTypeID) { event->ignore(); } else { event->accept(); } } else { event->ignore(); } } void DragInfoGraphicsView::dragLeaveEvent(QDragLeaveEvent *event) { Q_UNUSED(event); upDateInfoShow(); m_MoveDate = m_MoveDate.addMonths(-2); } void DragInfoGraphicsView::dragMoveEvent(QDragMoveEvent *event) { QString str = event->mimeData()->data("Info"); QDateTime gDate = getPosDate(event->pos()); QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(str.toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return; } if (!IsEqualtime(m_MoveDate,gDate)) { m_MoveDate = gDate; QJsonObject rootobj = jsonDoc.object(); m_DragScheduleInfo = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->JsonObjectToInfo(rootobj); MoveInfoProcess(m_DragScheduleInfo,event->posF()); setPressSelectInfo(m_DragScheduleInfo); } } void DragInfoGraphicsView::dropEvent(QDropEvent *event) { if (event->mimeData()->hasFormat("Info")) { if (event->source()!=this || m_MoveDate !=m_PressDate) { updateScheduleInfo(m_DragScheduleInfo); } else { emit signalsUpdateShcedule(); } m_DragStatus = NONE; m_MoveDate = m_MoveDate.addMonths(-2); } } bool DragInfoGraphicsView::event(QEvent *e) { if (e->type() ==QEvent::Leave) { if (m_DragStatus ==IsCreate || m_DragStatus == ChangeBegin || m_DragStatus == ChangeEnd) mouseReleaseScheduleUpdate(); } return DGraphicsView::event(e); } void DragInfoGraphicsView::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Left || event->key() ==Qt::Key_Right) return; DGraphicsView::keyPressEvent(event); } void DragInfoGraphicsView::slotCreate() { slotCreate(m_createDate); } void DragInfoGraphicsView::setPressSelectInfo(const ScheduleDtailInfo &info) { CScheduleDataManage::getScheduleDataManage()->setPressSelectInfo(info); } void DragInfoGraphicsView::updateScheduleInfo(const ScheduleDtailInfo &info) { emit signalViewtransparentFrame(1); if (info.rpeat >0) { CSchceduleDlg::ChangeRecurInfo(this,info, m_PressScheduleInfo,m_themetype); } else { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo( info); } emit signalViewtransparentFrame(0); } void DragInfoGraphicsView::DragPressEvent(const QPoint &pos, DragInfoItem *item) { m_PressPos = pos; m_PressDate = getPosDate(pos); m_MoveDate = m_PressDate.addMonths(-2); if (item != nullptr) { PosInItem mpressstatus = getPosInItem(pos,item->boundingRect()); if (mpressstatus != MIDDLE && item->getData().type.ID == 4) { return; } m_DragScheduleInfo = item->getData(); m_PressScheduleInfo = item->getData(); m_InfoBeginTime = m_DragScheduleInfo.beginDateTime; m_InfoEndTime = m_DragScheduleInfo.endDateTime; switch (mpressstatus) { case TOP: m_DragStatus = ChangeBegin; setCursor(Qt::SplitVCursor); break; case BOTTOM: m_DragStatus = ChangeEnd; setCursor(Qt::SplitVCursor); break; case LEFT: m_DragStatus = ChangeBegin; setCursor(Qt::SplitHCursor); break; case RIGHT: m_DragStatus = ChangeEnd; setCursor(Qt::SplitHCursor); break; default: ShowSchedule(item); m_DragStatus = ChangeWhole; QMimeData *mimeData = new QMimeData(); mimeData->setText(m_DragScheduleInfo.titleName); mimeData->setData("Info", CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->InfoToJson(m_DragScheduleInfo).toUtf8()); if (m_Drag ==nullptr) { m_Drag = new QDrag(this); } m_Drag->setMimeData(mimeData); QPointF itemPos = QPointF(pos.x()-item->boundingRect().x(), pos.y()-item->boundingRect().y()); m_Drag->setHotSpot(itemPos.toPoint()); setDragPixmap(m_Drag,item); break; } } else { m_DragStatus = IsCreate; m_isCreate = false; } } void DragInfoGraphicsView::mouseReleaseScheduleUpdate() { setCursor(Qt::ArrowCursor); m_press = false; DragInfoItem::setPressFlag(false); bool isUpdateInfo = false; switch (m_DragStatus) { case IsCreate: if (MeetCreationConditions(m_MoveDate)) { //如果不添加会进入leaveEvent事件内的条件 m_DragStatus = NONE; emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); dlg.setData(m_DragScheduleInfo); if (dlg.exec() == DDialog::Accepted) { } else { setPressSelectInfo(ScheduleDtailInfo()); } emit signalViewtransparentFrame(0); isUpdateInfo = true; } break; case ChangeBegin: if (!IsEqualtime(m_MoveDate,m_InfoBeginTime)) { //如果不添加会进入leaveEvent事件内的条件 m_DragStatus = NONE; updateScheduleInfo(m_DragScheduleInfo); isUpdateInfo = true; } break; case ChangeEnd: if (!IsEqualtime(m_MoveDate,m_InfoEndTime)) { //如果不添加会进入leaveEvent事件内的条件 m_DragStatus = NONE; updateScheduleInfo(m_DragScheduleInfo); isUpdateInfo = true; } break; default: break; } m_DragStatus = NONE; if (isUpdateInfo) { emit signalsUpdateShcedule(); } update(); } void DragInfoGraphicsView::DeleteItem(const ScheduleDtailInfo &info) { emit signalViewtransparentFrame(1); if (info.rpeat == 0) { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Are you sure you want to delete this event?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Delete"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(info.id); } } else { if (info.RecurID == 0) { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete all occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(info.id); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.ignore.append(info.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } else { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete this and all future occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All Future Events")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.enddata.type = 2; newschedule.enddata.date = info.beginDateTime.addDays(-1); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.ignore.append(info.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } } emit signalsUpdateShcedule(); emit signalViewtransparentFrame(0); } void DragInfoGraphicsView::setDragPixmap(QDrag *drag, DragInfoItem *item) { Q_UNUSED(item); //设置一个1*1的透明图片,要不然关闭窗口特效会有一个小黑点 QPixmap pixmap(1,1); pixmap.fill(Qt::transparent); drag->setPixmap(pixmap); //设置图标位置为鼠标位置 drag->setHotSpot(QPoint(0,0)); } void DragInfoGraphicsView::slotCreate(const QDateTime &date) { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); QDateTime tDatatime; tDatatime.setDate(date.date()); if (date.date() == QDate::currentDate()) { tDatatime.setTime(QTime::currentTime()); } else { tDatatime.setTime(QTime(8, 0)); } dlg.setDate(tDatatime); dlg.setAllDay(true); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); } emit signalViewtransparentFrame(0); } ScheduleDtailInfo DragInfoGraphicsView::getScheduleInfo(const QDateTime &beginDate, const QDateTime &endDate) { ScheduleDtailInfo info; if (beginDate.daysTo(endDate)>0) { info.beginDateTime = QDateTime(beginDate.date(),QTime(0,0,0)); info.endDateTime = QDateTime(endDate.date(),QTime(23,59,59)); } else { info.beginDateTime = QDateTime(endDate.date(),QTime(0,0,0)); info.endDateTime = QDateTime(beginDate.date(),QTime(23,59,00)); } info.titleName = tr("New Event"); info.allday = true; info.remind = true; info.id = 0; info.remindData.n = 1; info.remindData.time = QTime(9, 0); info.RecurID = 0; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType( 1, info.type); info.rpeat = 0; return info; } void DragInfoGraphicsView::ShowSchedule(DragInfoItem *infoitem) { if (infoitem ==nullptr) return; emit signalScheduleShow(true, infoitem->getData()); } int DragInfoGraphicsView::getDragStatus() const { return m_DragStatus; } dde-calendar-5.7.0.23/src/view/draginfographicsview.h000066400000000000000000000113451375021633200223760ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 DRAGINFOGRAPHICSVIEW_H #define DRAGINFOGRAPHICSVIEW_H #include "draginfoitem.h" #include #include #include DWIDGET_USE_NAMESPACE class CScheduleDataManage; class DragInfoGraphicsView : public DGraphicsView { Q_OBJECT public: explicit DragInfoGraphicsView(DWidget *parent = nullptr); ~DragInfoGraphicsView() override; public: //鼠标位置 enum PosInItem {LEFT,MIDDLE,RIGHT,TOP,BOTTOM}; //鼠标移动状态 enum DragStatus {IsCreate =0,ChangeBegin =1,ChangeEnd =2,ChangeWhole =3,NONE =4}; int getDragStatus() const; protected: void mousePressEvent(QMouseEvent *event) override; void mouseReleaseEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; void wheelEvent(QWheelEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override; void dragEnterEvent(QDragEnterEvent *event) override; void dragLeaveEvent(QDragLeaveEvent *event) override; void dragMoveEvent(QDragMoveEvent *event) override; void dropEvent(QDropEvent *event) override; bool event(QEvent *e) override; void keyPressEvent(QKeyEvent *event) override; private: void slotCreate(); void setPressSelectInfo(const ScheduleDtailInfo &info); void updateScheduleInfo(const ScheduleDtailInfo &info); void DragPressEvent(const QPoint &pos,DragInfoItem *item); void mouseReleaseScheduleUpdate(); protected: void DeleteItem(const ScheduleDtailInfo &info); protected: virtual void setDragPixmap(QDrag *drag,DragInfoItem *item); virtual void slotCreate(const QDateTime &date); //符合创建条件 virtual bool MeetCreationConditions(const QDateTime &date) =0; virtual void upDateInfoShow(const DragStatus &status = NONE,const ScheduleDtailInfo &info =ScheduleDtailInfo()) =0; virtual QDateTime getPosDate(const QPoint &p) =0; virtual void MoveInfoProcess(ScheduleDtailInfo &info,const QPointF &pos) = 0; virtual PosInItem getPosInItem(const QPoint &p,const QRectF &itemRect) =0; virtual ScheduleDtailInfo getScheduleInfo(const QDateTime &beginDate,const QDateTime &endDate); virtual void ShowSchedule(DragInfoItem *infoitem); //设置主题 virtual void setTheMe(int type = 0) =0; //判断时间是否相等 virtual bool IsEqualtime(const QDateTime &timeFirst,const QDateTime &timeSecond) =0; //根据鼠标移动的距离判断是否创建日程 virtual bool JudgeIsCreate(const QPointF &pos) =0; virtual void RightClickToCreate(QGraphicsItem *listItem,const QPoint &pos) =0; // virtual QDateTime getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) =0; // virtual QDateTime getDragScheduleInfoEndTime(const QDateTime &moveDateTime) =0; signals: //更新获取日程信息 void signalsUpdateShcedule(); void signalViewtransparentFrame(const int id = 0); void signalScheduleShow(const bool isShow, const ScheduleDtailInfo &out = ScheduleDtailInfo()); protected: int m_themetype = 0; QGraphicsScene *m_Scene = nullptr; bool m_press = false; QAction *m_createAction = nullptr; // 创建日程 QAction *m_editAction = nullptr; QAction *m_deleteAction = nullptr; DMenu *m_rightMenu = nullptr; QDateTime m_createDate; DragStatus m_DragStatus =NONE; bool m_isCreate; QDateTime m_PressDate; QDateTime m_MoveDate; QPoint m_PressPos; ScheduleDtailInfo m_DragScheduleInfo; QDateTime m_InfoBeginTime; QDateTime m_InfoEndTime; QDrag *m_Drag = nullptr; //点击的原始info ScheduleDtailInfo m_PressScheduleInfo; QRectF m_PressRect; }; #endif // DRAGINFOGRAPHICSVIEW_H dde-calendar-5.7.0.23/src/view/draginfoitem.cpp000066400000000000000000000071541375021633200211770ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "draginfoitem.h" #include #include #include bool DragInfoItem::m_press = false; ScheduleDtailInfo DragInfoItem::m_HoverInfo; DragInfoItem::DragInfoItem(QRectF rect, QGraphicsItem *parent) : QGraphicsRectItem(parent) , m_rect(rect) { setRect(m_rect); setAcceptHoverEvents(true); const int duration = 200; m_properAnimationFirst = new QPropertyAnimation( this, "offset", this); m_properAnimationFirst->setObjectName("First"); m_properAnimationSecond = new QPropertyAnimation( this, "offset", this); m_properAnimationSecond->setObjectName("Second"); m_properAnimationFirst->setDuration(duration); m_properAnimationSecond->setDuration(duration); m_properAnimationFirst->setEasingCurve(QEasingCurve::InOutQuad); m_properAnimationSecond->setEasingCurve(QEasingCurve::InOutQuad); m_Group = new QSequentialAnimationGroup(this); m_Group->addAnimation(m_properAnimationFirst); m_Group->addAnimation(m_properAnimationSecond); connect(m_Group , &QPropertyAnimation::finished , this , &DragInfoItem::animationFinished); } DragInfoItem::~DragInfoItem() { } void DragInfoItem::setData(const ScheduleDtailInfo &vScheduleInfo) { m_vScheduleInfo = vScheduleInfo; } ScheduleDtailInfo DragInfoItem::getData() const { return m_vScheduleInfo; } void DragInfoItem::setPressFlag(const bool flag) { m_press = flag; } void DragInfoItem::setFont(DFontSizeManager::SizeType type) { m_sizeType = type; } void DragInfoItem::setOffset(const int &offset) { m_offset = offset; setRect(QRectF(m_rect.x() - offset, m_rect.y() - offset / 2, m_rect.width() + offset * 2, m_rect.height() + offset)); setZValue(offset); } void DragInfoItem::setStartValue(const int value) { m_properAnimationFirst->setStartValue(value); m_properAnimationSecond->setEndValue(value); } void DragInfoItem::setEndValue(const int value) { m_properAnimationFirst->setEndValue(value); m_properAnimationSecond->setStartValue(value); } void DragInfoItem::startAnimation() { if (m_Group->state() != QAnimationGroup::Running) { m_Group->start(); } } void DragInfoItem::animationFinished() { m_isAnimation = false; } void DragInfoItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); m_HoverInfo = m_vScheduleInfo; update(); } void DragInfoItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); m_HoverInfo = ScheduleDtailInfo(); update(); } void DragInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); m_vHoverflag = m_HoverInfo == m_vScheduleInfo; paintBackground(painter,this->rect()); } dde-calendar-5.7.0.23/src/view/draginfoitem.h000066400000000000000000000056761375021633200206530ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 DRAGINFOITEM_H #define DRAGINFOITEM_H #include "scheduledatamanage.h" #include #include DWIDGET_USE_NAMESPACE class QPropertyAnimation; class QSequentialAnimationGroup; class DragInfoItem : public QObject, public QGraphicsRectItem { Q_OBJECT Q_PROPERTY(int offset READ readOffset WRITE setOffset) public: explicit DragInfoItem(QRectF rect, QGraphicsItem *parent = nullptr); ~DragInfoItem() override; void setData(const ScheduleDtailInfo &vScheduleInfo); ScheduleDtailInfo getData() const; void setFont(DFontSizeManager::SizeType type); void setOffset(const int &offset); int readOffset() const { return m_offset; } void setStartValue(const int value); void setEndValue(const int value); void startAnimation(); bool isRunning()const { return m_isAnimation; } public: static void setPressFlag(const bool flag); public slots: void animationFinished(); protected: void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override; protected: virtual void paintBackground(QPainter *painter,const QRectF &rect,const int isPixMap = false) =0; protected: ScheduleDtailInfo m_vScheduleInfo; QFont m_font; bool m_vSelectflag =false; bool m_vHoverflag = false; bool m_vHighflag = false; QRectF m_rect; bool m_isAnimation = false; int m_offset = 0; DFontSizeManager::SizeType m_sizeType = DFontSizeManager::T8; QPropertyAnimation *m_properAnimationFirst = nullptr; QPropertyAnimation *m_properAnimationSecond = nullptr; QSequentialAnimationGroup *m_Group = nullptr; static bool m_press; static ScheduleDtailInfo m_HoverInfo; }; #endif // DRAGINFOITEM_H dde-calendar-5.7.0.23/src/view/graphicsview.cpp000066400000000000000000000657631375021633200212340ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "graphicsview.h" #include "scheduleitem.h" #include "schedulecoormanage.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include "schcedulectrldlg.h" #include "myschceduleview.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CGraphicsView::CGraphicsView(QWidget *parent, int viewType) : DragInfoGraphicsView(parent) , m_viewType(viewType) { m_coorManage = new CScheduleCoorManage; setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_dayInterval = width(); m_timeInterval = height() / 24.0; m_Scene->setSceneRect(0, 0, width(), height()); m_LRPen.setColor(QColor(255, 255, 255)); m_LRPen.setStyle(Qt::SolidLine); m_TBPen.setColor(QColor(255, 255, 255)); m_TBPen.setStyle(Qt::SolidLine); m_LRFlag = true; m_TBFlag = true; m_margins = QMargins(0, 0, 0, 0); setLineWidth(0); m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(scrollBarValueChangedSlot())); m_timer->start(60000); setViewportUpdateMode(QGraphicsView::FullViewportUpdate); connect(this->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarValueChangedSlot())); connect(this->verticalScrollBar(), &QScrollBar::sliderPressed, this, &CGraphicsView::slotScrollBar); } CGraphicsView::~CGraphicsView() { m_timer->stop(); m_timer->deleteLater(); clearSchdule(); delete m_coorManage; m_coorManage = nullptr; } void CGraphicsView::setMargins(int left, int top, int right, int bottom) { Q_UNUSED(top) m_margins = QMargins(left, 0, right, bottom); setViewportMargins(m_margins); } void CGraphicsView::setTheMe(int type) { if (type == 0 || type == 1) { m_weekcolor = "#00429A"; m_weekcolor.setAlphaF(0.05); QColor linecolor = "#000000"; linecolor.setAlphaF(0.1); m_LRPen.setColor(linecolor); m_TBPen.setColor(linecolor); m_LRPen.setStyle(Qt::SolidLine); m_TBPen.setStyle(Qt::SolidLine); } else if (type == 2) { m_weekcolor = "#4F9BFF"; m_weekcolor.setAlphaF(0.1); QColor linecolor = "#000000"; linecolor.setAlphaF(0.1); m_LRPen.setColor(linecolor); m_TBPen.setColor(linecolor); } scene()->update(); update(); } void CGraphicsView::slotCreate(const QDateTime &date) { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); dlg.setDate(date); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); } emit signalViewtransparentFrame(0); } bool CGraphicsView::MeetCreationConditions(const QDateTime &date) { return qAbs(date.daysTo(m_PressDate)<7); } void CGraphicsView::updateHigh() { scene()->update(); update(); } void CGraphicsView::setRange( int w, int h, QDate begindate, QDate enddate, int rightmagin) { m_MoveDate.setDate(begindate.addMonths(-2)); m_beginDate = begindate; m_endDate = enddate; w = w - rightmagin -2; m_Scene->setSceneRect(0, 0, w, h); m_coorManage->setRange(w, h, begindate, enddate, rightmagin); m_rightmagin = rightmagin; qint64 totalDay = begindate.daysTo(enddate) + 1; m_dayInterval = w * 1.0 / totalDay; m_timeInterval = h / 24.0; m_totalDay = totalDay; if (m_viewType ==0) { int viewWidth = viewport()->width(); int viewHeight = viewport()->height(); QPoint newCenter(viewWidth / 2, viewHeight / 2 - 2000); centerOnScene(mapToScene(newCenter)); } } void CGraphicsView::setRange(QDate begin, QDate end) { m_MoveDate.setDate(begin.addMonths(-2)); m_beginDate = begin; m_endDate = end; getCoorManage()->setDateRange(begin, end); } void CGraphicsView::setInfo(const QVector &info) { m_scheduleInfo = info; } bool MScheduleTimeThan(const ScheduleDtailInfo &s1, const ScheduleDtailInfo &s2) { if (s1.beginDateTime.date().daysTo(s1.endDateTime.date())== s2.beginDateTime.date().daysTo(s2.endDateTime.date())) { if (s1.beginDateTime == s2.beginDateTime) { return s1.beginDateTime.secsTo(s1.endDateTime) > s2.beginDateTime.secsTo(s2.endDateTime); } else { return s1.beginDateTime < s2.beginDateTime; } } else { return s1.beginDateTime.date().daysTo(s1.endDateTime.date())>s2.beginDateTime.date().daysTo(s2.endDateTime.date()); } } void CGraphicsView::upDateInfoShow(const CGraphicsView::DragStatus &status, const ScheduleDtailInfo &info) { clearSchdule(); QVector vListData; vListData = m_scheduleInfo; switch (status) { case NONE: Q_UNUSED(info); break; case ChangeBegin: case ChangeEnd: { int index = vListData.indexOf(info); if (index >=0) vListData[index] = info; } break; case ChangeWhole: vListData.append(info); break; case IsCreate: vListData.append(info); break; } QMap > m_InfoMap; QDate currentDate; qint64 count = m_beginDate.daysTo(m_endDate); qint64 beginoffset = 0, endoffset = 0; QVector currentInfo; for (int i = 0; i <= count; ++i) { currentDate = m_beginDate.addDays(i); currentInfo.clear(); for (int j = 0; j 0 && vListData.at(j).endDateTime.time() ==QTime(0,0,0)) { continue; } currentInfo.append(vListData.at(j)); } std::sort(currentInfo.begin(), currentInfo.end(), MScheduleTimeThan); if (currentInfo.size()>0) { m_InfoMap[currentDate] = currentInfo; QList info; scheduleClassificationType(currentInfo,info); for (int m = 0; m < info.count(); m++) { int tnum = info.at(m).vData.count(); if (m_viewType == 0) { if (tnum > m_sMaxNum) { tnum = m_sMaxNum; for (int n = 0; n < tnum - 1; n++) { addSchduleItem(info.at(m).vData.at(n), currentDate, n + 1, tnum, 0, m_viewType, m_sMaxNum); } ScheduleDtailInfo tdetaliinfo = info.at(m).vData.at(tnum - 2); tdetaliinfo.titleName = "..."; tdetaliinfo.type.ID = 3; addSchduleItem(tdetaliinfo, currentDate, tnum, tnum, 1, m_viewType, m_sMaxNum); } else { for (int n = 0; n < tnum; n++) { addSchduleItem(info.at(m).vData.at(n), currentDate, n + 1, tnum, 0, m_viewType, m_sMaxNum); } } } else { for (int n = 0; n < tnum; n++) { addSchduleItem(info.at(m).vData.at(n), currentDate, n + 1, tnum, 0, m_viewType, m_sMaxNum); } } } } } } QDateTime CGraphicsView::getPosDate(const QPoint &p) { return TimeRounding(m_coorManage->getDate(mapToScene(p))); } void CGraphicsView::ShowSchedule(DragInfoItem *infoitem) { CScheduleItem *scheduleitem = dynamic_cast(infoitem); if (scheduleitem->getType() == 1) return; DragInfoGraphicsView::ShowSchedule(infoitem); } void CGraphicsView::MoveInfoProcess(ScheduleDtailInfo &info, const QPointF &pos) { Q_UNUSED(pos); if (!info.allday) { qint64 offset = m_PressDate.secsTo(m_MoveDate); info.beginDateTime = info.beginDateTime.addSecs(offset); info.endDateTime = info.endDateTime.addSecs(offset); } else { info.allday = false; info.remind = false; info.beginDateTime = m_MoveDate; info.endDateTime = m_MoveDate.addSecs(3600); } info.IsMoveInfo = true; upDateInfoShow(ChangeWhole,info); } void CGraphicsView::addSchduleItem( const ScheduleDtailInfo &info, QDate date, int index, int totalNum, int type, int viewtype, int maxnum) { CScheduleItem *item = new CScheduleItem( m_coorManage->getDrawRegion(date, info.beginDateTime, info.endDateTime, index, totalNum, maxnum, viewtype), nullptr, type); m_Scene->addItem(item); item->setData(info, date, totalNum); m_vScheduleItem.append(item); } void CGraphicsView::deleteSchduleItem( CScheduleItem *item ) { int id = item->getData().id; for (int i = 0; i < m_vScheduleItem.size(); i++) { if (m_vScheduleItem[i]->getData().id == id) { m_vScheduleItem.remove(i); m_Scene->removeItem(item); delete m_vScheduleItem[i]; m_vScheduleItem[i] = nullptr; i--; } } } void CGraphicsView::setSelectSchedule(const ScheduleDtailInfo &info) { setTime(info.beginDateTime.time()); for (int i = 0 ; i < m_vScheduleItem.size(); ++i) { if (m_vScheduleItem.at(i)->getType() == 1) continue; if (m_vScheduleItem.at(i)->hasSelectSchedule(info)) { m_vScheduleItem.at(i)->setStartValue(0); m_vScheduleItem.at(i)->setEndValue(10); m_vScheduleItem.at(i)->startAnimation(); } } } void CGraphicsView::clearSchdule() { for (int i = 0; i < m_vScheduleItem.size(); i++) { m_Scene->removeItem(m_vScheduleItem.at(i)); delete m_vScheduleItem[i]; m_vScheduleItem[i] = nullptr; } m_vScheduleItem.clear(); m_updateDflag = true; } void CGraphicsView::scheduleClassificationType(QVector &scheduleInfolist, QList &info) { QVector schedulelist = scheduleInfolist; if (schedulelist.isEmpty()) return; info.clear(); std::sort(schedulelist.begin(), schedulelist.end(), MScheduleTimeThan); QVector containIndex; for (int k = 0; k < schedulelist.count(); k++) { QDateTime endTime = schedulelist.at(k).endDateTime; QDateTime begTime = schedulelist.at(k).beginDateTime; if (begTime.date().daysTo(endTime.date())==0 && begTime.time().secsTo(endTime.time())= info.at(i).begindate && schedulelist.at(k).beginDateTime <= info.at(i).enddate) || (endTime >= info.at(i).begindate && endTime <= info.at(i).enddate) ) { containIndex.append(i); } } if (containIndex.count()==0) { ScheduleclassificationInfo firstschedule; firstschedule.begindate = schedulelist.at(k).beginDateTime; firstschedule.enddate = endTime; firstschedule.vData.append(schedulelist.at(k)); info.append(firstschedule); } else { ScheduleclassificationInfo &scheduleInfo = info[containIndex.at(0)]; int index = 0; for (int i = 1; i < containIndex.count(); ++i) { index = containIndex.at(i); if (info.at(index).begindate < scheduleInfo.begindate) scheduleInfo.begindate = info.at(index).begindate; if (info.at(index).enddate>scheduleInfo.enddate) scheduleInfo.enddate = info.at(index).enddate; scheduleInfo.vData.append(info.at(index).vData); } for (int i = containIndex.count() -1; i >0; --i) { info.removeAt(containIndex.at(i)); } if (schedulelist.at(k).beginDateTime < scheduleInfo.begindate) scheduleInfo.begindate = schedulelist.at(k).beginDateTime; if (endTime>scheduleInfo.enddate) scheduleInfo.enddate = endTime; scheduleInfo.vData.append(schedulelist.at(k)); } } } void CGraphicsView::mouseDoubleClickEvent( QMouseEvent *event ) { emit signalScheduleShow(false); DGraphicsView::mouseDoubleClickEvent(event); CScheduleItem *item = dynamic_cast(itemAt(event->pos())); if (item == nullptr) { QPointF senceposs = mapToScene(event->pos()); emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); QDateTime tDatatime = m_coorManage->getDate(senceposs); dlg.setDate(tDatatime); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); } emit signalViewtransparentFrame(0); return; } if (item->getType() == 1) { emit signalsCurrentScheduleDate(item->getdate()); return; } emit signalViewtransparentFrame(1); m_updateDflag = false; CMySchceduleView dlg(item->getData(), this); connect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CGraphicsView::slotDoubleEvent); dlg.exec(); emit signalViewtransparentFrame(0); disconnect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CGraphicsView::slotDoubleEvent); if (item == nullptr) { return; } } void CGraphicsView::mousePressEvent(QMouseEvent *event) { CScheduleItem *item = dynamic_cast(itemAt(event->pos())); if (item !=nullptr &&item->getType() ==1) { emit signalScheduleShow(false); return; } DragInfoGraphicsView::mousePressEvent(event); } void CGraphicsView::mouseMoveEvent(QMouseEvent *event) { CScheduleItem *item = dynamic_cast(itemAt(event->pos())); if (item !=nullptr &&item->getType() ==1) { setCursor(Qt::ArrowCursor); DGraphicsView::mouseMoveEvent(event); return; } DragInfoGraphicsView::mouseMoveEvent(event); } void CGraphicsView::slotDoubleEvent(int type) { Q_UNUSED(type); m_updateDflag = true; emit signalsUpdateShcedule(); } void CGraphicsView::slotDeleteItem() { if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID <0) { return; } if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID != DDECalendar::FestivalTypeID) { DeleteItem(CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo()); } CScheduleDataManage::getScheduleDataManage()->setPressSelectInfo(ScheduleDtailInfo()); } void CGraphicsView::slotScrollBar() { emit signalScheduleShow(false); } void CGraphicsView::slotUpdateScene() { this->scene()->update(); } #ifndef QT_NO_WHEELEVENT /************************************************************************ Function: wheelEvent() Description: 鼠标滚轮事件 Input: event 滚轮事件 Output: 无 Return: 无 Others: 无 ************************************************************************/ void CGraphicsView::wheelEvent( QWheelEvent *event ) { emit signalScheduleShow(false); int test = event -> delta(); int viewWidth = viewport()->width(); int viewHeight = viewport()->height(); QPoint newCenter(viewWidth / 2, viewHeight / 2 - test); QPointF centerpos = mapToScene(newCenter); centerOnScene(centerpos); } #endif /************************************************************************ Function: resizeEvent() Description: 窗口大小改变事件 Input: event 窗口大小改变事件 Output: 无 Return: 无 Others: 无 ************************************************************************/ void CGraphicsView::resizeEvent( QResizeEvent *event ) { scrollBarValueChangedSlot(); QGraphicsView::resizeEvent(event); viewport()->update(); update(); } /************************************************************************ Function: paintEvent() Description: 绘制事件 Input: event 事件 Output: 无 Return: 无 Others: 无 ************************************************************************/ void CGraphicsView::paintEvent(QPaintEvent *event) { QPainter t_painter(viewport()); //绘制背景 paintBackground(t_painter); int t_width = viewport()->width() + 2; //绘制水平线 if (m_LRFlag) { if (m_cuttrnttimetype == 0) { t_painter.save(); t_painter.setPen(m_LRPen); for (int i = 0; i < m_vLRLarge.size(); ++i) t_painter.drawLine(QPoint(0, m_vLRLarge[i] - 1), QPoint(t_width, m_vLRLarge[i] - 1)); t_painter.restore(); } else { t_painter.save(); t_painter.setPen(m_LRPen); for (int i = 0; i < m_vLRLarge.size() - 1; ++i) t_painter.drawLine(QPoint(0, m_vLRLarge[i] - 1), QPoint(t_width, m_vLRLarge[i] - 1)); t_painter.restore(); if (m_viewType == 1 && m_coorManage->getBegindate() == QDate::currentDate()) { t_painter.save(); QPen pen = m_LRPen; pen.setColor(m_currenttimecolor); t_painter.setPen(pen); int index = m_vLRLarge.count() - 1; t_painter.drawLine(QPoint(0, m_vLRLarge[index] - 1), QPoint(t_width, m_vLRLarge[index] - 1)); t_painter.restore(); } } } QGraphicsView::paintEvent(event); } void CGraphicsView::paintBackground(QPainter &painter) { // 绘制Rect的宽度 const int t_width = viewport()->width() - 2; // 需要处理的天数 const qint64 m_TotalDay = m_beginDate.daysTo(m_endDate) + 1; // 左边距 const int m_leftMagin = 0; // 每天的宽度 const qreal intenval = 1.0 * (t_width - m_leftMagin) / m_TotalDay; // 每天X坐标点偏移 const qreal XPointOffset = 1.5; // 分割线颜色 QColor m_linecolor = "#000000"; m_linecolor.setAlphaF(0.1); if (m_TotalDay > 1) { painter.save(); painter.setPen(Qt::SolidLine); painter.setPen(m_linecolor); //绘制分割线 for (int i = 1; i < 7; ++i) { painter.drawLine(QPointF(i * intenval + m_leftMagin + XPointOffset, 1), QPointF(i * intenval + m_leftMagin + XPointOffset, this->height())); } painter.restore(); painter.save(); //绘制周六周日背景色 painter.setBrush(m_weekcolor); painter.setPen(Qt::NoPen); painter.setRenderHint(QPainter::Antialiasing); for (int i = 0; i != 7; ++i) { int d = m_beginDate.addDays(i).dayOfWeek(); if (d == 7 || d == 6) { painter.drawRect( QRectF(m_leftMagin + i * intenval + XPointOffset, 0, intenval, this->height())); } } painter.restore(); } } void CGraphicsView::scrollBarValueChangedSlot() { emit signalScheduleShow(false); QMutexLocker locker(&m_Mutex); int viewHeight = viewport()->height(); m_vLRLarge.clear(); m_vTBLarge.clear(); QPointF leftToprealPos = mapToScene(QPoint(0, 0)); QPointF leftBttomrealPos = mapToScene(QPoint(0, viewHeight)); for (qreal i = m_dayInterval; i < scene()->width(); i = i + m_dayInterval) { m_vTBLarge.append(qFloor(i)); } qreal beginpos = static_cast(qFloor(leftToprealPos.y() / m_timeInterval) * m_timeInterval); if (beginpos < leftToprealPos.y()) { beginpos = (beginpos / m_timeInterval + 1) * m_timeInterval ; } QVector vHours; for (qreal i = beginpos; i < leftBttomrealPos.y(); i = i + m_timeInterval) { QPoint point = mapFromScene(leftBttomrealPos.x(), i); m_vLRLarge.append(point.y()); vHours.append(qFloor(i / m_timeInterval + 0.5)); } qreal currentTime = static_cast(m_coorManage->getHeight(QTime::currentTime())); if (currentTime > beginpos && currentTime < leftBttomrealPos.y()) { m_cuttrnttimetype = 1; QPoint point = mapFromScene(leftBttomrealPos.x(), currentTime); m_vLRLarge.append(point.y()); vHours.append(qFloor(currentTime / m_timeInterval + 0.5)); emit signalsPosHours(m_vLRLarge, vHours, m_cuttrnttimetype); } else { m_cuttrnttimetype = 0; emit signalsPosHours(m_vLRLarge, vHours, m_cuttrnttimetype); } scene()->update(); update(); } int CGraphicsView::checkDay(int weekday) { if (weekday <= 0) return weekday += 7; if (weekday > 7) return weekday -= 7; return weekday; } CGraphicsView::PosInItem CGraphicsView::getPosInItem(const QPoint &p, const QRectF &itemRect) { QPointF scenePos = this->mapToScene(p); QPointF itemPos = QPointF(scenePos.x()-itemRect.x(), scenePos.y()-itemRect.y()); qreal bottomy = itemRect.height()- itemPos.y(); if (itemPos.y()<5) { return TOP; } if (bottomy <5) { return BOTTOM; } return MIDDLE; } ScheduleDtailInfo CGraphicsView::getScheduleInfo(const QDateTime &beginDate, const QDateTime &endDate) { ScheduleDtailInfo info; if (beginDate.secsTo(endDate)>0) { info.beginDateTime = beginDate; if (beginDate.secsTo(endDate) < DDECalendar::ThirtyMinutesWithSec) { info.endDateTime = beginDate.addSecs(DDECalendar::ThirtyMinutesWithSec); } else { info.endDateTime = endDate; } } else { if (endDate.secsTo(beginDate) < DDECalendar::ThirtyMinutesWithSec) { info.beginDateTime = beginDate.addSecs(-DDECalendar::ThirtyMinutesWithSec); } else { info.beginDateTime = endDate; } info.endDateTime = beginDate; } info.titleName = tr("New Event"); info.allday = false; info.remind = true; info.id = 0; info.remindData.n = 1; info.remindData.time = QTime(9, 0); info.RecurID = 0; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType( 1, info.type); info.rpeat = 0; return info; } bool CGraphicsView::IsEqualtime(const QDateTime &timeFirst, const QDateTime &timeSecond) { return !(qAbs(timeFirst.secsTo(timeSecond))>100); } bool CGraphicsView::JudgeIsCreate(const QPointF &pos) { return qAbs(pos.x()-m_PressPos.x())>20 || qAbs(m_PressDate.secsTo(m_coorManage->getDate(mapToScene(pos.toPoint()))))>300; } void CGraphicsView::RightClickToCreate(QGraphicsItem *listItem, const QPoint &pos) { Q_UNUSED(listItem); m_rightMenu->clear(); m_rightMenu->addAction(m_createAction); QPointF senceposs = mapToScene(pos); m_createDate =m_coorManage->getDate(senceposs); m_rightMenu->exec(QCursor::pos()); } QDateTime CGraphicsView::getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) { return moveDateTime.secsTo(m_InfoEndTime) < DDECalendar::ThirtyMinutesWithSec ? m_InfoEndTime.addSecs(-DDECalendar::ThirtyMinutesWithSec) : moveDateTime; } QDateTime CGraphicsView::getDragScheduleInfoEndTime(const QDateTime &moveDateTime) { return m_InfoBeginTime.secsTo(moveDateTime) < DDECalendar::ThirtyMinutesWithSec ? m_InfoBeginTime.addSecs(DDECalendar::ThirtyMinutesWithSec) : moveDateTime; } QDateTime CGraphicsView::TimeRounding(const QDateTime &time) { int hours = time.time().hour(); int minnutes = 0; minnutes = time.time().minute() / 15; return QDateTime(time.date(),QTime(hours,minnutes*15,0)); } void CGraphicsView::centerOnScene(const QPointF &pos) { // view 根据鼠标下的点作为锚点来定位 scene setTransformationAnchor(QGraphicsView::AnchorUnderMouse); centerOn(pos); // scene 在 view 的中心点作为锚点 setTransformationAnchor(QGraphicsView::AnchorViewCenter); scrollBarValueChangedSlot(); setSceneHeightScale(pos); } void CGraphicsView::setSceneHeightScale(const QPointF &pos) { m_sceneHeightScale = pos.y()/this->scene()->height(); } void CGraphicsView::keepCenterOnScene() { QPointF pos; pos.setX(this->viewport()->width()/2); pos.setY(this->scene()->height()*m_sceneHeightScale); centerOnScene(pos); } void CGraphicsView::getLargeScaleFlag(bool &LRFlag, bool &TBFlag) { LRFlag = m_LRFlag; TBFlag = m_TBFlag; } void CGraphicsView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; } void CGraphicsView::setTime(QTime time) { int viewWidth = viewport()->width(); int viewHeight = viewport()->height(); QPoint newCenter(viewWidth / 2, viewHeight / 2); QPointF centerpos = mapToScene(newCenter); centerpos = QPointF(centerpos.x(), static_cast(m_coorManage->getHeight(time))); centerOnScene(centerpos); } void CGraphicsView::updateInfo() { switch (m_DragStatus) { case IsCreate: upDateInfoShow(IsCreate,m_DragScheduleInfo); break; default: upDateInfoShow(); break; } } dde-calendar-5.7.0.23/src/view/graphicsview.h000066400000000000000000000161551375021633200206700ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 GRAPHICSVIEW_H #define GRAPHICSVIEW_H #include "schedulestructs.h" #include "draginfographicsview.h" #include #include #include #include #include #include DWIDGET_USE_NAMESPACE typedef struct _tagScheduleclassificationInfo { QDateTime begindate; QDateTime enddate; QVector vData; } ScheduleclassificationInfo; class CScheduleCoorManage; class CScheduleItem; class CGraphicsView : public DragInfoGraphicsView { Q_OBJECT public: CGraphicsView(QWidget *parent, int viewType = 0); ~CGraphicsView() override; void setMargins(int left, int top, int right, int bottom); QMargins getMargins() { return m_margins; } void updateHigh(); void setRange(int w, int h, QDate begindate, QDate enddate, int rightmagin); void setRange(QDate begin, QDate end); CScheduleCoorManage *getCoorManage() { return m_coorManage; } void setInfo(const QVector &info); void addSchduleItem(const ScheduleDtailInfo &info, QDate date, int index, int totalNum, int type, int viewtype, int maxnum); void deleteSchduleItem(CScheduleItem *item); void setSelectSchedule(const ScheduleDtailInfo &info); void clearSchdule(); void setMinTime(const int &minTime) { m_minTime = minTime; } void setMaxNum(const int maxnum) { m_sMaxNum = maxnum; } void keepCenterOnScene(); void scheduleClassificationType(QVector &scheduleInfolist, QList &info); void mouseDoubleClickEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; #ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *event) override; #endif /************************************************************************ Function: resizeEvent() Description: 窗口大小改变事件 Input: event 窗口大小改变事件 Output: 无 Return: 无 Others: 无 ************************************************************************/ void resizeEvent(QResizeEvent *event) override; /************************************************************************ Function: getLargeScaleFlag() Description: 获取大刻度显示 Input: LRFlag 水平刻度,TBFlag 垂直刻度 Output: 无 Return: 无 Others: 无 ************************************************************************/ void getLargeScaleFlag(bool &LRFlag, bool &TBFlag); void setFirstWeekday(int weekday); void setTime(QTime time); void updateInfo(); protected: void paintEvent(QPaintEvent *event) override; private: /** * @brief paintBackground 绘制背景--周试图周六周天的背景色和每天的分割线 * @param painter painter对象 */ void paintBackground(QPainter &painter); public slots: void scrollBarValueChangedSlot(); void slotDoubleEvent(int type); void slotDeleteItem(); void slotScrollBar(); void slotUpdateScene(); signals: void signalsPosHours(QVector vPos, QVector vHours, int cuttrnttimetype = 0); void signalsCurrentScheduleDate(QDate date); void signalSceneUpdate(); private: int checkDay(int weekday); void TimeRound(QDateTime &dtime); QDateTime TimeRounding(const QDateTime &time); void centerOnScene(const QPointF &pos); void setSceneHeightScale(const QPointF &pos); public: void setTheMe(int type = 0) override; protected: void slotCreate(const QDateTime &date) override; bool MeetCreationConditions(const QDateTime &date) override; void upDateInfoShow(const DragStatus &status = NONE,const ScheduleDtailInfo &info =ScheduleDtailInfo())override; QDateTime getPosDate(const QPoint &p) override; void ShowSchedule(DragInfoItem *infoitem) override; void MoveInfoProcess(ScheduleDtailInfo &info,const QPointF &pos) override; PosInItem getPosInItem(const QPoint &p,const QRectF &itemRect) override; ScheduleDtailInfo getScheduleInfo(const QDateTime &beginDate,const QDateTime &endDate) override; bool IsEqualtime(const QDateTime &timeFirst,const QDateTime &timeSecond) override; bool JudgeIsCreate(const QPointF &pos) override; void RightClickToCreate(QGraphicsItem *listItem,const QPoint &pos) override; QDateTime getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) override; QDateTime getDragScheduleInfoEndTime(const QDateTime &moveDateTime) override; private: CScheduleCoorManage *m_coorManage = nullptr; QVector m_vScheduleItem; QMargins m_margins; //四周空白 bool m_LRFlag; //水平线 QPen m_LRPen; //水平线画笔 bool m_TBFlag; //垂直线 QPen m_TBPen; //垂直线画笔 QVector m_vLRLarge; //大刻度像素位置 QVector m_vTBLarge; //大刻度像素位置 qreal m_dayInterval; qreal m_timeInterval; int m_firstWeekDay; qint64 m_totalDay; qreal m_sceneHeightScale =0; QColor m_weekcolor = "#4F9BFF"; QColor m_currenttimecolor = "#F74444"; int m_cuttrnttimetype = 0; QTimer *m_timer = nullptr; QMutex m_Mutex; int m_viewType = 0; bool m_updateDflag = false; int m_rightmagin = 0; QVector m_scheduleInfo; QDate m_beginDate; QDate m_endDate; int m_minTime; //最小高度对应的最小时间 int m_sMaxNum = 4; }; #endif // GRAPHICSVIEW_H dde-calendar-5.7.0.23/src/view/monthgraphiview.cpp000066400000000000000000000573151375021633200217460ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 "monthgraphiview.h" #include "../widget/monthWidget/monthschceduleview.h" #include "../dialog/schceduledlg.h" #include "../dialog/schcedulectrldlg.h" #include "../dialog/myschceduleview.h" #include "constants.h" #include #include #include #include bool CDayGraphicsItem::m_LunarVisible = false; CMonthGraphiview::CMonthGraphiview(QWidget *parent) : DragInfoGraphicsView (parent) { QShortcut *shortcut = new QShortcut(parent); shortcut->setKey(QKeySequence(QLatin1String("Delete"))); connect(shortcut, &QShortcut::activated, this, &CMonthGraphiview::slotDeleteItem); m_MonthSchceduleView = new CMonthSchceduleView(this,m_Scene); connect(this,&CMonthGraphiview::signalFontChange, m_MonthSchceduleView,&CMonthSchceduleView::slotFontChange); for (int i = 0; i < DDEMonthCalendar::ItemSizeofMonthDay; ++i) { CDayGraphicsItem *item = new CDayGraphicsItem(); item->setZValue(-1); m_DayItem.append(item); m_Scene->addItem(item); item->setitemnum(i); } updateSize(); } CMonthGraphiview::~CMonthGraphiview() { delete m_MonthSchceduleView; for (int i = 0; i < m_DayItem.size(); ++i) { CDayGraphicsItem *item = m_DayItem.at(i); delete item; item = nullptr; } m_DayItem.clear(); } void CMonthGraphiview::setTheMe(int type) { m_themetype = type; for (int i = 0; i < m_DayItem.size(); ++i) { m_DayItem.at(i)->setTheMe(type); } m_MonthSchceduleView->setTheMe(type); } void CMonthGraphiview::setDate(const QDate date[42]) { if (date[0].day() !=1) { m_currentMonth = date[0].addMonths(1).month(); } else { m_currentMonth = date[0].month(); } for (int i = 0; i < m_DayItem.size(); ++i) { m_DayItem.at(i)->setData(date[i]); m_DayItem.at(i)->setCurrentMonth(date[i].month() == m_currentMonth); m_DayItem.at(i)->setStatus(CDayGraphicsItem::HolidayStatus(getFestivalInfoByDate(date[i]))); } this->scene()->update(); } void CMonthGraphiview::setLunarInfo(QMap *lunarCache) { m_lunarCache = lunarCache; updateLunar(); } void CMonthGraphiview::setLunarVisible(bool visible) { CDayGraphicsItem::m_LunarVisible = visible; } void CMonthGraphiview::setScheduleInfo(const QVector &info) { m_shceludelistdata = info; updateInfo(); } void CMonthGraphiview::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { QVector mscheduleShowBtn = m_MonthSchceduleView->getScheduleShowItem(); for (int i = 0; i < mscheduleShowBtn.size(); ++i) { CMonthSchceduleWidgetItem *item = dynamic_cast(mscheduleShowBtn.at(i)); if (item == nullptr) continue; if (scheduleInfo == item->getData()) { item->setStartValue(0); item->setEndValue(4); item->startAnimation(); } } } void CMonthGraphiview::updateSize() { m_Scene->setSceneRect(this->viewport()->rect()); qreal w = m_Scene->width() / DDEMonthCalendar::AFewDaysofWeek; qreal h = m_Scene->height() / DDEMonthCalendar::LinesNumofMonth; QRectF rect ; int w_offset = 0; int h_offset = 0; for (int i = 0 ; i < m_DayItem.size(); ++i) { h_offset = i / DDEMonthCalendar::AFewDaysofWeek; w_offset = i % DDEMonthCalendar::AFewDaysofWeek; rect.setRect(w*w_offset, h*h_offset, w, h); m_DayItem.at(i)->setRect(rect); } } void CMonthGraphiview::updateLunar() { QDate date; CaLunarDayInfo info; QString lunarStr(""); for (int i = 0 ; i < m_DayItem.size(); ++i) { date = m_DayItem.at(i)->getDate(); if (m_lunarCache->contains(date)) { info = m_lunarCache->value(date); if (info.mLunarDayName == "初一") { info.mLunarDayName = info.mLunarMonthName + info.mLunarDayName; } if (info.mTerm.isEmpty()) { lunarStr = info.mLunarDayName; } else { lunarStr = info.mTerm; } } else { lunarStr = ""; } m_DayItem.at(i)->setLunar(lunarStr); } } void CMonthGraphiview::updateInfo() { int h = m_MonthSchceduleView->getSchceduleHeight(); m_MonthSchceduleView->setallsize(this->viewport()->width(), this->viewport()->height(), 0, 0, 0, h); m_MonthSchceduleView->setData(m_shceludelistdata, 1); switch (m_DragStatus) { case IsCreate: upDateInfoShow(IsCreate,m_DragScheduleInfo); break; case ChangeWhole: upDateInfoShow(ChangeWhole,m_DragScheduleInfo); break; default: break; } update(); } char CMonthGraphiview::getFestivalInfoByDate(const QDate &date) { for (int i = 0; i < m_festivallist.count(); i++) { for (int j = 0; j < m_festivallist[i].listHoliday.count(); j++) { if (m_festivallist[i].listHoliday[j].date == date) { return m_festivallist[i].listHoliday[j].status; } } } return 0; } QPointF CMonthGraphiview::getItemPos(const QPoint &p, const QRectF &itemRect) { QPointF scenePos = this->mapToScene(p); return QPointF(scenePos.x()-itemRect.x(), scenePos.y()-itemRect.y()); } CMonthGraphiview::PosInItem CMonthGraphiview::getPosInItem(const QPoint &p, const QRectF &itemRect) { QPointF scenePos = this->mapToScene(p); QPointF itemPos = QPointF(scenePos.x()-itemRect.x(), scenePos.y()-itemRect.y()); qreal bottomy = itemRect.width()- itemPos.x(); if (itemPos.x()<5) { return LEFT; } if (bottomy <5) { return RIGHT; } return MIDDLE; } QDateTime CMonthGraphiview::getPosDate(const QPoint &p) { if (!this->sceneRect().contains(p)) return m_MoveDate; QRectF rect = this->sceneRect(); qreal x =0; qreal y = 0; if (p.x()<0) { x =0; } else if (p.x()>(rect.width()-10)) { x = rect.width()-10; } else { x = p.x(); } if (p.y()<0) { y =0; } else if (p.y()>(rect.height()-10)) { y = rect.height()-10; } else { y = p.y(); } int xoffset = qFloor(x / (rect.width() / DDEMonthCalendar::AFewDaysofWeek)) % DDEMonthCalendar::AFewDaysofWeek; int yoffset = qFloor(y / (rect.height() / DDEMonthCalendar::LinesNumofMonth)) % DDEMonthCalendar::LinesNumofMonth; return QDateTime(m_DayItem[xoffset+yoffset*7]->getDate(), QTime(0,0,0)); } void CMonthGraphiview::upDateInfoShow(const CMonthGraphiview::DragStatus &status, const ScheduleDtailInfo &info) { switch (status) { case NONE: Q_UNUSED(info); break; case ChangeBegin: case ChangeEnd: { m_MonthSchceduleView->changeDate(info); } break; case ChangeWhole: { } break; case IsCreate: m_MonthSchceduleView->updateDate(info); break; } } void CMonthGraphiview::updateScheduleInfo(const ScheduleDtailInfo &info) { if (info.rpeat >0) { CSchceduleDlg::ChangeRecurInfo(this,info, m_PressScheduleInfo,m_themetype); } else { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo( info); } } void CMonthGraphiview::DeleteItem(const ScheduleDtailInfo &info) { emit signalViewtransparentFrame(1); if (info.rpeat == 0) { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Are you sure you want to delete this event?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Delete"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(info.id); } } else { if (info.RecurID == 0) { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete all occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(info.id); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.ignore.append(info.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } else { CSchceduleCtrlDlg msgBox(this); msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete this and all future occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All Future Events")); msgBox.addWaringButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.enddata.type = 2; newschedule.enddata.date = info.beginDateTime.addDays(-1); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(info.id, newschedule); newschedule.ignore.append(info.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } } emit signalsUpdateShcedule(); emit signalViewtransparentFrame(0); } void CMonthGraphiview::setPressSelectInfo(const ScheduleDtailInfo &info) { CScheduleDataManage::getScheduleDataManage()->setPressSelectInfo(info); } void CMonthGraphiview::mouseDoubleClickEvent(QMouseEvent *event) { if (event->button() != Qt::LeftButton) { return; } QGraphicsItem *listItem =itemAt(event->pos()); CMonthSchceduleNumButton *item = dynamic_cast(listItem); if (item!= nullptr) { //双击切换视图 if (item->getDate().year() > DDECalendar::QueryEarliestYear) { emit signalsViewSelectDate(item->getDate()); } return; } CMonthSchceduleWidgetItem *infoitem = dynamic_cast(listItem); if (infoitem != nullptr) { CMySchceduleView dlg(infoitem->getData(), this); connect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CMonthGraphiview::signalsUpdateShcedule); connect(&dlg, &CMySchceduleView::signalViewtransparentFrame, this, &CMonthGraphiview::signalViewtransparentFrame); dlg.exec(); return; } CDayGraphicsItem *Dayitem = dynamic_cast(listItem); if (Dayitem !=nullptr) { QPointF point = getItemPos(event->pos(),Dayitem->rect()); if (point.y()<38) { //双击切换视图 if (Dayitem->getDate().year() > DDECalendar::QueryEarliestYear) { emit signalsViewSelectDate(Dayitem->getDate()); } } else { //双击新建日程 slotCreate(QDateTime(Dayitem->getDate(),QTime(0,0,0))); } } } void CMonthGraphiview::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); updateSize(); updateInfo(); } void CMonthGraphiview::changeEvent(QEvent *event) { if (event->type() ==QEvent::FontChange) { emit signalFontChange(); } } void CMonthGraphiview::wheelEvent(QWheelEvent *e) { Q_UNUSED(e); } void CMonthGraphiview::setDragPixmap(QDrag *drag, DragInfoItem *item) { CMonthSchceduleWidgetItem *infoitem = dynamic_cast(item); drag->setPixmap(infoitem->getPixmap()); } bool CMonthGraphiview::MeetCreationConditions(const QDateTime &date) { return qAbs(date.daysTo(m_PressDate)<43); } bool CMonthGraphiview::IsEqualtime(const QDateTime &timeFirst, const QDateTime &timeSecond) { return timeFirst.date()==timeSecond.date(); } bool CMonthGraphiview::JudgeIsCreate(const QPointF &pos) { return qAbs(pos.x()-m_PressPos.x())>20 ||qAbs(m_PressDate.daysTo(getPosDate(pos.toPoint())))>0; } void CMonthGraphiview::RightClickToCreate(QGraphicsItem *listItem,const QPoint &pos) { Q_UNUSED(pos); CDayGraphicsItem *Dayitem = dynamic_cast(listItem); if (Dayitem != nullptr) { m_rightMenu->clear(); m_rightMenu->addAction(m_createAction); m_createDate.setDate(Dayitem->getDate()); m_rightMenu->exec(QCursor::pos()); } } void CMonthGraphiview::MoveInfoProcess(ScheduleDtailInfo &info, const QPointF &pos) { qint64 offset = m_PressDate.daysTo(m_MoveDate); info.beginDateTime = info.beginDateTime.addDays(offset); info.endDateTime = info.endDateTime.addDays(offset); qreal y = 0; QRectF rect = this->sceneRect(); if (pos.y()<0) { y =0; } else if (pos.y()>rect.height()) { y = rect.height(); } else { y = pos.y(); } int yoffset = qFloor(y / (rect.height() / DDEMonthCalendar::LinesNumofMonth)) % DDEMonthCalendar::LinesNumofMonth; info.IsMoveInfo = true; m_MonthSchceduleView->updateDate(yoffset,info); } QDateTime CMonthGraphiview::getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) { return moveDateTime.daysTo(m_InfoEndTime)<0 ? QDateTime(m_InfoEndTime.date(),m_InfoBeginTime.time()): QDateTime(moveDateTime.date(),m_InfoBeginTime.time()); } QDateTime CMonthGraphiview::getDragScheduleInfoEndTime(const QDateTime &moveDateTime) { return m_InfoBeginTime.daysTo(moveDateTime)<0 ? QDateTime(m_InfoBeginTime.date(),m_InfoEndTime.time()): QDateTime(moveDateTime.date(),m_InfoEndTime.time()); } void CMonthGraphiview::slotCreate(const QDateTime &date) { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(1, this); QDateTime tDatatime; tDatatime.setDate(date.date()); if (date.date() == QDate::currentDate()) { tDatatime.setTime(QTime::currentTime()); } else { tDatatime.setTime(QTime(8, 0)); } dlg.setDate(tDatatime); dlg.setAllDay(true); if (dlg.exec() == DDialog::Accepted) { emit signalsUpdateShcedule(); emit signalsSchceduleUpdate(0); } emit signalViewtransparentFrame(0); } void CMonthGraphiview::slotdelete(const int id) { Q_UNUSED(id); emit signalsSchceduleUpdate(0); } void CMonthGraphiview::slotDeleteItem() { if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID <0) { return; } if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().type.ID != DDECalendar::FestivalTypeID) { DeleteItem(CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo()); } CScheduleDataManage::getScheduleDataManage()->setPressSelectInfo(ScheduleDtailInfo()); } CDayGraphicsItem::CDayGraphicsItem(QGraphicsItem *parent) : QGraphicsRectItem(parent) , m_Date(QDate::currentDate()) , m_DayLunar("") , m_DayStatus(H_NONE) { m_dayNumFont.setPixelSize(DDECalendar::FontSizeTwentyfour); m_dayNumFont.setWeight(QFont::Light); m_LunerFont.setPixelSize(DDECalendar::FontSizeTwelve); m_LunerFont.setWeight(QFont::Normal); } CDayGraphicsItem::~CDayGraphicsItem() { } void CDayGraphicsItem::setData(const QDate &date) { m_Date = date; setLunar(""); } void CDayGraphicsItem::setLunar(const QString &lunar) { m_DayLunar = lunar; } void CDayGraphicsItem::setStatus(const CDayGraphicsItem::HolidayStatus &status) { m_DayStatus = status; } void CDayGraphicsItem::setTheMe(int type) { m_themetype = type; if (type == 0 || type == 1) { m_dayNumColor = "#000000"; m_dayNumCurrentColor = "#FFFFFF"; m_LunerColor = "#5E5E5E"; m_LunerColor.setAlphaF(0.5); m_fillColor = Qt::white; m_banColor = "#FF7171"; m_banColor.setAlphaF(0.1); m_xiuColor = "#ADFF71"; m_xiuColor.setAlphaF(0.1); m_BorderColor = "#000000"; m_BorderColor.setAlphaF(0.05); } else if (type == 2) { m_dayNumColor = "#C0C6D4"; m_dayNumCurrentColor = "#B8D3FF"; m_LunerColor = "#ABDAFF"; m_LunerColor.setAlphaF(0.5); m_fillColor = "#000000"; m_fillColor.setAlphaF(0.05); m_banColor = "#FF7171"; m_banColor.setAlphaF(0.1); m_xiuColor = "#ADFF71"; m_xiuColor.setAlphaF(0.1); m_BorderColor = "#000000"; m_BorderColor.setAlphaF(0.05); } update(); } void CDayGraphicsItem::setitemnum(int num) { m_itemnum = num; } void CDayGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); const int hh = 36; m_currentColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); painter->setRenderHints(QPainter::Antialiasing); //绘制背景 if (m_LunarVisible) { switch (m_DayStatus) { case H_WORK: painter->setBrush(QBrush(m_banColor)); break; case H_REST: painter->setBrush(QBrush(m_xiuColor)); break; default: painter->setBrush(QBrush(m_fillColor)); break; } } else { painter->setBrush(QBrush(m_fillColor)); } if (!m_IsCurrentMonth) { painter->setOpacity(0.4); } QPen pen; pen.setWidth(1); pen.setColor(m_BorderColor); painter->setPen(pen); if (m_itemnum == 35) { QPainterPath painterpath; painterpath.moveTo(0, this->rect().y()); painterpath.lineTo(0, this->rect().y() + this->rect().height() - m_radius); painterpath.arcTo(QRectF(0, this->rect().y() + this->rect().height() - m_radius * 2, m_radius * 2, m_radius * 2), 180, 90); painterpath.lineTo(this->rect().width(), this->rect().y() + this->rect().height()); painterpath.lineTo(this->rect().width(), this->rect().y()); painterpath.lineTo(0, this->rect().y()); painter->drawPath(painterpath); } else if (m_itemnum == 41) { QPainterPath painterpath; painterpath.moveTo(this->rect().x(), this->rect().y()); painterpath.lineTo(this->rect().x(), this->rect().y() + this->rect().height()); painterpath.lineTo(this->rect().x() + this->rect().width() - m_radius, this->rect().y() + this->rect().height()); painterpath.arcTo(QRectF(this->rect().x() + this->rect().width() - m_radius * 2, this->rect().y() + this->rect().height() - m_radius * 2, m_radius * 2, m_radius * 2), 270, 90); painterpath.lineTo(this->rect().x() + this->rect().width(), this->rect().y()); painterpath.lineTo(this->rect().y() + this->rect().height(), this->rect().y()); painter->drawPath(painterpath); } else { painter->drawRect(this->rect()); } painter->save(); painter->restore(); //绘制日期 painter->setFont(m_dayNumFont); QRectF fillRect; if (m_LunarVisible) { fillRect.setRect(this->rect().x()+3,this->rect().y()+4, hh, hh); } else { fillRect.setRect(this->rect().x(),this->rect().y()+4, this->rect().width(), hh); } if (m_Date ==QDate::currentDate()) { QFont tfont = m_dayNumFont; tfont.setPixelSize(DDECalendar::FontSizeTwenty); painter->setFont(tfont); painter->setPen(m_dayNumCurrentColor); painter->save(); painter->setRenderHint(QPainter::Antialiasing); painter->setBrush(QBrush(m_currentColor)); painter->setPen(Qt::NoPen); if (m_LunarVisible) painter->drawEllipse(QRectF(this->rect().x() + 6, this->rect().y() + 4, hh - 8, hh - 8)); else painter->drawEllipse(QRectF((this->rect().width() - hh + 8) / 2 + this->rect().x(), this->rect().y() + 4, hh - 8, hh - 8)); painter->restore(); } else { painter->setPen(m_dayNumColor); } fillRect.setY(fillRect.y()-10); fillRect.setX(fillRect.x()-1); painter->drawText(fillRect, Qt::AlignCenter, QString::number(m_Date.day())); painter->save(); painter->restore(); //绘制农历 if (m_LunarVisible) { QFontMetrics metrics(m_LunerFont); int Lunarwidth = metrics.width(m_DayLunar); qreal filleRectX = this->rect().width()-12-3-(58 +Lunarwidth)/2; QRectF fillRect(this->rect().x()+filleRectX, this->rect().y()+9, 12, 12); if (filleRectX>hh) { painter->setRenderHint(QPainter::Antialiasing); painter->setRenderHint(QPainter::HighQualityAntialiasing); painter->setRenderHint(QPainter::SmoothPixmapTransform); switch (m_DayStatus) { case H_WORK: { QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/resources/icon/ban.svg"); painter->drawPixmap(fillRect.toRect(), pixmap); } break; case H_REST: { QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/resources/icon/xiu.svg"); painter->drawPixmap(fillRect.toRect(), pixmap); } break; default: break; } } painter->setFont(m_LunerFont); painter->setPen(m_LunerColor); painter->drawText(QRectF(this->rect().x()+this->rect().width() - 58, this->rect().y()+6, 58, 18), Qt::AlignCenter, m_DayLunar); } } dde-calendar-5.7.0.23/src/view/monthgraphiview.h000066400000000000000000000125661375021633200214120ustar00rootroot00000000000000/* * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. * * Author: uniontech * * Maintainer: uniontech * * 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 * 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 MONTHGRAPHIVIEW_H #define MONTHGRAPHIVIEW_H #include "calendardbus.h" #include "schedulestructs.h" #include "draginfographicsview.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CDayGraphicsItem; class CMonthSchceduleWidgetItem; class CMonthSchceduleView; class CMonthGraphiview : public DragInfoGraphicsView { Q_OBJECT public: explicit CMonthGraphiview(QWidget *parent = nullptr); ~CMonthGraphiview() override; void setTheMe(int type = 0) override; public: void setDate(const QDate date[42]); void setFestivalInfo(const QVector &info) { m_festivallist = info; } void setLunarInfo(QMap *lunarCache); void setLunarVisible(bool visible); void setScheduleInfo(const QVector &info); void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); private: void updateSize(); void updateLunar(); void updateInfo(); char getFestivalInfoByDate(const QDate &date); QPointF getItemPos(const QPoint &p, const QRectF &itemRect); void updateScheduleInfo(const ScheduleDtailInfo &info); void DeleteItem(const ScheduleDtailInfo &info); void setPressSelectInfo(const ScheduleDtailInfo &info); protected: void mouseDoubleClickEvent(QMouseEvent *event) override; void resizeEvent(QResizeEvent *event) override; void changeEvent(QEvent *event) override; void wheelEvent(QWheelEvent *) override; private: void setDragPixmap(QDrag *drag,DragInfoItem *item) override; bool MeetCreationConditions(const QDateTime &date) override; //判断时间是否相等 bool IsEqualtime(const QDateTime &timeFirst,const QDateTime &timeSecond) override; //根据鼠标移动的距离判断是否创建日程 bool JudgeIsCreate(const QPointF &pos) override; void RightClickToCreate(QGraphicsItem *listItem,const QPoint &pos) override; void MoveInfoProcess(ScheduleDtailInfo &info,const QPointF &pos) override; QDateTime getDragScheduleInfoBeginTime(const QDateTime &moveDateTime) override; QDateTime getDragScheduleInfoEndTime(const QDateTime &moveDateTime) override; PosInItem getPosInItem(const QPoint &p,const QRectF &itemRect)override; QDateTime getPosDate(const QPoint &p)override; void upDateInfoShow(const DragStatus &status = NONE,const ScheduleDtailInfo &info =ScheduleDtailInfo())override; signals: void signalFontChange(); void signalsViewSelectDate(QDate date); void signalsSchceduleUpdate(const int id = 0); public slots: void slotCreate(const QDateTime &date) override; void slotdelete(const int id =0); void slotDeleteItem(); private: QVector m_DayItem; QMap *m_lunarCache = nullptr; QVector m_festivallist; int m_currentMonth; CMonthSchceduleView *m_MonthSchceduleView = nullptr; QVector m_shceludelistdata; }; class CDayGraphicsItem :public QObject, public QGraphicsRectItem { Q_OBJECT public: enum HolidayStatus {H_NONE = 0x00,H_REST = 0x01,H_WORK = 0x02}; explicit CDayGraphicsItem( QGraphicsItem *parent = nullptr); ~CDayGraphicsItem() override; void setData(const QDate &date); void setLunar(const QString &lunar); void setStatus(const HolidayStatus &status); void setCurrentMonth(bool isCurrent) { m_IsCurrentMonth = isCurrent; } void setTheMe(int type = 0); QDate getDate()const { return m_Date; } void setitemnum(int num); protected: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override; private: QDate m_Date; QString m_DayLunar; HolidayStatus m_DayStatus; QFont m_dayNumFont; QColor m_dayNumColor; QColor m_dayNumCurrentColor; QFont m_LunerFont; QColor m_LunerColor; QColor m_BorderColor; bool m_IsCurrentMonth = false; QColor m_fillColor = Qt::white; QColor m_banColor = "#FBE9B7"; QColor m_xiuColor = "#D4FFB3"; int m_themetype = 0; QColor m_currentColor; int m_itemnum = 0; const int m_radius = 18; public: static bool m_LunarVisible; }; #endif // MONTHGRAPHIVIEW_H dde-calendar-5.7.0.23/src/view/scheduleitem.cpp000077500000000000000000000233131375021633200212000ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "scheduleitem.h" #include "schedulecoormanage.h" #include "scheduledatamanage.h" #include "SchecduleRemindWidget.h" #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE CScheduleItem::CScheduleItem(QRectF rect, QGraphicsItem *parent, int type) : DragInfoItem (rect,parent) , m_type(type) { m_transparentcolor = "#000000"; m_transparentcolor.setAlphaF(0.05); } CScheduleItem::~CScheduleItem() {} void CScheduleItem::setData(const ScheduleDtailInfo &info, QDate date, int totalNum) { m_vScheduleInfo = info; m_totalNum = totalNum; m_date = date; update(); } bool CScheduleItem::hasSelectSchedule(const ScheduleDtailInfo &info) { return info == m_vScheduleInfo; } void CScheduleItem::splitText(QFont font, int w, int h, QString str, QStringList &liststr, QFontMetrics &fontm) { if (str.isEmpty()) return; QFontMetrics fontmetris(font); int heightT = fontm.height(); QString tstr; QStringList tliststr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fontmetris.width(tstr) + 5; if (widthT >= w) { tstr.chop(1); if (tstr.isEmpty()) break; tliststr.append(tstr); tstr.clear(); i--; } } tliststr.append(tstr); if (w < 30) { QFontMetrics fm_s(fontm); QFontMetrics f_st(font); QString s = tliststr.at(0) + "..."; if (h < 23) { tliststr.append(""); } else { if (tliststr.isEmpty()) { liststr.append(""); } else { QString c = str.at(0); QString s = c + "..."; QFontMetrics fm(font); while (f_st.width(s) > w && f_st.width(s) >24) { s.chop(1); } liststr.append(s); } } } else { for (int i = 0; i < tliststr.count(); i++) { if ((i + 1) * heightT <= h - 1) { liststr.append(tliststr.at(i)); } else { if (i == 0) { break; } else { QString s; QFontMetrics fm_str(fontm); if (i == tliststr.count()) s = fontm.elidedText(tliststr.at(i - 1), Qt::ElideRight, w); else { s = fontm.elidedText(tliststr.at(i - 1) + "...", Qt::ElideRight, w); } liststr.removeAt(i - 1); liststr.append(s); break; } } } } } void CScheduleItem::paintBackground(QPainter *painter, const QRectF &rect, const int isPixMap) { Q_UNUSED(isPixMap); CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType( m_vScheduleInfo.type.ID); m_vHighflag = CScheduleDataManage::getScheduleDataManage()->getSearchResult(m_vScheduleInfo); if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo() == m_vScheduleInfo ) { if (m_vScheduleInfo.IsMoveInfo == CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().IsMoveInfo) { m_vHighflag = true; } else { painter->setOpacity(0.4); gdcolor.textColor.setAlphaF(0.4); gdcolor.timeColor.setAlphaF(0.4); } m_vSelectflag = m_press; } int themetype = CScheduleDataManage::getScheduleDataManage()->getTheme(); QColor bcolor = gdcolor.Purecolor; QFontMetrics fm = painter->fontMetrics(); int h = fm.height(); if (m_vHoverflag) { bcolor = gdcolor.hoverPurecolor; } else if (m_vHighflag) { bcolor = gdcolor.hightlightPurecolor; } if (m_vSelectflag) { bcolor = gdcolor.pressPurecolor; } painter->setBrush(bcolor); painter->setPen(Qt::NoPen); painter->drawRect(rect); if (m_vHoverflag && !m_vSelectflag) { painter->save(); QRectF trect = QRectF(rect.x() + 0.5, rect.y() + 0.5, rect.width() - 1, rect.height() - 1); QPen tpen; QColor cc = "#FFFFFF"; if (themetype == 2) { cc = "#FFFFFF"; } else { cc = "#000000"; } cc.setAlphaF(0.08); tpen.setColor(cc); tpen.setWidthF(1); tpen.setStyle(Qt::SolidLine); painter->setBrush(Qt::NoBrush); painter->setPen(tpen); painter->drawRect(trect); painter->restore(); } if (m_vSelectflag) { if (themetype == 0 || themetype ==1) { gdcolor.textColor.setAlphaF(0.4); gdcolor.timeColor.setAlphaF(0.4); } else if (themetype ==2) { gdcolor.textColor.setAlphaF(0.6); gdcolor.timeColor.setAlphaF(0.6); } } painter->save(); QPen pen(gdcolor.shadowcolor); pen.setWidth(2); painter->setPen(pen); painter->drawLine(rect.topLeft(), rect.bottomLeft()); painter->restore(); int tmagin = 10; if (m_totalNum > 1) tmagin = 5; if (m_type == 0) { int timeTextHight = 0; QFont font; font.setWeight(QFont::Normal); font = DFontSizeManager::instance()->get(DFontSizeManager::T8, font); //绘制日程起始时间 if (m_vScheduleInfo.beginDateTime.date() == m_date) { painter->save(); painter->setFont(font); painter->setPen(gdcolor.timeColor); QTime stime = m_vScheduleInfo.beginDateTime.time(); QString str = stime.toString("AP h:mm"); QFontMetrics fontmetris(font); qreal drawTextWidth = rect.width() - m_offset*2; if (fm.width(str) > drawTextWidth -5) { QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) - 5; if (widthT >= drawTextWidth) { if (i < 1) { tstr.chop(1); } else { tstr.chop(2); } tstr = tstr + "..."; break; } } QString tstrs = fontmetris.elidedText(str,Qt::ElideRight,qRound(drawTextWidth - 5)); painter->drawText( QRectF(rect.topLeft().x() + tmagin, rect.topLeft().y() + 3, drawTextWidth- 5, h), Qt::AlignLeft, tstrs); } else { painter->drawText( QRectF(rect.topLeft().x() + tmagin, rect.topLeft().y() + 3, drawTextWidth - 5, h), Qt::AlignLeft, str); } painter->restore(); } else { timeTextHight = -20; } painter->save(); //绘制日程标题 font = DFontSizeManager::instance()->get(DFontSizeManager::T6, font); font.setLetterSpacing(QFont::PercentageSpacing, 105); painter->setFont(font); painter->setPen(gdcolor.textColor); QStringList liststr; QRect textRect = rect.toRect(); textRect.setWidth(textRect.width() -m_offset*2); splitText(font, textRect.width() - tmagin - 8, textRect.height() - 20, m_vScheduleInfo.titleName, liststr, fm); for (int i = 0; i < liststr.count(); i++) { if ((20 + timeTextHight + (i + 1) * (h - 3)) > rect.height()) return; painter->drawText( QRect(textRect.topLeft().x() + tmagin, textRect.topLeft().y() + 20 + timeTextHight + i * (h - 3), textRect.width() - 2, h ), Qt::AlignLeft, liststr.at(i)); } painter->restore(); } else { painter->save(); QFont font; font.setWeight(QFont::Normal); font = DFontSizeManager::instance()->get(DFontSizeManager::T8, font); painter->setFont(font); painter->setPen(gdcolor.textColor); painter->drawText(rect, Qt::AlignCenter | Qt::AlignVCenter, "..."); painter->restore(); } if (m_vSelectflag) { QColor selcolor = m_transparentcolor; selcolor.setAlphaF(0.05); painter->setBrush(selcolor); painter->setPen(Qt::NoPen); painter->drawRect(rect); } } dde-calendar-5.7.0.23/src/view/scheduleitem.h000077500000000000000000000037261375021633200206530ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHEDULEITEM_H #define SCHEDULEITEM_H #include "schedulestructs.h" #include "draginfoitem.h" #include #include #include #include class CScheduleCoorManage; class CScheduleItem : public DragInfoItem { Q_OBJECT public: CScheduleItem(QRectF rect,QGraphicsItem *parent = nullptr, int type = 0); ~CScheduleItem() override; void setData(const ScheduleDtailInfo &info, QDate date, int totalNum); bool hasSelectSchedule(const ScheduleDtailInfo &info); int getType() { return m_type; } ScheduleDtailInfo getData() const { return m_vScheduleInfo; } QDate getdate()const { return m_date; } private: void splitText(QFont font, int w, int h, QString str, QStringList &liststr, QFontMetrics &fontm); private: void paintBackground(QPainter *painter,const QRectF &rect,const int isPixMap = false) override; private: QDate m_date; int m_type = 0; int m_totalNum; QColor m_transparentcolor; }; #endif // SCHEDULEITEM_H dde-calendar-5.7.0.23/src/widget/000077500000000000000000000000001375021633200163255ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/widget/calendarmainwindow.cpp000066400000000000000000001024271375021633200227050ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "calendarmainwindow.h" #include "widget/yearWidget/yearwindow.h" #include "widget/monthWidget/monthwindow.h" #include "dbuscalendar_adaptor.h" #include "widget/weekWidget/weekwindow.h" #include "widget/dayWidget/daywindow.h" #include "scheduledatamanage.h" #include "myschceduleview.h" #include "creatorparschedule.h" #include "configsettings.h" #include "shortcut.h" #include "schcedulesearchview.h" #include "cdynamicicon.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE DWIDGET_USE_NAMESPACE static const int CalendarMWidth = 860; static const int CalendarMHeight = 634; Calendarmainwindow::Calendarmainwindow(QWidget *w) : DMainWindow (w) { m_DataGetThread = new DbusDataGetThread(CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getDbus(), this); m_currentdate = QDate::currentDate(); setContentsMargins(QMargins(0, 0, 0, 0)); initUI(); initConnection(); initLunar(); setMinimumSize(CalendarMWidth, CalendarMHeight); setWindowTitle(tr("Calendar")); new CalendarAdaptor(this); resize(CalendarMWidth, CalendarMHeight); QShortcut *shortcut = new QShortcut(this); shortcut->setKey(QKeySequence(QLatin1String("Ctrl+F"))); connect(shortcut, SIGNAL(activated()), this, SLOT(slotSearchEdit())); QShortcut *viewshortcut = new QShortcut(this); viewshortcut->setKey(QKeySequence(QLatin1String("Ctrl+Shift+/"))); connect(viewshortcut, SIGNAL(activated()), this, SLOT(onViewShortcut())); setTitlebarShadowEnabled(true); setFocusPolicy(Qt::ClickFocus); QByteArray arrybyte = CConfigSettings::value("base.geometry").toByteArray(); bool isOk = false; int state = CConfigSettings::value("base.state").toInt(&isOk); if (!arrybyte.isEmpty() && isOk) { Qt::WindowStates winStates = static_cast(state); setWindowState(winStates); if (winStates !=Qt::WindowState::WindowMaximized) { restoreGeometry(arrybyte); } } Dtk::Widget::moveToCenter(this); } Calendarmainwindow::~Calendarmainwindow() { CDynamicIcon::releaseInstance(); } bool Calendarmainwindow::analysisCreate(const QString &content, ScheduleDtailInfo &info) { if (content.isEmpty()) return false; QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJson(content.toLocal8Bit(), &json_error)); if (json_error.error != QJsonParseError::NoError) { return false; } QJsonArray rootarry = jsonDoc.array(); for (int i = 0; i < rootarry.size(); i++) { QJsonObject subObj = rootarry.at(i).toObject(); if (subObj.value("name").toString() == "content") { info.titleName = subObj.value("value").toString(); } if (subObj.value("name").toString() == "datetime") { QString ssubObj = subObj.value("normValue").toString(); QJsonParseError sjson_error; QJsonDocument sjsonDoc(QJsonDocument::fromJson(ssubObj.toLocal8Bit(), &sjson_error)); if (sjson_error.error != QJsonParseError::NoError) { return false; } QJsonObject ssobject = sjsonDoc.object(); info.beginDateTime = QDateTime::fromString(ssobject.value("datetime").toString(), "yyyy-MM-ddThh:mm:ss"); } if (subObj.value("value").toString() == "reminder") { info.id = 0; info.rpeat = 0; info.remind = true; info.remindData.n = 0; info.endDateTime = info.beginDateTime.addSecs(3600); info.allday = false; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType(1, info.type); } } return true; } void Calendarmainwindow::onViewShortcut() { QRect rect = window()->geometry(); QPoint pos(rect.x() + rect.width() / 2, rect.y() + rect.height() / 2); Shortcut sc; QStringList shortcutString; QString param1 = "-j=" + sc.toStr(); QString param2 = "-p=" + QString::number(pos.x()) + "," + QString::number(pos.y()); shortcutString << "-b" << param1 << param2; QProcess *shortcutViewProc = new QProcess(this); shortcutViewProc->startDetached("killall deepin-shortcut-viewer"); shortcutViewProc->startDetached("deepin-shortcut-viewer", shortcutString); connect(shortcutViewProc, SIGNAL(finished(int)), shortcutViewProc, SLOT(deleteLater())); } void Calendarmainwindow::slotGetScheduleInfoSuccess() { m_yearwindow->getScheduleInfo(); } void Calendarmainwindow::slotDynamicIconUpdate() { if (QDate::currentDate() !=CDynamicIcon::getInstance()->getDate()) { CDynamicIcon::getInstance()->setDate(QDate::currentDate()); CDynamicIcon::getInstance()->setIcon(); } } void Calendarmainwindow::viewWindow(int type, QDateTime datetime) { if (type < 0 || type > m_stackWidget->count()) { return; } m_stackWidget->setCurrentIndex(type - 1); if (type - 1 != 0) { m_priindex = type - 1; } switch (type - 1) { case DDECalendar::CalendarYearWindow: { m_yearButton->setFocus(); m_yearButton->setChecked(true); m_yearwindow->setDate(datetime.date()); } break; case DDECalendar::CalendarMonthWindow: { m_monthButton->setFocus(); m_monthButton->setChecked(true); m_monthWindow->setDate(datetime.date()); m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekButton->setFocus(); m_weekButton->setChecked(true); m_weekWindow->setDate(datetime.date()); m_weekWindow->setTime(datetime.time()); m_weekWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarDayWindow: { m_dayButton->setFocus(); m_dayButton->setChecked(true); m_DayWindow->setDate(datetime.date()); m_DayWindow->slotupdateSchedule(0); m_searchflag = true; } break; } CConfigSettings::setOption("base.view", type); } void Calendarmainwindow::UpdateJob() { int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { case DDECalendar::CalendarMonthWindow: { m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->slotupdateSchedule(0); } break; } } void Calendarmainwindow::updateHigh() { int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { case DDECalendar::CalendarYearWindow: { } break; case DDECalendar::CalendarMonthWindow: { } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->updateHigh(); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->updateHigh(); } break; } } void Calendarmainwindow::setSearchWidth(int w) { m_contentBackground->setFixedWidth(w); } void Calendarmainwindow::slotTheme(int type) { if (type == 0) { type = DGuiApplicationHelper::instance()->themeType(); } if (type == 1) { DPalette pl = m_yearButton->palette(); pl.setColor(DPalette::ButtonText, QColor("#414D68")); pl.setColor(DPalette::Light, QColor("#E6E6E6")); pl.setColor(DPalette::Dark, QColor("#E3E3E3")); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.08); pl.setColor(DPalette::Shadow, sbcolor); m_yearButton->setPalette(pl); m_monthButton->setPalette(pl); m_weekButton->setPalette(pl); m_dayButton->setPalette(pl); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette tframepa = m_transparentFrame->palette(); QColor tColor = "#FFFFFF"; tColor.setAlphaF(0.3); tframepa.setColor(DPalette::Background, tColor); m_transparentFrame->setPalette(tframepa); m_transparentFrame->setBackgroundRole(DPalette::Background); } else { DPalette pl = m_yearButton->palette(); pl.setColor(DPalette::ButtonText, QColor("#C0C6D4")); pl.setColor(DPalette::Light, QColor("#484848")); pl.setColor(DPalette::Dark, QColor("#414141")); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.08); pl.setColor(DPalette::Shadow, sbcolor); m_yearButton->setPalette(pl); m_monthButton->setPalette(pl); m_weekButton->setPalette(pl); m_dayButton->setPalette(pl); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#252525"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette tframepa = m_transparentFrame->palette(); QColor tColor = "#000000"; tColor.setAlphaF(0.3); tframepa.setColor(DPalette::Background, tColor); m_transparentFrame->setPalette(tframepa); m_transparentFrame->setBackgroundRole(DPalette::Background); } CScheduleDataManage::getScheduleDataManage()->setTheMe(type); m_yearwindow->setTheMe(type); m_monthWindow->setTheMe(type); m_weekWindow->setTheMe(type); m_DayWindow->setTheMe(type); m_schceduleSearchView->setTheMe(type); } void Calendarmainwindow::OpenSchedule(QString job) { if (job.isEmpty()) return; ScheduleDtailInfo out; if (CreatOrParSchedule::GetJob(job, out)) { m_dayButton->setFocus(); m_dayButton->setChecked(true); m_stackWidget->setCurrentIndex(DDECalendar::CalendarDayWindow); m_DayWindow->setDate(out.beginDateTime.date()); m_DayWindow->slotupdateSchedule(0); CMySchceduleView dlg(out, this); dlg.exec(); m_DayWindow->slotupdateSchedule(0); slotWUpdateShcedule(nullptr,0); } } void Calendarmainwindow::ActiveWindow() { raise(); } void Calendarmainwindow::RaiseWindow() { raise(); } void Calendarmainwindow::initUI() { //设置主窗口辅助技术显示名称和描述 this->setObjectName("MainWindow"); this->setAccessibleName("MainWindow"); this->setAccessibleDescription("This is the main window"); m_DynamicIconUpdateTimer = new QTimer(this); m_DynamicIconUpdateTimer->start(3000); QFrame *titleframe = new QFrame(this); titleframe->setAccessibleName("TitleFrame"); titleframe->setObjectName("titleframe"); titleframe->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); CDynamicIcon::getInstance()->setTitlebar(this->titlebar()); CDynamicIcon::getInstance()->setIcon(); QStringList titlelist; titlelist << tr("Y") << tr("M") << tr("W") << tr("D"); m_buttonBox = new DButtonBox(this); m_buttonBox->setObjectName("ButtonBox"); m_buttonBox->setAccessibleName("ButtonBox"); m_buttonBox->setAccessibleDescription("Year, month, week, day button box"); m_yearButton = new DButtonBoxButton(tr("Y"), this); //设置年辅助技术显示名称 m_yearButton->setObjectName("YearButton"); m_yearButton->setAccessibleName("YearButton"); DPalette pl = m_yearButton->palette(); pl.setColor(DPalette::ButtonText, QColor("#414D68")); pl.setColor(DPalette::Light, QColor("#E6E6E6")); pl.setColor(DPalette::Dark, QColor("#E3E3E3")); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.08); pl.setColor(DPalette::Shadow, sbcolor); QFont viewfont; viewfont.setWeight(QFont::Medium); viewfont.setPixelSize(DDECalendar::FontSizeFourteen); m_yearButton->setFixedSize(50, 36); m_monthButton = new DButtonBoxButton(tr("M"), this); //设置月辅助技术显示名称 m_monthButton->setObjectName("MonthButton"); m_monthButton->setAccessibleName("MonthButton"); m_monthButton->setFixedSize(50, 36); m_weekButton = new DButtonBoxButton(tr("W"), this); //设置周辅助技术显示名称 m_weekButton->setObjectName("WeekButton"); m_weekButton->setAccessibleName("WeekButton"); m_weekButton->setFixedSize(50, 36); m_dayButton = new DButtonBoxButton(tr("D"), this); //设置日辅助技术显示名称 m_dayButton->setObjectName("DayButton"); m_dayButton->setAccessibleName("DayButton"); m_dayButton->setFixedSize(50, 36); m_yearButton->setPalette(pl); m_monthButton->setPalette(pl); m_weekButton->setPalette(pl); m_dayButton->setPalette(pl); m_yearButton->setFont(viewfont); m_monthButton->setFont(viewfont); m_weekButton->setFont(viewfont); m_dayButton->setFont(viewfont); QList btlist; btlist.append(m_yearButton); btlist.append(m_monthButton); btlist.append(m_weekButton); btlist.append(m_dayButton); m_buttonBox->setButtonList(btlist, true); m_buttonBox->setId(m_yearButton, DDECalendar::CalendarYearWindow); m_buttonBox->setId(m_monthButton, DDECalendar::CalendarMonthWindow); m_buttonBox->setId(m_weekButton, DDECalendar::CalendarWeekWindow); m_buttonBox->setId(m_dayButton, DDECalendar::CalendarDayWindow); m_buttonBox->setFixedSize(200, 36); QHBoxLayout *titleLayout = new QHBoxLayout; titleLayout->setMargin(0); titleLayout->setSpacing(0); titleLayout->addSpacing(8); titleLayout->addWidget(m_buttonBox); titleLayout->addSpacing(52); m_searchEdit = new DSearchEdit(this); //设置搜索框辅助技术显示名称 m_searchEdit->setObjectName("SearchEdit"); m_searchEdit->setAccessibleName("SearchEdit"); DFontSizeManager::instance()->bind(m_searchEdit, DFontSizeManager::T6); m_searchEdit->setFixedHeight(36); m_searchEdit->setMinimumWidth(240); m_searchEdit->setMaximumWidth(354); m_searchEdit->setFont(viewfont); titleLayout->addStretch(); titleframe->setLayout(titleLayout); DTitlebar *titlebar = this->titlebar(); titlebar->setObjectName("TitleBar"); titlebar->setAccessibleName("TitleBar"); titlebar->setFixedHeight(50); titlebar->addWidget(titleframe, Qt::AlignLeft | Qt::AlignVCenter); titlebar->setCustomWidget(m_searchEdit, true); m_stackWidget = new AnimationStackedWidget(); m_stackWidget->setObjectName("StackedWidget"); m_stackWidget->setAccessibleName("StackedWidget"); m_stackWidget->setAccessibleDescription("Container for year window, month window, week window and day window"); m_stackWidget->setContentsMargins(0, 0, 0, 0); m_stackWidget->setDuration(250); createview(); QHBoxLayout *tmainLayout = new QHBoxLayout; tmainLayout->setMargin(0); tmainLayout->setSpacing(0); tmainLayout->setContentsMargins(0, 0, 0, 0); tmainLayout->addWidget(m_stackWidget); m_contentBackground = new DFrame; m_contentBackground->setAccessibleName("ScheduleSearchWidgetBackgroundFrame"); m_contentBackground->setObjectName("ScheduleSearchWidgetBackgroundFrame"); m_contentBackground->setContentsMargins(0, 0, 0, 0); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setAutoFillBackground(true); m_contentBackground->setPalette(anipa); m_schceduleSearchView = new CSchceduleSearchView(this); m_schceduleSearchView->setObjectName("ScheduleSearchWidget"); m_schceduleSearchView->setAccessibleName("ScheduleSearchWidget"); m_schceduleSearchView->setAccessibleDescription("Window showing search results"); QVBoxLayout *ssLayout = new QVBoxLayout; ssLayout->setMargin(0); ssLayout->setSpacing(0); ssLayout->setContentsMargins(0, 10, 0, 10); ssLayout->addWidget(m_schceduleSearchView); m_contentBackground->setLayout(ssLayout); tmainLayout->addWidget(m_contentBackground); m_contentBackground->setVisible(false); DWidget *maincentralWidget = new DWidget(this); maincentralWidget->setAccessibleName("mainCentralWidget"); maincentralWidget->setLayout(tmainLayout); setCentralWidget(maincentralWidget); m_yearButton->setFocus(); m_yearButton->setChecked(true); m_transparentFrame = new DFrame(this); m_transparentFrame->setAutoFillBackground(true); m_transparentFrame->hide(); m_animation = new QPropertyAnimation(this); } void Calendarmainwindow::initConnection() { connect(m_DataGetThread, &DbusDataGetThread::signalGetScheduleSuccess, this, &Calendarmainwindow::slotGetScheduleInfoSuccess); connect(m_stackWidget , &AnimationStackedWidget::signalIsFinished , this , &Calendarmainwindow::slotSetButtonBox); connect(m_buttonBox, &DButtonBox::buttonClicked, this, &Calendarmainwindow::slotstackWClicked); connect(m_weekWindow, &CWeekWindow::signalsWUpdateShcedule, this, &Calendarmainwindow::slotWUpdateShcedule); connect(m_monthWindow, &CMonthWindow::signalsWUpdateShcedule, this, &Calendarmainwindow::slotWUpdateShcedule); connect(m_DayWindow, &CDayWindow::signalsWUpdateShcedule, this, &Calendarmainwindow::slotWUpdateShcedule); connect(m_searchEdit, &DSearchEdit::returnPressed, this, &Calendarmainwindow::slotSreturnPressed); connect(m_searchEdit, &DSearchEdit::textChanged, this, &Calendarmainwindow::slotStextChanged); connect(m_searchEdit, &DSearchEdit::focusChanged, this, &Calendarmainwindow::slotStextfocusChanged); connect(m_weekWindow, &CWeekWindow::signalsReturnTodayUpdate, this, &Calendarmainwindow::slotReturnTodyUpdate); connect(m_monthWindow, &CMonthWindow::signalsReturnTodayUpdate, this, &Calendarmainwindow::slotReturnTodyUpdate); connect(m_DayWindow, &CDayWindow::signalsReturnTodayUpdate, this, &Calendarmainwindow::slotReturnTodyUpdate); connect(m_yearwindow, &CYearWindow::signalsReturnTodayUpdate, this, &Calendarmainwindow::slotReturnTodyUpdate); //监听当前应用主题切换事件 connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &Calendarmainwindow::slotTheme); m_dbus = new com::deepin::daemon::calendar::Scheduler("com.deepin.daemon.Calendar", "/com/deepin/daemon/Calendar/Scheduler", QDBusConnection::sessionBus(), this); connect(m_dbus, &com::deepin::daemon::calendar::Scheduler::JobsUpdated, this, &Calendarmainwindow::slotJobsUpdated); connect(m_schceduleSearchView, &CSchceduleSearchView::signalsUpdateShcedule, this, &Calendarmainwindow::slotTransitSearchSchedule); connect(m_schceduleSearchView, &CSchceduleSearchView::signalDate, this, &Calendarmainwindow::slotsearchDateSelect); connect(m_schceduleSearchView, &CSchceduleSearchView::signalSelectSchedule, this, &Calendarmainwindow::slotSearchSelectSchedule); connect(m_schceduleSearchView, &CSchceduleSearchView::signalScheduleHide, this, &Calendarmainwindow::setScheduleHide); connect(m_yearwindow, &CYearWindow::signaldoubleclickDate, this, &Calendarmainwindow::slotdoubleclickDate); connect(m_yearwindow, &CYearWindow::signalselectWeekwindow, this, &Calendarmainwindow::slotselectWeek); connect(m_yearwindow, &CYearWindow::signalselectMonth, this, &Calendarmainwindow::slotselectMonth); connect(m_monthWindow, &CMonthWindow::signalsViewSelectDate, this, &Calendarmainwindow::slotViewSelectDate); connect(m_monthWindow, &CMonthWindow::signalsCurrentScheduleDate, this, &Calendarmainwindow::slotCurrentScheduleDate); connect(m_weekWindow, &CWeekWindow::signalsCurrentScheduleDate, this, &Calendarmainwindow::slotCurrentScheduleDate); connect(m_weekWindow, &CWeekWindow::signalsViewSelectDate, this, &Calendarmainwindow::slotViewSelectDate); connect(m_monthWindow, &CMonthWindow::signalViewtransparentFrame, this, &Calendarmainwindow::slotViewtransparentFrame); connect(m_schceduleSearchView, &CSchceduleSearchView::signalViewtransparentFrame, this, &Calendarmainwindow::slotViewtransparentFrame); connect(m_weekWindow, &CWeekWindow::signalViewtransparentFrame, this, &Calendarmainwindow::slotViewtransparentFrame); connect(m_DayWindow, &CDayWindow::signalViewtransparentFrame, this, &Calendarmainwindow::slotViewtransparentFrame); connect(m_weekWindow, &CWeekWindow::signalCurrentDate, this, &Calendarmainwindow::slotCurrentDate); connect(m_monthWindow, &CMonthWindow::signalCurrentDate, this, &Calendarmainwindow::slotCurrentDate); connect(m_DayWindow, &CDayWindow::signalCurrentDate, this, &Calendarmainwindow::slotCurrentDate); connect(m_yearwindow, &CYearWindow::signalCurrentDate, this, &Calendarmainwindow::slotCurrentDate); connect(m_yearwindow, &CYearWindow::signalupdateschcedule, this, &Calendarmainwindow::getScheduleInfo); connect(m_DynamicIconUpdateTimer, &QTimer::timeout, this, &Calendarmainwindow::slotDynamicIconUpdate); } void Calendarmainwindow::initLunar() { QLocale locale; bool flag = false; if (locale.language() == QLocale::Chinese) { flag = true; } m_yearwindow->setLunarVisible(flag); m_monthWindow->setLunarVisible(flag); m_weekWindow->setLunarVisible(flag); m_DayWindow->setLunarVisible(flag); } void Calendarmainwindow::createview() { CScheduleDataManage::getScheduleDataManage()->setFirstWeekDay(0); CScheduleDataManage::getScheduleDataManage()->setCurrentYear(QDate::currentDate().year()); getScheduleInfo(); m_yearwindow = new CYearWindow(this); m_yearwindow->setDate(QDate::currentDate()); m_stackWidget->addWidget(m_yearwindow); #if 1 m_monthWindow = new CMonthWindow; //0:周日 1~6:周一~周六 m_monthWindow->setFirstWeekday(0); m_monthWindow->setDate(QDate::currentDate()); m_stackWidget->addWidget(m_monthWindow); m_weekWindow = new CWeekWindow(this); m_weekWindow->setFirstWeekday(0); m_weekWindow->setDate(QDate::currentDate()); m_weekWindow->slotupdateSchedule(0); m_stackWidget->addWidget(m_weekWindow); m_DayWindow = new CDayWindow; QTimer::singleShot(500,[=] { m_DayWindow->setDate(QDate::currentDate()); }); m_stackWidget->addWidget(m_DayWindow); #endif } DPushButton *Calendarmainwindow::createButon(QString name) { DPushButton *button = new DPushButton(); button->setText(name); button->setFixedSize(50, 40); return button; } void Calendarmainwindow::getScheduleInfo() { YearScheduleInfo *info = CScheduleDataManage::getScheduleDataManage()->getGetAllYearScheduleInfo(); m_DataGetThread->getScheduleInfo(info); } void Calendarmainwindow::setScheduleHide() { m_yearwindow->slotSetSchceduleHide(); m_monthWindow->slotScheduleHide(); m_weekWindow->slotScheduleHide(); m_DayWindow->slotScheduleHide(); } void Calendarmainwindow::resizeEvent(QResizeEvent *event) { m_transparentFrame->resize(width(), height() - 50); m_scheduleSearchViewMaxWidth = qRound(0.2325 * width() + 0.5); m_schceduleSearchView->setMaxWidth(m_scheduleSearchViewMaxWidth); setSearchWidth(m_scheduleSearchViewMaxWidth); setScheduleHide(); DMainWindow::resizeEvent(event); CConfigSettings::setOption("base.geometry", saveGeometry()); CConfigSettings::setOption("base.state", int(windowState())); } void Calendarmainwindow::slotstackWClicked(QAbstractButton *bt) { m_buttonBox->setEnabled(false); setScheduleHide(); int index = m_buttonBox->id(bt); if (index < 0 || index > m_stackWidget->count() - 1) { return; } m_searchflag = false; m_stackWidget->setCurrent(index); if (index != 0) { m_priindex = index; } if (m_currentdate.year() < DDECalendar::QueryEarliestYear) return; switch (index) { case DDECalendar::CalendarYearWindow: { m_yearwindow->setDate(m_currentdate); } break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->setDate(m_currentdate); m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->setDate(m_currentdate); m_weekWindow->slotupdateSchedule(1); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->setDate(m_currentdate); m_DayWindow->slotupdateSchedule(1); m_searchflag = true; } break; } CConfigSettings::setOption("base.view", index + 1); } void Calendarmainwindow::slotWUpdateShcedule(QMainWindow *w, int id) { Q_UNUSED(w); Q_UNUSED(id); if (m_opensearchflag && !m_searchEdit->text().isEmpty()) { m_schceduleSearchView->slotsetSearch(m_searchEdit->text()); m_yearwindow->slotupdateSchedule(0); } updateHigh(); return; } void Calendarmainwindow::slotReturnTodyUpdate(QMainWindow *w) { if (w != m_weekWindow) m_weekWindow->slotReturnTodayUpdate(); if (w != m_monthWindow) m_monthWindow->slotReturnTodayUpdate(); if (w != m_DayWindow) m_DayWindow->slotReturnTodayUpdate(); if (w != m_yearwindow) m_yearwindow->slotReturnTodayUpdate(); } void Calendarmainwindow::slotSreturnPressed() { #if 1 if (!m_opensearchflag && !m_searchEdit->text().isEmpty()) { m_opensearchflag = true; m_contentBackground->setVisible(true); } m_schceduleSearchView->slotsetSearch(m_searchEdit->text()); m_yearwindow->setDate(m_currentdate); updateHigh(); #endif } void Calendarmainwindow::slotStextChanged() { if (!m_searchEdit->text().isEmpty()) { m_yearwindow->setSearchWFlag(true); m_weekWindow->setSearchWFlag(true); m_monthWindow->setSearchWFlag(true); m_DayWindow->setSearchWFlag(true); } else { m_schceduleSearchView->clearSearch(); m_yearwindow->setSearchWFlag(false); m_monthWindow->setSearchWFlag(false); m_weekWindow->setSearchWFlag(false); m_DayWindow->setSearchWFlag(false); m_contentBackground->setVisible(false); m_opensearchflag = false; } updateHigh(); } void Calendarmainwindow::slotStextfocusChanged(bool onFocus) { if (onFocus) { setScheduleHide(); } } void Calendarmainwindow::slotJobsUpdated(const QList &Ids) { Q_UNUSED(Ids); int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { //年窗口截面刷新 case DDECalendar::CalendarYearWindow: { //获取数据 getScheduleInfo(); m_yearwindow->slotupdateSchedule(0); }break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->slotupdateSchedule(0); } break; } } void Calendarmainwindow::slotSearchEdit() { m_searchEdit->lineEdit()->setFocus(); } void Calendarmainwindow::slotTransitSearchSchedule(int id) { Q_UNUSED(id); getScheduleInfo(); int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { case DDECalendar::CalendarYearWindow: { m_yearwindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->slotupdateSchedule(0); } break; } m_schceduleSearchView->slotsetSearch(m_searchEdit->text()); } void Calendarmainwindow::slotsearchDateSelect(QDate date) { setScheduleHide(); int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { case DDECalendar::CalendarYearWindow: { m_yearwindow->setDate(date); } break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->setDate(date); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->setDate(date); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->setDate(date); } break; } } void Calendarmainwindow::slotSearchSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } //等界面刷新完成后进行动作 QTimer::singleShot(50, [this, index,scheduleInfo] { switch (index) { case DDECalendar::CalendarYearWindow: { } break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->setSelectSchedule(scheduleInfo); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->setSelectSchedule(scheduleInfo); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->setSelectSchedule(scheduleInfo); } break; } }); } void Calendarmainwindow::slotdoubleclickDate(QDate date) { m_stackWidget->setCurrentIndex(m_priindex); switch (m_priindex) { case DDECalendar::CalendarMonthWindow: { m_monthButton->setFocus(); m_monthButton->setChecked(true); m_monthWindow->setDate(date); m_monthWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarWeekWindow: { m_weekButton->setFocus(); m_weekButton->setChecked(true); m_weekWindow->setDate(date); m_weekWindow->setTime(QTime::currentTime()); m_weekWindow->slotupdateSchedule(0); } break; case DDECalendar::CalendarDayWindow: { m_dayButton->setFocus(); m_dayButton->setChecked(true); m_DayWindow->setDate(date); m_DayWindow->setTime(QTime::currentTime()); m_DayWindow->slotupdateSchedule(0); } break; } CConfigSettings::setOption("base.view", m_priindex+1); } void Calendarmainwindow::slotselectMonth(QDate date) { qDebug() << date; viewWindow(DDECalendar::CalendarMonthWindow + 1, QDateTime(date)); } void Calendarmainwindow::slotselectWeek(QDate date) { qDebug() << date; viewWindow(DDECalendar::CalendarWeekWindow + 1, QDateTime(date)); CConfigSettings::setOption("base.view", m_priindex + 1); } void Calendarmainwindow::slotCurrentScheduleDate(QDate date) { viewWindow(DDECalendar::CalendarDayWindow + 1, QDateTime(date)); } void Calendarmainwindow::slotViewSelectDate(QDate date) { if (date.year() < DDECalendar::QueryEarliestYear) return; viewWindow(DDECalendar::CalendarDayWindow + 1, QDateTime(date)); } void Calendarmainwindow::slotViewtransparentFrame(int type) { static int showFrameCount =0; if (type) { m_transparentFrame->resize(width(), height() - 50); m_transparentFrame->move(0, 50); m_transparentFrame->show(); ++showFrameCount; } else { if (showFrameCount==1) m_transparentFrame->hide(); --showFrameCount; } int index = m_stackWidget->currentIndex(); if (index < 0 || index > m_stackWidget->count() - 1) { return; } switch (index) { case DDECalendar::CalendarYearWindow: { m_yearwindow->setFocus(); } break; case DDECalendar::CalendarMonthWindow: { m_monthWindow->setFocus(); } break; case DDECalendar::CalendarWeekWindow: { m_weekWindow->setFocus(); } break; case DDECalendar::CalendarDayWindow: { m_DayWindow->setFocus(); } break; } } void Calendarmainwindow::slotCurrentDate(QDate date) { m_currentdate = date; CScheduleDataManage::getScheduleDataManage()->setCurrentYear(date.year()); getScheduleInfo(); } void Calendarmainwindow::slotSetButtonBox() { m_buttonBox->setEnabled(true); } void Calendarmainwindow::closeEvent(QCloseEvent *event) { QWidget::closeEvent(event); } void Calendarmainwindow::mouseMoveEvent(QMouseEvent *event) { DMainWindow::mouseMoveEvent(event); setScheduleHide(); } void Calendarmainwindow::changeEvent(QEvent *event) { DMainWindow::changeEvent(event); if (event->type() == QEvent::ActivationChange) { setScheduleHide(); } } void Calendarmainwindow::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); setScheduleHide(); } dde-calendar-5.7.0.23/src/widget/calendarmainwindow.h000066400000000000000000000103471375021633200223510ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 CALENDARMAINWINDOW_H #define CALENDARMAINWINDOW_H #include "dbusdatagetthread.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CYearWindow; class CMonthWindow; class CWeekWindow; class CDayWindow; class __Scheduler; class CSchceduleSearchView; class AnimationStackedWidget; class CScheduleDataManage; class Calendarmainwindow : public DMainWindow { Q_OBJECT public: explicit Calendarmainwindow(QWidget *w = nullptr); ~Calendarmainwindow() override; bool analysisCreate(const QString &content, ScheduleDtailInfo &info); void viewWindow(int type, QDateTime datetime); void UpdateJob(); void updateHigh(); void setSearchWidth(int w); public slots: void slotTheme(int type); void OpenSchedule(QString job); void ActiveWindow(); void RaiseWindow(); void onViewShortcut(); void slotGetScheduleInfoSuccess(); void slotDynamicIconUpdate(); private: void initUI(); void initConnection(); void initLunar(); void createview(); DPushButton *createButon(QString name); void getScheduleInfo(); protected: void resizeEvent(QResizeEvent *event) override; void closeEvent(QCloseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; void changeEvent(QEvent *event) override; void mousePressEvent(QMouseEvent *event) override; private slots: void setScheduleHide(); void slotstackWClicked(QAbstractButton *bt); void slotWUpdateShcedule(QMainWindow *w, int id = 0); void slotReturnTodyUpdate(QMainWindow *w); void slotSreturnPressed(); void slotStextChanged(); void slotStextfocusChanged(bool onFocus); void slotJobsUpdated(const QList &Ids); void slotSearchEdit(); void slotTransitSearchSchedule(int id = 0); void slotsearchDateSelect(QDate date); void slotSearchSelectSchedule(const ScheduleDtailInfo &scheduleInfo); void slotdoubleclickDate(QDate date); void slotselectMonth(QDate date); void slotselectWeek(QDate date); void slotCurrentScheduleDate(QDate date); void slotViewSelectDate(QDate date); void slotViewtransparentFrame(int type); void slotCurrentDate(QDate date); void slotSetButtonBox(); private: DLabel *m_icon = nullptr; AnimationStackedWidget *m_stackWidget = nullptr; DButtonBox *m_buttonBox = nullptr; DButtonBoxButton *m_yearButton = nullptr; DButtonBoxButton *m_monthButton = nullptr; DButtonBoxButton *m_weekButton = nullptr; DButtonBoxButton *m_dayButton = nullptr; DSearchEdit *m_searchEdit = nullptr; CYearWindow *m_yearwindow = nullptr; CMonthWindow *m_monthWindow = nullptr; CWeekWindow *m_weekWindow = nullptr; CDayWindow *m_DayWindow = nullptr; __Scheduler *m_dbus = nullptr; bool m_searchflag = false; CSchceduleSearchView *m_schceduleSearchView = nullptr; DFrame *m_contentBackground = nullptr; int m_priindex = 3; //默认打开日视图双击 DFrame *m_transparentFrame = nullptr; bool m_opensearchflag = false; QDate m_currentdate; int m_scheduleSearchViewMaxWidth; QPropertyAnimation *m_animation = nullptr; DbusDataGetThread *m_DataGetThread = nullptr; QTimer *m_DynamicIconUpdateTimer = nullptr; }; #endif // CALENDARMAINWINDOW_H dde-calendar-5.7.0.23/src/widget/dayWidget/000077500000000000000000000000001375021633200202465ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/widget/dayWidget/dayhuangliview.cpp000066400000000000000000000066621375021633200240040ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "dayhuangliview.h" #include "schceduledlg.h" #include #include #include #include #include #include #include #include CDayHuangLiLabel::CDayHuangLiLabel(QWidget *parent) : DLabel(parent) { setMargin(0); } void CDayHuangLiLabel::setbackgroundColor(QColor backgroundColor) { m_backgroundColor = backgroundColor; } void CDayHuangLiLabel::setTextInfo(QColor tcolor, QFont font) { m_textcolor = tcolor; m_font = font; } void CDayHuangLiLabel::setHuangLiText(QStringList vhuangli, int type) { m_vHuangli = vhuangli; m_type = type; if (!vhuangli.isEmpty()) { QString str = vhuangli.at(0); for (int i = 1; i < vhuangli.count(); i++) { str += "." + vhuangli.at(i); } setToolTip(str); } else { setToolTip(QString()); } update(); } void CDayHuangLiLabel::paintEvent( QPaintEvent *e ) { Q_UNUSED(e); int labelwidth = width(); int labelheight = height(); QPainter painter(this); QRect fillRect = QRect(0, 0, labelwidth, labelheight); painter.setRenderHints(QPainter::HighQualityAntialiasing); painter.setBrush(QBrush(m_backgroundColor)); painter.setPen(Qt::NoPen); painter.drawRoundedRect(fillRect, 12, 12); QPixmap pixmap; if (m_type == 0) pixmap = DHiDPIHelper::loadNxPixmap(":/resources/icon/dde-yi.svg"); else { pixmap = DHiDPIHelper::loadNxPixmap(":/resources/icon/dde-ji.svg"); } pixmap.setDevicePixelRatio(devicePixelRatioF()); painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::HighQualityAntialiasing); painter.setRenderHint(QPainter::SmoothPixmapTransform); painter.drawPixmap(QRect(m_leftMagin, m_topMagin + 1, 22, 22), pixmap); painter.restore(); painter.setFont(m_font); painter.setPen(m_textcolor); int bw = m_leftMagin + 34; int bh = m_topMagin; int ss = 14; for (int i = 0; i < m_vHuangli.count(); i++) { int currentsw = m_vHuangli.at(i).count() * ss; if (bw + currentsw + 6 > labelwidth) { painter.drawText(QRect(bw, bh, labelwidth - bw, 21), Qt::AlignLeft, "..."); break; } else { painter.drawText(QRect(bw, bh, currentsw, 21), Qt::AlignLeft, m_vHuangli.at(i)); bw += currentsw + 10; } } } void CDayHuangLiLabel::resizeEvent(QResizeEvent *event) { m_leftMagin = static_cast(0.0424 * width() + 0.5); m_topMagin = (height() - 20) / 2; DLabel::resizeEvent(event); } dde-calendar-5.7.0.23/src/widget/dayWidget/dayhuangliview.h000066400000000000000000000031011375021633200234320ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 DAYHUANGLILABEL_H #define DAYHUANGLILABEL_H #include DWIDGET_USE_NAMESPACE class CDayHuangLiLabel : public DLabel { Q_OBJECT public: explicit CDayHuangLiLabel(QWidget *parent = nullptr); void setbackgroundColor(QColor backgroundColor); void setTextInfo(QColor tcolor, QFont font); void setHuangLiText(QStringList vhuangli, int type = 0); protected: void paintEvent(QPaintEvent *e) override; void resizeEvent(QResizeEvent *event) override; private: QStringList m_vHuangli; QColor m_backgroundColor; QColor m_textcolor; QFont m_font; int m_type = 0; int m_leftMagin = 14; int m_topMagin = 18; }; #endif // DAYHUANGLILABEL_H dde-calendar-5.7.0.23/src/widget/dayWidget/daymonthview.cpp000066400000000000000000000671451375021633200235050ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "calendardbus.h" #include "todybutton.h" #include "scheduledatamanage.h" #include "daymonthview.h" #include "constants.h" #include "dayhuangliview.h" #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CDayMonthView::CDayMonthView(QWidget *parent) : CustomFrame(parent) { m_DBusInter = new CalendarDBus("com.deepin.api.LunarCalendar", "/com/deepin/api/LunarCalendar", QDBusConnection::sessionBus(), this); if (!queue) queue = new QQueue; if (!lunarCache) lunarCache = new QMap; if (!emptyCaHuangLiDayInfo) emptyCaHuangLiDayInfo = new CaHuangLiDayInfo; m_weeklist.append(tr("Monday")); m_weeklist.append(tr("Tuesday")); m_weeklist.append(tr("Wednesday")); m_weeklist.append(tr("Thursday")); m_weeklist.append(tr("Friday")); m_weeklist.append(tr("Saturday")); m_weeklist.append(tr("Sunday")); initUI(); initConnection(); } CDayMonthView::~CDayMonthView() { if (lunarCache !=nullptr) { delete lunarCache; lunarCache = nullptr; } if ( queue !=nullptr) { delete queue; queue = nullptr; } if (emptyCaHuangLiDayInfo != nullptr) { delete emptyCaHuangLiDayInfo; emptyCaHuangLiDayInfo = nullptr; } } void CDayMonthView::handleCurrentDateChanged(const QDate date, const CaHuangLiDayInfo &detail) { Q_UNUSED(detail); if (date != m_currentDate) { setCurrentDate(date); } } void CDayMonthView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; updateDate(); } void CDayMonthView::setLunarVisible(bool visible) { m_huanglistate = visible; m_yiLabel->setVisible(visible); m_jiLabel->setVisible(visible); m_currentLuna->setVisible(visible); m_splitline->setVisible(visible); update(); } void CDayMonthView::setTheMe(int type) { m_themetype = type; if (type == 0 || type == 1) { DPalette anipa = this->palette(); QColor tbcolor = "#FFFFFF"; anipa.setColor(DPalette::Background, tbcolor); setPalette(anipa); setBackgroundRole(DPalette::Background); setBColor(tbcolor); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); QColor todayhover = "#000000"; todayhover.setAlphaF(0.1); QColor todaypress = "#000000"; todaypress.setAlphaF(0.2); m_today->setBColor("#FFFFFF", todayhover, todaypress, "#FFFFFF", todayhover, todaypress); m_today->setTColor(todayColor, "#001A2E", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette prevpa = m_prevButton->palette(); prevpa.setColor(DPalette::Dark, QColor("#E6E6E6")); prevpa.setColor(DPalette::Light, QColor("#E3E3E3")); DPalette nextvpa = m_nextButton->palette(); nextvpa.setColor(DPalette::Dark, QColor("#E6E6E6")); nextvpa.setColor(DPalette::Light, QColor("#E3E3E3")); m_currentMouth->setTextColor(QColor("#3B3B3B")); m_currentDay->setTextColor(todayColor); m_currentWeek->setTextColor(QColor("#414D68")); m_currentLuna->setTextColor(QColor("#414D68")); m_currentYear->setTextColor(QColor("#414D68")); QFont hlabelF; hlabelF.setPixelSize(DDECalendar::FontSizeFourteen); QColor yicolor = QColor("#75C18E"); yicolor.setAlphaF(0.1); m_yiLabel->setbackgroundColor(yicolor); m_yiLabel->setTextInfo(QColor("#7B7B7B"), hlabelF); m_yiLabel->update(); QColor jicolor = QColor("#C17575"); jicolor.setAlphaF(0.1); m_jiLabel->setbackgroundColor(jicolor); m_jiLabel->setTextInfo(QColor("#7B7B7B"), hlabelF); m_jiLabel->update(); m_topBorderColor = Qt::red; m_backgroundCircleColor = "#0081FF"; m_defaultTextColor = Qt::black; m_currentDayTextColor = todayColor; m_weekendsTextColor = Qt::black; m_selectedTextColor = Qt::white; m_festivalTextColor = Qt::black; m_notCurrentTextColor = "#b2b2b2"; m_ceventColor = QColor(255, 93, 0); } else if (type == 2) { DPalette anipa = this->palette(); QColor tbcolor = "#282828"; anipa.setColor(DPalette::Background, tbcolor); setPalette(anipa); setBackgroundRole(DPalette::Background); setBColor(tbcolor); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Light, "#484848"); todaypa.setColor(DPalette::Dark, "#414141"); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); m_today->setBColor("#484848", "#727272", "#242424", "#414141", "#535353", "#282828"); m_today->setTColor(todayColor, "#FFFFFF", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette prevpa = m_prevButton->palette(); prevpa.setColor(DPalette::Dark, QColor("#484848")); prevpa.setColor(DPalette::Light, QColor("#414141")); DPalette nextvpa = m_nextButton->palette(); nextvpa.setColor(DPalette::Dark, QColor("#484848")); nextvpa.setColor(DPalette::Light, QColor("#414141")); m_currentMouth->setTextColor(QColor("#C0C6D4")); m_currentDay->setTextColor(todayColor); m_currentWeek->setTextColor(QColor("#C0C6D4")); m_currentLuna->setTextColor(QColor("#C0C6D4")); m_currentYear->setTextColor(QColor("#C0C6D4")); QFont hlabelF; hlabelF.setPixelSize(DDECalendar::FontSizeFourteen); QColor yicolor = QColor("#2F8C4D"); yicolor.setAlphaF(0.2); m_yiLabel->setbackgroundColor(yicolor); m_yiLabel->setTextInfo(QColor("#C0C6D4"), hlabelF); m_yiLabel->update(); QColor jicolor = QColor("#A43B3B"); jicolor.setAlphaF(0.2); m_jiLabel->setbackgroundColor(jicolor); m_jiLabel->setTextInfo(QColor("#C0C6D4"), hlabelF); m_jiLabel->update(); m_topBorderColor = Qt::red; m_backgroundCircleColor = "#0059D2"; m_defaultTextColor = "#C0C6D4"; m_currentDayTextColor = todayColor; m_weekendsTextColor = Qt::black; m_selectedTextColor = "#B8D3FF"; m_festivalTextColor = Qt::black; m_notCurrentTextColor = "#C0C6D4"; m_notCurrentTextColor.setAlphaF(0.5); m_ceventColor = QColor(204, 77, 3); } for (int i(0); i != DDEDayCalendar::PainterCellNum; ++i) { m_cellList.at(i)->update(); } } void CDayMonthView::setSearchFlag(bool flag) { m_searchflag = flag; update(); } void CDayMonthView::updateFlag() { getlineflag(); update(); } void CDayMonthView::setCurrentDate(const QDate date, int type) { Q_UNUSED(type); if (date.year() < DDECalendar::QueryEarliestYear) return; if (date == m_currentDate) { return; } if (date == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } m_currentDate = date; updateCurrentLunar(); } int CDayMonthView::getDateIndex(const QDate &date) const { for (int i = 0; i != DDEDayCalendar::PainterCellNum; ++i) if (m_days[i] == date) return i; return 0; } bool CDayMonthView::eventFilter(QObject *o, QEvent *e) { QWidget *cell = qobject_cast(o); if (cell && m_cellList.contains(cell)) { const int pos = m_cellList.indexOf(cell); QDate date = m_days[pos]; if (date.year() < DDECalendar::QueryEarliestYear) return false; if (e->type() == QEvent::Paint) { paintCell(cell); } else if (e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = dynamic_cast(e); if (mouseEvent->button() ==Qt::LeftButton) { cellClicked(cell); } } } return false; } void CDayMonthView::updateDate() { const QDate firstDay(m_currentDate.year(), m_currentDate.month(), 1); const int day = (firstDay.dayOfWeek() + m_firstWeekDay) % 7; const int currentIndex = day + m_currentDate.day() - 1; if (currentIndex < 0) { return; } for (int i(0); i != DDEDayCalendar::PainterCellNum; ++i) { m_days[i] = firstDay.addDays(i - day); } setSelectedCell(currentIndex); getlineflag(); update(); } void CDayMonthView::getlineflag() { QLocale locale; CScheduleDataManage *tdataManage = CScheduleDataManage::getScheduleDataManage(); m_vlineflag.resize(DDEDayCalendar::PainterCellNum); m_vlineflag.fill(false); QVector out; if (tdataManage->getscheduleDataCtrl()->getScheduleInfo(m_days[0], m_days[41], out)) { if (out.count() == DDEDayCalendar::PainterCellNum) for (int i = 0; i < DDEDayCalendar::PainterCellNum; i++) { if (!out.at(i).vData.isEmpty()) { m_vlineflag[i] = true; } } } } void CDayMonthView::initUI() { m_dayNumFont.setPixelSize(DDECalendar::FontSizeTwelve); m_today = new CTodyButton; m_today->setText(QCoreApplication::translate("today", "Today", "Today")); m_today->setFixedSize(100, DDEDayCalendar::D_MLableHeight); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); QFont todayfont; todayfont.setPixelSize(DDECalendar::FontSizeFourteen); m_today->setFont(todayfont); m_today->setPalette(todaypa); m_prevButton = new DIconButton(DStyle::SP_ArrowLeft, this); m_prevButton->setFixedSize(36, 36); m_nextButton = new DIconButton(DStyle::SP_ArrowRight, this); m_nextButton->setFixedSize(36, 36); QHBoxLayout *titleLayout = new QHBoxLayout; titleLayout->setMargin(0); titleLayout->setSpacing(0); titleLayout->setContentsMargins(0, 0, 0, 3); //add separator line m_currentMouth = new CustomFrame(this); m_currentMouth->setFixedSize(74, DDEDayCalendar::D_MLableHeight); QFont mlabelF; mlabelF.setWeight(QFont::Medium); mlabelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_currentMouth->setTextFont(mlabelF); m_currentMouth->setTextAlign(Qt::AlignCenter); titleLayout->addWidget(m_prevButton); titleLayout->addWidget(m_currentMouth); titleLayout->addWidget(m_nextButton); titleLayout->addStretch(); titleLayout->addWidget(m_today, 0, Qt::AlignRight); // cells grid m_gridLayout = new QGridLayout; m_gridLayout->setMargin(0); m_gridLayout->setSpacing(0); for (int r = 0; r != 6; ++r) { for (int c = 0; c != 7; ++c) { QWidget *cell = new QWidget; cell->setFixedSize(DDEDayCalendar::DCellWidth, DDEDayCalendar::DCellHeight); cell->installEventFilter(this); cell->setFocusPolicy(Qt::ClickFocus); m_gridLayout->addWidget(cell, r, c); m_cellList.append(cell); } } //上半部分 m_upLayout = new QVBoxLayout; m_upLayout->setMargin(0); m_upLayout->setSpacing(0); m_upLayout->setContentsMargins(22, 9, 0, 7); m_upLayout->addLayout(titleLayout); m_upLayout->addLayout(m_gridLayout); //中间部分 QVBoxLayout *midLayout = new QVBoxLayout; midLayout->setMargin(0); midLayout->setSpacing(0); midLayout->setContentsMargins(0, 0, 0, 20); m_currentDay = new CustomFrame(this); m_currentDay->setFixedHeight(DDEDayCalendar::DDLableHeight); m_currentDay->setMinimumWidth(width()); m_currentDay->setTextAlign(Qt::AlignCenter); QFont daylabelF; daylabelF.setWeight(QFont::Medium); daylabelF.setPixelSize(DDECalendar::FontSizeOneHundred); m_currentDay->setTextFont(daylabelF); midLayout->addWidget(m_currentDay); m_currentWeek = new CustomFrame(this); m_currentWeek->setFixedHeight(DDEDayCalendar::DWLableHeight); m_currentWeek->setTextAlign(Qt::AlignCenter); QFont wlabelF; wlabelF.setPixelSize(DDECalendar::FontSizeSixteen); m_currentWeek->setTextFont(wlabelF); midLayout->addWidget(m_currentWeek); midLayout->addSpacing(2); m_currentYear = new CustomFrame(this); m_currentYear->setFixedHeight(DDEDayCalendar::DWLableHeight); m_currentYear->setTextAlign(Qt::AlignCenter); m_currentYear->setTextFont(wlabelF); midLayout->addWidget(m_currentYear); midLayout->addSpacing(2); m_currentLuna = new CustomFrame(this); m_currentLuna->setFixedHeight(DDEDayCalendar::DHualiInfoLableHeight); m_currentLuna->setTextAlign(Qt::AlignCenter); QFont hlabelF; hlabelF.setPixelSize(DDECalendar::FontSizeTwelve); m_currentLuna->setTextFont(hlabelF); midLayout->addWidget(m_currentLuna); m_yidownLayout = new QVBoxLayout; m_yidownLayout->setMargin(0); m_yidownLayout->setSpacing(0); m_yidownLayout->setContentsMargins(10, 5, 10, 0); hlabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_yiLabel = new CDayHuangLiLabel(this); m_yiLabel->setbackgroundColor(QColor("#75C18E")); m_yiLabel->setTextInfo(QColor("#7B7B7B "), hlabelF); m_yiLabel->setFixedSize(DDEDayCalendar::DHualiDtailLableWidth, DDEDayCalendar::DHualiDtailLableHeight); m_yidownLayout->addWidget(m_yiLabel); m_jidownLayout = new QVBoxLayout; m_jidownLayout->setMargin(0); m_jidownLayout->setSpacing(0); m_jidownLayout->setContentsMargins(10, 10, 10, 10); m_jiLabel = new CDayHuangLiLabel(this); m_jiLabel->setbackgroundColor(QColor("#C17575")); m_jiLabel->setTextInfo(QColor("#7B7B7B "), hlabelF); m_jiLabel->setFixedSize(DDEDayCalendar::DHualiDtailLableWidth, DDEDayCalendar::DHualiDtailLableHeight); m_jidownLayout->addWidget(m_jiLabel); m_hhLayout = new QVBoxLayout; m_hhLayout->setMargin(0); m_hhLayout->setSpacing(0); m_hhLayout->addLayout(m_upLayout); m_hhLayout->addLayout(midLayout); m_splitline = new DHorizontalLine; m_splitline->setFixedSize(241, 2); QHBoxLayout *hlineLayout = new QHBoxLayout; hlineLayout->setMargin(0); hlineLayout->setSpacing(0); hlineLayout->setContentsMargins(0, 0, 0, 3); hlineLayout->addStretch(1); hlineLayout->addWidget(m_splitline); hlineLayout->addStretch(1); m_hhLayout->addLayout(hlineLayout); m_hhLayout->addLayout(m_yidownLayout); m_hhLayout->addLayout(m_jidownLayout); m_hhLayout->addStretch(); setLayout(m_hhLayout); } void CDayMonthView::initConnection() { connect(m_prevButton, &DIconButton::clicked, this, &CDayMonthView::slotprev); connect(m_today, &CTodyButton::clicked, this, &CDayMonthView::slottoday); connect(m_nextButton, &DIconButton::clicked, this, &CDayMonthView::slotnext); connect(this, &CDayMonthView::dateSelected, this, &CDayMonthView::handleCurrentDateChanged); } void CDayMonthView::updateDateShow() { QLocale locale; m_currentMouth->setTextStr(locale.monthName(m_currentDate.month(), QLocale::ShortFormat)); m_currentDay->setTextStr(QString::number(m_currentDate.day())); if (m_currentDate.dayOfWeek() > 0) m_currentWeek->setTextStr(m_weeklist.at(m_currentDate.dayOfWeek() - 1)); m_currentYear->setTextStr(m_currentDate.toString("yyyy/M")); } void CDayMonthView::updateDateLunarDay() { if (!m_huanglistate) return; CaHuangLiDayInfo info = getCaHuangLiDayInfo(getDateIndex(m_currentDate)); m_currentLuna->setTextStr(info.mGanZhiYear + "年 " + "【" + info.mZodiac + "年】" + info.mGanZhiMonth + "月 " + info.mGanZhiDay + "日 "); QStringList yilist = info.mSuit.split(".", QString::SkipEmptyParts); QStringList jilist = info.mAvoid.split(".", QString::SkipEmptyParts); m_yiLabel->setHuangLiText(yilist); m_jiLabel->setHuangLiText(jilist, 1); } const QString CDayMonthView::getCellDayNum(int pos) { return QString::number(m_days[pos].day()); } const QDate CDayMonthView::getCellDate(int pos) { return m_days[pos]; } void CDayMonthView::paintCell(QWidget *cell) { const QRect rect(0, 0, cellwidth, cellheight); const int pos = m_cellList.indexOf(cell); const bool isSelectedCell = pos == m_selectedCell; const bool isCurrentDay = getCellDate(pos) == QDate::currentDate(); QPainter painter(cell); // draw selected cell background circle if (isSelectedCell) { int min = 0; //高度和宽度最小的一个 min = cell->height() < cell->width() ? cell->height():cell->width(); //最终rect QRectF fillRect; //宽度小于高度时的rect QRectF rectByWidth = QRectF(cell->width() * 0.15, (cell->height() - cell->width() * 0.75) / 2.0, min * 0.7, min * 0.7); //高度小于宽度时的rect QRectF rectByHeight = QRectF((cell->width() - cell->height() * 0.75) / 2.0, cell->height() * 0.15, min * 0.7, min * 0.7); //判断最终rect是哪一个 fillRect = cell->height() < cell->width() ? rectByHeight : rectByWidth; painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(QBrush(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor())); painter.setPen(Qt::NoPen); painter.drawEllipse(fillRect); painter.restore(); } painter.setPen(Qt::SolidLine); const QString dayNum = getCellDayNum(pos); // draw text of day if (isSelectedCell) { painter.setPen(m_selectedTextColor); } else if (isCurrentDay) { painter.setPen(m_currentDayTextColor); } else { if (m_currentDate.month() == getCellDate(pos).month()) painter.setPen(m_defaultTextColor); else painter.setPen(m_notCurrentTextColor); } QRect test; painter.setFont(m_dayNumFont); painter.drawText(rect, Qt::AlignCenter, dayNum, &test); if (m_vlineflag.count() == DDEDayCalendar::PainterCellNum) { if (m_vlineflag[pos]) { painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::HighQualityAntialiasing); painter.setRenderHint(QPainter::SmoothPixmapTransform); QPen pen; pen.setWidth(2); pen.setColor(m_ceventColor); painter.setPen(pen); painter.setBrush(QBrush(m_ceventColor)); painter.setPen(Qt::NoPen); int r = cell->width() * (4 / 25); if (r < 4) { r = 4; } else if ( r > 7) { r = 7; } painter.drawEllipse(cell->width() - r - 6, 4, r, r); painter.restore(); } } painter.end(); } void CDayMonthView::cellClicked(QWidget *cell) { if (!m_cellSelectable) return; const int pos = m_cellList.indexOf(cell); if (pos == -1) return; setSelectedCell(pos); } void CDayMonthView::setSelectedCell(int index) { if (m_selectedCell == index) return; const int prevPos = m_selectedCell; m_selectedCell = index; updateDate(); m_cellList.at(prevPos)->update(); m_cellList.at(index)->update(); if (m_currentDate.year() < DDECalendar::QueryEarliestYear) return; emit signalcurrentDateChanged(m_days[index]); } void CDayMonthView::updateCurrentLunar() { updateDate(); updateDateShow(); updateDateLunarDay(); emit signalcurrentLunarDateChanged(m_currentDate, getCaHuangLiDayInfo(getDateIndex(m_currentDate)), 1); } const QString CDayMonthView::getLunar(int pos) { CaHuangLiDayInfo info = getCaHuangLiDayInfo(pos); if (info.mLunarDayName == "初一") { info.mLunarDayName = info.mLunarMonthName + info.mLunarDayName; } if (info.mTerm.isEmpty()) return info.mLunarDayName; return info.mTerm; } const CaHuangLiDayInfo CDayMonthView::getCaHuangLiDayInfo(int pos) { const QDate date = m_days[pos]; if (lunarCache->contains(date)) { return lunarCache->value(date); } if (lunarCache->size() > 40) lunarCache->clear(); queue->push_back(pos); QTimer::singleShot(300, this, SLOT(getDbusData())); return *emptyCaHuangLiDayInfo; } void CDayMonthView::getDbusData() { if (queue->isEmpty()) return; const int pos = queue->head(); queue->pop_front(); const QDate date = m_days[pos]; if (!date.isValid()) { return; } CaHuangLiDayInfo currentDayInfo; if (!lunarCache->contains(date)) { CaHuangLiDayInfo scurrentDayinfo; if (m_DBusInter->GetHuangLiDayCalendar(date.year(), date.month(), date.day(), scurrentDayinfo)) { lunarCache->insert(date, scurrentDayinfo); currentDayInfo = scurrentDayinfo; } } else { currentDayInfo = lunarCache->value(date); } m_cellList.at(pos)->update(); // refresh lunar info if (date == m_currentDate) { updateCurrentLunar(); } } void CDayMonthView::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); cellwidth = qRound(width() * 0.1005 + 0.5); cellheight = qRound(height() * 0.0496 + 0.5); m_gridLayout->setHorizontalSpacing(qRound(width() * 0.0287 + 0.5)); m_gridLayout->setVerticalSpacing(0); int leftmagin = qRound(width() * 0.0332 + 0.5); int rightmagin = leftmagin; int topmagin = qRound(height() * 0.0164 + 0.5); int buttonmagin = topmagin; m_upLayout->setContentsMargins(leftmagin, topmagin, rightmagin, buttonmagin); m_dayNumFont.setPixelSize(qRound(12 + (width() - 347) / 71.66)); for (int i(0); i != DDEDayCalendar::PainterCellNum; ++i) { m_cellList.at(i)->setFixedSize(cellwidth, cellheight); m_cellList.at(i)->update(); } m_splitline->setFixedWidth(qRound(0.6925 * width() + 0.5)); int hleftmagin = qRound(width() * 0.026 + 0.5); int hrightmagin = hleftmagin; int htopmagin = qRound(height() * 0.01773 + 0.5); int hbuttonmagin = htopmagin; int lw = width() - hleftmagin * 2; int lh = qRound(height() * 0.0992); m_yiLabel->setFixedSize(lw, lh); m_yidownLayout->setContentsMargins(hleftmagin, qRound(htopmagin * 0.5), hrightmagin, 0); m_jiLabel->setFixedSize(lw, lh); m_jidownLayout->setContentsMargins(hleftmagin, htopmagin, hrightmagin, hbuttonmagin); } void CDayMonthView::wheelEvent(QWheelEvent *event) { //如果是拖拽则退出 bool isDragging = false; emit signalIsDragging(isDragging); if (isDragging) return; if (event->delta() < 0) { m_currentDate = m_currentDate.addDays(1); if (m_currentDate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } emit signalcurrentDateChanged(m_currentDate); updateCurrentLunar(); } else { QDate t_curret = m_currentDate.addDays(-1); if (t_curret.year() < DDECalendar::QueryEarliestYear) return; if (m_currentDate.year() >= DDECalendar::QueryEarliestYear) { m_currentDate = t_curret; if (m_currentDate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } emit signalcurrentDateChanged(m_currentDate); updateCurrentLunar(); } else { } } } void CDayMonthView::paintEvent(QPaintEvent *e) { Q_UNUSED(e); int labelwidth = width(); int labelheight = height(); DPalette anipa = this->palette(); QPainter painter(this); painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(anipa.background()); painter.setPen(Qt::NoPen); QPainterPath painterPath; painterPath.moveTo(m_radius, 0); painterPath.lineTo(0, 0); painterPath.lineTo(0, m_radius); painterPath.lineTo(0, labelheight - m_radius); painterPath.lineTo(0, labelheight); painterPath.lineTo(m_radius, labelheight); painterPath.lineTo(labelwidth - m_radius, labelheight); if (!m_searchflag) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 270, 90); } else { painterPath.lineTo(labelwidth, labelheight); painterPath.lineTo(labelwidth, labelheight - m_radius); } painterPath.lineTo(labelwidth, m_radius); if (!m_searchflag) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, 0, m_radius * 2, m_radius * 2), 0, 90); } else { painterPath.lineTo(labelwidth, 0); painterPath.lineTo(labelwidth - m_radius, 0); } painterPath.lineTo(m_radius, 0); painterPath.closeSubpath(); painter.drawPath(painterPath); painter.restore(); } void CDayMonthView::slotprev() { emit signalSchedulHide(); if (m_currentDate.year() == DDECalendar::QueryEarliestYear && m_currentDate.month() == 1) return; if (m_currentDate.year() >= DDECalendar::QueryEarliestYear) { m_currentDate = m_currentDate.addMonths(-1); if (m_currentDate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } emit signalcurrentDateChanged(m_currentDate); updateCurrentLunar(); } else { } } void CDayMonthView::slotnext() { emit signalSchedulHide(); m_currentDate = m_currentDate.addMonths(1); if (m_currentDate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } emit signalcurrentDateChanged(m_currentDate); updateCurrentLunar(); } void CDayMonthView::slottoday() { emit signalSchedulHide(); emit signalsReturnDay(); setCurrentDate(QDate::currentDate()); } dde-calendar-5.7.0.23/src/widget/dayWidget/daymonthview.h000066400000000000000000000113301375021633200231330ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 DAYMONTHVIEW_H #define DAYMONTHVIEW_H #include "customframe.h" #include "calendardbus.h" #include #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class QLabel; class CDayHuangLiLabel; class CTodyButton; class CDayMonthView: public CustomFrame { Q_OBJECT public: explicit CDayMonthView(QWidget *parent = nullptr); ~CDayMonthView(); void setFirstWeekday(int weekday); int getDateType(const QDate &date); inline bool cellSelectable() const { return m_cellSelectable; } void updateSelectState(); void setLunarVisible(bool visible); QDate getCurrDate() { return m_currentDate; } void setTheMe(int type = 0); void setSearchFlag(bool flag); void updateFlag(); signals: void dateSelected(const QDate date, const CaHuangLiDayInfo &detail) const; void signalcurrentDateChanged(QDate date); void signalcurrentLunarDateChanged(QDate date, CaHuangLiDayInfo detail, int type = 0); void cellSelectableChanged(bool cellSelectable) const; void signalsReturnDay(); void signalSchedulHide(); void signalIsDragging(bool &isDragging); public slots: void setCurrentDate(const QDate date, int type = 0); void handleCurrentDateChanged(const QDate date, const CaHuangLiDayInfo &detail); void slottoday(); private: int getDateIndex(const QDate &date) const; const QString getCellDayNum(int pos); const QDate getCellDate(int pos); void paintCell(QWidget *cell); bool eventFilter(QObject *o, QEvent *e) override; void updateDate(); void getlineflag(); const QString getLunar(int pos); const CaHuangLiDayInfo getCaHuangLiDayInfo(int pos); void updateCurrentLunar(); void initUI(); void initConnection(); void updateDateShow(); void updateDateLunarDay(); private slots: void cellClicked(QWidget *cell); void setSelectedCell(int index); void slotprev(); void slotnext(); void getDbusData(); protected: void resizeEvent(QResizeEvent *event) override; void wheelEvent(QWheelEvent *event) override; void paintEvent(QPaintEvent *e) override; private: DIconButton *m_prevButton = nullptr; DIconButton *m_nextButton = nullptr; CTodyButton *m_today = nullptr; CustomFrame *m_currentMouth = nullptr; CustomFrame *m_currentDay = nullptr; CustomFrame *m_currentYear = nullptr; CustomFrame *m_currentWeek = nullptr; CustomFrame *m_currentLuna = nullptr; CDayHuangLiLabel *m_yiLabel = nullptr; CDayHuangLiLabel *m_jiLabel = nullptr; QList m_cellList; QDate m_days[42]; QDate m_currentDate; CalendarDBus *m_DBusInter = nullptr; int m_selectedCell = 0; bool m_cellSelectable = true; QFont m_dayNumFont; QColor m_topBorderColor = Qt::red; QColor m_backgroundCircleColor = "#2ca7f8"; QColor m_defaultTextColor = Qt::black; QColor m_currentDayTextColor = "#2ca7f8"; QColor m_weekendsTextColor = Qt::black; QColor m_selectedTextColor = Qt::white; QColor m_festivalTextColor = Qt::black; QColor m_notCurrentTextColor = "#b2b2b2"; int m_firstWeekDay; bool m_huanglistate = true; QGridLayout *m_gridLayout = nullptr; int cellwidth = 20; int cellheight = 20; QVBoxLayout *m_hhLayout = nullptr; QVBoxLayout *m_upLayout = nullptr; DHorizontalLine *m_splitline = nullptr; QVBoxLayout *m_yidownLayout = nullptr; QVBoxLayout *m_jidownLayout = nullptr; QStringList m_weeklist; QQueue *queue = nullptr; QMap *lunarCache = nullptr; CaHuangLiDayInfo *emptyCaHuangLiDayInfo = nullptr; int m_themetype = 1; const int m_radius = 8; bool m_searchflag = false; QColor m_ceventColor = "#FF5D00"; QVector m_vlineflag; //节假日和日程标识 }; #endif // YEARVIEW_H dde-calendar-5.7.0.23/src/widget/dayWidget/daywindow.cpp000066400000000000000000000236311375021633200227640ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "daywindow.h" #include "constants.h" #include "customframe.h" #include "daymonthview.h" #include "schcedulesearchview.h" #include "scheduleview.h" #include #include #include DGUI_USE_NAMESPACE CDayWindow::CDayWindow(QWidget *parent) : QMainWindow(parent) { initUI(); initConnection(); } CDayWindow::~CDayWindow() {} void CDayWindow::setTheMe(int type) { if (type == 0 || type == 1) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); m_leftground->setBColor("#FFFFFF"); DPalette ypa = m_YearLabel->palette(); ypa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(ypa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette lpa = m_LunarLabel->palette(); lpa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_LunarLabel->setPalette(lpa); m_LunarLabel->setForegroundRole(DPalette::WindowText); DPalette spa = m_SolarDay->palette(); spa.setColor(DPalette::WindowText, Qt::red); m_SolarDay->setPalette(spa); m_SolarDay->setForegroundRole(DPalette::WindowText); } else if (type == 2) { DPalette anipa = m_contentBackground->palette(); QColor bcolor = "#252525"; anipa.setColor(DPalette::Background, bcolor); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); m_leftground->setBColor("#282828"); DPalette ypa = m_YearLabel->palette(); ypa.setColor(DPalette::WindowText, QColor("#C0C6D4")); m_YearLabel->setPalette(ypa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette lpa = m_LunarLabel->palette(); lpa.setColor(DPalette::WindowText, QColor("#798BA8")); m_LunarLabel->setPalette(lpa); m_LunarLabel->setForegroundRole(DPalette::WindowText); DPalette spa = m_SolarDay->palette(); spa.setColor(DPalette::WindowText, Qt::red); m_SolarDay->setPalette(spa); m_SolarDay->setForegroundRole(DPalette::WindowText); } m_daymonthView->setTheMe(type); m_scheduleView->setTheMe(type); } void CDayWindow::setTime(QTime time) { m_scheduleView->setTime(time); } void CDayWindow::updateHigh() { m_scheduleView->updateHigh(); } void CDayWindow::setDate(QDate date) { if (!date.isValid()) return; m_currentdate = date; m_daymonthView->setFirstWeekday(0); m_daymonthView->setCurrentDate(date); int w = m_scheduleView->width() - 72; m_scheduleView->setRange(w, 1032, m_currentdate, m_currentdate); emit signalCurrentDate(date); } void CDayWindow::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { m_scheduleView->setSelectSchedule(scheduleInfo); } void CDayWindow::setSearchWFlag(bool flag) { m_searchfalg = flag; m_daymonthView->setSearchFlag(flag); } void CDayWindow::clearSearch() { } void CDayWindow::setLunarVisible(bool state) { m_LunarLabel->setVisible(state); m_SolarDay->setVisible(state); m_scheduleView->setLunarVisible(state); m_daymonthView->setLunarVisible(state); } void CDayWindow::initUI() { m_contentBackground = new DFrame; m_contentBackground->setAutoFillBackground(true); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setFrameRounded(true); m_contentBackground->setLineWidth(0); QHBoxLayout *titleLayout = new QHBoxLayout; titleLayout->setMargin(0); titleLayout->setSpacing(0); titleLayout->setContentsMargins(10, 9, 0, 3); m_YearLabel = new QLabel(); m_YearLabel->setMinimumHeight(DDEDayCalendar::D_YLableHeight); QFont labelF; labelF.setWeight(QFont::Medium); labelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_YearLabel->setFont(labelF); DPalette ypa = m_YearLabel->palette(); ypa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(ypa); titleLayout->addWidget(m_YearLabel); m_LunarLabel = new QLabel(); titleLayout->addSpacing(15); m_LunarLabel->setFixedHeight(DDEDayCalendar::D_YLableHeight); labelF.setPixelSize(DDECalendar::FontSizeFourteen); m_LunarLabel->setFont(labelF); m_LunarLabel->setAlignment(Qt::AlignCenter); DPalette lpa = m_LunarLabel->palette(); lpa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_LunarLabel->setPalette(lpa); titleLayout->addWidget(m_LunarLabel); m_SolarDay = new QLabel(); labelF.setPixelSize(DDECalendar::FontSizeTen); m_SolarDay->setFixedHeight(DDEDayCalendar::D_YLableHeight); m_SolarDay->setFont(labelF); m_SolarDay->setAlignment(Qt::AlignCenter); DPalette spa = m_SolarDay->palette(); spa.setColor(DPalette::WindowText, Qt::red); m_SolarDay->setPalette(spa); titleLayout->addWidget(m_SolarDay); titleLayout->addStretch(); QVBoxLayout *leftLayout = new QVBoxLayout; leftLayout->setMargin(0); leftLayout->setSpacing(0); m_scheduleView = new CScheduleView(this, 1); m_scheduleView->setviewMagin(72, 109, 20, 0); m_scheduleView->setRange(423, 1032, QDate(2019, 8, 12), QDate(2019, 8, 12)); leftLayout->addLayout(titleLayout); leftLayout->addWidget(m_scheduleView); m_verline = new DVerticalLine; m_verline->setFixedWidth(2); m_daymonthView = new CDayMonthView(this); QHBoxLayout *lfetmainLayout = new QHBoxLayout; lfetmainLayout->setMargin(0); lfetmainLayout->setSpacing(1); lfetmainLayout->setContentsMargins(0, 0, 0, 0); lfetmainLayout->addLayout(leftLayout); lfetmainLayout->addWidget(m_verline); lfetmainLayout->addWidget(m_daymonthView); m_leftground = new CustomFrame(); m_leftground->setRoundState(true, true, true, true); m_leftground->setLayout(lfetmainLayout); m_leftground->setBColor("#FFFFFF"); m_mainLayout = new QHBoxLayout; m_mainLayout->setMargin(0); m_mainLayout->setSpacing(0); m_mainLayout->setContentsMargins(10, 10, 10, 10); m_mainLayout->addWidget(m_leftground); m_contentBackground->setLayout(m_mainLayout); setCentralWidget(m_contentBackground); } void CDayWindow::initConnection() { connect(m_daymonthView, &CDayMonthView::signalcurrentLunarDateChanged, this, &CDayWindow::slotcurrentDateLunarChanged); connect(m_daymonthView, &CDayMonthView::signalcurrentDateChanged, this, &CDayWindow::slotcurrentDateChanged); connect(m_daymonthView, &CDayMonthView::signalsReturnDay, this, &CDayWindow::slotCurrentReturnDay); connect(m_scheduleView, &CScheduleView::signalViewtransparentFrame, this, &CDayWindow::signalViewtransparentFrame); connect(m_scheduleView, &CScheduleView::signalsUpdateShcedule, this, &CDayWindow::slotTransitSchedule); connect(m_daymonthView, &CDayMonthView::signalSchedulHide , this, &CDayWindow::slotScheduleHide); connect(m_daymonthView,&CDayMonthView::signalIsDragging, this,&CDayWindow::slotIsDragging); } void CDayWindow::slotupdateSchedule(int id) { Q_UNUSED(id); m_daymonthView->setCurrentDate(m_currentdate); m_scheduleView->setRange(m_currentdate, m_currentdate); m_daymonthView->updateFlag(); } void CDayWindow::slotTransitSchedule(int id) { emit signalsWUpdateShcedule(this, id); m_daymonthView->updateFlag(); } void CDayWindow::slotTransitSearchSchedule(int id) { m_scheduleView->slotupdateSchedule(); emit signalsWUpdateShcedule(this, id); } void CDayWindow::slotReturnTodayUpdate() { m_daymonthView->slottoday(); } void CDayWindow::slotCurrentReturnDay() { emit signalsReturnTodayUpdate(this); } void CDayWindow::slotScheduleHide() { m_scheduleView->slotScheduleShow(false); } void CDayWindow::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); qreal dw = 0.4046 * width(); int dh = height() - 20; if (m_searchfalg) { m_mainLayout->setContentsMargins(10, 10, 0, 10); } else { m_mainLayout->setContentsMargins(10, 10, 10, 10); } if (dw < 350) dw = 350; m_daymonthView->setFixedSize(qRound(dw), dh); } void CDayWindow::slotcurrentDateLunarChanged(QDate date, CaHuangLiDayInfo detail, int type) { m_currentdate = date; if (type == 1) { QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(date.year()) + tr("Y") + QString::number(date.month()) + tr("M") + QString::number(date.day()) + tr("D")); } else { m_YearLabel->setText(locale.toString(date, "yyyy/M/d")); } m_LunarLabel->setText(detail.mLunarMonthName + detail.mLunarDayName); } } void CDayWindow::slotcurrentDateChanged(QDate date) { setDate(date); slotupdateSchedule(1); } void CDayWindow::slotsearchDateSelect(QDate date) { setDate(date); slotupdateSchedule(1); } void CDayWindow::slotIsDragging(bool &isDragging) { isDragging = m_scheduleView->IsDragging(); } dde-calendar-5.7.0.23/src/widget/dayWidget/daywindow.h000066400000000000000000000054321375021633200224300ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 DAYWINDOW_H #define DAYWINDOW_H #include "calendardbus.h" #include "schedulestructs.h" #include #include #include #include #include DWIDGET_USE_NAMESPACE class CDayMonthView; class CScheduleView; class CSchceduleSearchView; class QHBoxLayout; class CustomFrame; class CDayWindow: public QMainWindow { Q_OBJECT public: CDayWindow(QWidget *parent = nullptr); ~CDayWindow(); void setDate(QDate date); void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); void setSearchWFlag(bool flag); void clearSearch(); void setLunarVisible(bool state); void setTheMe(int type = 0); void setTime(QTime time); void updateHigh(); private: void initUI(); void initConnection(); signals: void dateSelected(const QDate date, const CaLunarDayInfo &detail) const; void signalsWUpdateShcedule(QMainWindow *w, int id = 0); void signalsReturnTodayUpdate(QMainWindow *w); void signalViewtransparentFrame(int type); void signalCurrentDate(QDate date); public slots: void slotupdateSchedule(int id = 0); void slotTransitSchedule(int id = 0); void slotTransitSearchSchedule(int id = 0); void slotReturnTodayUpdate(); void slotCurrentReturnDay(); void slotScheduleHide(); protected: void resizeEvent(QResizeEvent *event) override; private slots: void slotcurrentDateLunarChanged(QDate date, CaHuangLiDayInfo detail, int type = 0); void slotcurrentDateChanged(QDate date); void slotsearchDateSelect(QDate date); void slotIsDragging(bool &isDragging); private: CDayMonthView *m_daymonthView = nullptr; DFrame *m_contentBackground = nullptr; CustomFrame *m_leftground = nullptr; DVerticalLine *m_verline = nullptr; QDate m_currentdate; QLabel *m_YearLabel = nullptr; QLabel *m_LunarLabel = nullptr; QLabel *m_SolarDay = nullptr; CScheduleView *m_scheduleView = nullptr; QString m_searchText; bool m_searchfalg = false; QHBoxLayout *m_mainLayout = nullptr; }; #endif // YEARWINDOW_H dde-calendar-5.7.0.23/src/widget/monthWidget/000077500000000000000000000000001375021633200206165ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/widget/monthWidget/monthdayview.cpp000066400000000000000000000202251375021633200240410ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "monthdayview.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CMonthDayView::CMonthDayView(QWidget *parent) : DFrame(parent) { QHBoxLayout *hboxLayout = new QHBoxLayout; hboxLayout->setMargin(0); hboxLayout->setSpacing(0); hboxLayout->setContentsMargins(10, 0, 10, 0); m_monthWidget = new CMonthWidget(this); hboxLayout->addWidget(m_monthWidget); setLayout(hboxLayout); setFrameRounded(true); setLineWidth(0); setWindowFlags(Qt::FramelessWindowHint); connect(m_monthWidget, &CMonthWidget::signalsSelectDate, this, &CMonthDayView::signalsSelectDate); } CMonthDayView::~CMonthDayView() { } void CMonthDayView::setCurrentDate(const QDate date) { m_selectDate = date; m_days[5] = m_selectDate; for (int i(4); i >= 0; i--) { m_days[4 - i] = m_selectDate.addMonths(-i - 1); } for (int i(6); i != DDEMonthCalendar::MonthNumofYear; ++i) { m_days[i] = m_selectDate.addMonths(i - 5); } update(); m_monthWidget->setDate(m_days); } void CMonthDayView::setRCurrentDate(const QDate date) { if (m_selectDate == date) return; m_selectDate = date; m_days[5] = m_selectDate; for (int i(4); i >= 0; i--) { m_days[4 - i] = m_selectDate.addMonths(-i - 1); } for (int i(6); i != DDEMonthCalendar::MonthNumofYear; ++i) { m_days[i] = m_selectDate.addMonths(i - 5); } m_monthWidget->setDate(m_days); update(); } void CMonthDayView::setTheMe(int type) { QColor frameclor; if (type == 0 || type == 1) { frameclor = "#FFFFFF"; } else if (type == 2) { frameclor = "#FFFFFF"; frameclor.setAlphaF(0.05); } DPalette anipa = palette(); anipa.setColor(DPalette::Background, frameclor); setPalette(anipa); setBackgroundRole(DPalette::Background); CMonthRect::setTheMe(type); } void CMonthDayView::setsearchfalg(bool flag) { m_searchfalg = flag; } CMonthWidget::CMonthWidget(QWidget *parent) :QWidget(parent) { for (int i = 0; i < DDEMonthCalendar::MonthNumofYear; ++i) { CMonthRect *monthrect = new CMonthRect(); m_MonthItem.append(monthrect); } } CMonthWidget::~CMonthWidget() { for (int i = 0; i < DDEMonthCalendar::MonthNumofYear; ++i) { CMonthRect *monthrect = m_MonthItem.at(i); delete monthrect; } m_MonthItem.clear(); } void CMonthWidget::setDate(const QDate date[12]) { for (int i = 0; i < DDEMonthCalendar::MonthNumofYear; ++i) { m_MonthItem.at(i)->setDate(date[i]); } CMonthRect::setSelectRect(m_MonthItem.at(5)); update(); } void CMonthWidget::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); updateSize(); } void CMonthWidget::mousePressEvent(QMouseEvent *event) { if (event->button() ==Qt::RightButton) return; int itemindex = getMousePosItem(event->pos()); if (!(itemindex<0)) { if (m_MonthItem.at(itemindex)->getDate().year() < DDECalendar::QueryEarliestYear) { return; } CMonthRect::setSelectRect(m_MonthItem.at(itemindex)); emit signalsSelectDate(m_MonthItem.at(itemindex)->getDate()); } update(); } void CMonthWidget::paintEvent(QPaintEvent *event) { Q_UNUSED(event); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; for (int i = 0; i < m_MonthItem.size(); ++i) { m_MonthItem.at(i)->paintItem(&painter, m_MonthItem.at(i)->rect()); } painter.end(); } void CMonthWidget::updateSize() { qreal w= this->width()/m_MonthItem.size(); for (int i = 0; i < m_MonthItem.size(); ++i) { m_MonthItem.at(i)->setRect(i*w,0,w,this->height()); } update(); } int CMonthWidget::getMousePosItem(const QPointF &pos) { int res =-1; for (int i = 0 ; i < m_MonthItem.size(); ++i) { if (m_MonthItem.at(i)->rect().contains(pos)) { res = i; break; } } return res; } int CMonthRect::m_themetype ; qreal CMonthRect::m_DevicePixelRatio; QColor CMonthRect::m_defaultTextColor; QColor CMonthRect::m_backgrounddefaultColor ; QColor CMonthRect::m_currentDayTextColor; QColor CMonthRect::m_backgroundcurrentDayColor; QColor CMonthRect::m_fillColor; QFont CMonthRect::m_dayNumFont; CMonthRect *CMonthRect::m_SelectRect = nullptr; CMonthRect::CMonthRect() { m_dayNumFont.setPixelSize(DDECalendar::FontSizeSixteen); m_dayNumFont.setWeight(QFont::Light); } void CMonthRect::setDate(const QDate &date) { m_Date = date; } QDate CMonthRect::getDate() const { return m_Date; } QRectF CMonthRect::rect() const { return m_rect; } void CMonthRect::setRect(const QRectF &rect) { m_rect = rect; } void CMonthRect::setRect(qreal x, qreal y, qreal w, qreal h) { m_rect.setRect(x,y,w,h); } void CMonthRect::paintItem(QPainter *painter, const QRectF &rect) { m_selectColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); if (m_Date.year() < DDECalendar::QueryEarliestYear) return; const bool isCurrentDay = (m_Date.month() == QDate::currentDate().month() && m_Date.year() == QDate::currentDate().year()); painter->setPen(Qt::SolidLine); const QString dayNum = QString::number(m_Date.month()); if (m_SelectRect ==this) { QRectF fillRect((rect.width() - 36) / 2 +rect.x() + 6, (rect.height() - 36) / 2 + 7 +rect.y(), 24, 24); painter->setBrush(QBrush(m_selectColor)); painter->setPen(Qt::NoPen); painter->drawEllipse(fillRect); painter->setRenderHint(QPainter::HighQualityAntialiasing); painter->setPen(m_currentDayTextColor); painter->setFont(m_dayNumFont); painter->drawText(rect, Qt::AlignCenter, dayNum); } else { if (isCurrentDay) { painter->setPen(m_backgroundcurrentDayColor); } else { painter->setPen(m_defaultTextColor); } painter->setFont(m_dayNumFont); painter->drawText(rect, Qt::AlignCenter, dayNum); } } void CMonthRect::setDevicePixelRatio(const qreal pixel) { m_DevicePixelRatio = pixel; } void CMonthRect::setTheMe(int type) { m_themetype = type; QColor frameclor; if (type == 0 || type == 1) { m_defaultTextColor = Qt::black; m_backgrounddefaultColor = Qt::white; m_currentDayTextColor = Qt::white; m_backgroundcurrentDayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_fillColor = "#FFFFFF"; frameclor = m_fillColor; m_fillColor.setAlphaF(0); } else if (type == 2) { m_defaultTextColor = "#C0C6D4"; QColor framecolor = Qt::black; framecolor.setAlphaF(0.5); m_backgrounddefaultColor = framecolor; m_currentDayTextColor = "#C0C6D4"; m_backgroundcurrentDayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_fillColor = "#FFFFFF"; m_fillColor.setAlphaF(0.05); frameclor = m_fillColor; m_fillColor.setAlphaF(0); } } void CMonthRect::setSelectRect(CMonthRect *selectRect) { m_SelectRect =selectRect; } dde-calendar-5.7.0.23/src/widget/monthWidget/monthdayview.h000066400000000000000000000063551375021633200235160ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MONTHDAYVIEW_H #define MONTHDAYVIEW_H #include #include #include DWIDGET_USE_NAMESPACE class CMonthWidget; class CMonthDayView : public DFrame { Q_OBJECT public: explicit CMonthDayView(QWidget *parent = nullptr); ~CMonthDayView(); void setCurrentDate(const QDate date); void setRCurrentDate(const QDate date); void setTheMe(int type = 0); void setsearchfalg(bool flag); signals: void signalsSelectDate(QDate date); void signalsCurrentDate(QDate date); private: CMonthWidget *m_monthWidget = nullptr; QDate m_selectDate; QDate m_days[12]; int m_fixwidth = 200; int m_realwidth = 100; bool m_searchfalg = false; }; class CMonthRect; class CMonthWidget : public QWidget { Q_OBJECT public: CMonthWidget(QWidget *parent = nullptr); ~CMonthWidget() override; void setDate(const QDate date[12]); protected: void resizeEvent(QResizeEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void paintEvent(QPaintEvent *event) override; private: void updateSize(); int getMousePosItem(const QPointF &pos); signals: void signalsSelectDate(QDate date); private: QVector m_MonthItem; QDate m_days[12]; }; class CMonthRect { public: CMonthRect(); void setDate(const QDate &date); QDate getDate()const; QRectF rect() const; void setRect(const QRectF &rect); inline void setRect(qreal x, qreal y, qreal w, qreal h); void paintItem(QPainter *painter, const QRectF &rect); void setDevicePixelRatio(const qreal pixel); static void setTheMe(int type); static void setSelectRect(CMonthRect *selectRect); private: QRectF m_rect; QDate m_Date; static int m_themetype ; static qreal m_DevicePixelRatio; static QColor m_defaultTextColor; static QColor m_backgrounddefaultColor; static QColor m_currentDayTextColor; static QColor m_backgroundcurrentDayColor; static QColor m_fillColor; static QFont m_dayNumFont; static CMonthRect *m_SelectRect; QColor m_selectColor; }; #endif // MONTDAYVIEW_H dde-calendar-5.7.0.23/src/widget/monthWidget/monthschceduleview.cpp000066400000000000000000000613271375021633200252330ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "monthschceduleview.h" #include "SchecduleRemindWidget.h" #include "monthview.h" #include "schcedulectrldlg.h" #include "schceduledlg.h" #include "myschceduleview.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CMonthSchceduleWidgetItem::CMonthSchceduleWidgetItem(QRect rect, QGraphicsItem *parent, int edittype) : DragInfoItem(rect, parent) , m_pos(13, 5) { Q_UNUSED(edittype); } CMonthSchceduleWidgetItem::~CMonthSchceduleWidgetItem() { } QPixmap CMonthSchceduleWidgetItem::getPixmap() { QPixmap pixmap(this->rect().size().toSize()); pixmap.fill(Qt::transparent); QPainter painter(&pixmap); paintBackground(&painter,pixmap.rect(),true); painter.end(); return pixmap; } void CMonthSchceduleWidgetItem::paintBackground(QPainter *painter, const QRectF &rect, const int isPixMap) { qreal labelwidth = rect.width(); qreal labelheight = rect.height(); m_font = DFontSizeManager::instance()->get(m_sizeType, m_font); int themetype = CScheduleDataManage::getScheduleDataManage()->getTheme(); CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType(m_vScheduleInfo.type.ID); m_vHighflag = CScheduleDataManage::getScheduleDataManage()->getSearchResult(m_vScheduleInfo); QLinearGradient linearGradient(rect.topLeft().x(), 0, rect.topRight().x(), 0); QColor color1 = gdcolor.gradientFromC; QColor color2 = gdcolor.gradientToC; QColor textcolor = gdcolor.textColor; if (CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo() == m_vScheduleInfo ) { if (m_vScheduleInfo.IsMoveInfo == CScheduleDataManage::getScheduleDataManage()->getPressSelectInfo().IsMoveInfo) { m_vHighflag = true; } else { painter->setOpacity(0.4); textcolor.setAlphaF(0.4); } m_vSelectflag = m_press; } if (isPixMap) { painter->setOpacity(0.6); textcolor.setAlphaF(0.8); } if (m_vHoverflag) { color1 = gdcolor.hovergradientFromC; color2 = gdcolor.hovergradientToC; } else if (m_vHighflag) { color1 = gdcolor.hightlightgradientFromC; color2 = gdcolor.hightlightgradientToC; } if (m_vSelectflag) { color1 = gdcolor.pressgradientFromC; color2 = gdcolor.pressgradientToC; textcolor.setAlphaF(0.4); } linearGradient.setColorAt(0, color1); linearGradient.setColorAt(1, color2); QRectF fillRect = QRectF(rect.x()+2, rect.y()+2, labelwidth - 2, labelheight - 2); painter->save(); //将直线开始点设为0,终点设为1,然后分段设置颜色 painter->setBrush(linearGradient); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, rect.height() / 3, rect.height() / 3); painter->restore(); painter->setFont(m_font); painter->setPen(textcolor); QFontMetrics fm = painter->fontMetrics(); QString tStitlename = m_vScheduleInfo.titleName; tStitlename.replace("\n", ""); QString str = tStitlename; qreal textWidth = labelwidth - m_pos.x() - m_offset*2; QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= textWidth) { tstr.chop(2); break; } } if (tstr != str) { tstr = tstr + "..."; } painter->drawText(QRectF(rect.x()+m_pos.x(), rect.y()+1, textWidth, labelheight - m_pos.y() + 3 ), Qt::AlignLeft | Qt::AlignVCenter, tstr); if (m_vHoverflag && !m_vSelectflag) { QRectF trect = QRectF(rect.x()+2.5, rect.y()+2.5, labelwidth - 3, labelheight - 3); painter->save(); painter->setRenderHints(QPainter::Antialiasing); QPen pen; QColor selcolor; if (themetype == 2) { selcolor = "#FFFFFF"; } else { selcolor = "#000000"; } selcolor.setAlphaF(0.08); pen.setColor(selcolor); pen.setWidthF(1); pen.setStyle(Qt::SolidLine); painter->setBrush(Qt::NoBrush); painter->setPen(pen); painter->drawRoundedRect(trect, rect.height() / 3, rect.height() / 3); painter->restore(); } if (m_vSelectflag) { QColor selcolor = "#000000"; selcolor.setAlphaF(0.05); painter->setBrush(selcolor); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, rect.height() / 3, rect.height() / 3); } } CMonthSchceduleNumButton::CMonthSchceduleNumButton(QGraphicsItem *parent) : QGraphicsRectItem(parent) { } CMonthSchceduleNumButton::~CMonthSchceduleNumButton() { } void CMonthSchceduleNumButton::setColor(QColor color1, QColor color2, bool GradientFlag) { m_color1 = color1; m_color2 = color2; m_GradientFlag = GradientFlag; } void CMonthSchceduleNumButton::setText( QColor tcolor, QFont font, QPoint pos) { Q_UNUSED(pos); m_textcolor = tcolor; m_font = font; } void CMonthSchceduleNumButton::setSizeType(DFontSizeManager::SizeType sizeType) { m_SizeType = sizeType; } void CMonthSchceduleNumButton::setTransparentB(bool t, QColor tcolor) { m_transparentcolor = tcolor; m_transparentf = t; } void CMonthSchceduleNumButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); qreal labelwidth = this->rect().width(); qreal labelheight = this->rect().height() - 6; qreal rectx = this->rect().x(); qreal recty = this->rect().y(); m_font = DFontSizeManager::instance()->get(m_SizeType, m_font); if (m_GradientFlag) { QLinearGradient linearGradient(0, 0, labelwidth, 0); linearGradient.setColorAt(0, m_color1); linearGradient.setColorAt(1, m_color2); QRectF fillRect = QRectF(rectx+2, recty+1, labelwidth - 2, labelheight - 1); //将直线开始点设为0,终点设为1,然后分段设置颜色 painter->setRenderHints(QPainter::HighQualityAntialiasing); painter->setBrush(linearGradient); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, 3, 2); painter->setFont(m_font); painter->setPen(m_textcolor); QString str = QString(tr("%1 more")).arg(m_num) + "..."; QFont tfont = m_font; QFontMetrics fm = painter->fontMetrics(); QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= labelwidth - m_pos.x()) { tstr.chop(2); break; } } if (tstr != str) { tstr = tstr + "..."; } painter->drawText(QRectF(rectx+m_pos.x(), recty+m_pos.y(), labelwidth - m_pos.x(), labelheight + 4), Qt::AlignCenter, tstr); } else { QRectF fillRect = QRectF(rectx+2, recty+1, labelwidth - 2, labelheight - 1); //将直线开始点设为0,终点设为1,然后分段设置颜色 painter->setRenderHints(QPainter::HighQualityAntialiasing); painter->setBrush(m_color1); painter->setPen(Qt::NoPen); painter->drawRoundedRect(fillRect, 3, 2); painter->setFont(m_font); painter->setPen(m_textcolor); painter->drawText(QRectF(rectx+m_pos.x(), recty+m_pos.y(), labelwidth - m_pos.x(), labelheight + 4), Qt::AlignLeft, QString(tr("%1 more")).arg(m_num)); } } void CMonthSchceduleView::setTheMe(int type) { Q_UNUSED(type); updateData(); } CMonthSchceduleView::CMonthSchceduleView(QWidget *parent, QGraphicsScene *scene) : QObject(parent) , m_Scene(scene) { for (int i = 0; i < 6; ++i) { CWeekScheduleView *weekSchedule = new CWeekScheduleView(this); m_weekSchedule.append(weekSchedule); } slotFontChange(); } CMonthSchceduleView::~CMonthSchceduleView() { } void CMonthSchceduleView::setallsize(int w, int h, int left, int top, int buttom, int itemHeight) { m_width = w; m_height = h; m_buttommagin = buttom; m_leftMagin = left; m_topMagin = top; m_cNum = static_cast(((m_height - m_topMagin - m_buttommagin) / 6.0 + 0.5 - 27) / (itemHeight + 1)); } void CMonthSchceduleView::setData(QVector &data, int currentMonth) { m_data = data; m_currentMonth = currentMonth; updateData(); } void CMonthSchceduleView::slotdeleteitem( CMonthSchceduleWidgetItem *item) { emit signalsUpdateShcedule(item->getData().id); } void CMonthSchceduleView::slotedititem(CMonthSchceduleWidgetItem *item, int type) { Q_UNUSED(type); emit signalsUpdateShcedule(item->getData().id); } void CMonthSchceduleView::slotFontChange() { QFont font; DFontSizeManager::instance()->setFontGenericPixelSize( static_cast(DFontSizeManager::instance()->fontPixelSize(qGuiApp->font()))); font= DFontSizeManager::instance()->t8(font); QFontMetrics fm(font); int h = fm.height(); if (m_ItemHeight != h) { m_ItemHeight = h; updateData(); } } bool MScheduleDateThan(const MScheduleDateRangeInfo &s1, const MScheduleDateRangeInfo &s2) { if (s1.bdate != s1.edate && s2.bdate == s2.edate) { return true; } else if (s1.bdate == s1.edate && s2.bdate != s2.edate) { return false; } else if (s1.bdate != s1.edate && s2.bdate != s2.edate) { if (s1.tData.beginDateTime == s2.tData.beginDateTime) { return s1.bdate.daysTo(s1.edate) > s2.bdate.daysTo(s2.edate); } else { return s1.bdate < s2.bdate; } } else { if (s1.tData.beginDateTime == s2.tData.beginDateTime) { return s1.tData.titleName < s2.tData.titleName; } else { return s1.tData.beginDateTime < s2.tData.beginDateTime; } } } bool MScheduleDaysThan(const MScheduleDateRangeInfo &s1, const MScheduleDateRangeInfo &s2) { return s1.bdate.daysTo(s1.edate) > s2.bdate.daysTo(s2.edate); } void CMonthSchceduleView::updateData() { //保护数据防止越界 if (m_data.count() != DDEMonthCalendar::ItemSizeofMonthDay || m_cNum < 1) return; //开始结束时间 QDate begindate = m_data.begin()->date; QDate enddate = m_data[m_data.count() - 1].date; m_beginDate = begindate; m_endDate = enddate; for (int i = 0 ; i < m_weekSchedule.size(); ++i) { m_weekSchedule[i]->clearItem(); m_weekSchedule[i]->setHeight(m_ItemHeight,qRound((m_height - m_topMagin - m_buttommagin) / 6.0-27)); m_weekSchedule[i]->setData(m_data,i*7,7); QVector > mSchedule = m_weekSchedule[i]->getMScheduleInfo(); updateDateShow(mSchedule,m_weekSchedule[i]->getScheduleShowItem()); } return; } void CMonthSchceduleView::updateHigh() { for (int j = 0 ; j < m_weekSchedule.size(); ++j) { for (int i = 0; i < m_weekSchedule[j]->getScheduleShowItem().count(); i++) { m_weekSchedule[j]->getScheduleShowItem().at(i)->update(); } } } QVector CMonthSchceduleView::getScheduleShowItem() const { QVector m_scheduleShowItem; for (int j = 0 ; j < m_weekSchedule.size(); ++j) { for (int i = 0; i < m_weekSchedule[j]->getScheduleShowItem().count(); i++) { m_scheduleShowItem.append(m_weekSchedule[j]->getScheduleShowItem().at(i)); } } return m_scheduleShowItem; } void CMonthSchceduleView::updateDate(const ScheduleDtailInfo &info) { for (int i = 0 ; i < m_weekSchedule.size(); ++i) { if (m_weekSchedule.at(i)->addData(info)) { } else { m_weekSchedule[i]->clearItem(); m_weekSchedule[i]->updateSchedule(true); }; QVector > mSchedule = m_weekSchedule[i]->getMScheduleInfo(); updateDateShow(mSchedule,m_weekSchedule[i]->getScheduleShowItem()); } } void CMonthSchceduleView::changeDate(const ScheduleDtailInfo &info) { for (int i = 0 ; i < m_weekSchedule.size(); ++i) { m_weekSchedule.at(i)->changeDate(info); QVector > mSchedule = m_weekSchedule[i]->getMScheduleInfo(); updateDateShow(mSchedule,m_weekSchedule[i]->getScheduleShowItem()); } } void CMonthSchceduleView::updateDate(const int row, const ScheduleDtailInfo &info) { for (int i = 0 ; i < m_weekSchedule.size(); ++i) { if ( row ==i) { m_weekSchedule.at(i)->addData(info); } else { m_weekSchedule[i]->clearItem(); m_weekSchedule[i]->updateSchedule(true); }; QVector > mSchedule = m_weekSchedule[i]->getMScheduleInfo(); updateDateShow(mSchedule,m_weekSchedule[i]->getScheduleShowItem()); } } void CMonthSchceduleView::updateDateShow(QVector > &vCMDaySchedule, QVector &schudeleShowItem) { for (int i = 0; i < vCMDaySchedule.count(); i++) { for (int j = 0; j < vCMDaySchedule[i].count(); j++) { if (vCMDaySchedule[i].at(j).state) { createScheduleNumWidget(vCMDaySchedule[i].at(j), i + 1,schudeleShowItem); } else { createScheduleItemWidget(vCMDaySchedule[i].at(j), i + 1,schudeleShowItem); } } } } void CMonthSchceduleView::createScheduleItemWidget(MScheduleDateRangeInfo info, int cnum,QVector &schudeleShowItem) { ScheduleDtailInfo gd = info.tData; QPoint pos; int fw; int fh; computePos(cnum, info.bdate, info.edate, pos, fw, fh); CMonthSchceduleWidgetItem *gwi = new CMonthSchceduleWidgetItem(QRect(pos.x(),pos.y(),fw,fh),nullptr); m_Scene->addItem(gwi); QFont font; gwi->setData(gd); QColor TransparentC = "#000000"; TransparentC.setAlphaF(0.05); schudeleShowItem.append(gwi); } void CMonthSchceduleView::createScheduleNumWidget(MScheduleDateRangeInfo info, int cnum,QVector &schudeleShowItem) { int type = CScheduleDataManage::getScheduleDataManage()->getTheme(); CMonthSchceduleNumButton *gwi = new CMonthSchceduleNumButton(nullptr); QPoint pos; int fw; int fh; computePos(cnum, info.bdate, info.edate, pos, fw, fh); QColor gradientFromC = "#000000"; gradientFromC.setAlphaF(0.00); gwi->setColor(gradientFromC, gradientFromC, true); QFont font; gwi->setSizeType(DFontSizeManager::T8); if (type == 0 || type == 1) { QColor tc("#5E5E5E"); tc.setAlphaF(0.9); gwi->setText(tc, font, QPoint(13, 3)); } else { QColor tc("#798190"); tc.setAlphaF(1); gwi->setText(tc, font, QPoint(13, 3)); } m_Scene->addItem(gwi); gwi->setRect(pos.x(), pos.y(), fw, fh); gwi->setData(info.num); gwi->setDate(info.bdate); if (m_currentMonth != info.bdate.month() && m_currentMonth != info.edate.month()) { QColor TransparentC = "#000000"; TransparentC.setAlphaF(0.05); gwi->setTransparentB(true, TransparentC); } connect(gwi, &CMonthSchceduleNumButton::signalsCurrentScheduleDate, this, &CMonthSchceduleView::signalsCurrentScheduleDate); connect(gwi, &CMonthSchceduleNumButton::signalPressScheduleShow, this, &CMonthSchceduleView::signalPressScheduleShow); schudeleShowItem.append(gwi); } void CMonthSchceduleView::computePos(int cnum, QDate bgeindate, QDate enddate, QPoint &pos, int &fw, int &fh) { int brow = static_cast((m_beginDate.daysTo(bgeindate)) / DDEMonthCalendar::AFewDaysofWeek); int bcol = (m_beginDate.daysTo(bgeindate)) % DDEMonthCalendar::AFewDaysofWeek; int ecol = (m_beginDate.daysTo(enddate)) % DDEMonthCalendar::AFewDaysofWeek; fw = static_cast((ecol - bcol + 1) * ((m_width - m_leftMagin ) / 7.0) - 11); fh = m_ItemHeight; int x =static_cast(m_leftMagin + bcol * ((m_width - m_leftMagin ) / 7.0) + 5); int y = static_cast(m_topMagin + ((m_height - m_topMagin - m_buttommagin) * brow / 6.0 + 0.5) + 27 + (cnum - 1) * fh + 2.9); pos = QPoint(x, y); } CWeekScheduleView::CWeekScheduleView(QObject *parent) : QObject(parent) , m_ScheduleHeight(22) , m_DayHeight(47) { setMaxNum(); } CWeekScheduleView::~CWeekScheduleView() { } void CWeekScheduleView::setData(QVector &data, const int position, const int count) { int endPos = position+count; Q_ASSERT(!(endPos>data.size())); m_ScheduleInfo.clear(); for (int i = position; i=0 &&beginDate.daysTo(info.endDateTime.date())>=0) { clearItem(); updateSchedule(false,info); return true; } return false; } void CWeekScheduleView::changeDate(const ScheduleDtailInfo &info) { int index = m_ScheduleInfo.indexOf(info); if (index <0) { m_ScheduleInfo.append(info); } else { m_ScheduleInfo[index] = info; } clearItem(); updateSchedule(true); } void CWeekScheduleView::setHeight(const int ScheduleHeight, const int DayHeigth) { m_ScheduleHeight = ScheduleHeight; m_DayHeight = DayHeigth; setMaxNum(); } void CWeekScheduleView::updateSchedule(const bool isNormalDisplay, const ScheduleDtailInfo &info) { QVector schedulev; schedulev.clear(); schedulev = m_ScheduleInfo; if (isNormalDisplay) { Q_UNUSED(info); } else { schedulev.append(info); } QDate tbegindate,tenddate; QVector vMDaySchedule; m_ColumnScheduleCount.clear(); m_ColumnScheduleCount.fill(0,m_colum); for (int i = 0 ; i < schedulev.size(); ++i) { //日程时间重新标定 tbegindate = schedulev.at(i).beginDateTime.date(); tenddate = schedulev.at(i).endDateTime.date(); if (tenddateendDate) continue; if (tbegindate < beginDate) tbegindate = beginDate; if (tenddate > endDate) tenddate = endDate; //日程信息 MScheduleDateRangeInfo info; info.bdate = tbegindate; info.edate = tenddate; info.tData = schedulev.at(i); info.state = false; vMDaySchedule.append(info); qint64 pos = beginDate.daysTo(info.bdate); qint64 count = info.bdate.daysTo(info.edate); int j = static_cast(pos); for (; j < (pos+ count+1); ++j) { ++m_ColumnScheduleCount[j]; } } std::sort(vMDaySchedule.begin(),vMDaySchedule.end()); sortAndFilter(vMDaySchedule); } void CWeekScheduleView::clearItem() { for (int i = 0; i < m_scheduleShowItem.count(); i++) { delete m_scheduleShowItem[i]; } m_scheduleShowItem.clear(); } void CWeekScheduleView::setMaxNum() { m_MaxNum = m_DayHeight/(m_ScheduleHeight+1); } void CWeekScheduleView::mScheduleClear() { for (int i = 0; i < m_MScheduleInfo.size(); ++i) { m_MScheduleInfo[i].clear(); } m_MScheduleInfo.clear(); } void CWeekScheduleView::sortAndFilter(QVector &vMDaySchedule) { QVector > scheduleFill; QVector scheduf; //初始化 //m_colum列 scheduf.fill(false,m_colum); //m_MaxNum 行 scheduleFill.fill(scheduf,m_MaxNum); //标签起始位置 int postion = 0; //标签结束位置 int end = 0; mScheduleClear(); for (int i = 0 ; i < vMDaySchedule.size(); ++i) { postion = static_cast(beginDate.daysTo(vMDaySchedule.at(i).bdate)); end = static_cast(beginDate.daysTo(vMDaySchedule.at(i).edate)); //初始化当前行 int row = 0; int pos = postion; int count = 0; int scheduleRow = row; for (; postionm_MaxNum) &&(row>=m_MaxNum-1)) { //占用该位置 scheduleFill[row][postion] = true; //如果该位置不为起始位置 if (pos !=postion) { MScheduleDateRangeInfo scheduleInfo; scheduleInfo.bdate = beginDate.addDays(pos); scheduleInfo.edate = beginDate.addDays(postion -1); scheduleInfo.state = false; scheduleInfo.tData = vMDaySchedule.at(i).tData; m_MScheduleInfo[row].append(scheduleInfo); } //设置还有xxx项 MScheduleDateRangeInfo info; info.bdate = beginDate.addDays(postion); info.edate = info.bdate; info.num = m_ColumnScheduleCount[postion] -m_MaxNum +1; info.state = true; m_MScheduleInfo[row].append(info); pos = postion +1; row = 0; count = 0; } else { scheduleFill[row][postion] = true; ++count; scheduleRow = row; } break; } else { ++row; } } } if (pos>6||count==0) { } else { MScheduleDateRangeInfo scheduleInfo; scheduleInfo.bdate = beginDate.addDays(pos); scheduleInfo.edate = beginDate.addDays(postion -1); scheduleInfo.state = false; scheduleInfo.tData = vMDaySchedule.at(i).tData; m_MScheduleInfo[scheduleRow].append(scheduleInfo); } } } dde-calendar-5.7.0.23/src/widget/monthWidget/monthschceduleview.h000066400000000000000000000163241375021633200246750ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MONTHSCHCEDULEVIEW_H #define MONTHSCHCEDULEVIEW_H #include "schedulestructs.h" #include "draginfoitem.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CMonthSchceduleWidgetItem; class QVBoxLayout; class CMonthSchceduleNumButton; class SchecduleRemindWidget; class QPropertyAnimation; class QSequentialAnimationGroup; class CWeekScheduleView; class CScheduleDataManage; class CMonthSchceduleView : public QObject { Q_OBJECT public: CMonthSchceduleView(QWidget *parent,QGraphicsScene *scene); ~CMonthSchceduleView() override; void setallsize(int w, int h, int left, int top, int buttom, int itemHeight = 22); void setData(QVector &data, int currentMonth); void setTheMe(int type = 0); void updateData(); void updateHigh(); QVector getScheduleShowItem() const; int getSchceduleHeight() const { return m_ItemHeight; } void updateDate(const ScheduleDtailInfo &info); void changeDate(const ScheduleDtailInfo &info); void updateDate(const int row,const ScheduleDtailInfo &info); signals: void signalsUpdateShcedule(int id = 0); void signalsCurrentScheduleDate(QDate date); void signalViewtransparentFrame(int type); void signalUpdateUI(int type); void signalPressScheduleShow(const bool isShow, const ScheduleDtailInfo &out = ScheduleDtailInfo()); public slots: void slotdeleteitem(CMonthSchceduleWidgetItem *item); void slotedititem(CMonthSchceduleWidgetItem *item, int type = 0); void slotFontChange(); private: void updateDateShow(QVector > &vCMDaySchedule,QVector &schudeleShowItem); void createScheduleItemWidget(MScheduleDateRangeInfo info, int cnum,QVector &schudeleShowItem); void createScheduleNumWidget(MScheduleDateRangeInfo info, int cnum,QVector &schudeleShowItem); void computePos(int cnum, QDate bgeindate, QDate enddate, QPoint &pos, int &fw, int &fh); private: QVector m_data; int m_cNum = 2;//日程层数 QWidget *m_parernt = nullptr; int m_currentMonth=0; QDate m_beginDate; QDate m_endDate; int m_width =0; int m_height=0; int m_leftMagin=0; int m_topMagin=0; int m_buttommagin=0; QVector m_weekSchedule; int m_ItemHeight = 22; QGraphicsScene *m_Scene = nullptr; }; class CWeekScheduleView :public QObject { Q_OBJECT typedef QVector RowScheduleInfo; public: CWeekScheduleView(QObject *parent = nullptr); ~CWeekScheduleView() override; public: void setData(QVector &data,const int position,const int count =7); bool addData(const ScheduleDtailInfo &info); void changeDate(const ScheduleDtailInfo &info); void setHeight(const int ScheduleHeight,const int DayHeigth); QVector getMScheduleInfo() const { return m_MScheduleInfo; } QVector &getScheduleShowItem() { return m_scheduleShowItem; } void updateSchedule(const bool isNormalDisplay,const ScheduleDtailInfo &info = ScheduleDtailInfo()); void clearItem(); private: void setMaxNum(); void mScheduleClear(); void sortAndFilter(QVector &vMDaySchedule); private: QVector m_scheduleShowItem; QVector m_MScheduleInfo; QVector m_ScheduleInfo; QVector m_ColumnScheduleCount; int m_ScheduleHeight=0; int m_DayHeight=0; int m_MaxNum=0; QDate beginDate; QDate endDate; int m_colum=0; }; class CMonthSchceduleNumButton : public QObject, public QGraphicsRectItem { Q_OBJECT public: CMonthSchceduleNumButton(QGraphicsItem *parent = nullptr); ~CMonthSchceduleNumButton() override; void setColor(QColor color1, QColor color2, bool GradientFlag = false); void setText(QColor tcolor, QFont font, QPoint pos); void setSizeType(DFontSizeManager::SizeType sizeType); void setTransparentB(bool t, QColor tcolor); void setDate(QDate date) { m_date = date; } QDate getDate()const { return m_date; } void setData(int num) { m_num = num; } signals: void signalsCurrentScheduleDate(QDate date); void signalPressScheduleShow(const bool isShow, const ScheduleDtailInfo &out = ScheduleDtailInfo()); protected: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override; private: bool m_GradientFlag; QColor m_color1; QColor m_color2; QColor m_textcolor; QFont m_font; QPoint m_pos; int m_num; QColor m_transparentcolor; bool m_transparentf = false; QDate m_date; DFontSizeManager::SizeType m_SizeType = DFontSizeManager::T8; }; class CMonthSchceduleWidgetItem :public DragInfoItem { Q_OBJECT public: explicit CMonthSchceduleWidgetItem(QRect rect,QGraphicsItem *parent = nullptr, int edittype = 0); ~CMonthSchceduleWidgetItem() override; QPixmap getPixmap(); private: void paintBackground(QPainter *painter,const QRectF &rect,const int isPixMap = false) override; private: QPoint m_pos; }; #endif // CSHCEDULEDAYVIEW_H dde-calendar-5.7.0.23/src/widget/monthWidget/monthview.cpp000066400000000000000000000221301375021633200233400ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "monthview.h" #include "calendardbus.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE void CMonthView::setTheMe(int type) { m_weekIndicator->setTheMe(type); m_MonthGraphicsView->setTheMe(type); } CMonthView::CMonthView(QWidget *parent) : DWidget(parent) { m_DBusInter = new CalendarDBus("com.deepin.api.LunarCalendar", "/com/deepin/api/LunarCalendar", QDBusConnection::sessionBus(), this); if (!lunarCache) lunarCache = new QMap; m_weekIndicator = new CMonthWeekView; m_MonthGraphicsView = new CMonthGraphiview(this); connect(m_MonthGraphicsView, &CMonthGraphiview::signalsViewSelectDate, this, &CMonthView::signalsViewSelectDate); connect(m_MonthGraphicsView, &CMonthGraphiview::signalsUpdateShcedule, this, &CMonthView::slotSchceduleUpdate); connect(m_MonthGraphicsView, &CMonthGraphiview::signalsSchceduleUpdate, this, &CMonthView::signalsSchceduleUpdate); connect(m_MonthGraphicsView, &CMonthGraphiview::signalViewtransparentFrame, this, &CMonthView::signalViewtransparentFrame); connect(m_MonthGraphicsView, &CMonthGraphiview::signalScheduleShow, this, &CMonthView::slotScheduleRemindWidget); m_mainLayout = new QVBoxLayout; m_mainLayout->setMargin(0); m_mainLayout->setSpacing(0); m_mainLayout->setContentsMargins(10, 0, 0, 10); m_mainLayout->addWidget(m_weekIndicator); m_mainLayout->addWidget(m_MonthGraphicsView); setLayout(m_mainLayout); CScheduleDataCtrl *scheduleDataCtrl = CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl(); m_createAction = new QAction(tr("New event"), this); m_RemindWidget = new SchecduleRemindWidget(this); connect(scheduleDataCtrl, &CScheduleDataCtrl::signalsupdatescheduleD, this, &CMonthView::slotsupdatescheduleD); connect(this, &CMonthView::signalsupdatescheduleD, scheduleDataCtrl, &CScheduleDataCtrl::slotupdatescheduleD); setMouseTracking(true); setFocusPolicy(Qt::StrongFocus); } CMonthView::~CMonthView() { if (lunarCache !=nullptr) { delete lunarCache; lunarCache = nullptr; } } void CMonthView::slotSchceduleUpdate() { emit signalsSchceduleUpdate(0); emit signalsupdatescheduleD(this, m_days[0], m_days[41]); } void CMonthView::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { m_MonthGraphicsView->setSelectSchedule(scheduleInfo); } void CMonthView::slotsupdatescheduleD(QWidget *w, QVector &data) { if (w != this) return; if (m_sflag) { m_MonthGraphicsView->setScheduleInfo(data); } parentWidget()->setEnabled(true); } void CMonthView::slotdelete(int id) { Q_UNUSED(id); emit signalsSchceduleUpdate(0); } void CMonthView::slotScheduleRemindWidget(const bool isShow, const ScheduleDtailInfo &out) { if (isShow) { QPoint pos22 = QCursor::pos(); CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType( out.type.ID); m_RemindWidget->setData(out, gdcolor); m_RemindWidget->show(pos22.x() + 10, pos22.y()); QDesktopWidget *w = QApplication::desktop(); if ((pos22.x() + m_RemindWidget->width() + 10) > w->width()) { m_RemindWidget->setArrowDirection(DArrowRectangle::ArrowRight); m_RemindWidget->show(pos22.x() - 10, pos22.y()); } else { m_RemindWidget->setArrowDirection(DArrowRectangle::ArrowLeft); m_RemindWidget->show(pos22.x() + 10, pos22.y()); } } else { m_RemindWidget->hide(); } } void CMonthView::resizeEvent(QResizeEvent *event) { DWidget::resizeEvent(event); int leftmagin = 10; int topmagin = static_cast(height() * 0.0193 + 0.5); topmagin = 10; m_leftmaagin = leftmagin; m_topmagin = topmagin; m_mainLayout->setContentsMargins(leftmagin, topmagin, 0, 10); m_weekIndicator->setFixedSize(width()-leftmagin, static_cast(height() * 0.1042 + 0.5)); } void CMonthView::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); slotScheduleRemindWidget(false); } void CMonthView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; m_weekIndicator->setList(weekday); m_weekIndicator->updateWeek(); updateDate(); } void CMonthView::setCurrentDate(const QDate date) { slotScheduleRemindWidget(false); qDebug() << "set current date " << date; if (date.year() < DDECalendar::QueryEarliestYear) return; if (date.month() != m_currentDate.month()) { m_festivallist.clear(); m_DBusInter->GetFestivalMonth(date.addMonths(-1).year(), date.addMonths(-1).month(), m_festivallist); m_DBusInter->GetFestivalMonth(date.year(), date.month(), m_festivallist); m_DBusInter->GetFestivalMonth(date.addMonths(1).year(), date.addMonths(1).month(), m_festivallist); } m_currentDate = date; m_MonthGraphicsView->setFestivalInfo(m_festivallist); updateDate(); getDbusData(); m_MonthGraphicsView->setLunarInfo(lunarCache); emit signalcurrentDateChanged(m_currentDate); m_weekIndicator->updateWeek(); emit signalsupdatescheduleD(this, m_days[0], m_days[41]); } void CMonthView::setLunarVisible(bool visible) { m_MonthGraphicsView->setLunarVisible(visible); } int CMonthView::getDateIndex(const QDate &date) const { for (int i = 0; i != DDEMonthCalendar::ItemSizeofMonthDay; ++i) if (m_days[i] == date) return i; return 0; } void CMonthView::updateDate() { const QDate firstDay(m_currentDate.year(), m_currentDate.month(), 1); int offset = firstDay.dayOfWeek() % DDEMonthCalendar::AFewDaysofWeek - m_firstWeekDay; const int day = offset < 0 ? offset + DDEMonthCalendar::AFewDaysofWeek : offset; const int currentIndex = day + m_currentDate.day() - 1; if (currentIndex < 0) { return; } for (int i(0); i != DDEMonthCalendar::ItemSizeofMonthDay; ++i) { m_days[i] = firstDay.addDays(i - day); } m_MonthGraphicsView->setDate(m_days); update(); } void CMonthView::updateCurrentLunar(const CaLunarDayInfo &info) { emit signalcurrentLunarDateChanged(m_currentDate, info, 1); } ScheduleDtailInfo CMonthView::getScheduleInfo(const QDate &beginDate, const QDate &endDate) { ScheduleDtailInfo info; if (beginDate.daysTo(endDate)>0) { info.beginDateTime = QDateTime(beginDate,QTime(0,0,0)); info.endDateTime = QDateTime(endDate,QTime(23,59,59)); } else { info.beginDateTime = QDateTime(endDate,QTime(0,0,0)); info.endDateTime = QDateTime(beginDate,QTime(23,59,00)); } info.titleName = tr("New Event"); info.allday = true; info.remind = true; info.remindData.n = 1; info.remindData.time = QTime(9, 0); info.RecurID = 0; info.id = 0; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->GetType( 1, info.type); info.rpeat = 0; return info; } const QDate CMonthView::getCellDate(int pos) { return m_days[pos]; } const CaLunarDayInfo CMonthView::getCaLunarDayInfo(const QDate &date) { return lunarCache->value(date); } void CMonthView::getDbusData() { lunarCache->clear(); CaLunarDayInfo currentDayInfo; bool o1 = true; QDate getDate = m_currentDate; for (int i = -1; i < 2; ++i) { getDate = m_currentDate.addMonths(i); QDBusReply reply = m_DBusInter->GetLunarMonthCalendar(getDate.year(), getDate.month(), false, o1); QDate cacheDate; cacheDate.setDate(getDate.year(), getDate.month(), 1); foreach (const CaLunarDayInfo &dayInfo, reply.value().mCaLunarDayInfo) { lunarCache->insert(cacheDate, dayInfo); cacheDate = cacheDate.addDays(1); } } // refresh lunar info updateCurrentLunar(lunarCache->value(m_currentDate)); } dde-calendar-5.7.0.23/src/widget/monthWidget/monthview.h000066400000000000000000000134611375021633200230140ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MONTHVIEW_H #define MONTHVIEW_H #include "monthweekview.h" #include "calendardbus.h" #include "SchecduleRemindWidget.h" #include "monthgraphiview.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CMonthView: public DWidget { Q_OBJECT public: /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief isDragging 是否可以拖拽 * @return 是否可以拖拽 */ bool isDragging()const { return m_MonthGraphicsView->getDragStatus() !=4; } public: /** * @brief CMonthView 构造函数 * @param parent 父类 */ explicit CMonthView(QWidget *parent = nullptr); /** * @brief ~CMonthView 析构函数 */ ~CMonthView() override; /** * @brief setFirstWeekday 设置每周的第一天是周几 * @param weekday 周几 */ void setFirstWeekday(int weekday); signals: /** * @brief signalcurrentLunarDateChanged 当前时间改变的信号 * @param date 改变的日期 * @param detail 阴历信息 * @param type 是否显示阴历信息 */ void signalcurrentLunarDateChanged(QDate date, CaLunarDayInfo detail, int type = 0); /** * @brief signalcurrentDateChanged 当前日期改变的信号 * @param date 日期 */ void signalcurrentDateChanged(QDate date); /** * @brief signalsSchceduleUpdate 更新日程的信号 * @param id */ void signalsSchceduleUpdate(int id = 0); /** * @brief signalsCurrentScheduleDate * @param date */ void signalsCurrentScheduleDate(QDate date); /** * @brief signalViewtransparentFrame 设置窗口的焦点 * @param type */ void signalViewtransparentFrame(int type); /** * @brief signalsViewSelectDate 切换视图 * @param date 日期 */ void signalsViewSelectDate(QDate date); public slots: /** * @brief setCurrentDate 设置当前的日程 * @param date 日期 */ void setCurrentDate(const QDate date); /** * @brief setLunarVisible 设置是否显示阴历信息 * @param visible 是否显示阴历信息 */ void setLunarVisible(bool visible); /** * @brief slotSchceduleUpdate 更新日程信息 */ void slotSchceduleUpdate(); /** * @brief setSelectSchedule 设置选择的日程 * @param scheduleInfo 日程信息 */ void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); public slots: /** * @brief slotsupdatescheduleD 更新日程 * @param w 判断是否是当前的widget * @param data 日程信息 */ void slotsupdatescheduleD(QWidget *w, QVector &data); /** * @brief slotdelete 发送更新日程的信号 * @param id */ void slotdelete(int id); /** * @brief slotScheduleRemindWidget 日程浮框 * @param isShow 是否显示日程浮框 * @param out 日程信息 */ void slotScheduleRemindWidget(const bool isShow, const ScheduleDtailInfo &out = ScheduleDtailInfo()); signals: /** * @brief signalsupdatescheduleD 更新日程的信号 * @param w widget * @param begin 开始日期 * @param end 结束日期 */ void signalsupdatescheduleD(QWidget *w, QDate begin, QDate end); protected: /** * @brief resizeEvent 窗口大小调整 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; /** * @brief mousePressEvent 鼠标单击 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; private: /** * @brief getDateIndex 获取日期的索引值 * @param date 日期 * @return 索引值 */ int getDateIndex(const QDate &date) const; const QDate getCellDate(int pos); const CaLunarDayInfo getCaLunarDayInfo(const QDate &date); void updateDate(); void updateCurrentLunar(const CaLunarDayInfo &info); ScheduleDtailInfo getScheduleInfo(const QDate &beginDate,const QDate &endDate); private slots: void getDbusData(); private: CMonthGraphiview *m_MonthGraphicsView = nullptr; CalendarDBus *m_DBusInter = nullptr; QDate m_days[42]; QDate m_currentDate; QDate m_createDate; QMap *lunarCache = nullptr; QVector m_festivallist; CMonthWeekView *m_weekIndicator = nullptr; int m_firstWeekDay = 0; QAction *m_createAction = nullptr; // 创建日程 QVBoxLayout *m_mainLayout = nullptr; int m_leftmaagin = 0; int m_topmagin = 0; bool m_sflag = true; SchecduleRemindWidget *m_RemindWidget = nullptr; QPoint m_PressPoint; bool isCreate; QDate m_PressDate; QDate m_MoveDate; }; #endif // MYCALENDARWIDGET_H dde-calendar-5.7.0.23/src/widget/monthWidget/monthweekview.cpp000066400000000000000000000154601375021633200242240ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "monthweekview.h" #include "scheduledatamanage.h" #include #include #include #include #include #include DGUI_USE_NAMESPACE CMonthWeekView::CMonthWeekView(QWidget *parent) : DWidget(parent) { m_mainLayout = new QHBoxLayout; m_mainLayout->setMargin(0); m_mainLayout->setSpacing(0); setLayout(m_mainLayout); } void CMonthWeekView::setList(int weekday) { QLayoutItem *child; while ((child = m_mainLayout->takeAt(0)) != nullptr) { if (child->widget() != nullptr) { delete child->widget(); } delete child; } m_weekData.clear(); QLocale locale; for (int i = 0; i != DDEMonthCalendar::AFewDaysofWeek; ++i) { int d = checkDay(i + weekday); QVBoxLayout *hhLayout = new QVBoxLayout; hhLayout->setMargin(0); hhLayout->setSpacing(0); hhLayout->setContentsMargins(0, 0, 0, 0); CustomFrame *label = new CustomFrame(); label->setTextStr(locale.dayName(d ? d : DDEMonthCalendar::AFewDaysofWeek, QLocale::ShortFormat)); label->setContentsMargins(0, 0, 0, 0); QFont weekfont; weekfont.setWeight(QFont::Medium); weekfont.setPixelSize(DDECalendar::FontSizeSixteen); label->setTextFont(weekfont); if (i ==0) { label->setRoundState(true, false, false, false); } else if (i == DDEMonthCalendar::AFewDaysofWeek - 1) { label->setRoundState(false, true, false, false); } if (d == 0) { QColor textbC(0, 66, 154); QColor colorSeven = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); label->setTextColor(colorSeven); label->setBColor(textbC); m_weekData.append(qMakePair(label, 1)); } else if (d == DDEMonthCalendar::AFewDaysofWeek - 1) { QColor textbC(0, 66, 154); QColor colorSix = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); label->setTextColor(colorSix); label->setBColor(textbC); m_weekData.append(qMakePair(label, 1)); } else { QColor textC = Qt::black; QColor textbC(0, 66, 154); textbC.setAlphaF(0.05); label->setTextColor(textC); label->setBColor(textbC); m_weekData.append(qMakePair(label, 0)); } if ((i == weekday - 1 && weekday != 0) || i == weekday || (weekday == 0 && i == 6)) { label->setObjectName("MonthHeaderWeekend"); } else { label->setObjectName("MonthHeaderWeekday"); } DHorizontalLine *splitline = new DHorizontalLine; if (i == 0 || i == DDEMonthCalendar::AFewDaysofWeek - 1) { label->setFixedSize(DDEMonthCalendar::MWeekCellWidth - 1, DDEMonthCalendar::MWeekCellHeight); splitline->setFixedSize(DDEMonthCalendar::MWeekCellWidth - 1, 2); } else { label->setFixedSize(DDEMonthCalendar::MWeekCellWidth - 3, DDEMonthCalendar::MWeekCellHeight); splitline->setFixedSize(DDEMonthCalendar::MWeekCellWidth - 3, 2); } hhLayout->addWidget(label); hhLayout->addWidget(splitline); splitline->setAutoFillBackground(true); m_vline.append(splitline); splitline->setVisible(false); m_mainLayout->addLayout(hhLayout); } } void CMonthWeekView::setTheMe(int type) { if (type == 0 || type == 1) { for (int i = 0; i < m_weekData.count(); i++) { if (m_weekData.at(i).second == 1) { QColor color = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); QColor textbC("#75C18E"); textbC.setAlphaF(0.1); m_weekData.at(i).first->setTextColor(color); m_weekData.at(i).first->setBColor(textbC); } else { QColor textC = "#6F6F6F"; QColor textbC("#75C18E"); textbC.setAlphaF(0.1); m_weekData.at(i).first->setTextColor(textC); m_weekData.at(i).first->setBColor(textbC); } m_vline.at(i)->setBackgroundRole(DPalette::Highlight); } } else if (type == 2) { for (int i = 0; i < m_weekData.count(); i++) { if (m_weekData.at(i).second == 1) { QColor color = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); QColor textbC = "#82AEC1"; textbC.setAlphaF(0.10); m_weekData.at(i).first->setTextColor(color); m_weekData.at(i).first->setBColor(textbC); } else { QColor textC = "#C0C6D4"; QColor textbC = "#82AEC1"; textbC.setAlphaF(0.10); m_weekData.at(i).first->setTextColor(textC); m_weekData.at(i).first->setBColor(textbC); } m_vline.at(i)->setBackgroundRole(DPalette::Highlight); } } } void CMonthWeekView::updateWeek() { for (int i = 0; i < m_vline.count(); ++i) { m_vline.at(i)->setVisible(false); } QDate date = QDate::currentDate(); int d = date.dayOfWeek(); QLocale locale; QString str = locale.dayName(d ? d : DDEMonthCalendar::AFewDaysofWeek, QLocale::ShortFormat); for (int i = 0; i < m_vline.count(); ++i) { if (m_weekData.at(i).first->getTextStr() == str) { m_vline.at(i)->setVisible(true); } } } int CMonthWeekView::checkDay(int weekday) { // check the week, calculate the correct order in the custom. return weekday % DDEMonthCalendar::AFewDaysofWeek; } void CMonthWeekView::resizeEvent(QResizeEvent *event) { int tw = static_cast(width() / 7.0 + 0.5); int th = height(); for (int i = 0; i < m_weekData.count(); i++) { if (m_weekData.at(i).second == 1) { m_weekData.at(i).first->setFixedSize(tw, th); } else { m_weekData.at(i).first->setFixedSize(tw, th); } m_vline.at(i)->setFixedWidth(tw); } DWidget::resizeEvent(event); } dde-calendar-5.7.0.23/src/widget/monthWidget/monthweekview.h000066400000000000000000000026441375021633200236710ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MONTHWEEKVIEW_H #define MONTHWEEKVIEW_H #include "constants.h" #include "customframe.h" #include #include #include #include DWIDGET_USE_NAMESPACE class CMonthWeekView : public DWidget { Q_OBJECT public: explicit CMonthWeekView(QWidget *parent = nullptr); void setList(int weekday); void setTheMe(int type = 0); void updateWeek(); private: int checkDay(int weekday); protected: void resizeEvent(QResizeEvent *event) override; private: QHBoxLayout *m_mainLayout = nullptr; QVector> m_weekData; QVector m_vline; }; #endif // WEEKINDICATOR_H dde-calendar-5.7.0.23/src/widget/monthWidget/monthwindow.cpp000066400000000000000000000325751375021633200237130ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "monthwindow.h" #include "monthview.h" #include "monthdayview.h" #include "constants.h" #include "calendardbus.h" #include "schcedulesearchview.h" #include "todybutton.h" #include "scheduledatamanage.h" #include #include #include DGUI_USE_NAMESPACE CMonthWindow::CMonthWindow(QWidget *parent) : QMainWindow(parent) { setContentsMargins(0, 0, 0, 0); initUI(); initConnection(); initLunar(); } CMonthWindow::~CMonthWindow() { disconnect(m_today, &CTodyButton::clicked, this, &CMonthWindow::slottoday); delete m_monthDayView; m_monthDayView = nullptr; delete m_monthView; m_monthView = nullptr; } void CMonthWindow::setFirstWeekday(int weekday) { m_monthView->setFirstWeekday(weekday); } void CMonthWindow::setDate(QDate date) { if (!date.isValid()) return; m_monthDayView->setCurrentDate(date); if (m_currentdate == date) return; m_currentdate = date; QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(date.year()) + tr("Y")); } else { m_YearLabel->setText(QString::number(date.year())); } m_monthView->setCurrentDate(date); emit signalCurrentDate(date); } void CMonthWindow::setLunarVisible(bool state) { m_monthView->setLunarVisible(state); m_YearLunarLabel->setVisible(state); } void CMonthWindow::setTheMe(int type) { if (type == 0 || type == 1) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); DPalette todaypa = m_today->palette(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); QColor todayhover = "#000000"; todayhover.setAlphaF(0.1); QColor todaypress = "#000000"; todaypress.setAlphaF(0.2); m_today->setBColor("#FFFFFF", todayhover, todaypress, "#FFFFFF", todayhover, todaypress); m_today->setTColor(todayColor, "#001A2E", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); DPalette gpa = m_gridWidget->palette(); gpa.setColor(DPalette::Background, "#F8F8F8"); m_gridWidget->setPalette(gpa); m_gridWidget->setBackgroundRole(DPalette::Background); } else if (type == 2) { QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); DPalette todaypa = m_today->palette(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Light, "#484848"); todaypa.setColor(DPalette::Dark, "#414141"); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); m_today->setBColor("#484848", "#727272", "#242424", "#414141", "#535353", "#282828"); m_today->setTColor(todayColor, "#FFFFFF", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#C0C6D4")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#798BA8")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#252525"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette gpa = m_gridWidget->palette(); gpa.setColor(DPalette::Background, "#252525"); m_gridWidget->setPalette(gpa); m_gridWidget->setBackgroundRole(DPalette::Background); } m_monthDayView->setTheMe(type); m_monthView->setTheMe(type); } void CMonthWindow::previousMonth() { slideMonth(false); } void CMonthWindow::nextMonth() { slideMonth(true); } void CMonthWindow::slotsearchDateSelect(QDate date) { setDate(date); slotupdateSchedule(); } void CMonthWindow::setSearchWFlag(bool flag) { m_searchfalg = flag; m_monthDayView->setsearchfalg(flag); } void CMonthWindow::clearSearch() { } void CMonthWindow::wheelEvent(QWheelEvent *e) { //拖拽时禁用 if (!m_monthView->isDragging()) { QPoint numDegrees = e->angleDelta(); if (numDegrees.y()>0) { nextMonth(); } else { previousMonth(); } } } void CMonthWindow::initUI() { m_contentBackground = new DFrame; m_contentBackground->setContentsMargins(0, 0, 0, 0); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setAutoFillBackground(true); m_contentBackground->setPalette(anipa); m_today = new CTodyButton; m_today->setText(QCoreApplication::translate("today", "Today", "Today")); m_today->setFixedSize(DDEMonthCalendar::MTodayWindth, DDEMonthCalendar::MTodayHeight); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); DPalette todaypa = m_today->palette(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); QFont todayfont; todayfont.setWeight(QFont::Medium); todayfont.setPixelSize(DDECalendar::FontSizeFourteen); m_today->setFont(todayfont); m_today->setPalette(todaypa); m_YearLabel = new QLabel(); m_YearLabel->setFixedHeight(DDEMonthCalendar::M_YLableHeight); m_YearLunarLabel = new QLabel(); m_YearLunarLabel->setFixedSize(DDEMonthCalendar::M_YLunatLabelWindth, DDEMonthCalendar::M_YLunatLabelHeight); QFont ylabelF; ylabelF.setWeight(QFont::Medium); ylabelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_YearLabel->setFont(ylabelF); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); ylabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_YearLunarLabel->setFont(ylabelF); DPalette Lunarpa = m_YearLunarLabel->palette(); Lunarpa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunarpa); m_monthDayView = new CMonthDayView(this); QHBoxLayout *yeartitleLayout = new QHBoxLayout; yeartitleLayout->setMargin(0); yeartitleLayout->setSpacing(0); yeartitleLayout->setContentsMargins(21, 20, 8, 10); yeartitleLayout->addWidget(m_YearLabel); QHBoxLayout *yeartitleLayout1 = new QHBoxLayout; yeartitleLayout1->setMargin(0); yeartitleLayout1->setSpacing(0); yeartitleLayout1->setContentsMargins(14, 9, 0, 7); yeartitleLayout1->addWidget(m_YearLunarLabel); yeartitleLayout->addLayout(yeartitleLayout1); yeartitleLayout->addStretch(); yeartitleLayout->addWidget(m_monthDayView, 0, Qt::AlignCenter); yeartitleLayout->addStretch(); yeartitleLayout->addWidget(m_today, 0, Qt::AlignRight); m_monthView = new CMonthView(this); QVBoxLayout *mhLayout = new QVBoxLayout; mhLayout->setMargin(0); mhLayout->setSpacing(0); mhLayout->addWidget(m_monthView); QVBoxLayout *hhLayout = new QVBoxLayout; hhLayout->setSpacing(0); hhLayout->setMargin(0); hhLayout->addLayout(yeartitleLayout); m_gridWidget = new DWidget(); m_gridWidget->setContentsMargins(0, 0, 0, 0); m_gridWidget->setAutoFillBackground(true); m_gridWidget->setLayout(mhLayout); hhLayout->addWidget(m_gridWidget); m_tmainLayout = new QHBoxLayout; m_tmainLayout->setMargin(0); m_tmainLayout->setSpacing(0); m_tmainLayout->setContentsMargins(0, 0, 10, 0); m_tmainLayout->addLayout(hhLayout); QVBoxLayout *ssLayout = new QVBoxLayout; ssLayout->setMargin(0); ssLayout->setSpacing(0); ssLayout->setContentsMargins(0, 10, 0, 10); m_tmainLayout->addLayout(ssLayout); m_contentBackground->setLayout(m_tmainLayout); setCentralWidget(m_contentBackground); } void CMonthWindow::initConnection() { connect(m_today, &DPushButton::clicked, this, &CMonthWindow::slottoday); connect(m_monthView, &CMonthView::signalcurrentLunarDateChanged, this, &CMonthWindow::slotcurrentDateLunarChanged); connect(m_monthView, &CMonthView::signalcurrentDateChanged, this, &CMonthWindow::slotcurrentDateChanged); connect(m_monthDayView, &CMonthDayView::signalsSelectDate, this, &CMonthWindow::slotSelectedMonth); connect(m_monthView, &CMonthView::signalsSchceduleUpdate, this, &CMonthWindow::slotTransitSchedule); connect(m_monthDayView, &CMonthDayView::signalsCurrentDate, this, &CMonthWindow::slotSelectedMonth); connect(m_monthView, &CMonthView::signalsCurrentScheduleDate, this, &CMonthWindow::signalsCurrentScheduleDate); connect(m_monthView, &CMonthView::signalViewtransparentFrame, this, &CMonthWindow::signalViewtransparentFrame); connect(m_monthView, &CMonthView::signalsViewSelectDate, this, &CMonthWindow::signalsViewSelectDate); } void CMonthWindow::initLunar() { m_monthView->setLunarVisible(true); } void CMonthWindow::slideMonth(bool next) { QDate currentDate; if (next) { if (m_currentdate.year() == DDECalendar::QueryEarliestYear && m_currentdate.month() == 1) return; currentDate = m_currentdate.addMonths(-1); } else { currentDate = m_currentdate.addMonths(1); } setDate(currentDate); QDate tdate = QDate(m_currentdate.year(), m_currentdate.month(), 1); emit signalCurrentDate(tdate); } void CMonthWindow::slotReturnTodayUpdate() { setDate(QDate::currentDate()); } void CMonthWindow::slotScheduleHide() { m_monthView->slotScheduleRemindWidget(false); } void CMonthWindow::slotupdateSchedule(int id) { Q_UNUSED(id); m_monthView->slotSchceduleUpdate(); } void CMonthWindow::slotTransitSchedule(int id) { emit signalsWUpdateShcedule(this, id); } void CMonthWindow::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { m_monthView->setSelectSchedule(scheduleInfo); } void CMonthWindow::resizeEvent(QResizeEvent *event) { qreal dw = width() * 0.5023 + 0.5; int dh = 36; if (m_searchfalg) { m_tmainLayout->setContentsMargins(0, 0, 0, 0); } else { m_tmainLayout->setContentsMargins(0, 0, 10, 0); } if (!m_searchfalg) { m_monthDayView->setFixedSize(qRound(dw), dh); } else { m_monthDayView->setFixedSize(qRound(dw), dh); } QMainWindow::resizeEvent(event); } void CMonthWindow::slottoday() { emit signalsReturnTodayUpdate(this); setDate(QDate::currentDate()); } void CMonthWindow::slotcurrentDateLunarChanged(QDate date, CaLunarDayInfo detail, int type) { QDate currentdate = m_currentdate; m_currentdate = date; if (type == 1) { QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(date.year()) + tr("Y")); } else { m_YearLabel->setText(QString::number(date.year())); } m_YearLunarLabel->setText("-" + detail.mGanZhiYear + detail.mZodiac + "年-"); } else if (type == 0) { if (date.month() != currentdate.month()) { m_monthDayView->setRCurrentDate(date); } } } void CMonthWindow::slotcurrentDateChanged(QDate date) { m_currentdate = date; if (m_currentdate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } } void CMonthWindow::slotSelectedMonth(QDate date) { m_currentdate = date; m_monthView->setCurrentDate(date); emit signalCurrentDate(date); } dde-calendar-5.7.0.23/src/widget/monthWidget/monthwindow.h000066400000000000000000000137211375021633200233500ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 MONTHWINDOW_H #define MONTHWINDOW_H #include "SchecduleRemindWidget.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CSchceduleSearchView; class CMonthView; class CMonthDayView; class QHBoxLayout; class CTodyButton; class CMonthWindow: public QMainWindow { Q_OBJECT public: /** * @brief CMonthWindow 构造函数 * @param parent 父类 */ explicit CMonthWindow(QWidget *parent = nullptr); /** * @brief ~CMonthWindow 析构函数 */ ~CMonthWindow() override; /** * @brief setFirstWeekday 设置每周第一天是周几 * @param weekday 周几 */ void setFirstWeekday(int weekday); /** * @brief setDate 设置时间 * @param date 日期 */ void setDate(QDate date); /** * @brief setLunarVisible 设置是否显示阴历信息 * @param state 是否显示阴历信息 */ void setLunarVisible(bool state); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setSearchWFlag 设置是否选择的标志 * @param flag 是否选择的标志 */ void setSearchWFlag(bool flag); /** * @brief clearSearch */ void clearSearch(); public slots: /** * @brief previousMonth 选择上一个月份 */ void previousMonth(); /** * @brief nextMonth 选择下一个月份 */ void nextMonth(); /** * @brief slotsearchDateSelect 选择搜索到的日期 * @param date 日期 */ void slotsearchDateSelect(QDate date); protected: /** * @brief wheelEvent 鼠标滚轮事件 */ void wheelEvent(QWheelEvent *) override; private: /** * @brief initUI 初始化界面 */ void initUI(); /** * @brief initConnection 初始化信号和槽的连接 */ void initConnection(); /** * @brief initLunar 初始化阴历信息 */ void initLunar(); /** * @brief slideMonth 切换月份,并更新信息 * @param next 是否切换到下一个月 */ void slideMonth(bool next); signals: /** * @brief dateSelected * @param date * @param detail */ void dateSelected(const QDate date, const CaLunarDayInfo &detail) const; /** * @brief signalsWUpdateShcedule 更新日程的信号 * @param w unused * @param id unused */ void signalsWUpdateShcedule(QMainWindow *w, int id = 0); /** * @brief signalsReturnTodayUpdate 返回今天的按钮的信号 * @param w 视图 */ void signalsReturnTodayUpdate(QMainWindow *w); /** * @brief signalsCurrentScheduleDate * @param date */ void signalsCurrentScheduleDate(QDate date); /** * @brief signalsViewSelectDate 切换视图的信号 * @param date 日期 */ void signalsViewSelectDate(QDate date); /** * @brief signalViewtransparentFrame 获取视图的焦点 * @param type */ void signalViewtransparentFrame(int type); /** * @brief signalCurrentDate 设置时间的信号 * @param date 日期 */ void signalCurrentDate(QDate date); public slots: /** * @brief slotReturnTodayUpdate 返回今天 */ void slotReturnTodayUpdate(); /** * @brief slotScheduleHide 隐藏日程浮框 */ void slotScheduleHide(); public slots: /** * @brief slotupdateSchedule 更新日程 * @param id */ void slotupdateSchedule(int id = 0); /** * @brief slotTransitSchedule 发送更新日程的信号 * @param id */ void slotTransitSchedule(int id = 0); /** * @brief setSelectSchedule 设置选择的日程 * @param scheduleInfo 选择日程的信息 */ void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); protected: /** * @brief resizeEvent 窗口大小调整 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; private slots: /** * @brief slottoday 返回今天 */ void slottoday(); /** * @brief slotcurrentDateLunarChanged 当前时间改变,更新信息 * @param date 时间 * @param detail 阴历信息 * @param type 是否显示阴历信息 */ void slotcurrentDateLunarChanged(QDate date, CaLunarDayInfo detail, int type = 0); /** * @brief slotcurrentDateChanged 根据时间变化,返回今天按钮状态变化 * @param date 时间 */ void slotcurrentDateChanged(QDate date); /** * @brief slotSelectedMonth 设置选择的月份 * @param date 日期 */ void slotSelectedMonth(QDate date); private: CMonthView *m_monthView = nullptr; CMonthDayView *m_monthDayView = nullptr; DFrame *m_contentBackground = nullptr; CTodyButton *m_today = nullptr; QDate m_currentdate; QLabel *m_YearLabel = nullptr; QLabel *m_YearLunarLabel = nullptr; QSpacerItem *m_spaceitem = nullptr; DWidget *m_gridWidget = nullptr; bool m_searchfalg = false; QHBoxLayout *m_tmainLayout = nullptr; }; #endif // YEARWINDOW_H dde-calendar-5.7.0.23/src/widget/schcedulesearchview.cpp000066400000000000000000000673441375021633200230670ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "schcedulesearchview.h" #include "schcedulectrldlg.h" #include "myschceduleview.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CSchceduleSearchItem::CSchceduleSearchItem(QWidget *parent) : DLabel(parent) , m_rightMenu(new DMenu(this)) { //设置对象名称和辅助显示名称 this->setObjectName("CScheduleDataItem"); this->setAccessibleName("CScheduleDataItem"); m_editAction = new QAction(tr("Edit"), this); m_deleteAction = new QAction(tr("Delete"), this); connect(m_editAction, SIGNAL(triggered(bool)), this, SLOT(slotEdit())); connect(m_deleteAction, SIGNAL(triggered(bool)), this, SLOT(slotDelete())); setTheMe(DGuiApplicationHelper::instance()->themeType()); QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::paletteTypeChanged, this, &CSchceduleSearchItem::setTheMe); m_mouseStatus = M_NONE; installEventFilter(this); } void CSchceduleSearchItem::setBackgroundColor(QColor color1) { m_Backgroundcolor = color1; } void CSchceduleSearchItem::setSplitLineColor(QColor color1) { m_splitlinecolor = color1; } void CSchceduleSearchItem::setText( QColor tcolor, QFont font) { m_ttextcolor = tcolor; m_tfont = font; } void CSchceduleSearchItem::setTimeC(QColor tcolor, QFont font) { m_timecolor = tcolor; m_timefont = font; } void CSchceduleSearchItem::setData( ScheduleDtailInfo vScheduleInfo, QDate date) { m_ScheduleInfo = vScheduleInfo; m_date = date; update(); } void CSchceduleSearchItem::setRoundtype(int rtype) { m_roundtype = rtype; update(); } void CSchceduleSearchItem::setTheMe(int type) { if (type == 2) { m_presscolor.background = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_presscolor.background.setAlphaF(1); m_presscolor.timeColor = "#FFFFFF"; m_presscolor.timeColor.setAlphaF(1); m_presscolor.textColor = "#FFFFFF"; m_presscolor.textColor.setAlphaF(1); m_hovercolor.background= "#FFFFFF"; m_hovercolor.background.setAlphaF(0.2); m_hovercolor.timeColor = "#6D7C88"; m_hovercolor.timeColor.setAlphaF(1); m_hovercolor.textColor = "#C0C6D4"; m_hovercolor.textColor.setAlphaF(1); } else { m_presscolor.background = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_presscolor.background.setAlphaF(1); m_presscolor.timeColor = "#FFFFFF"; m_presscolor.timeColor.setAlphaF(1); m_presscolor.textColor = "#FFFFFF"; m_presscolor.textColor.setAlphaF(1); m_hovercolor.background= "#000000"; m_hovercolor.background.setAlphaF(0.2); m_hovercolor.timeColor = "#526A7F"; m_hovercolor.timeColor.setAlphaF(1); m_hovercolor.textColor = "#414D68"; m_hovercolor.textColor.setAlphaF(1); } } void CSchceduleSearchItem::slotEdit() { emit signalViewtransparentFrame(1); CSchceduleDlg dlg(0, this); dlg.setData(m_ScheduleInfo); if (dlg.exec() == DDialog::Accepted) { emit signalsEdit(this); } emit signalViewtransparentFrame(0); } void CSchceduleSearchItem::slotDelete() { emit signalViewtransparentFrame(1); if (m_ScheduleInfo.rpeat == 0) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Are you sure you want to delete this event?")); msgBox.addPushButton(tr("Cancel"), true); msgBox.addWaringButton(tr("Delete"), true); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(m_ScheduleInfo.id); } } else { if (m_ScheduleInfo.RecurID == 0) { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete all occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All")); msgBox.addsuggestButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->deleteScheduleInfoById(m_ScheduleInfo.id); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_ScheduleInfo.id, newschedule); newschedule.ignore.append(m_ScheduleInfo.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } else { CSchceduleCtrlDlg msgBox; msgBox.setText(tr("You are deleting an event.")); msgBox.setInformativeText(tr("Do you want to delete this and all future occurrences of this event, or only the selected occurrence?")); msgBox.addPushButton(tr("Cancel")); msgBox.addPushButton(tr("Delete All Future Events")); msgBox.addsuggestButton(tr("Delete Only This Event")); msgBox.exec(); if (msgBox.clickButton() == 0) { emit signalViewtransparentFrame(0); return; } else if (msgBox.clickButton() == 1) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_ScheduleInfo.id, newschedule); newschedule.enddata.type = 2; newschedule.enddata.date = m_ScheduleInfo.beginDateTime.addDays(-1); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } else if (msgBox.clickButton() == 2) { ScheduleDtailInfo newschedule; CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->getScheduleInfoById(m_ScheduleInfo.id, newschedule); newschedule.ignore.append(m_ScheduleInfo.beginDateTime); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->updateScheduleInfo(newschedule); } } } emit signalViewtransparentFrame(0); emit signalsDelete(this); } void CSchceduleSearchItem::slotDoubleEvent(int type) { Q_UNUSED(type); emit signalsDelete(this); } void CSchceduleSearchItem::paintEvent( QPaintEvent *e ) { Q_UNUSED(e); int labelwidth = width(); int labelheight = height(); QPainter painter(this); QColor bcolor = m_Backgroundcolor; QColor textcolor = m_ttextcolor; QColor timecolor = m_timecolor; switch (m_mouseStatus) { case M_NONE: { bcolor = m_Backgroundcolor; textcolor = m_ttextcolor; timecolor = m_timecolor; } break; case M_HOVER: { bcolor = m_hovercolor.background; textcolor = m_hovercolor.textColor; timecolor = m_hovercolor.timeColor; } break; case M_PRESS: { bcolor = m_presscolor.background; textcolor = m_presscolor.textColor; timecolor = m_presscolor.timeColor; } break; } painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(bcolor)); painter.setPen(Qt::NoPen); QPainterPath painterPath; painterPath.moveTo(m_radius, m_borderframew); if (m_roundtype == 1 || m_roundtype == 3) { painterPath.arcTo(QRect(m_borderframew, m_borderframew, m_radius * 2, m_radius * 2), 90, 90); } else { painterPath.lineTo(m_borderframew, m_borderframew); painterPath.lineTo(m_borderframew, m_radius); } painterPath.lineTo(0, labelheight - m_radius); if (m_roundtype == 1 || m_roundtype == 2) { painterPath.arcTo(QRect(m_borderframew, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 180, 90); } else { painterPath.lineTo(m_borderframew, labelheight); painterPath.lineTo(m_radius, labelheight); } painterPath.lineTo(labelwidth - m_radius, labelheight); if (m_roundtype == 1 || m_roundtype == 2) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 270, 90); } else { painterPath.lineTo(labelwidth, labelheight); painterPath.lineTo(labelwidth, labelheight - m_radius); } painterPath.lineTo(labelwidth, m_radius); if (m_roundtype == 1 || m_roundtype == 3) { painterPath.arcTo(QRect(labelwidth - m_radius * 2, m_borderframew, m_radius * 2, m_radius * 2), 0, 90); } else { painterPath.lineTo(labelwidth, m_borderframew); painterPath.lineTo(labelwidth - m_radius, m_borderframew); } painterPath.lineTo(m_radius, m_borderframew); painterPath.closeSubpath(); painter.drawPath(painterPath); painter.restore(); painter.setFont(m_timefont); painter.setPen(timecolor); QDate begindate = m_ScheduleInfo.beginDateTime.date(); QDate enddate = m_ScheduleInfo.endDateTime.date(); QString datestr; if (begindate == enddate) { datestr = m_ScheduleInfo.beginDateTime.toString("hh:mm") + "-" + m_ScheduleInfo.endDateTime.toString("hh:mm"); } else { datestr = m_ScheduleInfo.beginDateTime.toString("hh:mm") + "-" + m_ScheduleInfo.endDateTime.toString("hh:mm"); } QFontMetrics fm1(m_timefont); int durationSize = 0; durationSize = fm1.horizontalAdvance(datestr); int flag = Qt::AlignLeft | Qt::AlignVCenter; if (m_ScheduleInfo.allday) { datestr = tr("All Day"); } painter.drawText(QRect(12, 8, durationSize, labelheight - 16), flag, datestr); painter.save(); bcolor = m_splitlinecolor; QPen pen(bcolor); pen.setWidth(2); painter.setPen(pen); painter.drawLine(durationSize + 17, 0, durationSize + 17, labelheight); painter.restore(); painter.setFont(m_tfont); painter.setPen(textcolor); int tilenameW = labelwidth - 91; QFontMetrics fm = painter.fontMetrics(); QString tStitlename = m_ScheduleInfo.titleName; tStitlename.replace("\n", ""); QString str = tStitlename; QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= tilenameW) { tstr.chop(1); break; } } if (tstr != str) { tstr = tstr + "..."; } painter.drawText(QRect(durationSize + 17 + 9, 6, tilenameW, labelheight), Qt::AlignLeft, tstr); painter.end(); } void CSchceduleSearchItem::contextMenuEvent( QContextMenuEvent *event ) { Q_UNUSED(event); if (m_ScheduleInfo.type.ID == DDECalendar::FestivalTypeID) return; m_rightMenu->clear(); m_rightMenu->addAction(m_editAction); m_rightMenu->addAction(m_deleteAction); m_rightMenu->exec(QCursor::pos()); } void CSchceduleSearchItem::mouseDoubleClickEvent(QMouseEvent *event) { Q_UNUSED(event); emit signalViewtransparentFrame(1); CMySchceduleView dlg(m_ScheduleInfo, this); connect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CSchceduleSearchItem::slotDoubleEvent); dlg.exec(); disconnect(&dlg, &CMySchceduleView::signalsEditorDelete, this, &CSchceduleSearchItem::slotDoubleEvent); emit signalViewtransparentFrame(0); } void CSchceduleSearchItem::mousePressEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { emit signalSelectDate(m_date); emit signalSelectSchedule(m_ScheduleInfo); } } void CSchceduleSearchItem::mouseReleaseEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton) { m_mouseStatus = M_HOVER; update(); } } void CSchceduleSearchItem::enterEvent(QEvent *event) { Q_UNUSED(event); m_mouseStatus = M_HOVER; update(); } void CSchceduleSearchItem::leaveEvent(QEvent *event) { Q_UNUSED(event); m_mouseStatus = M_NONE; update(); } bool CSchceduleSearchItem::eventFilter(QObject *o, QEvent *e) { Q_UNUSED(o); if (e->type() == QEvent::MouseButtonPress) { QMouseEvent *m_press = dynamic_cast(e); if (m_press->button() == Qt::LeftButton) { m_mouseStatus = M_PRESS; } } update(); return false; } CSchceduleSearchView::CSchceduleSearchView(QWidget *parent) : DWidget(parent) { QVBoxLayout *layout = new QVBoxLayout; layout->setMargin(0); layout->setSpacing(0); m_gradientItemList = new CScheduleListWidget(parent); m_gradientItemList->setAlternatingRowColors(true); layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(m_gradientItemList); // set default row m_gradientItemList->setCurrentRow(0); setLayout(layout); setMouseTracking(true); setFocusPolicy(Qt::StrongFocus); m_bBackgroundcolor.setAlphaF(0.03); m_gradientItemList->setLineWidth(0); m_labellist.clear(); connect(m_gradientItemList, &CScheduleListWidget::signalListWidgetScheduleHide, this, &CSchceduleSearchView::signalScheduleHide); } CSchceduleSearchView::~CSchceduleSearchView() { for (int i = 0; i < m_gradientItemList->count(); i++) { QListWidgetItem *item11 = m_gradientItemList->takeItem(i); m_gradientItemList->removeItemWidget(item11); delete item11; item11 = nullptr; } m_gradientItemList->clear(); } void CSchceduleSearchView::setTheMe(int type) { if (type == 0 || type == 1) { m_bBackgroundcolor = "#000000"; m_bBackgroundcolor.setAlphaF(0.03); m_btimecolor = "#526A7F"; m_bttextcolor = "#414D68"; m_lBackgroundcolor = Qt::white; m_ltextcolor = "#001A2E"; } else if (type == 2) { m_bBackgroundcolor = "#FFFFFF"; m_bBackgroundcolor.setAlphaF(0.05); m_btimecolor = "#6D7C88"; m_bttextcolor = "#C0C6D4"; m_lBackgroundcolor = "#FFFFFF"; m_lBackgroundcolor.setAlphaF(0.0); m_ltextcolor = "#C0C6D4"; } updateDateShow(); } void CSchceduleSearchView::clearSearch() { m_vlistData.clear(); for (int i = 0; i < m_gradientItemList->count(); i++) { QListWidgetItem *item11 = m_gradientItemList->takeItem(i); m_gradientItemList->removeItemWidget(item11); delete item11; item11 = nullptr; } m_labellist.clear(); m_gradientItemList->clear(); QVector vScheduleInfo; CScheduleDataManage::getScheduleDataManage()->setSearchResult(vScheduleInfo); } void CSchceduleSearchView::setMaxWidth(const int w) { m_maxWidth = w; } void CSchceduleSearchView::updateDateShow() { m_currentItem = nullptr; for (int i = 0; i < m_gradientItemList->count(); i++) { QListWidgetItem *item11 = m_gradientItemList->takeItem(i); m_gradientItemList->removeItemWidget(item11); delete item11; item11 = nullptr; } m_gradientItemList->clear(); m_labellist.clear(); //找最近日程 QDate tcurrentdata = QDate::currentDate(); QVector m_showData; ScheduleDateRangeInfo showData; qint64 offset = 1000; QDate topdate = tcurrentdata; for (int i = 0; i < m_vlistData.size(); ++i) { qint64 d = qAbs(m_vlistData.at(i).date.daysTo(tcurrentdata)); showData.date = m_vlistData.at(i).date; for (int j = 0 ; j < m_vlistData.at(i).vData.size(); ++j) { if (m_vlistData.at(i).vData.at(j).beginDateTime.date() == m_vlistData.at(i).date) { showData.vData.append(m_vlistData.at(i).vData.at(j)); } } if (showData.vData.count() > 0) { if ( dcount() == 0) { QListWidgetItem *listItem = new QListWidgetItem(m_gradientItemList); DLabel *gwi = new DLabel(); QFont font; font.setPixelSize(DDECalendar::FontSizeTwenty); gwi->setAlignment(Qt::AlignCenter ); DPalette daypa = gwi->palette(); QColor textcolor = DPalette::ToolTipText; int themtype = CScheduleDataManage::getScheduleDataManage()->getTheme(); if (themtype == 2) { textcolor = "#C0C6D4"; textcolor.setAlphaF(0.4); } else { textcolor = "#000000"; textcolor.setAlphaF(0.3); } daypa.setColor(DPalette::WindowText, textcolor); daypa.setColor(DPalette::Window, m_lBackgroundcolor); gwi->setPalette(daypa); gwi->setForegroundRole(DPalette::WindowText); gwi->setFont(font); gwi->move(this->width() - 70, this->height() - 196); gwi->setText(tr("No search results")); gwi->setFixedSize(m_maxWidth - 20, 450); listItem->setSizeHint(QSize(m_maxWidth, 450)); //每次改变Item的高度 listItem->setFlags(Qt::ItemIsTristate ); m_gradientItemList->addItem(listItem); m_gradientItemList->setItemWidget(listItem, gwi); m_labellist.append(gwi); } if (m_currentItem != nullptr) { m_gradientItemList->scrollToItem(m_currentItem, QAbstractItemView::PositionAtTop); } } void CSchceduleSearchView::createItemWidget(ScheduleDtailInfo info, QDate date, int rtype) { ScheduleDtailInfo &gd = info; CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType(gd.type.ID); CSchceduleSearchItem *gwi = new CSchceduleSearchItem(); QFont font; font.setPixelSize(DDECalendar::FontSizeFourteen); font.setWeight(QFont::Normal); gwi->setBackgroundColor(m_bBackgroundcolor); QColor scolor = gdcolor.Purecolor; scolor.setAlphaF(1.0); gwi->setSplitLineColor(gdcolor.splitColor); gwi->setText(m_bttextcolor, font); font.setPixelSize(DDECalendar::FontSizeTwelve); gwi->setTimeC(m_btimecolor, font); gwi->setFixedSize(m_maxWidth - 20, 35); gwi->setData(gd, date); gwi->setRoundtype(rtype); connect(gwi, &CSchceduleSearchItem::signalsDelete, this, &CSchceduleSearchView::slotdeleteitem); connect(gwi, &CSchceduleSearchItem::signalsEdit, this, &CSchceduleSearchView::slotedititem); connect(gwi, &CSchceduleSearchItem::signalSelectDate, this, &CSchceduleSearchView::slotSelectDate); connect(gwi, &CSchceduleSearchItem::signalSelectSchedule, this, &CSchceduleSearchView::slotSelectSchedule); connect(gwi, &CSchceduleSearchItem::signalViewtransparentFrame, this, &CSchceduleSearchView::signalViewtransparentFrame); QListWidgetItem *listItem = new QListWidgetItem; listItem->setSizeHint(QSize(m_maxWidth - 5, 36)); //每次改变Item的高度 listItem->setFlags(Qt::ItemIsTristate ); m_gradientItemList->addItem(listItem); m_gradientItemList->setItemWidget(listItem, gwi); m_labellist.append(gwi); } QListWidgetItem *CSchceduleSearchView::createItemWidget(QDate date) { CSchceduleSearchDateItem *gwi = new CSchceduleSearchDateItem(); QFont font; font.setWeight(QFont::Medium); font.setPixelSize(DDECalendar::FontSizeSixteen); gwi->setBackgroundColor(m_lBackgroundcolor); gwi->setText(m_ltextcolor, font); if (date == QDate::currentDate()) { int themtype = CScheduleDataManage::getScheduleDataManage()->getTheme(); if (themtype == 2) { gwi->setText(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(), font); } else { gwi->setText(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(), font); } } gwi->setFixedSize(m_maxWidth - 20, 35); gwi->setDate(date); connect(gwi, &CSchceduleSearchDateItem::signalLabelScheduleHide, this, &CSchceduleSearchView::signalScheduleHide); QListWidgetItem *listItem = new QListWidgetItem; listItem->setSizeHint(QSize(m_maxWidth - 5, 36)); //每次改变Item的高度 listItem->setFlags(Qt::ItemIsTristate ); m_gradientItemList->addItem(listItem); m_gradientItemList->setItemWidget(listItem, gwi); m_labellist.append(gwi); return listItem; } void CSchceduleSearchView::slotdeleteitem( CSchceduleSearchItem *item ) { emit signalsUpdateShcedule(item->getData().id); updateDateShow(); update(); } void CSchceduleSearchView::slotedititem(CSchceduleSearchItem *item) { emit signalsUpdateShcedule(item->getData().id); } void CSchceduleSearchView::slotsetSearch(QString str) { if (str.isEmpty()) return; QDateTime date = QDateTime::currentDateTime(); QDateTime bdate = date.addMonths(-6); if (!bdate.isValid()) { QDateTime tdate = date; tdate.setDate(QDate(date.date().year(), date.date().month(), 1)); bdate = tdate.addMonths(-6); } QDateTime edate = date.addMonths(6); if (!edate.isValid()) { QDateTime tdate = date; tdate.setDate(QDate(date.date().year(), date.date().month(), 1)); edate = tdate.addMonths(7); edate = edate.addDays(-1); } QVector vScheduleInfo; m_vlistData.clear(); CScheduleDataManage::getScheduleDataManage()->getscheduleDataCtrl()->queryScheduleInfo(str, bdate, edate, vScheduleInfo); m_vlistData = vScheduleInfo; CScheduleDataManage::getScheduleDataManage()->setSearchResult(vScheduleInfo); updateDateShow(); } void CSchceduleSearchView::slotSelectDate(QDate date) { emit signalDate(date); } void CSchceduleSearchView::slotSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { emit signalSelectSchedule(scheduleInfo); } void CSchceduleSearchView::resizeEvent(QResizeEvent *event) { for (int i = 0; i < m_gradientItemList->count(); i++) { QListWidgetItem *item11 = m_gradientItemList->item(i); item11->setSizeHint(QSize(m_maxWidth - 5, 36)); //每次改变Item的高度 } for (int i = 0; i < m_labellist.count(); i++) { m_labellist.at(i)->setFixedSize(m_maxWidth - 20, 35); m_labellist.at(i)->update(); } if (m_gradientItemList->count() == 1) { QListWidgetItem *item11 = m_gradientItemList->item(0); item11->setSizeHint(QSize(m_maxWidth, qRound(height() * 0.7978))); //每次改变Item的高度 m_labellist.at(0)->setFixedSize(m_maxWidth, qRound(height() * 0.7978)); m_labellist.at(0)->update(); } if (m_gradientItemList->count() >1) { if (m_currentItem != nullptr) { m_gradientItemList->scrollToItem(m_currentItem, QAbstractItemView::PositionAtTop); } } DWidget::resizeEvent(event); } void CSchceduleSearchView::mousePressEvent(QMouseEvent *event) { DWidget::mousePressEvent(event); } CSchceduleSearchDateItem::CSchceduleSearchDateItem(QWidget *parent) : DLabel(parent) { //设置对象名称和辅助显示名称 this->setObjectName("CScheduleDateItem"); this->setAccessibleName("CScheduleDateItem"); setAutoFillBackground(true); } void CSchceduleSearchDateItem::setBackgroundColor(QColor color1) { m_Backgroundcolor = color1; } void CSchceduleSearchDateItem::setText(QColor tcolor, QFont font) { m_textcolor = tcolor; m_font = font; } void CSchceduleSearchDateItem::setDate(QDate date) { m_date = date; } void CSchceduleSearchDateItem::paintEvent(QPaintEvent *e) { Q_UNUSED(e); int labelwidth = width(); int labelheight = height(); QPainter painter(this); QRect fillRect = QRect(0, 0, labelwidth, labelheight); painter.setRenderHints(QPainter::HighQualityAntialiasing); painter.setBrush(QBrush(m_Backgroundcolor)); painter.setPen(Qt::NoPen); painter.drawRoundedRect(fillRect, 3, 3); painter.setFont(m_font); painter.setPen(m_textcolor); QLocale locale; QString datestr; if (locale.language() == QLocale::Chinese) { datestr = QString::number(m_date.year()) + tr("Y") + QString::number(m_date.month()) + tr("M") + QString::number(m_date.day()) + tr("D"); } else { datestr = m_date.toString("yyyy/M/d"); } painter.drawText(QRect(12, 8, labelwidth, labelheight - 8), Qt::AlignLeft, datestr); painter.end(); } void CSchceduleSearchDateItem::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); emit signalLabelScheduleHide(); } CScheduleListWidget::CScheduleListWidget(QWidget *parent) : DListWidget (parent) { //设置对象名称和辅助显示名称 this->setObjectName("CScheduleListWidget"); this->setAccessibleName("CScheduleListWidget"); } CScheduleListWidget::~CScheduleListWidget() { } void CScheduleListWidget::mousePressEvent(QMouseEvent *event) { DListWidget::mousePressEvent(event); emit signalListWidgetScheduleHide(); } dde-calendar-5.7.0.23/src/widget/schcedulesearchview.h000066400000000000000000000134671375021633200225310ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 SCHCEDULESEARCHVIEW_H #define SCHCEDULESEARCHVIEW_H #include "schedulestructs.h" #include #include #include #include DWIDGET_USE_NAMESPACE class QVBoxLayout; class CScheduleListWidget; class CSchceduleSearchItem; class CSchceduleSearchDateItem; class CSchceduleSearchView : public DWidget { Q_OBJECT public: CSchceduleSearchView(QWidget *parent = nullptr); ~CSchceduleSearchView() override; void setTheMe(int type = 0); void clearSearch(); void setMaxWidth(const int w); signals: void signalsUpdateShcedule(int id = 0); void signalDate(QDate date); void signalSelectSchedule(const ScheduleDtailInfo &scheduleInfo); void signalViewtransparentFrame(int type); void signalScheduleHide(); public slots: void slotdeleteitem(CSchceduleSearchItem *item); void slotedititem(CSchceduleSearchItem *item); void slotsetSearch(QString str); void slotSelectDate(QDate date); void slotSelectSchedule(const ScheduleDtailInfo &scheduleInfo); protected: void resizeEvent(QResizeEvent *event) override; void mousePressEvent(QMouseEvent *event) override; private: void updateDateShow(); void createItemWidget(ScheduleDtailInfo info, QDate date, int rtype); QListWidgetItem *createItemWidget(QDate date); private: CScheduleListWidget *m_gradientItemList = nullptr; //下拉列表窗 bool m_widgetFlag; QVector m_vlistData; QVector m_labellist; int m_type; QDate m_currentDate; QColor m_bBackgroundcolor = "#000000"; QColor m_btimecolor = "#526A7F"; QColor m_bttextcolor = "#414D68"; QColor m_lBackgroundcolor = Qt::white; QColor m_ltextcolor = "#001A2E"; QListWidgetItem *m_currentItem = nullptr; int m_maxWidth = 200; }; class CScheduleListWidget : public DListWidget { Q_OBJECT public: CScheduleListWidget(QWidget *parent = nullptr); ~CScheduleListWidget() override; signals: void signalListWidgetScheduleHide(); protected: void mousePressEvent(QMouseEvent *event) override; }; class CSchceduleSearchItem : public DLabel { Q_OBJECT enum MouseStatus {M_NONE,M_PRESS,M_HOVER}; public: explicit CSchceduleSearchItem(QWidget *parent = nullptr); void setBackgroundColor(QColor color1); void setSplitLineColor(QColor color1); void setText(QColor tcolor, QFont font); void setTimeC(QColor tcolor, QFont font); void setData(ScheduleDtailInfo vScheduleInfo, QDate date); void setRoundtype(int rtype); void setTheMe(int type = 0); const ScheduleDtailInfo &getData() const { return m_ScheduleInfo; } signals: void signalsDelete(CSchceduleSearchItem *item); void signalsEdit(CSchceduleSearchItem *item); void signalSelectDate(QDate date); void signalSelectSchedule(const ScheduleDtailInfo &scheduleInfo); void signalViewtransparentFrame(int type); public slots: void slotEdit(); void slotDelete(); void slotDoubleEvent(int type = 0); protected: void paintEvent(QPaintEvent *e) override; void contextMenuEvent(QContextMenuEvent *event) override; void mouseDoubleClickEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void mouseReleaseEvent(QMouseEvent *event) override; void enterEvent(QEvent *event) override; void leaveEvent(QEvent *event) override; bool eventFilter(QObject *o, QEvent *e) override; private: struct ColorStatus { QColor background; QColor timeColor; QColor textColor; }; ScheduleDtailInfo m_ScheduleInfo; QAction *m_editAction = nullptr; QAction *m_deleteAction = nullptr; QColor m_Backgroundcolor; ColorStatus m_presscolor; ColorStatus m_hovercolor; QColor m_timecolor; QColor m_splitlinecolor; QFont m_timefont; QColor m_ttextcolor; QFont m_tfont; QDate m_date; MouseStatus m_mouseStatus; DMenu *m_rightMenu = nullptr; int m_roundtype = 1; const int m_radius = 8; const int m_borderframew = 0; }; class CSchceduleSearchDateItem : public DLabel { Q_OBJECT public: explicit CSchceduleSearchDateItem(QWidget *parent = nullptr); void setBackgroundColor(QColor color1); void setText(QColor tcolor, QFont font); void setDate(QDate date); signals: void signalLabelScheduleHide(); protected: void paintEvent(QPaintEvent *e) override; void mousePressEvent(QMouseEvent *event) override; private: QColor m_Backgroundcolor; QColor m_textcolor; QFont m_font; QDate m_date; }; #endif // CSHCEDULEDAYVIEW_H dde-calendar-5.7.0.23/src/widget/weekWidget/000077500000000000000000000000001375021633200204245ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/widget/weekWidget/weekheadview.cpp000066400000000000000000000433611375021633200236070ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "weekheadview.h" #include "calendardbus.h" #include "customframe.h" #include "scheduledatamanage.h" #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CWeekHeadView::CWeekHeadView(QWidget *parent) : DFrame(parent) { setContentsMargins(0, 0, 0, 0); m_DBusInter = new CalendarDBus("com.deepin.api.LunarCalendar", "/com/deepin/api/LunarCalendar", QDBusConnection::sessionBus(), this); if (!queue) queue = new QQueue; if (!lunarCache) lunarCache = new QMap; if (!emptyCaLunarDayInfo) emptyCaLunarDayInfo = new CaLunarDayInfo; m_dayNumFont.setWeight(QFont::Medium); m_dayNumFont.setPixelSize(DDECalendar::FontSizeSixteen); m_monthFont.setWeight(QFont::Medium); m_monthFont.setPixelSize(DDECalendar::FontSizeTwenty); // cells grid QHBoxLayout *hboxLayout = new QHBoxLayout; hboxLayout->setMargin(0); hboxLayout->setSpacing(0); m_monthLabel = new CustomFrame(this); m_monthLabel->setFixedWidth(DDEWeekCalendar::WMCellHeadrWidth - 5); m_monthLabel->setRoundState(true, false, false, false); QFont mlabelF; mlabelF.setWeight(QFont::Medium); mlabelF.setPixelSize(DDECalendar::FontSizeTwenty); m_monthLabel->setTextFont(mlabelF); hboxLayout->addWidget(m_monthLabel); hboxLayout->setStretch(0, 0); hboxLayout->setSpacing(0); for (int c = 0; c != DDEWeekCalendar::AFewDaysofWeek; ++c) { QWidget *cell = new QWidget(this); cell->installEventFilter(this); cell->setFocusPolicy(Qt::ClickFocus); hboxLayout->addWidget(cell); m_cellList.append(cell); } setLayout(hboxLayout); connect(this, &CWeekHeadView::dateSelected, this, &CWeekHeadView::handleCurrentDateChanged); setFrameRounded(false); m_monthList.append( "一月" ); m_monthList.append( "二月"); m_monthList.append( "三月" ); m_monthList.append( "四月" ); m_monthList.append( "五月" ); m_monthList.append( "六月" ); m_monthList.append( "七月" ); m_monthList.append( "八月"); m_monthList.append( "九月" ); m_monthList.append( "十月" ); m_monthList.append( "十一月"); m_monthList.append( "十二月"); } CWeekHeadView::~CWeekHeadView() { if (lunarCache !=nullptr) { delete lunarCache; lunarCache = nullptr; } if (emptyCaLunarDayInfo != nullptr) { delete emptyCaLunarDayInfo; emptyCaLunarDayInfo = nullptr; } if (queue != nullptr) { delete queue; queue = nullptr; } } void CWeekHeadView::handleCurrentDateChanged(const QDate date, const CaLunarDayInfo &detail) { Q_UNUSED(detail); if (date != m_currentDate) { setCurrentDate(date); } } void CWeekHeadView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; updateDate(); } int CWeekHeadView::getDateType(const QDate &date) { const int currentIndex = getDateIndex(date); const CaLunarDayInfo info = getCaLunarDayInfo(currentIndex); const int dayOfWeek = date.dayOfWeek(); bool weekends = dayOfWeek == DDEWeekCalendar::FirstDayofWeekend || dayOfWeek == DDEWeekCalendar::AFewDaysofWeek; bool isCurrentMonth = m_currentDate.month() == date.month(); bool isFestival = !info.mSolarFestival.isEmpty() || !info.mLunarFestival.isEmpty(); int resultFlag = 0; if (!isCurrentMonth) resultFlag |= SO_MNotCurrentMonth; if (isFestival) resultFlag |= SO_MFestival; if (weekends) resultFlag |= SO_MWeekends; return resultFlag; } void CWeekHeadView::setTheMe(int type) { m_themetype = type; if (type == 0 || type == 1) { QColor textC = "#000000"; QColor textbC(230, 238, 242); m_monthLabel->setBColor(textbC); m_monthLabel->setTextColor(textC); m_backgroundCircleColor = "#0081FF"; m_backgroundShowColor = "#2CA7F8"; m_backgroundShowColor.setAlphaF(0.4); m_Background_Weekend_Color = "#DAE4ED"; m_defaultTextColor = "#6F6F6F"; m_currentDayTextColor = "#FFFFFF"; m_defaultLunarColor = "#898989"; m_weekendsTextColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_currentMonthColor = "#000000"; m_backgroudColor = "#E6EEF2"; m_solofestivalLunarColor = "#4DFF7272"; } else if (type == 2) { QColor textbC = "#82AEC1"; textbC.setAlphaF(0.1); m_monthLabel->setBColor(textbC); m_monthLabel->setTextColor("#BF1D63"); m_backgroundCircleColor = "#0059D2"; m_backgroundShowColor = "#002AAF"; m_backgroundShowColor.setAlphaF(0.4); m_Background_Weekend_Color = "#333D4A"; m_defaultTextColor = "#C0C6D4"; m_currentDayTextColor = "#C0C6D4"; m_defaultLunarColor = "#6886BA"; m_weekendsTextColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_currentMonthColor = "#000000"; m_backgroudColor = "#82AEC1"; m_backgroudColor.setAlphaF(0.1); m_solofestivalLunarColor = "#4DFF7272"; } for (int i = 0; i != DDEWeekCalendar::AFewDaysofWeek; ++i) m_cellList.at(i)->update(); } void CWeekHeadView::setWeekDay(QVector vDays) { if (vDays.count() != DDEWeekCalendar::AFewDaysofWeek) return; for (int i = 0; i != DDEWeekCalendar::AFewDaysofWeek; ++i) m_days[i] = vDays[i]; } void CWeekHeadView::setMounthLabelWidth(int w, int rw) { m_monthW = w + 1; m_fixwidth = rw; } void CWeekHeadView::setCurrentDate(const QDate date) { qDebug() << "set current date " << date; if (date == m_currentDate) { return; } m_currentDate = date; emit signalcurrentDateChanged(m_currentDate); // to refresh lunar calendar updateCurrentLunar(getCaLunarDayInfo(getDateIndex(m_currentDate))); QLocale locale; m_monthLabel->setTextStr(locale.monthName(date.month(), QLocale::ShortFormat)); } void CWeekHeadView::setLunarVisible(bool visible) { int state = int(m_showState); if (visible) state |= ShowLunar; else state &= ~ShowLunar; m_showState = ShowState(state); update(); } void CWeekHeadView::setCellSelectable(bool selectable) { if (selectable == m_cellSelectable) return; m_cellSelectable = selectable; emit cellSelectableChanged(m_cellSelectable); } int CWeekHeadView::getDateIndex(const QDate &date) const { for (int i = 0; i != DDEWeekCalendar::AFewDaysofWeek; ++i) if (m_days[i] == date) return i; return 0; } bool CWeekHeadView::eventFilter(QObject *o, QEvent *e) { QWidget *cell = qobject_cast(o); if (cell && m_cellList.contains(cell)) { if (e->type() == QEvent::Paint) { paintCell(cell); } else if (e->type() == QEvent::MouseButtonPress) { } else if (e->type() == QEvent::MouseButtonDblClick) { const int pos = m_cellList.indexOf(cell); emit signalsViewSelectDate(m_days[pos]); } } return false; } void CWeekHeadView::updateDate() { const int currentIndex = getDateIndex(m_currentDate); setSelectedCell(currentIndex); update(); } void CWeekHeadView::updateCurrentLunar(const CaLunarDayInfo &info) { if (!info.mLunarFestival.isEmpty()) { emit currentFestivalChanged(info.mLunarFestival); } else if (!info.mTerm.isEmpty()) { emit currentFestivalChanged(info.mTerm); } else if (!info.mSolarFestival.isEmpty()) { QStringList tmpFestival = info.mSolarFestival.split(" "); if (tmpFestival.length() >= 3) { emit currentFestivalChanged(QString("%1 %2").arg(tmpFestival[0]).arg(tmpFestival[1])); } else { emit currentFestivalChanged(info.mSolarFestival); } } else { emit currentFestivalChanged(""); } QVector vdate; QVector vdetail; for (int i = 0; i < DDEWeekCalendar::AFewDaysofWeek; i++) { vdate.append(m_days[i]); vdetail.append(getCaLunarDayInfo(getDateIndex(m_days[i]))); } emit signalcurrentLunarDateChanged(vdate, vdetail, 1); updateDate(); } const QString CWeekHeadView::getCellDayNum(int pos) { return QString::number(m_days[pos].day()); } const QDate CWeekHeadView::getCellDate(int pos) { return m_days[pos]; } const QString CWeekHeadView::getLunar(int pos) { CaLunarDayInfo info = getCaLunarDayInfo(pos); if (info.mLunarDayName == "初一") { info.mLunarDayName = info.mLunarMonthName; } if (info.mTerm.isEmpty()) return info.mLunarDayName; return info.mTerm; } const CaLunarDayInfo CWeekHeadView::getCaLunarDayInfo(int pos) { const QDate date = m_days[pos]; if (lunarCache->contains(date)) { return lunarCache->value(date); } if (lunarCache->size() > 300) lunarCache->clear(); queue->push_back(pos); QTimer::singleShot(300, this, SLOT(getDbusData())); return *emptyCaLunarDayInfo; } void CWeekHeadView::getDbusData() { if (queue->isEmpty()) return; const int pos = queue->head(); queue->pop_front(); const QDate date = m_days[pos]; if (!date.isValid()) { return; } CaLunarDayInfo currentDayInfo; if (!lunarCache->contains(date)) { bool o1 = true; QDBusReply reply = m_DBusInter->GetLunarMonthCalendar(date.year(), date.month(), false, o1); QDate cacheDate; cacheDate.setDate(date.year(), date.month(), 1); foreach (const CaLunarDayInfo &dayInfo, reply.value().mCaLunarDayInfo) { lunarCache->insert(cacheDate, dayInfo); if (date == m_currentDate) { currentDayInfo = dayInfo; } cacheDate = cacheDate.addDays(1); } } else { currentDayInfo = lunarCache->value(date); } m_cellList.at(pos)->update(); // refresh lunar info if (date == m_currentDate) { updateCurrentLunar(currentDayInfo); } } void CWeekHeadView::paintCell(QWidget *cell) { m_weekendsTextColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); const QRect rect(0, 0, cell->width(), cell->height()); const int pos = m_cellList.indexOf(cell); const bool isCurrentDay = getCellDate(pos) == QDate::currentDate(); const bool isSelectedCell = isCurrentDay; int d = m_days[pos].dayOfWeek(); QPainter painter(cell); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(Qt::NoPen); //根据周几设置不一样的背景色 if (d == DDEWeekCalendar::FirstDayofWeekend || d == DDEWeekCalendar::AFewDaysofWeek) { painter.setBrush(QBrush(m_Background_Weekend_Color)); } else { painter.setBrush(QBrush(m_backgroudColor)); } if (d != 6) { painter.drawRect(rect);//画矩形 } else { int labelwidth = cell->width(); int labelheight = cell->height(); QPainterPath painterPath; painterPath.moveTo(m_radius, 0); painterPath.lineTo(0, 0); painterPath.lineTo(0, m_radius); painterPath.lineTo(0, labelheight - m_radius); painterPath.lineTo(0, labelheight); painterPath.lineTo(m_radius, labelheight); painterPath.lineTo(labelwidth - m_radius, labelheight); painterPath.lineTo(labelwidth, labelheight); painterPath.lineTo(labelwidth, labelheight - m_radius); painterPath.lineTo(labelwidth, m_radius); painterPath.arcTo(QRect(labelwidth - m_radius * 2, 0, m_radius * 2, m_radius * 2), 0, 90); painterPath.lineTo(m_radius, 0); painterPath.closeSubpath(); painter.drawPath(painterPath); } //绘制分割线 if (d != DDEWeekCalendar::FirstDayofWeekend && d != DDEWeekCalendar::AFewDaysofWeek) { QPoint point_begin(cell->width(), 0); QPoint point_end(cell->width(), cell->height()); painter.save(); QColor m_linecolor = "#000000"; m_linecolor.setAlphaF(0.1); painter.setPen(m_linecolor); painter.drawLine(point_begin, point_end); painter.restore(); } int bw = (cell->width() - 104) / 2; int bh = (cell->height() - 26) / 2; if (bw < 0) { bw = 2; } if (bh < 0) { bh = 2; } if (isSelectedCell) { if (m_showState & ShowLunar) { QRect fillRect(bw - 2, bh, 26, 26); painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(QBrush(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor())); painter.setPen(Qt::NoPen); painter.drawEllipse(fillRect); painter.restore(); } else { QRect fillRect(cell->width() - (cell->width()/2) + 1, bh - 1, 26, 26); painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(QBrush(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor())); painter.setPen(Qt::NoPen); painter.drawEllipse(fillRect); painter.restore(); } } QLocale locale; const QString dayNum = getCellDayNum(pos); const QString dayLunar = getLunar(pos); QString dayWeek = locale.dayName(d ? d : DDEWeekCalendar::AFewDaysofWeek, QLocale::ShortFormat); painter.save(); painter.setPen(Qt::SolidLine); // draw text of day if (isSelectedCell) { painter.setPen(m_currentDayTextColor); } else if (isCurrentDay) { painter.setPen(m_weekendsTextColor); } else { if (d == DDEWeekCalendar::FirstDayofWeekend || d == DDEWeekCalendar::AFewDaysofWeek) painter.setPen(m_weekendsTextColor); else painter.setPen(m_defaultTextColor); } painter.setFont(m_dayNumFont); if (m_showState & ShowLunar) { painter.drawText(QRect(bw - 1, bh, 24, 24), Qt::AlignCenter, dayNum); if (d == DDEWeekCalendar::FirstDayofWeekend || d == DDEWeekCalendar::AFewDaysofWeek) painter.setPen(m_weekendsTextColor); else painter.setPen(m_defaultTextColor); painter.drawText(QRect(bw + 24, bh, 30, 25), Qt::AlignCenter, dayWeek); } else { QFontMetrics fm1 = painter.fontMetrics(); painter.drawText(QRect(cell->width() - (cell->width()/2) - 4, bh - 1, 36, 26), Qt::AlignCenter, dayNum); if (d == DDEWeekCalendar::FirstDayofWeekend || d == DDEWeekCalendar::AFewDaysofWeek) painter.setPen(m_weekendsTextColor); else painter.setPen(m_defaultTextColor); QFontMetrics fm = painter.fontMetrics(); while (fm.width(dayWeek) > cell->width()/2) dayWeek.chop(1); painter.drawText(QRect(0, bh, (cell->width()/2), 26), Qt::AlignRight, dayWeek); } // draw text of day type if (m_showState & ShowLunar) { if (cell->width() > 100) { if (d == DDEWeekCalendar::FirstDayofWeekend || d == DDEWeekCalendar::AFewDaysofWeek) painter.setPen(m_weekendsTextColor); else painter.setPen(m_defaultLunarColor); if (cell->width() < 132) { QString str_dayLunar = nullptr; if (dayLunar.count() > 2) { for (int i = 0; i < 2; i++) { str_dayLunar.append(dayLunar.at(i)); } str_dayLunar.append("..."); } else { str_dayLunar = dayLunar; } painter.drawText(QRect(bw + 52 + 10, bh, 50, 25), Qt::AlignLeft, str_dayLunar); } else { painter.drawText(QRect(bw + 52 + 10, bh, 50, 25), Qt::AlignLeft, dayLunar); } CaLunarDayInfo dayInfo = getCaLunarDayInfo(pos); } } painter.restore(); painter.end(); } void CWeekHeadView::cellClicked(QWidget *cell) { if (!m_cellSelectable) return; const int pos = m_cellList.indexOf(cell); if (pos == -1) return; setSelectedCell(pos); // my gift eggs static int gift = 0; if (m_days[pos] == QDate(1993, 7, 28)) if (++gift == 10) QMessageBox::about(this, "LinuxDeepin", "by shibowen :P"); } void CWeekHeadView::setSelectedCell(int index) { if (m_selectedCell == index) return; const int prevPos = m_selectedCell; m_selectedCell = index; m_cellList.at(prevPos)->update(); m_cellList.at(index)->update(); emit dateSelected(m_days[index], getCaLunarDayInfo(index)); } int CWeekHeadView::checkDay(int weekday) { // check the week, calculate the correct order in the custom. if (weekday <= 0) return weekday += DDEWeekCalendar::AFewDaysofWeek; if (weekday > DDEWeekCalendar::AFewDaysofWeek) return weekday -= DDEWeekCalendar::AFewDaysofWeek; return weekday; } void CWeekHeadView::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); emit signaleSchedulHide(); } dde-calendar-5.7.0.23/src/widget/weekWidget/weekheadview.h000066400000000000000000000177001375021633200232520ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 WEEKHEADVIEW_H #define WEEKHEADVIEW_H #include "constants.h" #include "calendardbus.h" #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE enum CalendarWeekDayType { SO_MFestival = QStyleOption::SO_CustomBase + 0x01, SO_MWeekends = QStyleOption::SO_CustomBase + 0x02, SO_MWeekendsAndFestival = SO_MFestival | SO_MWeekends, SO_MNotCurrentMonth = 0x04, SO_MNotCurrentMonthFestival = SO_MNotCurrentMonth | SO_MFestival, SO_MDefault, }; class CustomFrame; class CWeekHeadView: public DFrame { Q_OBJECT public: enum ShowState { ShowLunar = 0x01, ShowLunarFestivalHighlight = 0x02, Normal = ShowLunar | ShowLunarFestivalHighlight, }; public: /** * @brief CWeekHeadView 构造函数 * @param parent 父类 */ explicit CWeekHeadView(QWidget *parent = nullptr); /** * @brief CWeekHeadView 析构函数 */ ~CWeekHeadView() override; /** * @brief setFirstWeekday 设置每周的第一天是周几 * @param weekday 周几 */ void setFirstWeekday(int weekday); /** * @brief getDateType 获取所给日期的类型CalendarWeekDayType * @param date 日期 * @return 类型 */ int getDateType(const QDate &date); /** * @brief cellSelectable * @return */ inline bool cellSelectable() const { return m_cellSelectable; } /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setWeekDay 设置一周的时间 * @param vDays 一周代表的时间 */ void setWeekDay(QVector vDays); /** * @brief setMounthLabelWidth 设置 * @param w * @param rw */ void setMounthLabelWidth(int w, int rw); signals: /** * @brief dateSelected 选择时间的信号 * @param date 时间 * @param detail 时间的阴历信息 */ void dateSelected(const QDate date, const CaLunarDayInfo &detail) const; /** * @brief signalcurrentLunarDateChanged 当前周的阴历日期改变的信号 * @param vdate 一周的日期 * @param vdetail 一周的阴历信息 * @param type 是否显示信息 */ void signalcurrentLunarDateChanged(QVector vdate, QVector vdetail, int type = 0); /** * @brief signalcurrentDateChanged 当前时间改变的信号 * @param date 当前时间 */ void signalcurrentDateChanged(QDate date); /** * @brief currentDateChanged * @param year * @param month */ void currentDateChanged(const int year, const int month); /** * @brief currentFestivalChanged 当前的节日信息改变的信号 * @param festival 节日信息 */ void currentFestivalChanged(const QString &festival); /** * @brief cellSelectableChanged * @param cellSelectable */ void cellSelectableChanged(bool cellSelectable) const; /** * @brief signalsViewSelectDate 选择日期的信号 * @param date 日期 */ void signalsViewSelectDate(QDate date); /** * @brief signaleSchedulHide 隐藏日程浮框的信号 */ void signaleSchedulHide(); public slots: /** * @brief setCurrentDate 设置当前的时间 * @param date 日期 */ void setCurrentDate(const QDate date); /** * @brief setLunarVisible 设置是否显示阴历信息 * @param visible 是否显示阴历信息 */ void setLunarVisible(bool visible); /** * @brief setCellSelectable * @param selectable */ void setCellSelectable(bool selectable); /** * @brief handleCurrentDateChanged 当前日期改变的信号 * @param date 日期 * @param detail unused */ void handleCurrentDateChanged(const QDate date, const CaLunarDayInfo &detail); private: /** * @brief getDateIndex 根据日期返回当天的索引 * @param date 日期 * @return 日期所在的索引 */ int getDateIndex(const QDate &date) const; /** * @brief getCellDayNum 根据索引值获取当天是在一个月中的第几天 * @param pos 索引 * @return 日期的字符串 */ const QString getCellDayNum(int pos); /** * @brief getCellDate 根据索引获取当天的日期 * @param pos 索引值 * @return 日期 */ const QDate getCellDate(int pos); /** * @brief getLunar 根据索引值获取当天的阴历信息 * @param pos 索引值 * @return 阴历信息字符串 */ const QString getLunar(int pos); /** * @brief getCaLunarDayInfo 根据索引值获取阴历信息 * @param pos 索引值 * @return 阴历信息 */ const CaLunarDayInfo getCaLunarDayInfo(int pos); /** * @brief paintCell 绘制周信息 * @param cell 每天所在的widget */ void paintCell(QWidget *cell); /** * @brief eventFilter 过滤器 * @param o 事件对象 * @param e 时间类型 * @return false */ bool eventFilter(QObject *o, QEvent *e) override; /** * @brief updateDate 更新数据 */ void updateDate(); /** * @brief updateCurrentLunar 更新当前的阴历信息 * @param info 阴历信息 */ void updateCurrentLunar(const CaLunarDayInfo &info); /** * @brief checkDay 检查周数,在定制中计算正确的顺序。 * @param weekday 周数 * @return 周数 */ int checkDay(int weekday); protected: /** * @brief mousePressEvent 鼠标单击事件 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; private slots: /** * @brief cellClicked * @param cell */ void cellClicked(QWidget *cell); /** * @brief setSelectedCell 设置选择的时间 * @param index 索引值 */ void setSelectedCell(int index); /** * @brief getDbusData 获取dbus日期 */ void getDbusData(); private: QList m_cellList; CustomFrame *m_monthLabel = nullptr; CalendarDBus *m_DBusInter = nullptr; QDate m_days[7]; QDate m_currentDate; QStringList m_monthList; ShowState m_showState = Normal; int m_selectedCell = 0; bool m_cellSelectable = true; QFont m_dayNumFont; QFont m_monthFont; QColor m_backgroundCircleColor = "#2ca7f8"; QColor m_backgroundShowColor = "#2CA7F8"; QColor m_defaultTextColor = "#6F6F6F"; QColor m_currentDayTextColor = "#FFFFFF"; QColor m_defaultLunarColor = "#898989"; QColor m_weekendsTextColor = "#0887FF"; QColor m_currentMonthColor = "#000000"; QColor m_backgroudColor = "#E6EEF2"; /** * @brief m_Background_Weekend_Color 周六周日背景色 */ QColor m_Background_Weekend_Color = "#00429A"; QColor m_solofestivalLunarColor = "#4DFF7272"; QQueue *queue = nullptr; QMap *lunarCache = nullptr; CaLunarDayInfo *emptyCaLunarDayInfo = nullptr; int m_firstWeekDay; int m_themetype = 1; int m_monthW = 80; int m_fixwidth = 200; const int m_radius = 8; }; #endif // MYCALENDARWIDGET_H dde-calendar-5.7.0.23/src/widget/weekWidget/weekindicator.cpp000066400000000000000000000043241375021633200237630ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "weekindicator.h" #include #include WeekIndicator::WeekIndicator(QWidget *parent) : DWidget(parent) { m_mainLayout = new QHBoxLayout; m_mainLayout->setMargin(0); m_mainLayout->setSpacing(0); setLayout(m_mainLayout); } void WeekIndicator::setList(int weekday) { QLayoutItem *child; while ((child = m_mainLayout->takeAt(0)) != nullptr) { if (child->widget() != nullptr) { delete child->widget(); } delete child; } QLocale locale; for (int i = 0; i != DDEWeekCalendar::AFewDaysofWeek; ++i) { int d = checkDay(i - weekday); DLabel *label = new DLabel(locale.dayName(d ? d : DDEWeekCalendar::AFewDaysofWeek, QLocale::ShortFormat)); if ((i == weekday - 1 && weekday != 0) || i == weekday || (weekday == 0 && i == 6)) { label->setObjectName("CalendarHeaderWeekend"); } else { label->setObjectName("CalendarHeaderWeekday"); } label->setAlignment(Qt::AlignCenter); label->setFixedSize(DDECalendar::CellWidth, DDECalendar::HeaderItemHeight); m_mainLayout->addWidget(label, 0, Qt::AlignCenter); } } int WeekIndicator::checkDay(int weekday) { // check the week, calculate the correct order in the custom. if (weekday <= 0) return weekday += DDEWeekCalendar::AFewDaysofWeek; if (weekday > DDEWeekCalendar::AFewDaysofWeek) return weekday -= DDEWeekCalendar::AFewDaysofWeek; return weekday; } dde-calendar-5.7.0.23/src/widget/weekWidget/weekindicator.h000077500000000000000000000026341375021633200234350ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 WEEKINDICATOR_H #define WEEKINDICATOR_H #include "constants.h" #include #include #include DWIDGET_USE_NAMESPACE class WeekIndicator : public DWidget { Q_OBJECT public: /** * @brief WeekIndicator 构造函数 * @param parent 父类 */ explicit WeekIndicator(QWidget *parent = nullptr); /** * @brief setList 设置周数 * @param weekday 周数 */ void setList(int weekday); private: /** * @brief checkDay 检查周数 * @param weekday 周数 * @return 周数 */ int checkDay(int weekday); private: QHBoxLayout *m_mainLayout = nullptr; }; #endif // WEEKINDICATOR_H dde-calendar-5.7.0.23/src/widget/weekWidget/weekview.cpp000066400000000000000000000210701375021633200227560ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "weekview.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE CWeekView::CWeekView(QWidget *parent) : QWidget(parent) { m_dayNumFont.setPixelSize(DDECalendar::FontSizeSixteen); m_dayNumFont.setWeight(QFont::Light); // cells grid QHBoxLayout *hboxLayout = new QHBoxLayout; hboxLayout->setMargin(0); hboxLayout->setSpacing(0); for (int c = 0; c != DDEWeekCalendar::NumWeeksDisplayed; ++c) { QWidget *cell = new QWidget; cell->setFixedSize(DDEWeekCalendar::WWeekCellWidth, DDEWeekCalendar::WWeekCellHeight); cell->installEventFilter(this); cell->setFocusPolicy(Qt::ClickFocus); hboxLayout->addWidget(cell); m_cellList.append(cell); } setLayout(hboxLayout); setMinimumWidth(150); } CWeekView::~CWeekView() { for (int i = 0; i < DDEWeekCalendar::NumWeeksDisplayed; i++) { m_cellList.at(i)->removeEventFilter(this); delete m_cellList.at(i); } m_cellList.clear(); } void CWeekView::setFirstWeekDay(int weekday) { m_firstWeekDay = weekday; updateDate(); } void CWeekView::setCurrentDate(const QDate date) { m_selectDate = date; m_selectedCell = 0; updateDate(); update(); } void CWeekView::setTheMe(int type) { m_themetype = type; if (type == 0 || type == 1) { m_defaultTextColor = Qt::black; m_backgrounddefaultColor = Qt::white; m_currentDayTextColor = Qt::white; m_backgroundcurrentDayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_fillColor = "#FFFFFF"; } else if (type == 2) { m_defaultTextColor = "#C0C6D4"; m_backgrounddefaultColor = "#FFFFFF"; m_backgrounddefaultColor.setAlphaF(0.05); m_currentDayTextColor = "#B8D3FF"; m_backgroundcurrentDayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); m_fillColor = "#000000"; m_fillColor.setAlphaF(0.05); } } void CWeekView::setsearchfalg(bool flag) { m_searchfalg = flag; } void CWeekView::slotprev() { if (m_selectDate.year() >= DDECalendar::QueryEarliestYear) { QDate date = m_selectDate.addDays(-6); setCurrentDate(date); } else { } } void CWeekView::slotnext() { QDate date = m_selectDate.addDays(8);; setCurrentDate(date); } void CWeekView::paintCell(QWidget *cell) { const QRect rect(0, 0, cell->width(), cell->height()); const int pos = m_cellList.indexOf(cell); //计算当前日期周数 int weekNumber = QDate::currentDate().weekNumber(); //In accordance with ISO 8601, weeks start on Monday and the first if (QDate::currentDate().dayOfWeek() == DDEWeekCalendar::AFewDaysofWeek) { ++weekNumber; } const bool isCurrentDay = m_days[pos].addDays(3).weekNumber() == weekNumber && m_days[pos].addDays(3).year() == QDate::currentDate().year(); const bool isSelectDay = m_days[pos].addDays(m_weekAddDay).weekNumber() == m_selectDate.addDays(m_weekAddDay).weekNumber(); QPainter painter(cell); painter.save(); painter.setRenderHints(QPainter::HighQualityAntialiasing); painter.setBrush(QBrush(m_fillColor)); painter.setPen(Qt::NoPen); painter.drawRect(rect);//画矩形 painter.restore(); painter.setPen(Qt::SolidLine); const QString dayNum = QString::number(m_days[pos].addDays(3).weekNumber()); if (m_days[pos].year() < DDECalendar::QueryEarliestYear && dayNum != "1") return; if (isSelectDay) { QRect fillRect((cell->width() - 24) / 2, (cell->height() - 32) / 2 + 4, 24, 24); painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(QBrush(CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor())); painter.setPen(Qt::NoPen); painter.drawEllipse(fillRect); painter.restore(); painter.setRenderHint(QPainter::HighQualityAntialiasing); painter.setPen(m_currentDayTextColor); painter.setFont(m_dayNumFont); painter.drawText(QRect(0, 0, cell->width(), cell->height()), Qt::AlignCenter, dayNum); } else { if (isCurrentDay) { painter.setPen(m_backgroundcurrentDayColor); } else { painter.setPen(m_defaultTextColor); } painter.setFont(m_dayNumFont); painter.drawText(QRect(0, 0, cell->width(), cell->height()), Qt::AlignCenter, dayNum); } painter.end(); } bool CWeekView::eventFilter(QObject *o, QEvent *e) { QWidget *cell = qobject_cast(o); if (cell && m_cellList.contains(cell)) { if (e->type() == QEvent::Paint) { paintCell(cell); } else if (e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = dynamic_cast(e); if (mouseEvent->button() ==Qt::LeftButton) { cellClicked(cell); } } } return false; } void CWeekView::cellClicked(QWidget *cell) { if (!m_cellSelectable) return; const int pos = m_cellList.indexOf(cell); if (pos == -1) return; setSelectedCell(pos); update(); } void CWeekView::setSelectedCell(int index) { if (m_selectedCell == index) return; const int prevPos = m_selectedCell; m_selectedCell = index; m_cellList.at(prevPos)->update(); m_cellList.at(index)->update(); m_selectDate = m_days[index]; const QString dayNum = QString::number(m_days[index].addDays(3).weekNumber()); if (m_days[index].year() < DDECalendar::QueryEarliestYear && dayNum != "1") return; emit signalsSelectDate(m_days[index], m_days[index].addDays(m_weekAddDay)); } void CWeekView::updateDate() { m_weekAddDay = (m_selectDate.dayOfWeek() + m_firstWeekDay) % DDEWeekCalendar::AFewDaysofWeek; QDate weekfirstDay = m_selectDate.addDays(-m_weekAddDay); m_days[4] = weekfirstDay; for (int i(0); i < 4; ++i) { m_days[i] = weekfirstDay.addDays(-(4 - i) * DDEWeekCalendar::AFewDaysofWeek); } for (int i(5); i != DDEWeekCalendar::NumWeeksDisplayed; ++i) { m_days[i] = weekfirstDay.addDays((i - 4) * DDEWeekCalendar::AFewDaysofWeek); } setSelectedCell(4); update(); } void CWeekView::resizeEvent(QResizeEvent *event) { int w = width() / DDEWeekCalendar::NumWeeksDisplayed; int h = height(); int ww = 36; if (w >= ww) { for (int c = 0; c != DDEWeekCalendar::NumWeeksDisplayed; ++c) { m_cellList[c]->setFixedSize(w, h); m_cellList[c]->update(); } for (int i = 0; i < DDEWeekCalendar::NumWeeksDisplayed; i++) { m_cellList[i]->setVisible(true); m_cellList[i]->update(); } } else { for (int c = 0; c != DDEWeekCalendar::NumWeeksDisplayed; ++c) { m_cellList[c]->setFixedSize(ww, h); m_cellList[c]->update(); } int t_num = qRound((ww * DDEWeekCalendar::NumWeeksDisplayed - width()) / ww / 2.0); QVector vindex; vindex.resize(10); vindex.fill(true); for (int i = 0; i < t_num; i++) { vindex[i] = false; vindex[9 - i] = false; } for (int i = 0; i < DDEWeekCalendar::NumWeeksDisplayed; i++) { m_cellList[i]->setVisible(vindex[i]); m_cellList[i]->update(); } } QWidget::resizeEvent(event); } void CWeekView::wheelEvent(QWheelEvent *event) { Q_UNUSED(event); bool isDragging = false; // emit signalIsDragging(isDragging); //判断是否是拖拽状态 if (!isDragging) { if (event->delta() < 0) { slotnext(); } else { slotprev(); } } } dde-calendar-5.7.0.23/src/widget/weekWidget/weekview.h000066400000000000000000000072641375021633200224340ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 WEEKVIEW_H #define WEEKVIEW_H #include #include #include class CWeekView : public QWidget { Q_OBJECT public: /** * @brief CWeekView 构造函数 * @param parent 父类 */ explicit CWeekView(QWidget *parent = nullptr); /** * @brief ~CWeekView 析构函数 */ ~CWeekView(); /** * @brief setFirstWeekDay 设置每周的第一天是周几,并更新 * @param weekday 周几 */ void setFirstWeekDay(int weekday); /** * @brief setCurrentDate 设置当天时间,并更新 * @param date 时间 */ void setCurrentDate(const QDate date); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setsearchfalg * @param flag */ void setsearchfalg(bool flag); public slots: /** * @brief cellClicked 选择点击的日期 * @param cell 周数所在的widget */ void cellClicked(QWidget *cell); /** * @brief slotprev 选择上一周 */ void slotprev(); /** * @brief slotnext 选择下一周 */ void slotnext(); signals: /** * @brief signalsSelectDate 选择日期的信号 * @param date 选择的日期 * @param currentDate 今天的时间 */ void signalsSelectDate(QDate date, QDate currentDate); /** * @brief signalIsDragging 判断是否是拖拽状态 * @param isDragging 是否是拖拽状态 */ void signalIsDragging(bool &isDragging); protected: /** * @brief resizeEvent 调整窗口大小 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; /** * @brief wheelEvent 鼠标滚轮切换上一周下一周 * @param event 鼠标滚轮事件 */ void wheelEvent(QWheelEvent *event) override; private: /** * @brief paintCell 绘制周数 * @param cell 周数所在的widget */ void paintCell(QWidget *cell); /** * @brief eventFilter 过滤器 * @param o 事件对象 * @param e 事件类型 * @return false */ bool eventFilter(QObject *o, QEvent *e) override; /** * @brief setSelectedCell 设置被选择的周数 * @param index 周数所在的索引 */ void setSelectedCell(int index); /** * @brief updateDate 更新数据 */ void updateDate(); private: QList m_cellList; QDate m_selectDate; QDate m_days[10]; bool m_cellSelectable = true; int m_selectedCell = 0; QFont m_dayNumFont; QColor m_defaultTextColor = Qt::black; QColor m_backgrounddefaultColor = Qt::white; QColor m_currentDayTextColor = Qt::white; QColor m_backgroundcurrentDayColor = "#0081FF"; QColor m_fillColor = Qt::white; int m_firstWeekDay; int m_weekAddDay = 0; int m_themetype = 1; bool m_searchfalg = false; }; #endif // MONTDAYVIEW_H dde-calendar-5.7.0.23/src/widget/weekWidget/weekwindow.cpp000066400000000000000000000417041375021633200233210ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "weekwindow.h" #include "scheduleview.h" #include "constants.h" #include "calendardbus.h" #include "weekheadview.h" #include "weekview.h" #include "schcedulesearchview.h" #include "todybutton.h" #include #include #include #include #include #include DGUI_USE_NAMESPACE CWeekWindow::CWeekWindow(QWidget *parent) : QMainWindow(parent) { setContentsMargins(0, 0, 0, 0); initUI(); initConnection(); } CWeekWindow::~CWeekWindow() { } void CWeekWindow::setDate(QDate date) { if (!date.isValid()) return; m_currentdate = date; m_weekview->setCurrentDate(date); update(); emit signalCurrentDate(date); } void CWeekWindow::setSelectSchedule(const ScheduleDtailInfo &scheduleInfo) { m_scheduleView->setSelectSchedule(scheduleInfo); } void CWeekWindow::setFirstWeekday(int weekday) { m_weekview->setFirstWeekDay(weekday); m_weekHeadView->setFirstWeekday(weekday); m_scheduleView->setFirstWeekday(weekday); } void CWeekWindow::setLunarVisible(bool state) { m_weekHeadView->setLunarVisible(state); m_YearLunarLabel->setVisible(state); m_scheduleView->setLunarVisible(state); } void CWeekWindow::initUI() { m_contentBackground = new DFrame; m_contentBackground->setAutoFillBackground(true); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setContentsMargins(0, 0, 0, 0); m_today = new CTodyButton; m_today->setText(QCoreApplication::translate("today", "Today", "Today")); m_today->setFixedSize(DDEWeekCalendar::WTodayWindth, DDEWeekCalendar::WTodayHeight); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); QFont todayfont; todayfont.setWeight(QFont::Medium); todayfont.setPixelSize(DDECalendar::FontSizeFourteen); m_today->setFont(todayfont); m_today->setPalette(todaypa); m_prevButton = new DIconButton(DStyle::SP_ArrowLeft, this); m_prevButton->setFixedSize(36, 36); m_nextButton = new DIconButton(DStyle::SP_ArrowRight, this); m_nextButton->setFixedSize(36, 36); m_YearLabel = new QLabel(); m_YearLabel->setFixedHeight(DDEWeekCalendar::W_YLableHeight); QFont t_labelF; t_labelF.setWeight(QFont::Medium); t_labelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_YearLabel->setFont(t_labelF); DPalette Lunadpa = m_YearLabel->palette(); Lunadpa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(Lunadpa); m_YearLunarLabel = new QLabel(m_contentBackground); m_YearLunarLabel->setFixedSize(DDEWeekCalendar::W_YLunatLabelWindth, DDEWeekCalendar::W_YLunatLabelHeight); m_weekview = new CWeekView(this); m_weekLabel = new QLabel(); m_weekLabel->setFixedHeight(DDEWeekCalendar::W_YLableHeight); QFont weeklabelF; weeklabelF.setWeight(QFont::Medium); weeklabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_weekLabel->setFont(weeklabelF); DPalette wpa = m_weekLabel->palette(); wpa.setColor(DPalette::WindowText, QColor("#717171")); m_weekLabel->setPalette(wpa); m_weekLabel->setText(tr("Week")); QFont ylabelF; ylabelF.setWeight(QFont::Medium); ylabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_YearLunarLabel->setFont(ylabelF); DPalette YearLpa = m_YearLunarLabel->palette(); YearLpa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(YearLpa); QHBoxLayout *yeartitleLayout = new QHBoxLayout; yeartitleLayout->setMargin(0); yeartitleLayout->setSpacing(0); yeartitleLayout->setContentsMargins(21, 20, 8, 0); yeartitleLayout->addWidget(m_YearLabel); QHBoxLayout *yeartitleLayout1 = new QHBoxLayout; yeartitleLayout1->setMargin(0); yeartitleLayout1->setSpacing(0); yeartitleLayout1->setContentsMargins(14, 9, 0, 7); yeartitleLayout1->addWidget(m_YearLunarLabel); yeartitleLayout->addLayout(yeartitleLayout1); yeartitleLayout->addStretch(); m_todayframe = new CustomFrame; m_todayframe->setContentsMargins(0, 0, 0, 0); m_todayframe->setRoundState(true, true, true, true); m_todayframe->setBColor(Qt::white); m_todayframe->setFixedHeight(DDEYearCalendar::Y_MLableHeight); m_todayframe->setboreder(1); QHBoxLayout *todaylayout = new QHBoxLayout; todaylayout->setMargin(0); todaylayout->setSpacing(0); todaylayout->addWidget(m_prevButton); todaylayout->addWidget(m_weekview); todaylayout->addWidget(m_nextButton); m_todayframe->setLayout(todaylayout); yeartitleLayout->addWidget(m_todayframe, 0, Qt::AlignCenter); yeartitleLayout->addSpacing(10); yeartitleLayout->addWidget(m_weekLabel, 0, Qt::AlignCenter); yeartitleLayout->addStretch(); yeartitleLayout->addWidget(m_today, 0, Qt::AlignRight); m_weekHeadView = new CWeekHeadView(this); m_scheduleView = new CScheduleView(this); m_scheduleView->setviewMagin(73, 109 + 30, 0, 0); m_scheduleView->setRange(763, 1032, QDate(2019, 8, 12), QDate(2019, 8, 18)); m_mainhLayout = new QVBoxLayout; m_mainhLayout->setMargin(0); m_mainhLayout->setSpacing(0); m_mainhLayout->setContentsMargins(8, 20, 0, 9); m_mainhLayout->addWidget(m_weekHeadView); m_mainhLayout->addWidget(m_scheduleView); QVBoxLayout *hhLayout = new QVBoxLayout; hhLayout->setMargin(0); hhLayout->setSpacing(0); hhLayout->setContentsMargins(0, 0, 0, 0); hhLayout->addLayout(yeartitleLayout); hhLayout->addLayout(m_mainhLayout); m_tmainLayout = new QHBoxLayout; m_tmainLayout->setMargin(0); m_tmainLayout->setSpacing(0); m_tmainLayout->setContentsMargins(0, 0, 10, 0); m_tmainLayout->addLayout(hhLayout); QVBoxLayout *ssLayout = new QVBoxLayout; ssLayout->setMargin(0); ssLayout->setSpacing(0); ssLayout->setContentsMargins(0, 0, 0, 10); m_tmainLayout->addLayout(ssLayout); m_contentBackground->setLayout(m_tmainLayout); setCentralWidget(m_contentBackground); } void CWeekWindow::initConnection() { connect(m_prevButton, &DIconButton::clicked, this, &CWeekWindow::slotprev); connect(m_today, &CTodyButton::clicked, this, &CWeekWindow::slottoday); connect(m_nextButton, &DIconButton::clicked, this, &CWeekWindow::slotnext); connect(m_weekview, &CWeekView::signalsSelectDate, this, &CWeekWindow::slotCurrentWeek); connect(m_weekHeadView, &CWeekHeadView::signalcurrentLunarDateChanged, this, &CWeekWindow::slotcurrentDateLunarChanged); connect(m_weekHeadView, &CWeekHeadView::signalcurrentDateChanged, this, &CWeekWindow::slotcurrentDateChanged); connect(m_scheduleView, &CScheduleView::signalsUpdateShcedule, this, &CWeekWindow::slotTransitSchedule); connect(m_scheduleView, &CScheduleView::signalsCurrentScheduleDate, this, &CWeekWindow::signalsCurrentScheduleDate); connect(m_scheduleView, &CScheduleView::signalViewtransparentFrame, this, &CWeekWindow::signalViewtransparentFrame); connect(m_weekHeadView, &CWeekHeadView::signalsViewSelectDate, this, &CWeekWindow::signalsViewSelectDate); connect(m_weekHeadView, &CWeekHeadView::signaleSchedulHide, this, &CWeekWindow::slotScheduleHide); connect(m_weekview,&CWeekView::signalIsDragging,this,&CWeekWindow::slotIsDragging); } void CWeekWindow::setTheMe(int type) { if (type == 0 || type == 1) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, Qt::white); todaypa.setColor(DPalette::Light, Qt::white); QColor sbcolor("#002A57"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); QColor todayhover = "#000000"; todayhover.setAlphaF(0.1); QColor todaypress = "#000000"; todaypress.setAlphaF(0.2); m_today->setBColor("#FFFFFF", todayhover, todaypress, "#FFFFFF", todayhover, todaypress); m_today->setTColor(todayColor, "#001A2E", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette prevpa = m_prevButton->palette(); prevpa.setColor(DPalette::Dark, QColor("#E6E6E6")); prevpa.setColor(DPalette::Light, QColor("#E3E3E3")); DPalette nextvpa = m_nextButton->palette(); nextvpa.setColor(DPalette::Dark, QColor("#E6E6E6")); nextvpa.setColor(DPalette::Light, QColor("#E3E3E3")); m_todayframe->setBColor(Qt::white); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); DPalette wpa = m_weekLabel->palette(); wpa.setColor(DPalette::WindowText, QColor("#717171")); m_weekLabel->setPalette(wpa); m_weekLabel->setForegroundRole(DPalette::WindowText); } else if (type == 2) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#252525"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette todaypa = m_today->palette(); QColor todayColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); todaypa.setColor(DPalette::ButtonText, todayColor); todaypa.setColor(DPalette::Dark, "#414141"); todaypa.setColor(DPalette::Light, "#484848"); QColor sbcolor("#000000"); sbcolor.setAlphaF(0.05); todaypa.setColor(DPalette::Shadow, sbcolor); m_today->setPalette(todaypa); m_today->setBColor("#484848", "#727272", "#242424", "#414141", "#535353", "#282828"); m_today->setTColor(todayColor, "#FFFFFF", "#0081FF"); m_today->setshadowColor(sbcolor); DPalette prevpa = m_prevButton->palette(); prevpa.setColor(DPalette::Dark, QColor("#484848")); prevpa.setColor(DPalette::Light, QColor("#414141")); DPalette nextvpa = m_nextButton->palette(); nextvpa.setColor(DPalette::Dark, QColor("#484848")); nextvpa.setColor(DPalette::Light, QColor("#414141")); QColor bcolor = "#FFFFFF"; bcolor.setAlphaF(0.05); m_todayframe->setBColor(bcolor); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#C0C6D4")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#798BA8")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); DPalette wpa = m_weekLabel->palette(); wpa.setColor(DPalette::WindowText, QColor("#717171")); m_weekLabel->setPalette(wpa); m_weekLabel->setForegroundRole(DPalette::WindowText); } m_weekview->setTheMe(type); m_weekHeadView->setTheMe(type); m_scheduleView->setTheMe(type); } void CWeekWindow::setTime(QTime time) { m_scheduleView->setTime(time); } void CWeekWindow::setSearchWFlag(bool flag) { m_searchfalg = flag; m_weekview->setsearchfalg(flag); update(); } void CWeekWindow::clearSearch() { } void CWeekWindow::updateHigh() { m_scheduleView->updateHigh(); } void CWeekWindow::slotReturnTodayUpdate() { setDate(QDate::currentDate()); } void CWeekWindow::slotIsDragging(bool &isDragging) { isDragging = m_scheduleView->IsDragging(); } void CWeekWindow::slotupdateSchedule(int id) { Q_UNUSED(id); m_scheduleView->slotupdateSchedule(); } void CWeekWindow::slotTransitSchedule(int id) { emit signalsWUpdateShcedule(this, id); } void CWeekWindow::slotTransitSearchSchedule(int id) { m_scheduleView->slotupdateSchedule(); emit signalsWUpdateShcedule(this, id); } void CWeekWindow::slotprev() { slotScheduleHide(); QDate tcurrent = m_currentdate.addDays(-DDEWeekCalendar::AFewDaysofWeek); if (tcurrent.year() < DDECalendar::QueryEarliestYear) return; if (m_currentdate.year() >= DDECalendar::QueryEarliestYear) { m_currentdate = tcurrent; setDate(m_currentdate); } else { } } void CWeekWindow::slotnext() { slotScheduleHide(); m_currentdate = m_currentdate.addDays(DDEWeekCalendar::AFewDaysofWeek); setDate(m_currentdate); } void CWeekWindow::slottoday() { slotScheduleHide(); emit signalsReturnTodayUpdate(this); setDate(QDate::currentDate()); } void CWeekWindow::slotCurrentWeek(QDate date, QDate currentDate) { QVector vDate; for (int i = 0; i < DDEWeekCalendar::AFewDaysofWeek; i++) vDate.append(date.addDays(i)); emit signalCurrentDate(vDate[0]); m_currentdate = currentDate; m_weekHeadView->setWeekDay(vDate); m_weekHeadView->setCurrentDate(m_currentdate); m_scheduleView->setRange(date, date.addDays(6)); } void CWeekWindow::slotcurrentDateLunarChanged(QVector vdate, QVector vdetail, int type) { int offset = 0; for (int i = 0; i < vdate.count(); ++i) { if (vdate.at(i) == m_currentdate) { offset =i; break; } } if (m_currentdate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } if (!vdate.isEmpty()) { CaLunarDayInfo detail = vdetail.at(offset); if (type == 1) { int yearnum = vdate.at(0).year(); if (yearnum < DDECalendar::QueryEarliestYear) yearnum = DDECalendar::QueryEarliestYear; QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(yearnum) + tr("Y")); } else { m_YearLabel->setText(QString::number(yearnum)); } m_YearLunarLabel->setText("-" + detail.mGanZhiYear + detail.mZodiac + "年-"); } } } void CWeekWindow::slotcurrentDateChanged(QDate date) { if (m_currentdate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return Today", "Today", "Return Today")); } m_currentdate = date; m_scheduleView->setDate(date); } void CWeekWindow::slotsearchDateSelect(QDate date) { setDate(date); slotupdateSchedule(); } void CWeekWindow::slotScheduleHide() { m_scheduleView->slotScheduleShow(false); } void CWeekWindow::resizeEvent(QResizeEvent *event) { qreal sleftMagin = 0.093 * width() + 0.5; qreal headh = height() * 0.0924 + 0.5; qreal dw = width() * 0.4186 + 0.5; int dh = 36; int winframe = 10; m_mainhLayout->setContentsMargins(10, 20, 0, 10); if (m_searchfalg) { m_tmainLayout->setContentsMargins(0, 0, 0, 0); } else { winframe += 10; m_tmainLayout->setContentsMargins(0, 0, 10, 0); } if (!m_searchfalg) { m_weekview->setFixedSize(qRound(dw), dh); } else { m_weekview->setFixedSize(qRound(dw - 100), dh); } m_weekHeadView->setMounthLabelWidth(qRound(sleftMagin + 1), qRound(width() * 0.9802 + 0.5)); m_weekHeadView->setFixedSize(width() - winframe, qRound(headh)); QMainWindow::resizeEvent(event); } void CWeekWindow::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); slotScheduleHide(); } dde-calendar-5.7.0.23/src/widget/weekWidget/weekwindow.h000066400000000000000000000155341375021633200227700ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 WEEKWINDOW_H #define WEEKWINDOW_H #include "customframe.h" #include "schedulestructs.h" #include "calendardbus.h" #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CWeekHeadView; class CaLunarDayInfo; class CWeekView; class CScheduleView; class CSchceduleSearchView; class CTodyButton; class CWeekWindow: public QMainWindow { Q_OBJECT public: /** * @brief CWeekWindow 构造函数 * @param parent 父类 */ CWeekWindow(QWidget *parent = nullptr); /** *@brief ~CWeekWindow 析构函数 */ ~CWeekWindow() override; /** * @brief setDate 设置今天的日期 * @param date 日期 */ void setDate(QDate date); /** * @brief setSelectSchedule 设置选择的日程 * @param scheduleInfo 日程信息 */ void setSelectSchedule(const ScheduleDtailInfo &scheduleInfo); /** * @brief setFirstWeekday 设置每周以周几开始 * @param weekday 周几 */ void setFirstWeekday(int weekday); /** * @brief setLunarVisible 设置是否显示阴历信息 * @param state 是否显示阴历信息 */ void setLunarVisible(bool state); /** * @brief initUI 初始化界面设置 */ void initUI(); /** * @brief initConnection 初始化信号和槽的连接 */ void initConnection(); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setTime 设置CScheduleView的时间 * @param time 时间 */ void setTime(QTime time); /** * @brief setSearchWFlag 设置搜索标志 * @param flag 是否进行了搜索 */ void setSearchWFlag(bool flag); /** * @brief clearSearch */ void clearSearch(); /** * @brief updateHigh CScheduleView updateHigh */ void updateHigh(); signals: /** * @brief dateSelected * @param date * @param detail */ void dateSelected(const QDate date, const CaLunarDayInfo &detail) const; /** * @brief signalsWUpdateShcedule 更新日程信号 * @param w * @param id */ void signalsWUpdateShcedule(QMainWindow *w, int id = 0); /** * @brief signalsReturnTodayUpdate 返回今天的信号 * @param w 视图窗口 */ void signalsReturnTodayUpdate(QMainWindow *w); /** * @brief signalsCurrentScheduleDate 切换窗口的信号 * @param date 时间 */ void signalsCurrentScheduleDate(QDate date); /** * @brief signalViewtransparentFrame 窗口转换信号 * @param type */ void signalViewtransparentFrame(int type); /** * @brief signalCurrentDate 设置时间信号 * @param date 时间 */ void signalCurrentDate(QDate date); /** * @brief signalsViewSelectDate 选择时间的信号 * @param date 时间 */ void signalsViewSelectDate(QDate date); public slots: /** * @brief slotReturnTodayUpdate 返回今天按钮,设置当前时间 */ void slotReturnTodayUpdate(); /** * @brief slotIsDragging CScheduleView IsDragging,判断是否可以拖拽 * @param isDragging 是否可以拖拽 */ void slotIsDragging(bool &isDragging); public slots: /** * @brief slotupdateSchedule 更新日程 * @param id */ void slotupdateSchedule(int id = 0); /** * @brief slotTransitSchedule 发送更新日程的信号 * @param id */ void slotTransitSchedule(int id = 0); /** * @brief slotTransitSearchSchedule 更新日程并发送信号 * @param id */ void slotTransitSearchSchedule(int id = 0); /** * @brief slotScheduleHide 隐藏日程浮框 */ void slotScheduleHide(); private slots: /** * @brief slotprev 切换到上一周,隐藏日程浮框 */ void slotprev(); /** * @brief slotnext 切换到下一周,隐藏日程浮框 */ void slotnext(); /** * @brief slottoday 返回到今天,隐藏日程浮框 */ void slottoday(); /** * @brief slotCurrentWeek 设置每周开始的日期和今天的日期 * @param date 每周开始的日期 * @param currentDate 今天的日期 */ void slotCurrentWeek(QDate date, QDate currentDate); /** * @brief slotcurrentDateLunarChanged 切换显示当天的阴历信息 * @param vdate 一周的时间 * @param vdetail 阴历信息 * @param type 是否显示阴历信息 */ void slotcurrentDateLunarChanged(QVector vdate, QVector vdetail, int type = 0); /** * @brief slotcurrentDateChanged 切换显示当天的时间,并改变返回今天按钮显示的文字 * @param date 时间 */ void slotcurrentDateChanged(QDate date); /** * @brief slotsearchDateSelect 选择选中的日期 * @param date 日期 */ void slotsearchDateSelect(QDate date); protected: /** * @brief resizeEvent 调整周视图窗口 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; /** * @brief mousePressEvent 鼠标单击隐藏日程浮框 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; private: CWeekHeadView *m_weekHeadView = nullptr; //周视图头 DFrame *m_contentBackground = nullptr; DIconButton *m_prevButton = nullptr; DIconButton *m_nextButton = nullptr; CTodyButton *m_today = nullptr; QDate m_currentdate; QLabel *m_YearLabel = nullptr; QLabel *m_YearLunarLabel = nullptr; QLabel *m_weekLabel = nullptr; CWeekView *m_weekview = nullptr; CustomFrame *m_todayframe = nullptr; CScheduleView *m_scheduleView = nullptr; QSpacerItem *m_spaceitem = nullptr; QVBoxLayout *m_mainhLayout = nullptr; QString m_searchText; QHBoxLayout *m_tmainLayout = nullptr; bool m_searchfalg = false; }; #endif // YEARWINDOW_H dde-calendar-5.7.0.23/src/widget/yearWidget/000077500000000000000000000000001375021633200204315ustar00rootroot00000000000000dde-calendar-5.7.0.23/src/widget/yearWidget/yearschceduleview.cpp000066400000000000000000000463251375021633200246620ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "yearschceduleview.h" #include "schcedulectrldlg.h" #include "myschceduleview.h" #include "schceduledlg.h" #include "scheduledatamanage.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE const QString fontfamily = QStringLiteral("SourceHanSansSC-Medium"); CYearSchceduleItem::CYearSchceduleItem(QWidget *parent) : DLabel(parent) { } void CYearSchceduleItem::setBackgroundColor(QColor color1) { m_Backgroundcolor = color1; } void CYearSchceduleItem::setStateColor(QColor color1) { m_Statecolor = color1; } void CYearSchceduleItem::setText( QColor tcolor, QFont font) { m_ttextcolor = tcolor; m_tfont = font; } void CYearSchceduleItem::setTimeC(QColor tcolor, QFont font) { m_timecolor = tcolor; m_timefont = font; } void CYearSchceduleItem::setData( ScheduleDtailInfo vScheduleInfo) { m_ScheduleInfo = vScheduleInfo; update(); } void CYearSchceduleItem::paintEvent( QPaintEvent *e ) { Q_UNUSED(e); int labelwidth = width(); int labelheight = height(); QPainter painter(this); QRect fillRect = QRect(0, 0, labelwidth, labelheight); painter.setRenderHints(QPainter::HighQualityAntialiasing); QColor bcolor = m_Backgroundcolor; painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(bcolor)); painter.setPen(Qt::NoPen); painter.drawRect(fillRect); painter.restore(); //圆点 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(m_Statecolor)); painter.setPen(Qt::NoPen); painter.drawEllipse(QRect(10, (labelheight - 8) / 2, 8, 8)); painter.restore(); QString str; //左边文字 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setPen(m_ttextcolor); painter.setFont(m_tfont); QFontMetrics fm = painter.fontMetrics(); QString tStitlename = m_ScheduleInfo.titleName; tStitlename.replace("\n", ""); str = tStitlename; int tilenameW = labelwidth - 90; QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= tilenameW) { tstr.chop(1); break; } } if (tstr != str) { tstr = tstr + "..."; } painter.drawText(QRect(28, 0, tilenameW, labelheight - 2), Qt::AlignLeft | Qt::AlignVCenter, tstr); painter.restore(); //右边时间 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setPen(m_timecolor); painter.setFont(m_timefont); QLocale locale; if (locale.language() == QLocale::Chinese) { if (m_ScheduleInfo.allday) { str = tr("All Day"); } else { str = m_ScheduleInfo.beginDateTime.time().toString("ap h") + ("时"); } } else { if (m_ScheduleInfo.allday) { str = tr("All Day"); } else { str = m_ScheduleInfo.beginDateTime.time().toString("ap h:mm"); } } QFontMetrics fm2 = painter.fontMetrics(); painter.drawText(QRect(labelwidth - 60, 0, 50, labelheight - 2), Qt::AlignRight | Qt::AlignVCenter, str); painter.restore(); } CYearSchceduleView::CYearSchceduleView(QWidget *parent) : DWidget(parent) { setContentsMargins(10, 10, 10, 10); setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); setAttribute(Qt::WA_TranslucentBackground); } CYearSchceduleView::~CYearSchceduleView() { } void CYearSchceduleView::setSoloDay(QString soloday) { m_soloDay = soloday; } bool YScheduleDateThan(const ScheduleDtailInfo &s1, const ScheduleDtailInfo &s2) { QDate bdate1 = s1.beginDateTime.date(); QDate edate1 = s1.endDateTime.date(); QDate bdate2 = s2.beginDateTime.date(); QDate edate2 = s2.endDateTime.date(); if (bdate1 != edate1 && bdate2 == edate2) { return true; } else if (bdate1 == edate1 && bdate2 != edate2) { return false; } else if (bdate1 != edate1 && bdate2 != edate2) { return bdate1 < bdate2; } else { if (s1.beginDateTime == s2.beginDateTime) { return s1.titleName < s2.titleName; } else { return s1.beginDateTime < s2.beginDateTime; } } } bool YScheduleDaysThan(const ScheduleDtailInfo &s1, const ScheduleDtailInfo &s2) { return s1.beginDateTime.date().daysTo(s1.endDateTime.date()) > s2.beginDateTime.date().daysTo(s2.endDateTime.date()); } void CYearSchceduleView::setData(QVector &vListData) { QVector valldayListData, vDaylistdata; for (int i = 0; i < vListData.count(); i++) { if (vListData.at(i).allday) { valldayListData.append(vListData.at(i)); } else { vDaylistdata.append(vListData.at(i)); } } std::sort(valldayListData.begin(), valldayListData.end(), YScheduleDaysThan); std::sort(valldayListData.begin(), valldayListData.end(), YScheduleDateThan); std::sort(vDaylistdata.begin(), vDaylistdata.end(), YScheduleDaysThan); std::sort(vDaylistdata.begin(), vDaylistdata.end(), YScheduleDateThan); for (int i = 0; i < valldayListData.count(); i++) { QVector::iterator iter = valldayListData.begin(); if (valldayListData.at(i).type.ID == DDECalendar::FestivalTypeID) { ScheduleDtailInfo moveDate; moveDate = valldayListData.at(i); valldayListData.removeAt(i); valldayListData.insert(iter, moveDate); } } m_vlistData.clear(); m_vlistData.append(valldayListData); m_vlistData.append(vDaylistdata); if (m_vlistData.size() > DDEYearCalendar::YearScheduleListMaxcount) { QVector vTlistData; for (int i = 0; i < 4; i++) { if (m_vlistData.at(i).beginDateTime.date() != m_vlistData.at(i).endDateTime.date() && !m_vlistData.at(i).allday) { if (m_vlistData.at(i).beginDateTime.date() != m_currentDate) { m_vlistData[i].allday = true; } } vTlistData.append(m_vlistData.at(i)); } ScheduleDtailInfo info; info.titleName = "......"; info.id = -1; vTlistData.append(info); m_vlistData = vTlistData; } } void CYearSchceduleView::clearData() { m_vlistData.clear(); m_soloDay.clear(); return; } int CYearSchceduleView::showWindow() { if (m_soloDay.isEmpty() && m_vlistData.isEmpty()) { setFixedSize(130, 45); } else { setFixedSize(240, 180); } updateDateShow(); return this->width(); } void CYearSchceduleView::setTheMe(int type) { if (type == 0 || type == 1) { m_bBackgroundcolor = "#FFFFFF"; m_bBackgroundcolor.setAlphaF(0.0); m_btimecolor = "#414D68"; m_btimecolor.setAlphaF(0.7); m_bttextcolor = "#414D68"; m_lBackgroundcolor = "#EBEBEB"; m_lBackgroundcolor.setAlphaF(0.0); m_ltextcolor = "#001A2E"; m_solocolor = "#FF7272"; m_TBcolor = "#EBEBEB"; m_borderColor = "#000000"; m_borderColor.setAlphaF(0.05); } else if (type == 2) { m_bBackgroundcolor = "#FFFFFF"; m_bBackgroundcolor.setAlphaF(0.0); m_btimecolor = "#C0C6D4"; m_btimecolor.setAlphaF(0.7); m_bttextcolor = "#C0C6D4"; m_lBackgroundcolor = "#191919"; m_lBackgroundcolor.setAlphaF(0.00); m_ltextcolor = "#C0C6D4"; m_solocolor = "#FF7272"; m_solocolor.setAlphaF(0.8); m_TBcolor = "#191919"; m_borderColor = "#FFFFFF"; m_borderColor.setAlphaF(0.05); } } void CYearSchceduleView::setDtype(int type, int arrowheight) { m_dtype = type; m_arrowheight = arrowheight; update(); } void CYearSchceduleView::setCurrentDate(QDate cdate) { m_currentDate = cdate; } QDate CYearSchceduleView::getCurrentDate() { return m_currentDate; } void CYearSchceduleView::adjustPosition(bool ad) { adjustPos = ad; } void CYearSchceduleView::updateDateShow() { int sviewNum = 0; if (!m_soloDay.isEmpty() || !m_vlistData.isEmpty()) { if (!m_soloDay.isEmpty()) { if (m_vlistData.size() > 4) { sviewNum = DDEYearCalendar::YearScheduleListMaxcount; } else { sviewNum = m_vlistData.size() + 1; } } else { if (m_vlistData.size() > DDEYearCalendar::YearScheduleListMaxcount) { sviewNum = DDEYearCalendar::YearScheduleListMaxcount; } else { sviewNum = m_vlistData.size(); } } } if (!m_soloDay.isEmpty() || !m_vlistData.isEmpty()) setFixedSize(240, 45 + (sviewNum - 1) * 29); update(); return; } void CYearSchceduleView::createItemWidget(ScheduleDtailInfo info, int type) { ScheduleDtailInfo &gd = info; CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType(gd.type.ID); CYearSchceduleItem *gwi = new CYearSchceduleItem(); QFont font; font.setWeight(QFont::Medium); font.setPixelSize(DDECalendar::FontSizeFourteen); gwi->setBackgroundColor(m_bBackgroundcolor); QColor scolor = gdcolor.Purecolor; scolor.setAlphaF(1.0); if (type == 0) gwi->setStateColor(gdcolor.splitColor); else { gwi->setStateColor(m_solocolor); } gwi->setText(m_bttextcolor, font); font.setPixelSize(DDECalendar::FontSizeTwelve); gwi->setTimeC(m_btimecolor, font); gwi->setFixedSize(m_gradientItemList->width() - 3, 28); gwi->setData(gd); QListWidgetItem *listItem = new QListWidgetItem; listItem->setSizeHint(QSize(m_gradientItemList->width() - 2, 29)); //每次改变Item的高度 listItem->setFlags(Qt::ItemIsTristate ); m_gradientItemList->addItem(listItem); m_gradientItemList->setItemWidget(listItem, gwi); m_labellist.append(gwi); } void CYearSchceduleView::paintEvent(QPaintEvent *event) { Q_UNUSED(event); for (int i = 0; i < m_vlistData.size(); ++i) { paintItem(m_vlistData.at(i), i, 0); } if (m_soloDay.isEmpty() && m_vlistData.isEmpty()) { paintItem(); } adjustPos = false; } void CYearSchceduleView::paintItem(ScheduleDtailInfo info, int index, int type) { int labelwidth = width() - 30; int bheight = index * 29 + 10; int labelheight = 28; ScheduleDtailInfo &gd = info; CSchedulesColor gdcolor = CScheduleDataManage::getScheduleDataManage()->getScheduleColorByType(gd.type.ID); QFont font; font.setWeight(QFont::Medium); font.setPixelSize(DDECalendar::FontSizeTwelve); QColor scolor = gdcolor.Purecolor; scolor.setAlphaF(1.0); QPainter painter(this); QRect fillRect = QRect(0, 0, width(), height()); painter.setRenderHints(QPainter::HighQualityAntialiasing); QColor bcolor = m_bBackgroundcolor; painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(bcolor)); painter.setPen(Qt::NoPen); painter.drawRect(fillRect); painter.restore(); if (gd.id == -1) { QString str = "..."; painter.save(); painter.setRenderHint(QPainter::Antialiasing); painter.setPen(m_btimecolor); painter.setFont(font); if (adjustPos) { painter.drawText(QRect(25 - 18, bheight, labelwidth - 80, labelheight - 2), Qt::AlignLeft | Qt::AlignVCenter, str); } else { painter.drawText(QRect(25, bheight, labelwidth - 80, labelheight - 2), Qt::AlignLeft | Qt::AlignVCenter, str); } painter.restore(); } else { if (info.id != -1) { //圆点 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; if (type == 0) painter.setBrush(QBrush(gdcolor.splitColor)); else { painter.setBrush(QBrush(m_solocolor)); } painter.setPen(Qt::NoPen); if (adjustPos) { painter.drawEllipse(QRect(25 - 18, bheight + (labelheight - 8) / 2, 8, 8)); } else { painter.drawEllipse(QRect(25, bheight + (labelheight - 8) / 2, 8, 8)); } painter.restore(); } QString str; //左边文字 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setPen(m_bttextcolor); painter.setFont(font); QFontMetrics fm = painter.fontMetrics(); QString tStitlename = gd.titleName; tStitlename.replace("\n", ""); str = tStitlename; int tilenameW = labelwidth - 80; QString tstr; for (int i = 0; i < str.count(); i++) { tstr.append(str.at(i)); int widthT = fm.width(tstr) + 5; if (widthT >= tilenameW) { tstr.chop(1); break; } } if (tstr != str) { tstr = tstr + "..."; } if (adjustPos) { painter.drawText(QRect(41 - 18, bheight, tilenameW, labelheight - 2), Qt::AlignLeft | Qt::AlignVCenter, tstr); } else { painter.drawText(QRect(41, bheight, tilenameW, labelheight - 2), Qt::AlignLeft | Qt::AlignVCenter, tstr); } painter.restore(); if (info.id != -1) { //右边时间 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setPen(m_btimecolor); painter.setFont(font); QLocale locale; if (info.allday) { str = tr("All Day"); } else { if (m_currentDate > info.beginDateTime.date()) { str = tr("All Day"); } else { str = info.beginDateTime.time().toString("hh:mm"); } } QFontMetrics fm2 = painter.fontMetrics(); if (adjustPos) { painter.drawText(QRect(width() - 70 - 18, bheight, 57, labelheight - 2), Qt::AlignRight | Qt::AlignVCenter, str); } else { painter.drawText(QRect(width() - 70, bheight, 57, labelheight - 2), Qt::AlignRight | Qt::AlignVCenter, str); } painter.restore(); } } } void CYearSchceduleView::paintItem() { QFont font; font.setPixelSize(DDECalendar::FontSizeTwelve); QPainter painter(this); QRect fillRect = QRect(0, 0, width(), height()); painter.setRenderHints(QPainter::HighQualityAntialiasing); QColor bcolor = m_bBackgroundcolor; painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(bcolor)); painter.setPen(Qt::NoPen); painter.drawRect(fillRect); painter.restore(); QString str; //左边文字 painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setPen(m_bttextcolor); painter.setFont(font); QFontMetrics fm = painter.fontMetrics(); QString tStitlename = tr("No event"); painter.drawText(QRect(0, 0, width(), height()), Qt::AlignCenter, tStitlename); painter.restore(); } CYearSchceduleOutView::CYearSchceduleOutView(QWidget *parent) : DArrowRectangle(DArrowRectangle::ArrowLeft, parent) { yearschceduleview = new CYearSchceduleView (); this->setContent(yearschceduleview); } void CYearSchceduleOutView::setSoloDay(QString soloday) { yearschceduleview->setSoloDay(soloday); } void CYearSchceduleOutView::setData(QVector &vListData) { list_count = vListData.size(); yearschceduleview->setData(vListData); scheduleinfoList = yearschceduleview->getlistdate(); } void CYearSchceduleOutView::clearData() { yearschceduleview->clearData(); } void CYearSchceduleOutView::showWindow() { int w = yearschceduleview->showWindow(); this->setFixedSize(w, yearschceduleview->height()); } void CYearSchceduleOutView::setTheMe(int type) { yearschceduleview->setTheMe(type); } void CYearSchceduleOutView::setDtype(int type, int arrowheight) { yearschceduleview->setDtype(type, arrowheight); } void CYearSchceduleOutView::setCurrentDate(QDate cdate) { currentdate = cdate; yearschceduleview->setCurrentDate(cdate); } void CYearSchceduleOutView::adjustPosition(bool ad) { yearschceduleview->adjustPosition(ad); } void CYearSchceduleOutView::mousePressEvent(QMouseEvent *event) { Q_UNUSED(event); QPoint pos = QCursor::pos(); pos = this->mapFromGlobal(pos); QVector rect_press; QRect rect(35,50,width() - 50,20); int listShow = 0; if (!scheduleinfoList.isEmpty()) { if (scheduleinfoList.size() < DDEYearCalendar::YearScheduleListMaxcount) listShow = scheduleinfoList.size(); else listShow = DDEYearCalendar::YearScheduleListMaxcount; } for (int i = 0; i < listShow; i++) { if (this->arrowDirection() == DArrowRectangle::ArrowLeft) rect_press.append(QRect(35, 20 + i * 30, width() - 50, 20)); else rect_press.append(QRect(20, 20 + i * 30, width() - 50, 20)); } for (int i = 0; i < listShow; i++) { if (rect_press.at(i).contains(pos)) { if (i > 3 && list_count > DDEYearCalendar::YearScheduleListMaxcount) { emit signalsViewSelectDate(currentdate); this->hide(); //跳转到周视图 } else { if (scheduleinfoList.at(i).type.ID != DDECalendar::FestivalTypeID) { CSchceduleDlg dlg(0); dlg.setData(scheduleinfoList.at(i)); if (dlg.exec() == DDialog::Accepted) emit signalupdateschcedule(); } } } } } dde-calendar-5.7.0.23/src/widget/yearWidget/yearschceduleview.h000066400000000000000000000177621375021633200243320ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 YEARSCHCEDULEVIEW_H #define YEARSCHCEDULEVIEW_H #include "schedulestructs.h" #include #include #include #include #include DWIDGET_USE_NAMESPACE class QVBoxLayout; class CYearSchceduleItem; class CYearSchceduleOutView; class CYearSchceduleView : public DWidget { Q_OBJECT public: /** * @brief CYearSchceduleView 构造函数 * @param parent 父类 */ explicit CYearSchceduleView(QWidget *parent = nullptr); /** * @brief ~CYearSchceduleView 析构函数 */ ~CYearSchceduleView(); /** * @brief setSoloDay * @param soloday */ void setSoloDay(QString soloday); /** * @brief setData 设置日程信息,并全天日程置于非全天日程之前 * @param vListData 日程信息 */ void setData(QVector &vListData); /** * @brief getlistdate 获取日程信息 * @return 日程信息 */ QVector getlistdate() { return m_vlistData; } /** * @brief clearData 清除日程信息 */ void clearData(); /** * @brief showWindow 设置日程浮框的大小 * @return 日程浮框的宽度 */ int showWindow(); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setDtype * @param type * @param arrowheight */ void setDtype(int type, int arrowheight); /** * @brief setCurrentDate 设置日程所在当天的日期 * @param cdate 日期 */ void setCurrentDate(QDate cdate); /** * @brief getCurrentDate 获取日程所在当天的日期 * @return 日期 */ QDate getCurrentDate(); /** * @brief adjustPosition 根据日程浮框左右朝向不同,日程显示位置不同 * @param ad 是否调整显示位置 */ void adjustPosition(bool ad); private: /** * @brief updateDateShow 调整最多展示日程为五个,并设置浮框大小 */ void updateDateShow(); /** * @brief createItemWidget 设置每条日程的具体信息 * @param info 日程信息 * @param type 系统主题类型 */ void createItemWidget(ScheduleDtailInfo info, int type = 0); protected: /** * @brief paintEvent 绘制日程 * @param event 绘图事件 */ void paintEvent(QPaintEvent *event) override; /** * @brief paintItem 绘制日程 * @param info 日程信息 * @param index 日程的索引 * @param type 系统主题类型 */ void paintItem(ScheduleDtailInfo info, int index, int type = 0); /** * @brief paintItem */ void paintItem(); private: DListWidget *m_gradientItemList = nullptr; //下拉列表窗 bool m_widgetFlag; QVector m_vlistData; QString m_soloDay; QVector m_labellist; int m_type; QDate m_currentDate; QColor m_bBackgroundcolor = "#000000"; QColor m_btimecolor = "#526A7F"; QColor m_bttextcolor = "#414D68"; QColor m_lBackgroundcolor = Qt::white; QColor m_ltextcolor = "#001A2E"; QColor m_solocolor = "#001A2E"; QColor m_TBcolor = "#001A2E"; int m_dtype = 3; int m_arrowheight = 0; QColor m_borderColor = "#000000"; bool adjustPos = false; }; class CYearSchceduleItem : public DLabel { Q_OBJECT public: /** * @brief CYearSchceduleItem 构造函数 * @param parent 父类 */ explicit CYearSchceduleItem(QWidget *parent = nullptr); /** * @brief setBackgroundColor 设置背景颜色 * @param color1 背景颜色 */ void setBackgroundColor(QColor color1); /** * @brief setStateColor 设置圆点的颜色 * @param color1 圆点颜色 */ void setStateColor(QColor color1); /** * @brief setText 设置文字颜色和字体 * @param tcolor 文字颜色 * @param font 文字字体 */ void setText(QColor tcolor, QFont font); /** * @brief setTimeC 设置时间的颜色和字体 * @param tcolor 时间的颜色 * @param font 时间的字体 */ void setTimeC(QColor tcolor, QFont font); /** * @brief setData 设置日程信息 * @param vScheduleInfo 日程信息 */ void setData(ScheduleDtailInfo vScheduleInfo); protected: /** * @brief paintEvent * @param e */ void paintEvent(QPaintEvent *e) override; private: ScheduleDtailInfo m_ScheduleInfo; QColor m_Backgroundcolor; QColor m_timecolor; QColor m_Statecolor; QFont m_timefont; QColor m_ttextcolor; QFont m_tfont; }; class CYearSchceduleOutView : public DArrowRectangle { Q_OBJECT public: /** * @brief CYearSchceduleOutView 构造函数 * @param parent 父类 */ explicit CYearSchceduleOutView(QWidget *parent = nullptr); /** * @brief setSoloDay * @param soloday */ void setSoloDay(QString soloday); /** * @brief setData 设置日程信息 * @param vListData 日程信息 */ void setData(QVector &vListData); /** * @brief clearData 清楚数据 */ void clearData(); /** * @brief showWindow 设置日程浮框外边框大小 */ void showWindow(); /** * @brief setTheMe 设置系统主题颜色 * @param type 系统主题 */ void setTheMe(int type = 0); /** * @brief setDtype * @param type * @param arrowheight */ void setDtype(int type, int arrowheight); /** * @brief setCurrentDate 设置日程所在当天的日期 * @param cdate 日期 */ void setCurrentDate(QDate cdate); /** * @brief adjustPosition 根据日程浮框左右朝向不同,日程显示位置不同 * @param ad 是否调整显示位置 */ void adjustPosition(bool ad); signals: /** * @brief signalsViewSelectDate 跳转视图信号 * @param date 当天的时间 */ void signalsViewSelectDate(QDate date); /** * @brief signalupdateschcedule 更新日程信息的信号 */ void signalupdateschcedule(); private: CYearSchceduleView *yearschceduleview = nullptr; QVector scheduleinfoList; QDate currentdate; int list_count = 0; protected: /** * @brief mousePressEvent 鼠标单击事件,单击非节日日程进行编辑,单击”...”区域跳转到周视图。 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; }; #endif // CSHCEDULEDAYVIEW_H dde-calendar-5.7.0.23/src/widget/yearWidget/yearview.cpp000066400000000000000000000466761375021633200230130ustar00rootroot00000000000000 /* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "calendardbus.h" #include "scheduledatamanage.h" #include "yearschceduleview.h" #include "yearview.h" #include "constants.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include DGUI_USE_NAMESPACE CYearSchceduleOutView *CYearView::m_Scheduleview = nullptr; CMonthDayRect *CMonthDayRect::m_CurrentRect =nullptr; qreal CMonthDayRect::m_DevicePixelRatio = 0; QColor CMonthDayRect::m_ceventColor("#FF5D00"); QColor CMonthDayRect::m_notCurrentTextColor = "#b2b2b2"; CMonthDayRect::CellColor CMonthDayRect::m_currentColor; QColor CMonthDayRect::m_defaultTextColor; QColor CMonthDayRect::m_selectedTextColor; CYearView::CYearView(QWidget *parent) : CustomFrame(parent) { setMouseTracking(true); //add separator line m_currentMouth = new CustomFrame(); m_currentMouth->setFixedHeight(24); m_currentMouth->setContentsMargins(0, 0, 0, 0); m_currentMouth->setTextAlign(Qt::AlignLeft); m_momthFont.setWeight(QFont::Medium); m_momthFont.setPixelSize(DDECalendar::FontSizeSixteen); m_currentMouth->setTextFont(m_momthFont); QHBoxLayout *separatorLineLayout = new QHBoxLayout; separatorLineLayout->setMargin(0); separatorLineLayout->setSpacing(0); separatorLineLayout->setContentsMargins(0, 0, 0, 0); separatorLineLayout->addWidget(m_currentMouth); separatorLineLayout->addStretch(); m_currentMouth->show(); m_currentMouth->installEventFilter(this); m_monthView = new CYearMonthView(this); connect(m_monthView, &CYearMonthView::signalPressDate, this, &CYearView::slotPressClickDate); connect(m_monthView, &CYearMonthView::signalDoubleClickDate, this, &CYearView::slotDoubleClickDate); m_hhLayout = new QVBoxLayout; m_hhLayout->addLayout(separatorLineLayout); m_hhLayout->addWidget(m_monthView); m_hhLayout->setMargin(0); m_hhLayout->setSpacing(0); m_hhLayout->setContentsMargins(13, 10, 10, 10); setLayout(m_hhLayout); createYearSchceduleView(parent); } void CYearView::slotupdateSchedule(const int id) { setCurrentDate(m_currentDate, id); } void CYearView::slotDoubleClickDate(const QDate &date) { if (date.year() < DDECalendar::QueryEarliestYear) return; SchceduleViewHide(); emit signaldoubleclickDate(date); } void CYearView::slotPressClickDate(const QDate &date) { if (date.year() < DDECalendar::QueryEarliestYear) return; emit signalcurrentDateChanged(date); emit signalHideInfo(); emit signalSelectInfo(true); m_Scheduleview->setCurrentDate(date); for (int i = 0; i < m_DateRangeInfo.size(); ++i) { if (m_DateRangeInfo.at(i).date ==date) { m_Scheduleview->setData(m_DateRangeInfo[i].vData); } } QPoint pos22 = QCursor::pos(); QDesktopWidget *w = QApplication::desktop(); m_Scheduleview->showWindow(); if (pos22.x() + 10 + m_Scheduleview->width() < w->width()) { m_Scheduleview->setArrowDirection(DArrowRectangle::ArrowLeft); m_Scheduleview->show(pos22.x() + 10, pos22.y()); } else { m_Scheduleview->adjustPosition(true); m_Scheduleview->setArrowDirection(DArrowRectangle::ArrowRight); m_Scheduleview->show(pos22.x() - 10, pos22.y()); } } void CYearView::setFirstWeekday(int weekday) { m_firstWeekDay = weekday; updateDate(); } void CYearView::setTheMe(int type) { m_themetype = type; if (type == 0 || type == 1) { DPalette bpa = palette(); bpa.setColor(DPalette::Background, Qt::white); setPalette(bpa); setBackgroundRole(DPalette::Background); m_currentMouth->setTextColor( QColor("#CF0059")); m_bnormalColor = "#FFFFFF"; m_topBorderColor = Qt::red; m_backgroundCircleColor = "#0081FF"; m_currentDayTextColor = "#0081FF"; m_weekendsTextColor = Qt::black; m_festivalTextColor = Qt::black; } else if (type == 2) { m_bnormalColor = "#FFFFFF"; m_bnormalColor.setAlphaF(0.05); m_currentMouth->setTextColor( QColor("#BF1D63")); m_topBorderColor = Qt::red; m_backgroundCircleColor = "#0059D2"; m_currentDayTextColor = "#0059D2"; m_weekendsTextColor = Qt::black; m_festivalTextColor = Qt::black; } m_monthView->setTheMe(type); QColor monthcolor = Qt::white; monthcolor.setAlphaF(0); m_currentMouth->setBColor(monthcolor); m_Scheduleview->setTheMe(type); } void CYearView::SchceduleViewHide() { m_Scheduleview->hide(); m_Scheduleview->clearData(); } void CYearView::getInfoAndSetLineFlag() { CScheduleDataManage *tdataManage = CScheduleDataManage::getScheduleDataManage(); m_vlineflag.resize(42); m_vlineflag.fill(false); if (tdataManage->getGetAllYearScheduleInfo()->m_monthInfo.size()>0) { m_DateRangeInfo = tdataManage->getGetAllYearScheduleInfo()->m_monthInfo[m_currentDate.month()]; if (m_DateRangeInfo.count() == DDEYearCalendar::RectSizeofEveyMonth) { for (int i = 0; i < DDEYearCalendar::RectSizeofEveyMonth; i++) { if (!m_DateRangeInfo.at(i).vData.isEmpty()) { m_vlineflag[i] = true; } } } } m_monthView->setLintFlag(m_vlineflag); m_monthView->update(); } void CYearView::setCurrentDate(const QDate date, int type) { Q_UNUSED(type); qDebug() << "set current date " << date; m_currentDate = date; QLocale locale; m_currentMouth->setTextStr(locale.monthName(date.month(), QLocale::ShortFormat)); updateDate(); m_monthView->setDate(m_days); } void CYearView::setCellSelectable(bool selectable) { if (selectable == m_cellSelectable) return; m_cellSelectable = selectable; } int CYearView::getDateIndex(const QDate &date) const { for (int i = 0; i != DDEYearCalendar::RectSizeofEveyMonth; ++i) if (m_days[i] == date) return i; return 0; } bool CYearView::eventFilter(QObject *o, QEvent *e) { QWidget *cell = qobject_cast(o); if (cell == m_currentMouth) { if (e->type() == QEvent::MouseButtonDblClick) { emit signalselectMonth(m_currentDate); } } return false; } void CYearView::updateDate() { const QDate firstDay(m_currentDate.year(), m_currentDate.month(), 1); int offset = firstDay.dayOfWeek() % 7 - m_firstWeekDay ; const int day = offset <0 ?offset +7:offset; const int currentIndex = day + m_currentDate.day() - 1; if (currentIndex < 0) { return; } for (int i(0); i != DDEYearCalendar::RectSizeofEveyMonth; ++i) { m_days[i] = firstDay.addDays(i - day); } update(); } void CYearView::createYearSchceduleView(QWidget *parent) { if (m_Scheduleview == nullptr) { m_Scheduleview = new CYearSchceduleOutView(parent); connect(m_Scheduleview, &CYearSchceduleOutView::signalsViewSelectDate, this, &CYearView::signalselectWeekwindow); connect(m_Scheduleview, &CYearSchceduleOutView::signalupdateschcedule, this, &CYearView::signalupdateschcedule); } } void CYearView::resizeEvent(QResizeEvent *event) { int leftmagin = qFloor(width() * 0.06435 + 0.5); int rightmagin = leftmagin; int topmagin = qFloor(height() * 0.02955 + 0.5); int buttonmagin = qFloor(height() * 0.044 + 0.5); m_hhLayout->setContentsMargins(leftmagin, topmagin, rightmagin, buttonmagin); m_momthFont.setPixelSize(qFloor(16 + (height() - 159) / 16.75)); m_currentMouth->setTextFont(m_momthFont); m_currentMouth->setFixedHeight(24 + (height() - 159) / 12); m_currentMouth->update(); QFrame::resizeEvent(event); } void CYearView::mousePressEvent(QMouseEvent *event) { if (m_selectFlag) return; if (event->button() == Qt::LeftButton) { emit signalHideInfo(); } CustomFrame::mousePressEvent(event); } void CYearView::paintEvent(QPaintEvent *e) { Q_UNUSED(e); int labelwidth = width() - 2 * m_borderframew; int labelheight = height() - 2 * m_borderframew; QPainter painter(this); if (1) { painter.save(); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.setBrush(QBrush(m_bnormalColor)); painter.setPen(Qt::NoPen); QPainterPath painterPath; painterPath.moveTo(m_radius, m_borderframew); painterPath.arcTo(QRect(m_borderframew, m_borderframew, m_radius * 2, m_radius * 2), 90, 90); painterPath.lineTo(0, labelheight - m_radius); painterPath.arcTo(QRect(m_borderframew, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 180, 90); painterPath.lineTo(labelwidth - m_radius, labelheight); painterPath.arcTo(QRect(labelwidth - m_radius * 2, labelheight - m_radius * 2, m_radius * 2, m_radius * 2), 270, 90); painterPath.lineTo(labelwidth, m_radius); painterPath.arcTo(QRect(labelwidth - m_radius * 2, m_borderframew, m_radius * 2, m_radius * 2), 0, 90); painterPath.lineTo(m_radius, m_borderframew); painterPath.closeSubpath(); painter.drawPath(painterPath); painter.restore(); } } CYearMonthView::CYearMonthView(DWidget *parent) :DWidget (parent) { for (int i = 0; i < DDEYearCalendar::RectSizeofEveyMonth; ++i) { CMonthDayRect *item = new CMonthDayRect(); m_DayItem.append(item); } setMouseTracking(true); CMonthDayRect::setDevicePixelRatio(devicePixelRatioF()); } CYearMonthView::~CYearMonthView() { for (int i = 0; i setDate(date[i]); m_DayItem.at(i)->setIsCurrentMonth(date[i].month() == m_currentMonth); } } void CYearMonthView::setTheMe(int type) { CMonthDayRect::setTheMe(type); } void CYearMonthView::setLintFlag(const QVector &lineFlag) { m_vlineflag = lineFlag; if (m_vlineflag.size() == DDEYearCalendar::RectSizeofEveyMonth) { for (int i = 0; i < DDEYearCalendar::RectSizeofEveyMonth; i++) { m_DayItem.at(i)->setLineFlag(m_vlineflag.at(i)); } } } void CYearMonthView::updateSize() { qreal w = width()/7; qreal h = height()/6; QRectF rect ; int w_offset = 0; int h_offset = 0; for (int i = 0 ; i < m_DayItem.size(); ++i) { h_offset = i / 7; w_offset = i % 7; rect.setRect(w*w_offset, h*h_offset, w, h); m_DayItem.at(i)->setRect(rect); } update(); } int CYearMonthView::getMousePosItem(const QPointF &pos) { int res =-1; for (int i = 0 ; i < m_DayItem.size(); ++i) { if (m_DayItem.at(i)->rect().contains(pos)) { res = i; break; } } return res; } void CYearMonthView::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); updateSize(); } void CYearMonthView::mousePressEvent(QMouseEvent *event) { int itemindex = getMousePosItem(event->pos()); if (!(itemindex<0)) { m_DayItem.at(itemindex)->setCellEvent(CMonthDayRect::CellPress); m_press = true; if ( event->button() ==Qt::LeftButton) { m_pressIndex = itemindex; emit signalPressDate(m_DayItem.at(itemindex)->getDate()); } } update(); } void CYearMonthView::mouseDoubleClickEvent(QMouseEvent *event) { int itemindex = getMousePosItem(event->pos()); if (!(itemindex<0)) { if (m_pressIndex == itemindex) { m_DayItem.at(itemindex)->setCellEvent(CMonthDayRect::CellPress); m_press = true; if ( event->button() ==Qt::LeftButton) { emit signalDoubleClickDate(m_DayItem.at(itemindex)->getDate()); } } } } void CYearMonthView::mouseReleaseEvent(QMouseEvent *event) { m_press = false; mouseMoveEvent(event); } void CYearMonthView::mouseMoveEvent(QMouseEvent *event) { if (!m_press) { int itemindex = getMousePosItem(event->pos()); if (!(itemindex<0)) { m_DayItem.at(itemindex)->setCellEvent(CMonthDayRect::Cellhover); } update(); } } void CYearMonthView::paintEvent(QPaintEvent *event) { Q_UNUSED(event); QPainter painter(this); painter.setRenderHints(QPainter::Antialiasing |QPainter::SmoothPixmapTransform); for (int i = 0 ; i < m_DayItem.size(); ++i) { m_DayItem[i]->paintItem(&painter,m_DayItem[i]->rect()); } painter.end(); } void CYearMonthView::leaveEvent(QEvent *event) { Q_UNUSED(event); CMonthDayRect::setCurrentRect(nullptr); update(); } CMonthDayRect::CMonthDayRect() :m_rect(0,0,0,0) { m_dayNumFont.setPixelSize(DDECalendar::FontSizeTwelve); m_hightFont.setPixelSize(DDECalendar::FontSizeTwelve); } void CMonthDayRect::setTheMe(int type) { if (type ==2) { m_currentColor.hoverColor = "#FFFFFF"; m_currentColor.hoverColor.setAlphaF(0.1); m_currentColor.pressColor = "#252525"; m_currentColor.pressColor.setAlphaF(1); m_currentColor.normalColor = "#000000"; m_currentColor.normalColor.setAlphaF(0.00); m_ceventColor = QColor(204, 77, 3); m_notCurrentTextColor = "#C0C6D4"; m_notCurrentTextColor.setAlphaF(0.5); m_defaultTextColor = "#C0C6D4"; m_selectedTextColor = Qt::white; } else if (type == 0 || type == 1) { m_currentColor.hoverColor = "#000000"; m_currentColor.hoverColor.setAlphaF(0.05); m_currentColor.pressColor = "#000000"; m_currentColor.pressColor.setAlphaF(0.2); m_currentColor.normalColor = "#FFFFFF"; m_currentColor.normalColor.setAlphaF(1); m_ceventColor = QColor(255, 93, 0); m_selectedTextColor = Qt::white; m_defaultTextColor = Qt::black; m_notCurrentTextColor = "#b2b2b2"; } } CMonthDayRect::~CMonthDayRect() { } void CMonthDayRect::setDate(const QDate &date) { m_date = date; } QDate CMonthDayRect::getDate() const { return m_date; } void CMonthDayRect::setCellEvent(const CMonthDayRect::CellEventType &type) { m_cellEventType = type; m_CurrentRect = this; } void CMonthDayRect::setIsCurrentMonth(const bool isCurrMonth) { m_isCurrentMonth = isCurrMonth; } QRectF CMonthDayRect::rect() const { return m_rect; } void CMonthDayRect::setRect(const QRectF &rect) { m_rect = rect; } void CMonthDayRect::setRect(qreal x, qreal y, qreal w, qreal h) { m_rect.setRect(x,y,w,h); } void CMonthDayRect::paintItem(QPainter *painter, const QRectF &rect) { m_highColor = CScheduleDataManage::getScheduleDataManage()->getSystemActiveColor(); if (m_date.year() < DDECalendar::QueryEarliestYear) return; const bool isCurrentDay = m_date == QDate::currentDate() && m_isCurrentMonth; bool isSelectedCell = false; if (isCurrentDay) { isSelectedCell = true; } const qreal r = rect.width() > rect.height() ? rect.height() * 0.9 : rect.width() * 0.9 ; int fontsize = qRound(DDECalendar::FontSizeTwelve + (r - 18) * 6 / 17); if (fontsize < DDECalendar::FontSizeTwelve) { fontsize = DDECalendar::FontSizeTwelve; } m_dayNumFont.setPixelSize(fontsize); m_hightFont.setPixelSize(fontsize); const qreal x = rect.x()+(rect.width() - r) / 2; const qreal y = rect.y()+(rect.height() - r) / 2; QRectF fillRect = QRectF(x, y, r, r); QColor m_cellBackgroundColor; if (m_CurrentRect !=this) { m_cellEventType = CellNormal; } if (m_cellEventType == CellPress) { m_cellBackgroundColor = m_currentColor.pressColor; } else if (m_cellEventType == Cellhover) { m_cellBackgroundColor = m_currentColor.hoverColor; } else { m_cellBackgroundColor = m_currentColor.normalColor; } painter->setBrush(m_cellBackgroundColor); painter->setPen(Qt::NoPen); painter->drawEllipse(fillRect); bool highflag = false; if (m_isCurrentMonth) { highflag = CScheduleDataManage::getScheduleDataManage()->getSearchResult(m_date); } if (highflag) { painter->setBrush(QBrush(m_highColor)); painter->setPen(Qt::NoPen); painter->drawEllipse(fillRect); painter->setPen(Qt::SolidLine); painter->setPen(m_highTextColor); painter->setFont(m_hightFont); painter->drawText(fillRect, Qt::AlignCenter, QString::number(m_date.day())); } else { // draw selected cell background circle if (isSelectedCell) { painter->setBrush(QBrush(m_highColor)); painter->setPen(Qt::NoPen); painter->drawEllipse(fillRect); } painter->setPen(Qt::SolidLine); // draw text of day if (isSelectedCell) { painter->setPen(m_selectedTextColor); } else if (isCurrentDay) { painter->setPen(m_currentDayTextColor); } else { if (m_isCurrentMonth) painter->setPen(m_defaultTextColor); else painter->setPen(m_notCurrentTextColor); } painter->setFont(m_dayNumFont); painter->drawText(fillRect, Qt::AlignCenter, QString::number(m_date.day())); if (m_vlineflag) { painter->save(); painter->setRenderHint(QPainter::Antialiasing); painter->setRenderHint(QPainter::HighQualityAntialiasing); painter->setRenderHint(QPainter::SmoothPixmapTransform); QPen pen; pen.setWidth(2); pen.setColor(m_ceventColor); painter->setPen(pen); painter->setBrush(QBrush(m_ceventColor)); painter->setPen(Qt::NoPen); qreal r = rect.width() * (4 / 25); if (r < 4) { r = 4; } else if ( r > 7) { r = 7; } painter->drawEllipse(QRectF(rect.width() - r+rect.x(), rect.y(), r, r)); painter->restore(); } } } void CMonthDayRect::setLineFlag(const bool flag) { m_vlineflag = flag; } void CMonthDayRect::setDevicePixelRatio(const qreal pixel) { m_DevicePixelRatio = pixel; } void CMonthDayRect::setCurrentRect(CMonthDayRect *currrect) { m_CurrentRect = currrect; } dde-calendar-5.7.0.23/src/widget/yearWidget/yearview.h000066400000000000000000000304071375021633200224410ustar00rootroot00000000000000#ifndef YEARVIEW_H #define YEARVIEW_H #include "schedulestructs.h" #include "customframe.h" #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CalendarDBus; class CaLunarDayInfo; class QLabel; class CYearSchceduleView; class CYearSchceduleOutView; class WeekIndicator; /** * @brief The CalendarYearDayType enum */ enum CalendarYearDayType { SO_YFestival = QStyleOption::SO_CustomBase + 0x01, SO_YWeekends = QStyleOption::SO_CustomBase + 0x02, SO_YWeekendsAndFestival = SO_YFestival | SO_YWeekends, SO_YNotCurrentMonth = 0x04, SO_YNotCurrentMonthFestival = SO_YNotCurrentMonth | SO_YFestival, SO_YDefault, }; //#define M_FLAG 0; class CYearMonthView; class CYearView: public CustomFrame { Q_OBJECT Q_PROPERTY(QColor backgroundCircleColor MEMBER m_backgroundCircleColor DESIGNABLE true SCRIPTABLE true) Q_PROPERTY(QColor weekendsTextColor MEMBER m_weekendsTextColor DESIGNABLE true SCRIPTABLE true) Q_PROPERTY(QColor topBorderColor MEMBER m_topBorderColor DESIGNABLE true SCRIPTABLE true) Q_PROPERTY(bool cellSelectable READ cellSelectable WRITE setCellSelectable NOTIFY cellSelectableChanged) public: /** * @brief CYearView 构造函数 * @param parent 父类 */ explicit CYearView(QWidget *parent = nullptr); /** * @brief setFirstWeekday 设置日历每周是以周几开始的 * @param weekday 星期几 */ void setFirstWeekday(int weekday); /** * @brief cellSelectable * @return */ inline bool cellSelectable() const { return m_cellSelectable; } /** * @brief setTheMe 根据系统主题类型,设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief SchceduleViewHide 隐藏日程浮框 */ static void SchceduleViewHide(); /** * @brief getInfoAndSetLineFlag 获取日程信息,设置是否有日程的标志 */ void getInfoAndSetLineFlag(); signals: /** * @brief signalcurrentDateChanged 当前现实日期改变的信号 * @param date 传递日期参数 */ void signalcurrentDateChanged(QDate date); /** * @brief cellSelectableChanged * @param cellSelectable */ void cellSelectableChanged(bool cellSelectable) const; /** * @brief signaldoubleclickDate 鼠标双击日期的信号 * @param date 传递日期参数 */ void signaldoubleclickDate(QDate date); /** * @brief signalselectMonth 鼠标双击月份的信号 * @param date 传递日期参数 */ void signalselectMonth(QDate date); /** * @brief signalselectWeekwindow 选择周视图的信号 * @param date 传递日期参数 */ void signalselectWeekwindow(QDate date); /** * @brief signalupdateschcedule 更新日程的信号 */ void signalupdateschcedule(); /** * @brief signalHideInfo 隐藏日程浮框的信号 */ void signalHideInfo(); /** * @brief signalSelectInfo 设置选择是否选择日期的标志 * @param flag 是否选择日期 */ void signalSelectInfo(bool flag); public slots: /** * @brief setCurrentDate 设置当前的日期 * @param date 日期 * @param type */ void setCurrentDate(const QDate date, int type = 0); /** * @brief setCellSelectable * @param selectable */ void setCellSelectable(bool selectable); /** * @brief slotupdateSchedule 设置当前时间 * @param id */ void slotupdateSchedule(const int id); /** * @brief slotDoubleClickDate 隐藏日程浮框,并发出鼠标双击的信号 * @param date 传递时间参数 */ void slotDoubleClickDate(const QDate &date); /** * @brief slotPressClickDate 鼠标单击日期,显示日程浮框 * @param date 传递日程参数 */ void slotPressClickDate(const QDate &date); private: /** * @brief getDateIndex 根据日期找到在一个月中的位置索引 * @param date 比较的日期 * @return 索引 */ int getDateIndex(const QDate &date) const; /** * @brief eventFilter 过滤器,双击年视图下的月份跳转到月视图。 * @param o 事件对象 * @param e 事件类型 * @return false */ bool eventFilter(QObject *o, QEvent *e) override; /** * @brief updateDate 更新日期 */ void updateDate(); /** * @brief createYearSchceduleView 创建日程浮框对象,并连接信号和槽 * @param parent 父类 */ void createYearSchceduleView(QWidget *parent = nullptr); protected: /** * @brief resizeEvent 更新月份框的高度 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; /** * @brief mousePressEvent 单击鼠标发出隐藏日程浮框信号 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; protected: /** * @brief paintEvent 绘制每个月的背景 * @param e 绘图事件 */ void paintEvent(QPaintEvent *e) override; private: CustomFrame *m_currentMouth = nullptr; QDate m_days[42]; QDate m_currentDate; QStringList m_monthList; int m_selectedCell = -1; bool m_cellSelectable = true; QFont m_momthFont; QColor m_topBorderColor = Qt::red; QColor m_backgroundCircleColor = "#2ca7f8"; QColor m_currentDayTextColor = "#2ca7f8"; QColor m_weekendsTextColor = Qt::black; QColor m_festivalTextColor = Qt::black; QColor m_cellBackgroundColor = "#FFFFFF" ; int m_firstWeekDay = 0; QVBoxLayout *m_hhLayout = nullptr; int m_themetype = 1; QColor m_bnormalColor = "#FFFFFF"; const int m_radius = 8; const int m_borderframew = 0; static CYearSchceduleOutView *m_Scheduleview; bool m_selectFlag = false; QDate m_selectDate; QVector m_vlineflag; //节假日和日程标识 CYearMonthView *m_monthView = nullptr; QVector m_DateRangeInfo; }; class CMonthDayRect; class CYearMonthView : public DWidget { Q_OBJECT public: /** * @brief CYearMonthView 构造函数 * @param parent 父类 */ explicit CYearMonthView(DWidget *parent = nullptr); /** *@brief ~CYearMonthView 析构函数 */ ~CYearMonthView() override; /** * @brief setDate 设置每个月的日期 * @param date 日期 */ void setDate(const QDate date[42]); /** * @brief setTheMe 根据系统主题设置颜色 * @param type 系统主题 */ void setTheMe(int type = 0); /** * @brief setLintFlag 设置是否有日程的标志 * @param lineFlag 是否有日程的标志 */ void setLintFlag(const QVector &lineFlag); private: /** * @brief updateSize 设置每天的日期所在矩形框的大小 */ void updateSize(); /** * @brief getMousePosItem 获取点击日期的索引 * @param pos 点击的点 * @return 索引值 */ int getMousePosItem(const QPointF &pos); protected: /** * @brief resizeEvent 设置每天的日期所在矩形框的大小 * @param event 窗口大小调整函数 */ void resizeEvent(QResizeEvent *event) override; /** * @brief mousePressEvent 鼠标单击事件,单击日期显示当天的日程和节日。 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; /** * @brief mouseDoubleClickEvent 鼠标双击事件,双击跳转到上次打开的视图 * @param event 鼠标事件 */ void mouseDoubleClickEvent(QMouseEvent *event) override; /** * @brief mouseReleaseEvent 鼠标释放事件 * @param event 鼠标事件 */ void mouseReleaseEvent(QMouseEvent *event) override; /** * @brief mouseMoveEvent 鼠标移动事件,设置hover状态 * @param event 鼠标事件 */ void mouseMoveEvent(QMouseEvent *event) override; /** * @brief paintEvent 绘制日期以及当天状态 * @param event 绘图事件 */ void paintEvent(QPaintEvent *event) override; /** * @brief leaveEvent 离开事件,设置当前选中的日期为空 * @param event QT事件 */ void leaveEvent(QEvent *event) override; signals: /** * @brief signalPressDate 鼠标点击日期的信号 * @param date 传递时间参数 */ void signalPressDate(const QDate &date); /** * @brief signalDoubleClickDate 鼠标双击日期的信号 * @param date 传递时间参数 */ void signalDoubleClickDate(const QDate &date); private: QVector m_DayItem; int m_currentMonth =1; QVector m_vlineflag; //节假日和日程标识 bool m_press = false; int m_pressIndex =0; }; class CMonthDayRect { public: /** * @brief The CellEventType enum */ enum CellEventType { CellNormal = 0, Cellhover = 1, CellPress = 2 }; /** * @brief The CellColor struct */ struct CellColor { QColor normalColor; QColor hoverColor; QColor pressColor; }; /** * @brief CMonthDayRect 构造函数 */ CMonthDayRect(); /** * @brief ~CMonthDayRect 析构函数 */ ~CMonthDayRect(); /** * @brief setDate 设置某一天的时间 * @param date 时间 */ void setDate(const QDate &date); /** * @brief getDate 获取某一天的时间 * @return 时间 */ QDate getDate()const; /** * @brief setCellEvent 设置某一天的状态,CellEventType * @param type CellEventType类型 */ void setCellEvent(const CellEventType &type); /** * @brief setIsCurrentMonth 设置是否是当前月 * @param isCurrMonth 是否是当前月 */ void setIsCurrentMonth(const bool isCurrMonth); /** * @brief rect * @return 当天日期所在的矩形 */ QRectF rect() const; /** * @brief setRect 设置当天日期的矩形 * @param rect 矩形 */ void setRect(const QRectF &rect); /** * @brief setRect 设置当天日期的矩形 * @param x 设置矩形左上角的x坐标 * @param y 设置矩形左上角的y坐标 * @param w 设置矩形的宽度 * @param h 设置矩形的高度 */ inline void setRect(qreal x, qreal y, qreal w, qreal h); /** * @brief paintItem 绘制年视图一天的所有状态并展示出来。 * @param painter QPainter绘画 * @param rect 年视图中每一天所在的矩形 */ void paintItem(QPainter *painter, const QRectF &rect); /** * @brief setLineFlag 设置是否有日程的标志 * @param flag 标志 */ void setLineFlag(const bool flag); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ static void setTheMe(int type = 0); /** * @brief setDevicePixelRatio * @param pixel */ static void setDevicePixelRatio(const qreal pixel); /** * @brief setCurrentRect 设置当前天 * @param currrect 当前天 */ static void setCurrentRect(CMonthDayRect *currrect); private: QFont m_dayNumFont; QFont m_hightFont; int m_themetype = 0; CellEventType m_cellEventType {CellNormal}; QColor m_highColor = "#0081FF"; QColor m_highTextColor = "#FFFFFF"; bool m_vlineflag = false; QColor m_currentDayTextColor = "#2ca7f8"; static QColor m_defaultTextColor; static QColor m_selectedTextColor; static QColor m_notCurrentTextColor; static CellColor m_currentColor; static QColor m_ceventColor; static CMonthDayRect *m_CurrentRect; static qreal m_DevicePixelRatio; QRectF m_rect; QDate m_date; bool m_isCurrentMonth = false; }; #endif // YEARVIEW_H dde-calendar-5.7.0.23/src/widget/yearWidget/yearwindow.cpp000066400000000000000000000531271375021633200233350ustar00rootroot00000000000000/* * Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 "yearwindow.h" #include "yearview.h" #include "constants.h" #include "schcedulesearchview.h" #include "calendardbus.h" #include #include #include #include DGUI_USE_NAMESPACE CYearWindow::CYearWindow(QWidget *parent) : QMainWindow(parent) { initUI(); initConnection(); setWindowFlags(Qt::FramelessWindowHint);//去掉标题 setContentsMargins(0, 0, 0, 0); } CYearWindow::~CYearWindow() { } bool CYearWindow::eventFilter(QObject *watched, QEvent *event) { if (watched == m_today) { if (event->type() == QEvent::MouseButtonPress) { slottoday(); } } return QMainWindow::eventFilter(watched, event); } void CYearWindow::mousePressEvent(QMouseEvent *event) { m_YearWidget->slotHideInfo(); QMainWindow::mousePressEvent(event); } void CYearWindow::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); m_topWidget->setGeometry(0, 0, this->width(), DDEMonthCalendar::M_YTopHeight); if (m_searchfalg) { m_tmainLayout->setContentsMargins(10, 0, 2, 0); m_topWidget->setContentsMargins(10, 0, 2, 0); } else { m_tmainLayout->setContentsMargins(10, 0, 10, 0); m_topWidget->setContentsMargins(10, 0, 10, 0); } } void CYearWindow::setDate(QDate date) { if (!date.isValid()) return; m_YearWidget->setDate(date); m_YearWidget->slotcurrentDateChanged(date); emit signalCurrentDate(date); slotUpdateCurrentDate(date); } void CYearWindow::initUI() { m_contentBackground = new DFrame(this); DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setAutoFillBackground(true); m_contentBackground->setPalette(anipa); m_today = new QLabel(this); m_today->installEventFilter(this); QFont todayfont; todayfont.setPixelSize(DDECalendar::FontSizeSixteen); m_today->setFont(todayfont); m_today->setAlignment(Qt::AlignCenter); m_today->setText(QCoreApplication::translate("today", "Today", "Today")); m_today->setFixedWidth(88); m_today->setAutoFillBackground(true); m_today->setFixedHeight(DDEYearCalendar::Y_MLableHeight - 4); m_prevButton = new DIconButton(DStyle::SP_ArrowLeft, this); //设置对象名称和辅助显示名称 m_prevButton->setObjectName("PrevButton"); m_prevButton->setAccessibleName("PrevButton"); m_prevButton->setFixedWidth(DDEYearCalendar::Y_MLableHeight); m_prevButton->setFixedHeight(DDEYearCalendar::Y_MLableHeight); m_nextButton = new DIconButton(DStyle::SP_ArrowRight, this); //设置对象名称和辅助显示名称 m_nextButton->setObjectName("NextButton"); m_nextButton->setAccessibleName("NextButton"); m_nextButton->setFixedWidth(DDEYearCalendar::Y_MLableHeight); m_nextButton->setFixedHeight(DDEYearCalendar::Y_MLableHeight); m_YearLabel = new QLabel(this); m_YearLabel->setFixedHeight(DDEYearCalendar::Y_YLableHeight); QFont t_labelF; t_labelF.setWeight(QFont::Medium); t_labelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_YearLabel->setFont(t_labelF); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLunarLabel = new QLabel(m_contentBackground); m_YearLunarLabel->setFixedSize(DDEMonthCalendar::M_YLunatLabelWindth, DDEMonthCalendar::M_YLunatLabelHeight); QFont ylabelF; ylabelF.setWeight(QFont::Medium); ylabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_YearLunarLabel->setFont(ylabelF); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarDayLabel = new QLabel(m_contentBackground); m_YearLunarDayLabel->setFixedSize(108, DDEMonthCalendar::M_YLunatLabelHeight); m_YearLunarDayLabel->setFont(ylabelF); m_YearLunarDayLabel->setPalette(Lunapa); m_YearLunarDayLabel->setAlignment(Qt::AlignRight); QHBoxLayout *yeartitleLayout = new QHBoxLayout; yeartitleLayout->setMargin(0); yeartitleLayout->setSpacing(0); yeartitleLayout->setContentsMargins(11, 12, 8, 10); yeartitleLayout->addWidget(m_YearLabel); QHBoxLayout *yeartitleLayout1 = new QHBoxLayout; yeartitleLayout1->setMargin(0); yeartitleLayout1->setSpacing(0); yeartitleLayout1->setContentsMargins(4, 9, 0, 7); yeartitleLayout1->addWidget(m_YearLunarLabel); yeartitleLayout1->addSpacing(390); yeartitleLayout1->addStretch(); yeartitleLayout1->addWidget(m_YearLunarDayLabel, 0, Qt::AlignVCenter); m_todayframe = new CustomFrame(this); m_todayframe->setContentsMargins(0, 0, 0, 0); m_todayframe->setRoundState(true, true, true, true); m_todayframe->setBColor(Qt::white); m_todayframe->setFixedHeight(DDEYearCalendar::Y_MLableHeight); m_todayframe->setboreder(1); QHBoxLayout *todaylayout = new QHBoxLayout; todaylayout->setMargin(0); todaylayout->setSpacing(0); todaylayout->addWidget(m_prevButton); todaylayout->addWidget(m_today, 0, Qt::AlignCenter); todaylayout->addWidget(m_nextButton); m_todayframe->setLayout(todaylayout); yeartitleLayout1->addSpacing(10); yeartitleLayout1->addWidget(m_todayframe); yeartitleLayout->addLayout(yeartitleLayout1); m_topWidget = new DWidget(this); m_topWidget->setLayout(yeartitleLayout); YearWidget_First = new YearFrame(); YearWidget_Second = new YearFrame(); m_StackedWidget = new AnimationStackedWidget(AnimationStackedWidget::TB); m_StackedWidget->addWidget(YearWidget_First); m_StackedWidget->addWidget(YearWidget_Second); m_StackedWidget->setContentsMargins(0, 0, 0, 0); m_StackedWidget->setDuration(600); m_YearWidget = qobject_cast(m_StackedWidget->widget(0)); QVBoxLayout *hhLayout = new QVBoxLayout; hhLayout->setMargin(0); hhLayout->setSpacing(0); hhLayout->setContentsMargins(0, 0, 0, 0); hhLayout->addWidget(m_StackedWidget); m_tmainLayout = new QHBoxLayout; m_tmainLayout->setMargin(0); m_tmainLayout->setSpacing(0); m_tmainLayout->setContentsMargins(10, 0, 10, 0); m_tmainLayout->addLayout(hhLayout); m_contentBackground->setContentsMargins(0, 0, 0, 0); m_contentBackground->setLayout(m_tmainLayout); setCentralWidget(m_contentBackground); } void CYearWindow::initConnection() { connect(m_prevButton, &DIconButton::clicked, this, &CYearWindow::slotprev); connect(m_nextButton, &DIconButton::clicked, this, &CYearWindow::slotnext); connect(YearWidget_First, &YearFrame::signaldoubleclickDate, this, &CYearWindow::signaldoubleclickDate); connect(YearWidget_Second, &YearFrame::signaldoubleclickDate, this, &CYearWindow::signaldoubleclickDate); connect(YearWidget_First, &YearFrame::signalselectMonth, this, &CYearWindow::signalselectMonth); connect(YearWidget_Second, &YearFrame::signalselectMonth, this, &CYearWindow::signalselectMonth); connect(YearWidget_First, &YearFrame::signalselectWeekwindow, this, &CYearWindow::signalselectWeekwindow); connect(YearWidget_Second, &YearFrame::signalselectWeekwindow, this, &CYearWindow::signalselectWeekwindow); connect(YearWidget_First, &YearFrame::signalUpdateYearDate, this, &CYearWindow::slotUpdateCurrentDate); connect(YearWidget_Second, &YearFrame::signalUpdateYearDate, this, &CYearWindow::slotUpdateCurrentDate); connect(YearWidget_First, &YearFrame::signalupdateschcedule, this, &CYearWindow::signalupdateschcedule); connect(m_StackedWidget, &AnimationStackedWidget::signalIsFinished, this, &CYearWindow::setYearData); } void CYearWindow::setLunarVisible(bool state) { m_YearLunarLabel->setVisible(state); m_YearLunarDayLabel->setVisible(state); } void CYearWindow::setTheMe(int type) { if (type == 0 || type == 1) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#F8F8F8"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette todaypa = m_today->palette(); todaypa.setColor(DPalette::WindowText, QColor("#000000")); todaypa.setColor(DPalette::Background, Qt::white); m_today->setPalette(todaypa); m_today->setForegroundRole(DPalette::WindowText); m_today->setBackgroundRole(DPalette::Background); m_todayframe->setBColor(Qt::white); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); m_YearLunarDayLabel->setPalette(Lunapa); m_YearLunarDayLabel->setForegroundRole(DPalette::WindowText); } else if (type == 2) { DPalette anipa = m_contentBackground->palette(); anipa.setColor(DPalette::Background, "#252525"); m_contentBackground->setPalette(anipa); m_contentBackground->setBackgroundRole(DPalette::Background); DPalette todaypa = m_today->palette(); todaypa.setColor(DPalette::WindowText, QColor("#C0C6D4")); QColor tbcolor = "#414141"; tbcolor.setAlphaF(0.0); todaypa.setColor(DPalette::Background, tbcolor); m_today->setPalette(todaypa); m_today->setForegroundRole(DPalette::WindowText); m_today->setBackgroundRole(DPalette::Background); QColor tbcolor2 = "#414141"; tbcolor2.setAlphaF(0.3); m_todayframe->setBColor(tbcolor2); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#C0C6D4")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#798BA8")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); m_YearLunarDayLabel->setPalette(Lunapa); m_YearLunarDayLabel->setForegroundRole(DPalette::WindowText); } YearWidget_First->setTheMe(type); YearWidget_Second->setTheMe(type); DPalette palette = m_topWidget->palette(); palette.setBrush(DPalette::WindowText, palette.color(DPalette::Window)); m_topWidget->setAutoFillBackground(true); m_topWidget->setPalette(palette); } void CYearWindow::setSearchWFlag(bool flag) { m_searchfalg = flag; m_YearWidget->setSearchWFlag(flag); } void CYearWindow::clearSearch() { } void CYearWindow::getScheduleInfo() { m_YearWidget->getInfoAndSetLineFlag(); } void CYearWindow::slotTransitSearchSchedule(int id) { emit signalsWUpdateShcedule(this, id); } void CYearWindow::slotSetSchceduleHide() { m_YearWidget->slotHideInfo(); } void CYearWindow::slotprev() { m_YearWidget->slotHideInfo(); if (m_currentdate.year() == DDECalendar::QueryEarliestYear) return; if (m_StackedWidget->IsRunning()) return; QDate tcurrent = QDate(m_currentdate.year() - 1, m_currentdate.month(), m_currentdate.day()); if (!tcurrent.isValid()) { m_currentdate = QDate(m_currentdate.year() - 1, m_currentdate.month(), 1); } else { m_currentdate = tcurrent; } if (m_currentdate.year() >= DDECalendar::QueryEarliestYear) { int index = m_StackedWidget->currentIndex(); index = qAbs(index - 1) % 2; m_YearWidget = qobject_cast(m_StackedWidget->widget(index)); m_YearWidget->setDate(m_currentdate); m_StackedWidget->setPre(); emit signalCurrentDate(m_currentdate); } else { } } void CYearWindow::slotnext() { m_YearWidget->slotHideInfo(); if (m_StackedWidget->IsRunning()) return; QDate tcurrent = QDate(m_currentdate.year() + 1, m_currentdate.month(), m_currentdate.day()); if (!tcurrent.isValid()) { m_currentdate = QDate(m_currentdate.year() + 1, m_currentdate.month(), 1); } else { m_currentdate = tcurrent; } int index = m_StackedWidget->currentIndex(); index = (index + 1) % 2; m_YearWidget = qobject_cast(m_StackedWidget->widget(index)); m_YearWidget->setDate(m_currentdate); m_StackedWidget->setNext(); emit signalCurrentDate(m_currentdate); } void CYearWindow::slottoday() { m_YearWidget->slotHideInfo(); emit signalsReturnTodayUpdate(this); setDate(QDate::currentDate()); } void CYearWindow::slotReturnTodayUpdate() { } void CYearWindow::slotupdateSchedule(const int id) { m_YearWidget->slotupdateSchedule(id); } void CYearWindow::slotUpdateCurrentDate(const QDate &date) { m_currentdate = date; setYearData(); } void CYearWindow::setYearData() { if (m_currentdate == QDate::currentDate()) { m_today->setText(QCoreApplication::translate("today", "Today", "Today")); } else { m_today->setText(QCoreApplication::translate("Return", "Today", "Return")); } QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(m_currentdate.year()) + tr("Y")); } else { m_YearLabel->setText(QString::number(m_currentdate.year())); } m_YearLunarLabel->setText(m_YearWidget->getLunarYear()); m_YearLunarDayLabel->setText(m_YearWidget->getLunarDay()); } void CYearWindow::slotsearchDateSelect(QDate date) { setDate(date); } void CYearWindow::wheelEvent(QWheelEvent *event) { if (event->delta() < 0) { slotnext(); } else { slotprev(); } } YearFrame::YearFrame(DWidget *parent) : DFrame(parent) { m_DBusInter = new CalendarDBus("com.deepin.api.LunarCalendar", "/com/deepin/api/LunarCalendar", QDBusConnection::sessionBus(), this); QGridLayout *gridLayout = new QGridLayout; gridLayout->setMargin(0); gridLayout->setSpacing(8); gridLayout->setContentsMargins(0, 0, 0, 0); for (int i = 0; i < 3; i++) { for (int j = 0; j < 4; j++) { CYearView *view = new CYearView(this); connect(view, &CYearView::signalcurrentDateChanged, this, &YearFrame::slotcurrentDateChanged); connect(view, &CYearView::signaldoubleclickDate, this, &YearFrame::signaldoubleclickDate); connect(view, &CYearView::signalselectWeekwindow, this, &YearFrame::signalselectWeekwindow); connect(view, &CYearView::signalupdateschcedule, this, &YearFrame::signalupdateschcedule); connect(view, &CYearView::signalselectMonth, this, &YearFrame::signalselectMonth); connect(view, &CYearView::signalHideInfo, this, &YearFrame::slotHideInfo); connect(view, &CYearView::signalSelectInfo, this, &YearFrame::slotSelectInfo); gridLayout->addWidget(view, i, j); m_monthViewList.append(view); } } m_YearLabel = new QLabel(this); m_YearLabel->setFixedHeight(DDEYearCalendar::Y_YLableHeight); QFont t_labelF; t_labelF.setWeight(QFont::Medium); t_labelF.setPixelSize(DDECalendar::FontSizeTwentyfour); m_YearLabel->setFont(t_labelF); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLunarLabel = new QLabel(); m_YearLunarLabel->setFixedSize(DDEMonthCalendar::M_YLunatLabelWindth, DDEMonthCalendar::M_YLunatLabelHeight); QFont ylabelF; ylabelF.setWeight(QFont::Medium); ylabelF.setPixelSize(DDECalendar::FontSizeFourteen); m_YearLunarLabel->setFont(ylabelF); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); QHBoxLayout *yeartitleLayout = new QHBoxLayout; yeartitleLayout->setMargin(0); yeartitleLayout->setSpacing(0); yeartitleLayout->setContentsMargins(11, 12, 8, 10); yeartitleLayout->addWidget(m_YearLabel); QHBoxLayout *yeartitleLayout1 = new QHBoxLayout; yeartitleLayout1->setMargin(0); yeartitleLayout1->setSpacing(0); yeartitleLayout1->setContentsMargins(4, 9, 0, 7); yeartitleLayout1->addWidget(m_YearLunarLabel); yeartitleLayout1->addSpacing(390); yeartitleLayout1->addStretch(); yeartitleLayout1->addSpacing(10); yeartitleLayout->addLayout(yeartitleLayout1); m_topWidget = new DWidget(); m_topWidget->setLayout(yeartitleLayout); m_topWidget->setFixedHeight(DDEMonthCalendar::M_YTopHeight); QVBoxLayout *hhLayout = new QVBoxLayout; hhLayout->setMargin(0); hhLayout->setSpacing(0); hhLayout->setContentsMargins(0, 0, 0, 0); hhLayout->addWidget(m_topWidget); hhLayout->addLayout(gridLayout); this->setLayout(hhLayout); setContentsMargins(0, 0, 0, 10); setFrameRounded(true); } YearFrame::~YearFrame() { } void YearFrame::setDate(QDate &date) { if (!date.isValid()) return; m_currentdate = date; for (int i = 0; i < DDEYearCalendar::FrameSizeofEveryYear; i++) { QDate tdate(m_currentdate.year(), i + 1, 1); m_monthViewList.at(i)->setCurrentDate(tdate, 0); } for (int i = 0; i < DDEYearCalendar::FrameSizeofEveryYear; i++) { QDate tdate(m_currentdate.year(), i + 1, 1); if (date.year() == tdate.year() && date.month() == tdate.month()) { m_monthViewList.at(i)->setCurrentDate(date, 1); break; } } getLunarData(); } void YearFrame::getInfoAndSetLineFlag() { for (int i = 0; i < DDEYearCalendar::FrameSizeofEveryYear; i++) { m_monthViewList.at(i)->getInfoAndSetLineFlag(); } } void YearFrame::setTheMe(int type) { if (type == 0 || type == 1) { DPalette gpa = palette(); gpa.setColor(DPalette::Background, "#F8F8F8"); setPalette(gpa); setBackgroundRole(DPalette::Background); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#3B3B3B")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#8A8A8A")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); } else if (type == 2) { DPalette gpa = palette(); gpa.setColor(DPalette::Background, "#252525"); setPalette(gpa); setBackgroundRole(DPalette::Background); DPalette pa = m_YearLabel->palette(); pa.setColor(DPalette::WindowText, QColor("#C0C6D4")); m_YearLabel->setPalette(pa); m_YearLabel->setForegroundRole(DPalette::WindowText); DPalette Lunapa = m_YearLunarLabel->palette(); Lunapa.setColor(DPalette::WindowText, QColor("#798BA8")); m_YearLunarLabel->setPalette(Lunapa); m_YearLunarLabel->setForegroundRole(DPalette::WindowText); } for (int i = 0; i < DDEYearCalendar::FrameSizeofEveryYear; i++) { m_monthViewList.at(i)->setTheMe(type); } } void YearFrame::setSearchWFlag(bool flag) { m_searchfalg = flag; } void YearFrame::getLunarData() { bool o1 = true; QDBusReply replydd = m_DBusInter->GetLunarInfoBySolar(m_currentdate.year(), m_currentdate.month(), m_currentdate.day(), o1); CaLunarDayInfo currentDayInfo = replydd.value(); m_LunarYear = QString("-%0%1年-").arg(currentDayInfo.mGanZhiYear).arg(currentDayInfo.mZodiac); m_LunarDay = QString("-农历%0%1-").arg(currentDayInfo.mLunarMonthName).arg(currentDayInfo.mLunarDayName); QLocale locale; if (locale.language() == QLocale::Chinese) { m_YearLabel->setText(QString::number(m_currentdate.year()) + tr("Y")); m_YearLunarLabel->setText(m_LunarYear); } else { m_YearLabel->setText(QString::number(m_currentdate.year())); m_YearLunarLabel->setText(""); } } void YearFrame::mousePressEvent(QMouseEvent *event) { if (m_selectFlag) return; if (event->button() == Qt::LeftButton) { slotHideInfo(); } } void YearFrame::slotcurrentDateChanged(QDate date) { m_currentdate = date; getLunarData(); emit signalUpdateYearDate(date); } void YearFrame::slotHideInfo() { CYearView::SchceduleViewHide(); } void YearFrame::slotSelectInfo(bool flag) { m_selectFlag = flag; } void YearFrame::slotupdateSchedule(const int id) { for (int i =0; i < m_monthViewList.size(); ++i) { m_monthViewList.at(i)->slotupdateSchedule(id); } } void YearFrame::slotSetSchceduleHide() { CYearView::SchceduleViewHide(); } dde-calendar-5.7.0.23/src/widget/yearWidget/yearwindow.h000066400000000000000000000231761375021633200230030ustar00rootroot00000000000000/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya * * 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 * 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 YEARWINDOW_H #define YEARWINDOW_H #include "animationstackedwidget.h" #include "calendardbus.h" #include #include #include #include #include #include #include #include #include #include DWIDGET_USE_NAMESPACE class CYearView; class CaLunarDayInfo; class CSchceduleSearchView; class YearFrame; class CustomFrame; class CYearWindow: public QMainWindow { Q_OBJECT public: explicit CYearWindow(QWidget *parent = nullptr); ~CYearWindow() override; /** * @brief setDate 设置年视图当前显示的时间 * @param date 年视图当前显示的时间 */ void setDate(QDate date); /** * @brief initUI 初始化年视图的界面显示 */ void initUI(); /** * @brief initConnection 初始化信号和槽的连接 */ void initConnection(); /** * @brief setLunarVisible 设置年视图是否显示阴历信息 * @param state 是否显示阴历信息 */ void setLunarVisible(bool state); /** * @brief setTheMe 设置系统主题 * @param type 主题类型 */ void setTheMe(int type = 0); /** * @brief setSearchWFlag 设置是否在进行搜索 * @param flag 是否所搜的标志 */ void setSearchWFlag(bool flag); /** * @brief clearSearch */ void clearSearch(); /** * @brief getScheduleInfo 判断一年中每一天是否有日程信息 */ void getScheduleInfo(); signals: /** * @brief dateSelected * @param date * @param detail */ void dateSelected(const QDate date, const CaLunarDayInfo &detail) const; /** * @brief signalsReturnTodayUpdate 点击返回今天按钮发出信号 * @param w 年视图窗口 */ void signalsReturnTodayUpdate(QMainWindow *w); /** * @brief signalsWUpdateShcedule * @param w * @param id */ void signalsWUpdateShcedule(QMainWindow *w, int id = 0); /** * @brief signaldoubleclickDate 双击鼠标发出信号 * @param date 双击的日期 */ void signaldoubleclickDate(QDate date); /** * @brief signalselectMonth 鼠标选择的日期信号 * @param date 选择的日期 */ void signalselectMonth(QDate date); /** * @brief signalselectWeekwindow 选择周视图的信号 * @param date 选择的日期 */ void signalselectWeekwindow(QDate date); /** * @brief signalCurrentDate 设置当前时间的信号 * @param date 当前时间 */ void signalCurrentDate(QDate date); /** * @brief signalupdateschcedule 更新日程的信号 */ void signalupdateschcedule(); private slots: /** * @brief slotprev 通过鼠标点击左箭头切换到上一年,刷新年视图下的所有内容,并隐藏日程展示浮窗。 */ void slotprev(); /** * @brief slotnext 通过鼠标点击右箭头切换到下一年,并刷新年视图下的所有内容,并隐藏日程展示浮窗。 */ void slotnext(); /** * @brief slottoday 通过鼠标点击返回今天按钮返回到今天,并刷新年视图下的所有内容,并隐藏日程展示浮窗。 */ void slottoday(); /** * @brief slotsearchDateSelect 设置选择的时间 * @param date 时间 */ void slotsearchDateSelect(QDate date); /** * @brief slotTransitSearchSchedule * @param id */ void slotTransitSearchSchedule(int id = 0); public slots: /** * @brief slotSetSchceduleHide 隐藏日程浮框 */ void slotSetSchceduleHide(); /** * @brief slotReturnTodayUpdate */ void slotReturnTodayUpdate(); /** * @brief slotupdateSchedule 更新当前时间 * @param id */ void slotupdateSchedule(const int id); /** * @brief setYearData 设置年视图阴历和按钮信息 */ void setYearData(); /** * @brief slotUpdateCurrentDate 设置年视图当前时间的信息 * @param date 时间 */ void slotUpdateCurrentDate(const QDate &date); protected: /** * @brief wheelEvent 通过鼠标中间的滚轮滚动切换年份,并刷新年视图下的所有内容。 * @param event 鼠标滚轮事件 */ void wheelEvent(QWheelEvent *event) override; /** * @brief eventFilter 过滤器,过滤返回今天的按钮事件 * @param watched 事件对象 * @param event 事件类型 * @return false */ bool eventFilter(QObject *watched, QEvent *event) override; /** * @brief mousePressEvent 鼠标单击事件,单击日期区域外,隐藏日程浮框 * @param event 鼠标事件 */ void mousePressEvent(QMouseEvent *event) override; /** * @brief resizeEvent 窗口大小调整事件,搜索时,调整边框大小 * @param event 窗口大小调整事件 */ void resizeEvent(QResizeEvent *event) override; private: DFrame *m_contentBackground = nullptr; DIconButton *m_prevButton = nullptr; DIconButton *m_nextButton = nullptr; QLabel *m_today = nullptr; QDate m_currentdate; QLabel *m_YearLabel = nullptr; QLabel *m_YearLunarLabel = nullptr; QLabel *m_YearLunarDayLabel = nullptr; YearFrame *m_YearWidget = nullptr; YearFrame *YearWidget_First = nullptr; YearFrame *YearWidget_Second = nullptr; CustomFrame *m_todayframe = nullptr; AnimationStackedWidget *m_StackedWidget = nullptr; QHBoxLayout *m_tmainLayout = nullptr; QString m_searchText; bool m_searchfalg = false; DWidget *m_topWidget = nullptr; }; class YearFrame : public DFrame { Q_OBJECT public: /** * @brief YearFrame 构造函数 * @param parent 父类 */ explicit YearFrame(DWidget *parent = nullptr); /** *@brief ~YearFrame 析构函数 */ ~YearFrame() override; /** * @brief setDate 设置当前时间 * @param date 时间 */ void setDate(QDate &date); /** * @brief getInfoAndSetLineFlag 获取日程信息,设置是否有日程的标志 */ void getInfoAndSetLineFlag(); /** * @brief setTheMe 根据系统主题类型设置颜色 * @param type 系统主题类型 */ void setTheMe(int type = 0); /** * @brief setSearchWFlag 设置搜索的标志 * @param flag 是否进行了搜索 */ void setSearchWFlag(bool flag); /** * @brief getLunarYear 获取阴历年信息 * @return 阴历年信息字符串 */ QString getLunarYear()const { return m_LunarYear; } /** * @brief getLunarDay 获取阴历日信息 * @return 阴历日信息字符串 */ QString getLunarDay()const { return m_LunarDay; } /** * @brief getLunarData 更新当天的农历年份数据。 */ void getLunarData(); protected: /** * @brief mousePressEvent 鼠标单击日期区域外隐藏日程浮框 * @param event 鼠标单击事件 */ void mousePressEvent(QMouseEvent *event) override; signals: /** * @brief signaldoubleclickDate 鼠标双击的信号 * @param date 传递日期参数 */ void signaldoubleclickDate(QDate date); /** * @brief signalselectWeekwindow 选择周视图的信号 * @param date 传递日期参数 */ void signalselectWeekwindow(QDate date); /** * @brief signalselectMonth 选择月视图的信号 * @param date 传递日期参数 */ void signalselectMonth(QDate date); /** * @brief signalUpdateYearDate 更新年视图的信号 * @param date 传递日期参数 */ void signalUpdateYearDate(const QDate &date); /** * @brief signalupdateschcedule 更新日程的信号 */ void signalupdateschcedule(); public slots: /** * @brief slotHideInfo 隐藏日程浮框 */ void slotHideInfo(); /** * @brief slotSelectInfo 设置是否选择了日期的标志 * @param flag 是否选择了如期 */ void slotSelectInfo(bool flag); /** * @brief slotupdateSchedule 更新日程 * @param id */ void slotupdateSchedule(const int id); /** * @brief slotSetSchceduleHide 隐藏日程浮框 */ void slotSetSchceduleHide(); /** * @brief slotcurrentDateChanged 设置当前时间 * @param date 时间 */ void slotcurrentDateChanged(QDate date); private: QList m_monthViewList; QLabel *m_YearLabel = nullptr; QLabel *m_YearLunarLabel = nullptr; CalendarDBus *m_DBusInter = nullptr; QDate m_currentdate; bool m_searchfalg = false; bool m_selectFlag = false; QString m_LunarYear; QString m_LunarDay; DWidget *m_topWidget = nullptr; }; #endif // YEARWINDOW_H dde-calendar-5.7.0.23/translations/000077500000000000000000000000001375021633200167745ustar00rootroot00000000000000dde-calendar-5.7.0.23/translations/dde-calendar.ts000066400000000000000000000453561375021633200216640ustar00rootroot00000000000000 CDayMonthView Monday 星期一 Tuesday 星期二 Wednesday 星期三 Thursday 星期四 Friday 星期五 Saturday 星期六 Sunday 星期天 CDayWindow Y D M CGraphicsView New Event CMonthGraphiview Delete 删除 You are deleting an event. Are you sure you want to delete this event? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView Cancel 取消 Edit 编辑 Delete 删除 You are deleting an event. Are you sure you want to delete this event? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event OK 确定 Delete All Future Events CSchceduleDlg Type: 类型: Cancel 取消 All Day: 全天: Repeat: 重复: End Repeat: 结束重复: OK 确定 New Event Edit Event End time must be greater than start time All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) New event Type All Day Starts Ends Remind Me: Remind Me Repeat Daily Weekdays Weekly Monthly Yearly End Repeat After On time(s) Save Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit 编辑 Delete 删除 Cancel 取消 You are deleting an event. Are you sure you want to delete this event? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results 无搜索结果 CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView No event All Day CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Y M W D Calendar CenterWidget All Day DragInfoGraphicsView Edit 编辑 Delete 删除 New event You are deleting an event. Are you sure you want to delete this event? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return 今天 Return Today Today Return Today 今天 Shortcut Help Delete event Copy Cut Paste Delete 删除 Select all YearFrame Y today Today Today 今天 dde-calendar-5.7.0.23/translations/dde-calendar_ady.ts000066400000000000000000000461001375021633200225050ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_af.ts000066400000000000000000000456521375021633200223310ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Verwyder You are deleting an event. Are you sure you want to delete this event? Cancel Kanselleer Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Kanselleer Delete Verwyder Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Stel OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Kanselleer Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Nooit At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Tipe: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Stoor New event End time must be greater than start time OK OK Type Tipe All Day Starts Ends Remind Me Repeat Herhaal End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Stel Delete Verwyder You are deleting an event. Are you sure you want to delete this event? Cancel Kanselleer Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Stel Delete Verwyder New event You are deleting an event. Are you sure you want to delete this event? Cancel Kanselleer Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Kopieer Cut Paste Select all Delete Verwyder YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_ak.ts000066400000000000000000000457711375021633200223400ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_am_ET.ts000066400000000000000000000454761375021633200227340ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y Y M M D CGraphicsView New Event CMonthGraphiview Delete ማጥፊያ You are deleting an event. Are you sure you want to delete this event? Cancel መሰረዣ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel መሰረዣ Delete ማጥፊያ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit ማረሚያ OK እሺ Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel መሰረዣ Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never በፍጹም At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: አይነት: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On ማብሪያ time(s) Save ማስቀመጫ New event End time must be greater than start time OK እሺ Type አይነት All Day Starts Ends Remind Me Repeat መድገሚያ End Repeat Ends: Description: Description መግለጫ Starts: Work Life Other ለላ CSchceduleSearchDateItem Y Y M M D CSchceduleSearchItem Edit ማረሚያ Delete ማጥፊያ You are deleting an event. Are you sure you want to delete this event? Cancel መሰረዣ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results ምንም መፈለጊያ የለም CScheduleView ALL DAY CWeekWindow Week Y Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y Y CalendarWindow Calendar ቀን መቁጠሪያ Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar ቀን መቁጠሪያ Y Y M M W D CenterWidget All Day DragInfoGraphicsView Edit ማረሚያ Delete ማጥፊያ New event You are deleting an event. Are you sure you want to delete this event? Cancel መሰረዣ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return ዛሬ Return Today Today Return Today ዛሬ Shortcut Help እርዳታ Delete event Copy ኮፒ Cut መቁረጫ Paste መለጠፊያ Select all ሁሉንም መምረጫ Delete ማጥፊያ YearFrame Y Y today Today Today ዛሬ dde-calendar-5.7.0.23/translations/dde-calendar_ar.ts000066400000000000000000000510351375021633200223350ustar00rootroot00000000000000 CDayMonthView Monday الاثنين Tuesday الثلاثاء Wednesday الأربعاء Thursday الخميس Friday الجمعة Saturday السبت Sunday الأحد CDayWindow Y السنة M الشهر D اليوم CGraphicsView New Event حدث جديد CMonthGraphiview Delete حذف You are deleting an event. أنت تحذف الآن الحدث Are you sure you want to delete this event? هل أنت متأكد من حذف هذا الحدث؟ Cancel إلغاء Do you want to delete all occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات في هذا الحدث أو الفعاليات المحددة فقط؟ Delete All حذف الكل Delete Only This Event حذف هذا الحدث فقط Do you want to delete this and all future occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات المستقبلية لهذا الحدث، أو الفعاليات المحددة فقط؟ Delete All Future Events حذف جميع الأحداث المستقبلية CMonthSchceduleNumButton %1 more أكثر من 1% CMonthView New event حدث جديد New Event حدث جديد CMonthWindow Y السنة CMySchceduleView You are deleting an event. أنت الآن تحذف الحدث Are you sure you want to delete this event? هل أنت متأكد من حذف هذا الحدث؟ Cancel إلغاء Delete حذف Do you want to delete all occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات لهذا الحدث أو الفعاليات المحددة فقط؟ Delete All حذف الكل Delete Only This Event حذف هذا الحدث فقط Do you want to delete this and all future occurrences of this event, or only the selected occurrence? هل تريد حذف هذه الفعالية لهذا الحدث وجميع الفعاليات المستقبلية أو حذف المحددة فقط؟ My Event أحداثي Edit تحرير OK موافق Delete All Future Events حذف جميع الأحداث المستقبلية CSchceduleDlg New Event حدث جديد Edit Event تحرير حدث All occurrences of a repeating event must have the same all-day status. يجب على جميع الفعاليات المتكررة في نفس الحدث أن تكون بنفس الحالة طوال اليوم Do you want to change all occurrences? هل تريد تغيير جميع الفعاليات؟ Cancel إلغاء Change All تغيير الكل You are changing the repeating rule of this event. انت تقوم الآن بتغيير القاعدة المتكررة لهذا الحدث You are changing a repeating event. انت تقوم الآن بتغيير حدث متكرر Do you want to change only this occurrence of the event, or all occurrences? هل انت متأكد من حذف جميع الفعاليات لهذا الحدث أو الفعاليات المحددة فقط؟ All الكل Only This Event فقط هذا الحدث Do you want to change only this occurrence of the event, or this and all future occurrences? هل تريد تغيير هذه الفعالية فقط في هذا الحدث أو هذه الفعالية مع جميع الفعاليات المستقبلية All Future Events جميع الفعاليات المستقبلية Never أبداً At time of event في وقت الحدث 15 minutes before قبل 15 دقيقة 30 minutes before قبل 30 دقيقة 1 hour before قبل ساعة واحدة 1 1 day before قبل يوم واحد 1 2 days before قبل يومين 2 1 week before قبل أسبوع واحد 1 On start day (9:00 AM) بداية اليوم (9:00 AM) Type: النوع: All Day: طوال اليوم Remind Me: ذكرني: Repeat: كرر: Daily يومياً Weekdays أيام الأسبوع Weekly أسبوعياً Monthly شهرياً Yearly سنوياً End Repeat: نهاية التكرار After بعد On في time(s) الوقت (الأوقات) Save حفظ New event حدث جديد End time must be greater than start time وقت النهاية يجب أن يكون أعلى من وقت البداية OK حسناً Type النوع All Day طوال اليوم Starts يبدأ: Ends ينتهي: Remind Me ذكرني Repeat تكرار End Repeat نهاية التكرار Ends: ينتهي: Description: الوصف: Description الوصف Starts: يبدأ: Work عمل Life حياة Other أخرى CSchceduleSearchDateItem Y السنة M الشهر D اليوم CSchceduleSearchItem Edit تحرير Delete حذف You are deleting an event. أنت الآن تحذف الحدث Are you sure you want to delete this event? هل أنت متأكد من حذف هذا الحدث؟ Cancel إلغاء Do you want to delete all occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات لهذا الحدث أو الفعاليات المحددة فقط؟ Delete All حذف الكل Delete Only This Event حذف هذا الحدث فقط Do you want to delete this and all future occurrences of this event, or only the selected occurrence? هل تريد حذف هذه الفعالية لهذا الحدث وجميع الفعاليات المستقبلية أو حذف المحددة فقط؟ Delete All Future Events حذف جميع الأحداث المستقبلية All Day طوال اليوم CSchceduleSearchView No search results لا توجد نتائج للبحث CScheduleView ALL DAY طوال اليوم CWeekWindow Week الأسبوع Y السنة CYearSchceduleItem All Day طوال اليوم CYearSchceduleView All Day طوال اليوم No event لا توجد أحداث CYearWindow Y السنة CalendarWindow Calendar التقويم Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. التقويم هو برنامج لعرض التواريخ وللتخطيط الذكي لجميع الأشياء في الحياة Calendarmainwindow Calendar التقويم Y السنة M الشهر W الأسبوع D اليوم CenterWidget All Day طوال اليوم DragInfoGraphicsView Edit تحرير Delete حذف New event حدث جديد You are deleting an event. أنت تحذف الآن الحدث Are you sure you want to delete this event? هل أنت متأكد من حذف هذا الحدث؟ Cancel إلغاء Do you want to delete all occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات في هذا الحدث أو الفعاليات المحددة فقط؟ Delete All حذف الكل Delete Only This Event حذف هذا الحدث فقط Do you want to delete this and all future occurrences of this event, or only the selected occurrence? هل تريد حذف جميع الفعاليات المستقبلية لهذا الحدث، أو الفعاليات المحددة فقط؟ Delete All Future Events حذف جميع الأحداث المستقبلية New Event حدث جديد Return Today Return اليوم Return Today Today Return Today اليوم Shortcut Help مساعدة Delete event حذف حدث Copy نسخ Cut قص Paste لصق Select all تحديد الكل Delete حذف YearFrame Y السنة today Today Today اليوم dde-calendar-5.7.0.23/translations/dde-calendar_ast.ts000066400000000000000000000452371375021633200225310ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y A M M D CGraphicsView New Event CMonthGraphiview Delete Desaniciar You are deleting an event. Are you sure you want to delete this event? Cancel Encaboxar Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y A CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Encaboxar Delete Desaniciar Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Editar OK Aceutar Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Encaboxar Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Enxamás At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Triba: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Guardar New event End time must be greater than start time OK Aceutar Type Triba All Day Starts Ends Remind Me Repeat Repitir End Repeat Ends: Description: Description Descripción Starts: Work Life Other Otro CSchceduleSearchDateItem Y A M M D CSchceduleSearchItem Edit Editar Delete Desaniciar You are deleting an event. Are you sure you want to delete this event? Cancel Encaboxar Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Nun hai resultaos de gueta CScheduleView ALL DAY CWeekWindow Week Y A CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y A CalendarWindow Calendar Calendariu Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendariu Y A M M W D CenterWidget All Day DragInfoGraphicsView Edit Editar Delete Desaniciar New event You are deleting an event. Are you sure you want to delete this event? Cancel Encaboxar Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Güei Return Today Today Return Today Güei Shortcut Help Ayuda Delete event Copy Copiar Cut Cortar Paste Apegar Select all Esbillar too Delete Desaniciar YearFrame Y A today Today Today Güei dde-calendar-5.7.0.23/translations/dde-calendar_az.ts000066400000000000000000000455071375021633200223540ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Sil You are deleting an event. Are you sure you want to delete this event? Cancel İmtina Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel İmtina Delete Sil Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Düzəlt OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel İmtina Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Heç vaxt At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Növ: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Yanılı time(s) Save Saxla New event End time must be greater than start time OK OK Type Növ All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other Digər CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Düzəlt Delete Sil You are deleting an event. Are you sure you want to delete this event? Cancel İmtina Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Axtarış nəticəsiz oldu CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Kalendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Düzəlt Delete Sil New event You are deleting an event. Are you sure you want to delete this event? Cancel İmtina Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Bu gün Return Today Today Return Today Bu gün Shortcut Help Kömək Delete event Copy Kopyala Cut Paste Əlavə et Select all Delete Sil YearFrame Y today Today Today Bu gün dde-calendar-5.7.0.23/translations/dde-calendar_bg.ts000066400000000000000000000456141375021633200223310ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y Г M М D CGraphicsView New Event CMonthGraphiview Delete Изтриване You are deleting an event. Are you sure you want to delete this event? Cancel Отказ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y Г CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Отказ Delete Изтриване Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Редактиране OK ОК Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Отказ Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Никога At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Тип: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Включване time(s) Save Запазване New event End time must be greater than start time OK ОК Type Тип All Day Starts Ends Remind Me Repeat Повторение End Repeat Ends: Description: Description Описание Starts: Work Life Other Други CSchceduleSearchDateItem Y Г M М D CSchceduleSearchItem Edit Редактиране Delete Изтриване You are deleting an event. Are you sure you want to delete this event? Cancel Отказ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Търсенето е без резултат CScheduleView ALL DAY CWeekWindow Week Y Г CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y Г CalendarWindow Calendar Календар Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Календар Y Г M М W D CenterWidget All Day DragInfoGraphicsView Edit Редактиране Delete Изтриване New event You are deleting an event. Are you sure you want to delete this event? Cancel Отказ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Днес Return Today Today Return Today Днес Shortcut Help Помощ Delete event Copy Копиране Cut Изрежи Paste Поставяне Select all Избери всички Delete Изтриване YearFrame Y Г today Today Today Днес dde-calendar-5.7.0.23/translations/dde-calendar_bn.ts000066400000000000000000000466221375021633200223400ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete মুছে ফেলুন You are deleting an event. Are you sure you want to delete this event? Cancel বাতিল করুন Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel বাতিল করুন Delete মুছে ফেলুন Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit সম্পাদন করুন OK ঠিক আছে Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel বাতিল করুন Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never কখনোই নয় At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: ধরণ: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save সংরক্ষণ করুন New event End time must be greater than start time OK ঠিক আছে Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other অন্যান্য CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit সম্পাদন করুন Delete মুছে ফেলুন You are deleting an event. Are you sure you want to delete this event? Cancel বাতিল করুন Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results অনুসন্ধানের কোন ফলাফল নেই CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar ক্যালেন্ডার Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar ক্যালেন্ডার Y M W D CenterWidget All Day DragInfoGraphicsView Edit সম্পাদন করুন Delete মুছে ফেলুন New event You are deleting an event. Are you sure you want to delete this event? Cancel বাতিল করুন Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return আজকে Return Today Today Return Today আজকে Shortcut Help সাহায্য করুন Delete event Copy কপি করুন Cut কাট Paste পেস্ট Select all সব সিলেক্ট Delete মুছে ফেলুন YearFrame Y today Today Today আজকে dde-calendar-5.7.0.23/translations/dde-calendar_bo.ts000066400000000000000000000625441375021633200223420ustar00rootroot00000000000000 CDayMonthView Monday གཟའ་ཟླ་བ། Tuesday གཟའ་མིག་དམར། Wednesday གཟའ་ལྷག་པ། Thursday གཟའ་ཕུར་བུ། Friday གཟའ་པ་སངས། Saturday གཟའ་སྤེན་པ། Sunday གཟའ་ཉི་མ། CDayWindow Y ལོ། M ཟླ། D ཚེས། CGraphicsView New Event ལས་རིམ་གསར་པ། CMonthGraphiview Delete སུབ་པ། You are deleting an event. ཁྱེད་ཀྱིས་ལས་རིམ་སུབ་བཞིན་ཡོད། Are you sure you want to delete this event? ཁྱེད་ཀྱིས་ལས་རིམ་འདི་དངོས་གནས་སུབ་བམ། Cancel ཕྱིར་འཐེན། Do you want to delete all occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་སལ་རིམ་སུབ་དགོས། Delete All ཚང་མ་སུབ་པ། Delete Only This Event ལས་རིམ་འདི་གཅིག་པུ་སུབ་དགོས། Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་འདི་དང་ཕྱིན་ཆད་ཀྱི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་ལས་རིམ་སུབ་དགོས། Delete All Future Events མ་འོང་གི་ལས་རིམ་ཚང་མ་སུབ་དགོས། CMonthSchceduleNumButton %1 more ད་དུང་%1ཡོད། CMonthView New event ལས་རིམ་གསར་པ། New Event ལས་རིམ་གསར་པ། CMonthWindow Y ལོ། CMySchceduleView You are deleting an event. ཁྱེད་ཀྱིས་ལས་རིམ་སུབ་བཞིན་ཡོད། Are you sure you want to delete this event? ཁྱེད་ཀྱིས་ལས་རིམ་འདི་དངོས་གནས་སུབ་བམ། Cancel ཕྱིར་འཐེན། Delete སུབ་པ། Do you want to delete all occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་ལས་རིམ་སུབ་དགོས། Delete All ཚང་མ་སུབ་པ། Delete Only This Event ལས་རིམ་འདི་གཅིག་པུ་སུབ་དགོས། Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་འདི་དང་ཕྱིན་ཆད་ཀྱི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་ལས་རིམ་སུབ་དགོས། My Event ངའི་ལས་རིམ། Edit རྩོམ་སྒྲིག OK གཏན་ཁེལ། Delete All Future Events མ་འོང་གི་ལས་རིམ་ཚང་མ་སུབ་དགོས། CSchceduleDlg New Event ལས་རིམ་གསར་པ། Edit Event ལས་རིམ་རྩོམ་སྒྲིག All occurrences of a repeating event must have the same all-day status. བསྐྱར་ཟློས་ཡིན་པའི་ལས་རིམ་ཚང་མ་ཉིན་གང་གི་གནས་ཚུལ་གཅིག་པ་ཡིན་དགོས། Do you want to change all occurrences? ཁྱེད་ཀྱིས་བསྐྱར་ཟློས་ཚང་མ་སྒྱུར་དགོས་སམ། Cancel ཕྱིར་འཐེན། Change All ཚང་མ་སྒྱུར་བ། You are changing the repeating rule of this event. ཁྱེད་ཀྱིས་བསྐྱར་ཟློས་ཡིན་པའི་ལས་རིམ་གྱི་སྒྲིག་སྲོལ་སྒྱུར་བཞིན་ཡོད། You are changing a repeating event. ཁྱེད་ཀྱིས་བསྐྱར་ཟློས་ཡིན་པའི་ལས་རིམ་སྒྱུར་བཞིན་ཡོད། Do you want to change only this occurrence of the event, or all occurrences? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་གཅིག་པུ་འདི་སྒྱུར་དགོས་སམ། ཡང་ན་དེའི་བསྐྱར་ཟློས་ཚང་མ་སྒྱུར་དགོས། All ཚང་མ། Only This Event ལས་རིམ་འདི་གཅིག་པུ། Do you want to change only this occurrence of the event, or this and all future occurrences? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་འདི་དང་ཕྱིན་ཆད་ཀྱི་བསྐྱར་ཟློས་ཚང་མ་སྒྱུར་དགོས་སམ། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་སྒྱུར་དགོས། All Future Events མ་འོངས་ཀྱི་ལས་རིམ་ཚང་མ། Never ནམ་ཡང་མིན། At time of event ལས་རིམ་འགོ་འཛུགས་དུས། 15 minutes before སྐར་མ་15སྔོན་ལ། 30 minutes before སྐར་མ་30སྔོན་ལ། 1 hour before ཆུ་ཚོད་1སྔོན་ལ། 1 day before ཉིན་1སྔོན་ལ། 2 days before ཉིན་2སྔོན་ལ། 1 week before གཟའ་འཁོར་1སྔོན་ལ། On start day (9:00 AM) ལས་རིམ་འགོ་ཚུགས་པའི་ཉིན།(སྔ་དྲོའི་ཆུ་ཚོད་9པ།) Type: རིགས་གྲས། All Day: ཉིན་གང་། Remind Me: དྲན་སྐུལ། Repeat: བསྐྱར་ཟློས། Daily ཉིན་རེ། Weekdays ལས་ཀའི་ཉིན་གྲངས། Weekly བདུན་རེ། Monthly ཟླ་རེ། Yearly ལོ་རེ། End Repeat: བསྐྱར་ཟློས་མཇུག་འགྲིལ་བ། After རྗེས་ལ། On ལ། time(s) ཐེངས་གྲངས། Save ཉར་གསོག་ New event ལས་རིམ་གསར་པ། End time must be greater than start time མཇུག་འགྲིལ་བའི་དུས་ཚོད་འགོ་འཛུགས་དུས་ཚོད་ལས་འཕྱི་བ་དགོས། OK གཏན་ཁེལ། Type རིགས་གྲས། All Day ཉིན་གང་། Starts འགོ་འཛུགས་དུས་ཚོད། Ends མཇུག་སྒྲིལ་དུས་ཚོད། Remind Me དྲན་སྐུལ། Repeat བསྐྲར་ཟློས། End Repeat བསྐྱར་ཟློས་མཇུག་འགྲིལ་བ། Ends: མཇུག་སྒྲིལ་དུས་ཚོད། Description: ནང་དོན། Description ནང་དོན། Starts: འགོ་འཛུགས་དུས་ཚོད། Work ལས་ཀ Life འཆོ་བ། Other གཞན་དག CSchceduleSearchDateItem Y ལོ། M ཟླ། D ཉིན། CSchceduleSearchItem Edit རྩོམ་སྒྲིག Delete སུབ་པ། You are deleting an event. ཁྱེད་ཀྱིས་ལས་རིམ་སུབ་བཞིན་ཡོད། Are you sure you want to delete this event? ཁྱེད་ཀྱིས་ལས་རིམ་འདི་དངོས་གནས་སུབ་བམ། Cancel ཕྱིར་འཐེན། Do you want to delete all occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་སལ་རིམ་སུབ་དགོས། Delete All ཚང་མ་སུབ་པ། Delete Only This Event ལས་རིམ་འདི་གཅིག་པུ་སུབ་དགོས། Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་འདི་དང་ཕྱིན་ཆད་ཀྱི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་ལས་རིམ་སུབ་དགོས། Delete All Future Events མ་འོང་གི་ལས་རིམ་ཚང་མ་སུབ་དགོས། All Day ཉིན་གང་། CSchceduleSearchView No search results འཚོལ་ཞིབ་བྱས་འབྲས་མེད། CScheduleView ALL DAY ཉིན་གང་། CWeekWindow Week གཟའ་འཁོར། Y ལོ། CYearSchceduleItem All Day ཉིན་གང་། CYearSchceduleView All Day ཉིན་གང་། No event ལས་རིམ་མེད། CYearWindow Y ལོ། CalendarWindow Calendar ལོ་ཐོ། Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. ལོ་ཐོ་ནི་ཚེས་གྲངས་བལྟ་བ་དང་ལས་རིམ་དོ་དམ་བྱེད་པའི་ཡོ་བྱད་ཆུང་ཆུང་ཞིག་རེད། Calendarmainwindow Calendar ལོ་ཐོ། Y ལོ། M ཟླ། W གཟའ། D ཉིན། CenterWidget All Day ཉིན་གང་། DragInfoGraphicsView Edit རྩོམ་སྒྲིག Delete སུབ་པ། New event ལས་རིམ་གསར་པ། You are deleting an event. ཁྱེད་ཀྱིས་ལས་རིམ་སུབ་བཞིན་ཡོད། Are you sure you want to delete this event? ཁྱེད་ཀྱིས་ལས་རིམ་འདི་དངོས་གནས་སུབ་བམ། Cancel ཕྱིར་འཐེན། Do you want to delete all occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་སལ་རིམ་སུབ་དགོས། Delete All ཚང་མ་སུབ་པ། Delete Only This Event ལས་རིམ་འདི་གཅིག་པུ་སུབ་དགོས། Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ཁྱེད་ཀྱིས་ལས་རིམ་འདིའི་བསྐྱར་ཟློས་འདི་དང་ཕྱིན་ཆད་ཀྱི་བསྐྱར་ཟློས་ཚང་མ་སུབ་དགོས། ཡང་ན་བདམས་པའི་བསྐྱར་ཟློས་ལས་རིམ་སུབ་དགོས། Delete All Future Events མ་འོང་གི་ལས་རིམ་ཚང་མ་སུབ་དགོས། New Event ལས་རིམ་གསར་པ། Return Today Return དེ་རིང་། Return Today Today Return Today དེ་རིང་། Shortcut Help རོགས་རམ། Delete event ལས་རིམ་སུབ་པ། Copy མཁོ་ཕབ། Cut དྲས་གཏུབ། Paste སྦྱར་བ། Select all ཡོངས་འདེམས། Delete སུབ་པ། YearFrame Y ལོ། today Today Today དེ་རིང་། dde-calendar-5.7.0.23/translations/dde-calendar_ca.ts000066400000000000000000000474201375021633200223210ustar00rootroot00000000000000 CDayMonthView Monday Dilluns Tuesday Dimarts Wednesday Dimecres Thursday Dijous Friday Divendres Saturday Dissabte Sunday Diumenge CDayWindow Y any M mes D D CGraphicsView New Event Esdeveniment nou CMonthGraphiview Delete Elimina You are deleting an event. Elimineu un esdeveniment. Are you sure you want to delete this event? Segur que voleu eliminar aquest esdeveniment? Cancel Cancel·la Do you want to delete all occurrences of this event, or only the selected occurrence? Voleu eliminar totes les ocurrències d'aquest esdeveniment o només l'ocurrència seleccionada? Delete All Elimina-les totes Delete Only This Event Elimina només aquest esdeveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voleu eliminar aquesta i totes les futures ocurrències d'aquest esdeveniment, o només l'ocurrència seleccionada? Delete All Future Events Elimina tots els esdeveniments futurs CMonthSchceduleNumButton %1 more %1 més CMonthView New event Nou esdeveniment New Event Esdeveniment nou CMonthWindow Y any CMySchceduleView You are deleting an event. Esteu suprimint un esdeveniment. Are you sure you want to delete this event? Segur que voleu eliminar aquest esdeveniment? Cancel Cancel·la Delete Elimina Do you want to delete all occurrences of this event, or only the selected occurrence? Voleu suprimir totes les ocurrències d'aquest esdeveniment o només l'ocurrència seleccionada? Delete All Suprimeix-les totes Delete Only This Event Suprimeix només aquest esdeveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voleu suprimir aquesta i totes les futures ocurrències d'aquest esdeveniment, o només l'ocurrència seleccionada? My Event El meu esdeveniment Edit Edita OK D'acord Delete All Future Events Suprimeix tots els esdeveniments futurs CSchceduleDlg New Event Esdeveniment nou Edit Event Edita l'esdeveniment All occurrences of a repeating event must have the same all-day status. Totes les ocurrències d'un esdeveniment repetitiu han de tenir el mateix estat durant tot el dia. Do you want to change all occurrences? Voleu canviar totes les ocurrències? Cancel Cancel·la Change All Canvia-les totes You are changing the repeating rule of this event. Esteu canviant la regla de repetició d'aquest esdeveniment. You are changing a repeating event. Esteu canviant un esdeveniment repetitiu. Do you want to change only this occurrence of the event, or all occurrences? Voleu canviar només aquesta ocurrència de l'esdeveniment o totes les ocurrències? All Totes Only This Event Només aquest esdeveniment Do you want to change only this occurrence of the event, or this and all future occurrences? Voleu canviar només aquesta ocurrència de l'esdeveniment, o aquesta i totes les futures ocurrències? All Future Events Tots els esdeveniments futurs Never Mai At time of event En el moment de l'esdeveniment 15 minutes before 15 minuts abans 30 minutes before 30 minuts abans 1 hour before 1 hora abans 1 day before 1 dia abans 2 days before 2 dies abans 1 week before 1 setmana abans On start day (9:00 AM) El dia d'inici (9:00) Type: Tipus: All Day: Tot el dia: Remind Me: Recorda'm: Repeat: Repeteix: Daily Diàriament Weekdays Els dies laborables Weekly Setmanalment Monthly Mensualment Yearly Anualment End Repeat: Fi de la repetició: After Després On En time(s) vegad(es) Save Desa New event Nou esdeveniment End time must be greater than start time L'hora de finalització ha de ser superior a l'hora d'inici OK D'acord Type Tipus All Day Tot el dia Starts Comença Ends Acaba Remind Me Recorda-m'ho Repeat Repeteix End Repeat Acaba la repetició Ends: Acaba: Description: Descripció: Description Descripció Starts: Comença: Work Feina Life Vida Other Altres CSchceduleSearchDateItem Y any M mes D D CSchceduleSearchItem Edit Edita Delete Elimina You are deleting an event. Esteu suprimint un esdeveniment. Are you sure you want to delete this event? Segur que voleu eliminar aquest esdeveniment? Cancel Cancel·la Do you want to delete all occurrences of this event, or only the selected occurrence? Voleu suprimir totes les ocurrències d'aquest esdeveniment o només l'ocurrència seleccionada? Delete All Suprimeix-les totes Delete Only This Event Suprimeix només aquest esdeveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voleu suprimir aquesta i totes les futures ocurrències d'aquest esdeveniment, o només l'ocurrència seleccionada? Delete All Future Events Suprimeix tots els esdeveniments futurs All Day Tot el dia CSchceduleSearchView No search results No hi ha resultats de la cerca. CScheduleView ALL DAY TOT EL DIA CWeekWindow Week Setmana Y any CYearSchceduleItem All Day Tot el dia CYearSchceduleView All Day Tot el dia No event Cap esdeveniment CYearWindow Y any CalendarWindow Calendar Calendari Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. El Calendari és una eina per veure dates i també un planificador diari intel·ligent per programar totes les coses de la vida. Calendarmainwindow Calendar Calendari Y any M mes W S D D CenterWidget All Day Tot el dia DragInfoGraphicsView Edit Edita Delete Elimina New event Esdeveniment nou You are deleting an event. Elimineu un esdeveniment. Are you sure you want to delete this event? Segur que voleu eliminar aquest esdeveniment? Cancel Cancel·la Do you want to delete all occurrences of this event, or only the selected occurrence? Voleu eliminar totes les ocurrències d'aquest esdeveniment o només l'ocurrència seleccionada? Delete All Elimina-les totes Delete Only This Event Elimina només aquest esdeveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voleu eliminar aquesta i totes les futures ocurrències d'aquest esdeveniment, o només l'ocurrència seleccionada? Delete All Future Events Elimina tots els esdeveniments futurs New Event Esdeveniment nou Return Today Return Avui Return Today Today Return Today Avui Shortcut Help Ajuda Delete event Suprimeix l'esdeveniment Copy Copia Cut Retalla Paste Enganxa Select all Selecciona-ho tot Delete Elimina YearFrame Y any today Today Today Avui dde-calendar-5.7.0.23/translations/dde-calendar_cs.ts000066400000000000000000000460511375021633200223420ustar00rootroot00000000000000 CDayMonthView Monday pondělí Tuesday úterý Wednesday středa Thursday čtvrtek Friday pátek Saturday sobota Sunday neděle CDayWindow Y R M M D D CGraphicsView New Event Nová událost CMonthGraphiview Delete Smazat You are deleting an event. Mažete událost. Are you sure you want to delete this event? Opravdu chcete tuto událost smazat? Cancel Zrušit Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete smazat všechny výskyty této události, nebo jen ten vybraný? Delete All Smazat vše Delete Only This Event Smazat jen tuto událost Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete smazat tento a všechny budoucí výskyty této události, nebo jen ten vybraný? Delete All Future Events Smazat všechny budoucí události CMonthSchceduleNumButton %1 more %1 více CMonthView New event Nová událost New Event Nová událost CMonthWindow Y R CMySchceduleView You are deleting an event. Mažete událost. Are you sure you want to delete this event? Opravdu chcete tuto událost smazat? Cancel Zrušit Delete Smazat Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete smazat všechny výskyty této události, nebo jen vybraný výskyt? Delete All Smazat vše Delete Only This Event Smazat jen tuto událost Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete smazat tento a všechny výskyty této události, nebo jen vybraný výskyt? My Event Moje událost Edit Upravit OK OK Delete All Future Events Smazat všechny budoucí události CSchceduleDlg New Event Nová událost Edit Event Upravit událost All occurrences of a repeating event must have the same all-day status. Je třeba, aby všechny výskyty opakující se události měly stejný stav „celý den“. Do you want to change all occurrences? Chcete změnit všechny výskyty? Cancel Zrušit Change All Změnit vše You are changing the repeating rule of this event. Měníte pravidlo opakování této události. You are changing a repeating event. Měníte pravidlo opakující se události. Do you want to change only this occurrence of the event, or all occurrences? Chcete změnit jen tento výskyt události, nebo všechny výskyty? All Vše Only This Event Jen tato událost Do you want to change only this occurrence of the event, or this and all future occurrences? Chcete změnit jen tento výskyt události, nebo tento a všechny budoucí výskyty? All Future Events Všechny budoucí události Never Nikdy At time of event V čase události 15 minutes before 15 minut před 30 minutes before 30 minut před 1 hour before 1 hodinu před 1 day before 1 den před 2 days before 2 dny před 1 week before 1 týden před On start day (9:00 AM) V den začátku (9:00 dop.) Type: Typ: All Day: Celý den: Remind Me: Připomenout: Repeat: Opakovat: Daily Denně Weekdays Všední dny Weekly Týdně Monthly Měsíčně Yearly Ročně End Repeat: Ukončit opakování: After Po On Zapnuto time(s) krát Save Uložit New event Nová událost End time must be greater than start time Je třeba, aby okamžik konce následoval až po okamžiku začátku OK OK Type Typ All Day Celý den Starts Začíná Ends Končí Remind Me Připomenout Repeat Opakování End Repeat Ukončit opakování Ends: Končí: Description: Popis: Description Popis Starts: Začíná: Work Práce Life Soukromé Other Ostatní CSchceduleSearchDateItem Y R M M D D CSchceduleSearchItem Edit Upravit Delete Smazat You are deleting an event. Mažete událost. Are you sure you want to delete this event? Opravdu chcete tuto událost smazat? Cancel Zrušit Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete smazat všechny výskyty této události, nebo jen vybraný výskyt? Delete All Smazat vše Delete Only This Event Smazat jen tuto událost Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete smazat tento a všechny výskyty této události, nebo jen vybraný výskyt? Delete All Future Events Smazat všechny budoucí události All Day Celý den CSchceduleSearchView No search results Nic nenalezeno CScheduleView ALL DAY CELÝ DEN CWeekWindow Week Týden Y R CYearSchceduleItem All Day Celý den CYearSchceduleView All Day Celý den No event Žádná událost CYearWindow Y R CalendarWindow Calendar Kalendář Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalendář slouží k zobrazování dat a také jako chytrý každodenní plánovač všeho v životě. Calendarmainwindow Calendar Kalendář Y R M M W T D D CenterWidget All Day Celý den DragInfoGraphicsView Edit Upravit Delete Smazat New event Nová událost You are deleting an event. Mažete událost. Are you sure you want to delete this event? Opravdu chcete tuto událost smazat? Cancel Zrušit Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete smazat všechny výskyty této události, nebo jen ten vybraný? Delete All Smazat vše Delete Only This Event Smazat jen tuto událost Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete smazat tento a všechny budoucí výskyty této události, nebo jen ten vybraný? Delete All Future Events Smazat všechny budoucí události New Event Nová událost Return Today Return Dnes Return Today Today Return Today Dnes Shortcut Help Nápověda Delete event Smazat událost Copy Kopírovat Cut Vyjmout Paste Vložit Select all Vybrat vše Delete Smazat YearFrame Y R today Today Today Dnes dde-calendar-5.7.0.23/translations/dde-calendar_da.ts000066400000000000000000000462701375021633200223240ustar00rootroot00000000000000 CDayMonthView Monday Mandag Tuesday Tirsdag Wednesday Onsdag Thursday Torsdag Friday Fredag Saturday Lørdag Sunday Søndag CDayWindow Y Å M M D D CGraphicsView New Event Ny begivenhed CMonthGraphiview Delete Slet You are deleting an event. Du er ved at slette en begivenhed. Are you sure you want to delete this event? Er du sikker på, at du vil slette begivenheden? Cancel Annuller Do you want to delete all occurrences of this event, or only the selected occurrence? Vil du slette alle forekomster af begivenheden eller kun den valgte forekomst? Delete All Slet alle Delete Only This Event Slet kun denne begivenhed Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Vil du slette denne og alle fremtidige forekomster af begivenheden eller kun den valgte forekomst? Delete All Future Events Slet alle fremtidige begivenheder CMonthSchceduleNumButton %1 more %1 mere CMonthView New event Ny begivenhed New Event Ny begivenhed CMonthWindow Y Å CMySchceduleView You are deleting an event. Du er ved at slette en begivenhed. Are you sure you want to delete this event? Er du sikker på, at du vil slette begivenheden? Cancel Annuller Delete Slet Do you want to delete all occurrences of this event, or only the selected occurrence? Vil du slette alle forekomster af begivenheden eller kun den valgte forekomst? Delete All Slet alle Delete Only This Event Slet kun denne begivenhed Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Vil du slette denne og alle fremtidige forekomster af begivenheden eller kun den valgte forekomst? My Event Min begivenhed Edit Rediger OK OK Delete All Future Events Slet alle fremtidige begivenheder CSchceduleDlg New Event Ny begivenhed Edit Event Rediger begivenhed All occurrences of a repeating event must have the same all-day status. Alle forekomster af en begivenhed som gentages skal have den samme hele dagen-status. Do you want to change all occurrences? Vil du ændre alle forekomster? Cancel Annuller Change All Ændr alle You are changing the repeating rule of this event. Du er ved at ændre gentagelsesreglen for begivenheden. You are changing a repeating event. Du er ved at ændre en begivenhed som gentages. Do you want to change only this occurrence of the event, or all occurrences? Vil du kun ændre denne forekomst for begivenheden, eller alle forekomster? All Alle Only This Event Kun denne begivenhed Do you want to change only this occurrence of the event, or this and all future occurrences? Vil du kun ændre denne forekomst for begivenheden, eller denne og alle fremtidige forekomster? All Future Events Alle fremtidige begivenheder Never Aldrig At time of event På tidspunktet for begivenheden 15 minutes before 15 minutter før 30 minutes before 30 minutter før 1 hour before 1 time før 1 day before 1 dag før 2 days before 2 dage før 1 week before 1 uge før On start day (9:00 AM) På starten af dagen (9:00) Type: Type: All Day: Hele dagen: Remind Me: Påmind mig: Repeat: Gentag: Daily Dagligt Weekdays Ugedage Weekly Ugentligt Monthly Månedligt Yearly Årligt End Repeat: Slut gentag: After Efter On Til time(s) gang(e) Save Gem New event Ny begivenhed End time must be greater than start time Sluttidspunktet skal være større end starttidspunktet OK OK Type Type All Day Hele dagen Starts Ends Remind Me Repeat Gentag End Repeat Ends: Slutter: Description: Beskrivelse: Description Beskrivelse Starts: Starter: Work Arbejde Life Leve Other Andre CSchceduleSearchDateItem Y Å M M D D CSchceduleSearchItem Edit Rediger Delete Slet You are deleting an event. Du er ved at slette en begivenhed. Are you sure you want to delete this event? Er du sikker på, at du vil slette begivenheden? Cancel Annuller Do you want to delete all occurrences of this event, or only the selected occurrence? Vil du slette alle forekomster af begivenheden eller kun den valgte forekomst? Delete All Slet alle Delete Only This Event Slet kun denne begivenhed Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Vil du slette denne og alle fremtidige forekomster af begivenheden eller kun den valgte forekomst? Delete All Future Events Slet alle fremtidige begivenheder All Day Hele dagen CSchceduleSearchView No search results Ingen søgeresultater CScheduleView ALL DAY HELE DAGEN CWeekWindow Week Uge Y Å CYearSchceduleItem All Day Hele dagen CYearSchceduleView All Day Hele dagen No event Ingen begivenhed CYearWindow Y Å CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalender er et værktøj til at vise datoer, og er også en smart dagsplanlægger til alt i dit liv. Calendarmainwindow Calendar Kalender Y Å M M W W D D CenterWidget All Day Hele dagen DragInfoGraphicsView Edit Rediger Delete Slet New event Ny begivenhed You are deleting an event. Du er ved at slette en begivenhed. Are you sure you want to delete this event? Er du sikker på, at du vil slette begivenheden? Cancel Annuller Do you want to delete all occurrences of this event, or only the selected occurrence? Vil du slette alle forekomster af begivenheden eller kun den valgte forekomst? Delete All Slet alle Delete Only This Event Slet kun denne begivenhed Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Vil du slette denne og alle fremtidige forekomster af begivenheden eller kun den valgte forekomst? Delete All Future Events Slet alle fremtidige begivenheder New Event Ny begivenhed Return Today Return I dag Return Today Today Return Today I dag Shortcut Help Hjælp Delete event Slet begivenhed Copy Kopiér Cut Klip Paste Indsæt Select all Vælg alle Delete Slet YearFrame Y Å today Today Today I dag dde-calendar-5.7.0.23/translations/dde-calendar_de.ts000066400000000000000000000466451375021633200223360ustar00rootroot00000000000000 CDayMonthView Monday Montag Tuesday Dienstag Wednesday Mittwoch Thursday Donnerstag Friday Freitag Saturday Samstag Sunday Sonntag CDayWindow Y J M M D T CGraphicsView New Event Neuer Termin CMonthGraphiview Delete Löschen You are deleting an event. Sie löschen einen Termin. Are you sure you want to delete this event? Sind Sie sicher, dass Sie diesen Termin löschen möchten? Cancel Abbrechen Do you want to delete all occurrences of this event, or only the selected occurrence? Möchten Sie alle Vorkommen dieses Termins löschen oder nur das ausgewählte Vorkommen? Delete All Alle löschen Delete Only This Event Nur diesen Termin löschen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Möchten Sie diesen und alle zukünftigen Vorkommen dieses Termins löschen, oder nur das ausgewählte Vorkommen? Delete All Future Events Alle zukünftigen Termine löschen CMonthSchceduleNumButton %1 more %1 mehr CMonthView New event Neuer Termin New Event Neuer Termin CMonthWindow Y J CMySchceduleView You are deleting an event. Sie löschen einen Termin. Are you sure you want to delete this event? Sind Sie sicher, dass Sie diesen Termin löschen möchten? Cancel Abbrechen Delete Löschen Do you want to delete all occurrences of this event, or only the selected occurrence? Möchten Sie alle Vorkommen dieses Termins löschen oder nur das ausgewählte Vorkommen? Delete All Alle löschen Delete Only This Event Nur diesen Termin löschen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Möchten Sie diesen und alle zukünftigen Vorkommen dieses Termins löschen, oder nur das ausgewählte Vorkommen? My Event Mein Termin Edit Bearbeiten OK OK Delete All Future Events Alle zukünftigen Termine löschen CSchceduleDlg New Event Neuer Termin Edit Event Termin bearbeiten All occurrences of a repeating event must have the same all-day status. Alle Vorkommen eines sich wiederholenden Ereignisses müssen den gleichen Tagesstatus haben. Do you want to change all occurrences? Möchten Sie alle Vorkommen ändern? Cancel Abbrechen Change All Alle ändern You are changing the repeating rule of this event. Sie ändern die Wiederholungsregel dieses Termins. You are changing a repeating event. Sie ändern einen sich wiederholenden Termin. Do you want to change only this occurrence of the event, or all occurrences? Möchten Sie nur dieses Vorkommen des Termins oder alle Vorkommnisse ändern? All Alle Only This Event Nur diesen Termin Do you want to change only this occurrence of the event, or this and all future occurrences? Möchten Sie nur dieses Ereignis oder dieses und alle zukünftigen Ereignisse ändern? All Future Events Alle zukünftigen Termine Never Nie At time of event Zum Zeitpunkt des Termins 15 minutes before 15 Minuten vorher 30 minutes before 30 Minuten vorher 1 hour before 1 Stunde vorher 1 day before 1 Tag vorher 2 days before 2 Tage vorher 1 week before 1 Woche vorher On start day (9:00 AM) Am Starttag (9:00 Uhr) Type: Typ: All Day: Ganztägig: Remind Me: Erinnere mich: Repeat: Wiederholung: Daily Täglich Weekdays Wochentage Weekly Wöchentlich Monthly Monatlich Yearly Jährlich End Repeat: Wiederholung beenden: After Nach On Am time(s) mal Save Speichern New event Neuer Termin End time must be greater than start time Die Endzeit muss größer als die Startzeit sein OK OK Type Typ All Day Ganztägig Starts Beginnt Ends Endet Remind Me Erinnere mich Repeat Wiederholung End Repeat Wiederholung beenden Ends: Endet: Description: Beschreibung: Description Beschreibung Starts: Beginnt: Work Arbeit Life Leben Other Andere CSchceduleSearchDateItem Y J M M D T CSchceduleSearchItem Edit Bearbeiten Delete Löschen You are deleting an event. Sie löschen einen Termin. Are you sure you want to delete this event? Sind Sie sicher, dass Sie diesen Termin löschen möchten? Cancel Abbrechen Do you want to delete all occurrences of this event, or only the selected occurrence? Möchten Sie alle Vorkommen dieses Termins löschen oder nur das ausgewählte Vorkommen? Delete All Alle löschen Delete Only This Event Nur diesen Termin löschen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Möchten Sie diesen und alle zukünftigen Vorkommen dieses Termins löschen, oder nur das ausgewählte Vorkommen? Delete All Future Events Alle zukünftigen Termine löschen All Day Ganztägig CSchceduleSearchView No search results Keine Suchergebnisse CScheduleView ALL DAY GANZTÄGIG CWeekWindow Week Woche Y J CYearSchceduleItem All Day Ganztägig CYearSchceduleView All Day Ganztägig No event Kein Termin CYearWindow Y J CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Der Kalender ist ein Werkzeug zum Anzeigen von Terminen und auch ein intelligenter Tagesplaner, um alle Dinge im Leben zu planen. Calendarmainwindow Calendar Kalender Y J M M W W D T CenterWidget All Day Ganztägig DragInfoGraphicsView Edit Bearbeiten Delete Löschen New event Neuer Termin You are deleting an event. Sie löschen einen Termin. Are you sure you want to delete this event? Sind Sie sicher, dass Sie diesen Termin löschen möchten? Cancel Abbrechen Do you want to delete all occurrences of this event, or only the selected occurrence? Möchten Sie alle Vorkommen dieses Termins löschen oder nur das ausgewählte Vorkommen? Delete All Alle löschen Delete Only This Event Nur diesen Termin löschen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Möchten Sie diesen und alle zukünftigen Vorkommen dieses Termins löschen, oder nur das ausgewählte Vorkommen? Delete All Future Events Alle zukünftigen Termine löschen New Event Neuer Termin Return Today Return Heute Return Today Today Return Today Heute Shortcut Help Hilfe Delete event Termin löschen Copy Kopieren Cut Ausschneiden Paste Einfügen Select all Alles auswählen Delete Löschen YearFrame Y J today Today Today Heute dde-calendar-5.7.0.23/translations/dde-calendar_el.ts000066400000000000000000000524671375021633200223450ustar00rootroot00000000000000 CDayMonthView Monday Δευτέρα Tuesday Τρίτη Wednesday Τετάρτη Thursday Πέμπτη Friday Παρασκευή Saturday Σάββατο Sunday Κυριακή CDayWindow Y Ε M Μ D Η CGraphicsView New Event Νέο Συμβάν CMonthGraphiview Delete Διαγραφή You are deleting an event. Διαγράφεις ένα συμβάν. Are you sure you want to delete this event? Είστε σίγουρος ότι θέλετε να διαγράψετε αυτό το συμβάν; Cancel Ακύρωση Do you want to delete all occurrences of this event, or only the selected occurrence? Θέλετε να διαγράψετε όλες τις εμφανίσεις αυτού του συμβάντος ή μόνο την επιλεγμένη εμφάνιση; Delete All Διαγραφή όλων Delete Only This Event Διαγραφή Μόνο Αυτού του Συμβάντος Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Θέλετε να διαγράψετε αυτό και όλες τις μελλοντικές εμφανίσεις αυτού του συμβάντος ή μόνο το επιλεγμένο συμβάν; Delete All Future Events Διαγραφή Όλων των Μελλοντικών Συμβάντων CMonthSchceduleNumButton %1 more %1 περισσότερο CMonthView New event Νέο συμβάν New Event Νέο Συμβάν CMonthWindow Y Y CMySchceduleView You are deleting an event. Διαγράφεις ένα συμβάν. Are you sure you want to delete this event? Είστε σίγουρος ότι θέλετε να διαγράψετε αυτό το συμβάν; Cancel Ακύρωση Delete Διαγραφή Do you want to delete all occurrences of this event, or only the selected occurrence? %1 περισσότερο Delete All Διαγραφή όλων Delete Only This Event Διαγραφή Μόνο Αυτού του Συμβάντος Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Θέλετε να διαγράψετε αυτό και όλες τις μελλοντικές εμφανίσεις αυτού του συμβάντος ή μόνο το επιλεγμένο συμβάν; My Event Το Συμβάν Μου Edit Επεξεργασία OK OK Delete All Future Events Διαγραφή Όλων των Μελλοντικών Συμβάντων CSchceduleDlg New Event Νέο Συμβάν Edit Event Επεξεργασία Συμβάντος All occurrences of a repeating event must have the same all-day status. Όλες οι εμφανίσεις ενός επαναλαμβανόμενου συμβάντος πρέπει να έχουν την ίδια ολοήμερη κατάσταση. Do you want to change all occurrences? Θέλετε να αλλάξετε όλες τις εμφανίσεις; Cancel Ακύρωση Change All Αλλαγή Όλων You are changing the repeating rule of this event. Αλλάζεις τον κανόνα επανάληψης αυτού του συμβάντος. You are changing a repeating event. Αλλάζεις ένα επαναλαμβανόμενο συμβάν. Do you want to change only this occurrence of the event, or all occurrences? Θέλετε να αλλάξετε μόνο αυτήν την εμφάνιση του συμβάντος ή όλες τις εμφανίσεις; All Όλα Only This Event Μόνο Αυτό το Συμβάν Do you want to change only this occurrence of the event, or this and all future occurrences? Θέλετε να αλλάξετε μόνο αυτήν την εμφάνιση του συμβάντος ή αυτήν και όλες τις μελλοντικές εμφανίσεις; All Future Events Όλα τα Μελλοντικά Συμβάντα Never Ποτέ At time of event Στην ώρα του συμβάντος 15 minutes before 15 λεπτά πριν 30 minutes before 30 λεπτά πριν 1 hour before 1 ώρα πριν 1 day before 1 ημέρα πριν 2 days before 2 ημέρες πριν 1 week before 1 εβδομάδα πριν On start day (9:00 AM) Στην έναρξη της ημέρας (9:00 ΠΜ) Type: Τύπος: All Day: Ολοήμερο: Remind Me: Υπενθύμισέ μου: Repeat: Επανάληψη: Daily Ημερήσιο Weekdays Ημέρες Weekly Εβδομαδιαίο Monthly Μηνιαίο Yearly Ετήσιο End Repeat: Τέλος Επανάληψης: After Μετά On Ενεργό time(s) φορά(ές) Save Αποθήκευση New event Νέο συμβάν End time must be greater than start time Το τέλος πρέπει να είναι μεγαλύτερο από την αρχική ώρα OK OK Type Τύπος All Day Ολοήμερο Starts Αρχίζει Ends Τελειώνει Remind Me Υπενθύμισέ μου Repeat Επανάληψη End Repeat Τέλος Επανάληψης Ends: Τελειώνει: Description: Περιγραφή: Description Περιγραφή Starts: Αρχίζει: Work Εργασία Life Ζωή Other Άλλο CSchceduleSearchDateItem Y Y M Μ D Η CSchceduleSearchItem Edit Επεξεργασία Delete Διαγραφή You are deleting an event. Διαγράφεις ένα συμβάν. Are you sure you want to delete this event? Είστε σίγουρος ότι θέλετε να διαγράψετε αυτό το συμβάν; Cancel Ακύρωση Do you want to delete all occurrences of this event, or only the selected occurrence? %1 περισσότερο Delete All Διαγραφή όλων Delete Only This Event Διαγραφή Μόνο Αυτού του Συμβάντος Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Θέλετε να διαγράψετε αυτό και όλες τις μελλοντικές εμφανίσεις αυτού του συμβάντος ή μόνο το επιλεγμένο συμβάν; Delete All Future Events Διαγραφή Όλων των Μελλοντικών Συμβάντων All Day Ολοήμερο CSchceduleSearchView No search results Χωρίς αποτελέσματα αναζήτησης CScheduleView ALL DAY ΟΛΟΗΜΕΡΟ CWeekWindow Week Εβδομάδα Y Y CYearSchceduleItem All Day Ολοήμερο CYearSchceduleView All Day Ολοήμερο No event Χωρίς συμβάν CYearWindow Y Y CalendarWindow Calendar Ημερολόγιο Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Ημερολόγιο Y Y M Μ W Β D Η CenterWidget All Day Ολοήμερο DragInfoGraphicsView Edit Επεξεργασία Delete Διαγραφή New event Νέο συμβάν You are deleting an event. Διαγράφεις ένα συμβάν. Are you sure you want to delete this event? Είστε σίγουρος ότι θέλετε να διαγράψετε αυτό το συμβάν; Cancel Ακύρωση Do you want to delete all occurrences of this event, or only the selected occurrence? %1 περισσότερο Delete All Διαγραφή όλων Delete Only This Event Διαγραφή Μόνο Αυτού του Συμβάντος Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Θέλετε να διαγράψετε αυτό και όλες τις μελλοντικές εμφανίσεις αυτού του συμβάντος ή μόνο το επιλεγμένο συμβάν; Delete All Future Events Διαγραφή Όλων των Μελλοντικών Συμβάντων New Event Νέο Συμβάν Return Today Return Σήμερα Return Today Today Return Today Σήμερα Shortcut Help Βοήθεια Delete event Διαγραφή συμβάντος Copy Αντιγραφή Cut Αποκοπή Paste Επικόλληση Select all Επιλογή όλων Delete Διαγραφή YearFrame Y Y today Today Today Σήμερα dde-calendar-5.7.0.23/translations/dde-calendar_en.ts000066400000000000000000000457161375021633200223460ustar00rootroot00000000000000 CDayMonthView Monday Monday Tuesday Tuesday Wednesday Wednesday Thursday Thursday Friday Friday Saturday Saturday Sunday Sunday CDayWindow Y Y M M D D CGraphicsView New Event New Event CMonthGraphiview Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events CMonthSchceduleNumButton %1 more %1 more CMonthView New event New event New Event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Delete Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event My Event Edit Edit OK OK Delete All Future Events Delete All Future Events CSchceduleDlg New Event New Event Edit Event Edit Event All occurrences of a repeating event must have the same all-day status. All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Do you want to change all occurrences? Cancel Cancel Change All Change All You are changing the repeating rule of this event. You are changing the repeating rule of this event. You are changing a repeating event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? Do you want to change only this occurrence of the event, or all occurrences? All All Only This Event Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events All Future Events Never Never At time of event At time of event 15 minutes before 15 minutes before 30 minutes before 30 minutes before 1 hour before 1 hour before 1 day before 1 day before 2 days before 2 days before 1 week before 1 week before On start day (9:00 AM) On start day (9:00 AM) Type: Type: All Day: All Day: Remind Me: Remind Me: Repeat: Repeat: Daily Daily Weekdays Weekdays Weekly Weekly Monthly Monthly Yearly Yearly End Repeat: End Repeat: After After On On time(s) time(s) Save Save New event New event End time must be greater than start time End time must be greater than start time OK OK Type Type All Day All Day Starts Starts Ends Ends Remind Me Remind Me Repeat Repeat End Repeat End Repeat Ends: Ends: Description: Description: Description Description Starts: Starts: Work Work Life Life Other Other CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edit Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events All Day All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY ALL DAY CWeekWindow Week Week Y Y CYearSchceduleItem All Day All Day CYearSchceduleView All Day All Day No event No event CYearWindow Y Y CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendar Y Y M M W W D D CenterWidget All Day All Day DragInfoGraphicsView Edit Edit Delete Delete New event New event You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events New Event New Event Return Today Return Today Return Today Today Return Today Today Shortcut Help Help Delete event Delete event Copy Copy Cut Cut Paste Paste Select all Select all Delete Delete YearFrame Y Y today Today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_en_AU.ts000066400000000000000000000457211375021633200227270ustar00rootroot00000000000000 CDayMonthView Monday Monday Tuesday Tuesday Wednesday Wednesday Thursday Thursday Friday Friday Saturday Saturday Sunday Sunday CDayWindow Y Y M M D D CGraphicsView New Event New Event CMonthGraphiview Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events CMonthSchceduleNumButton %1 more %1 more CMonthView New event New event New Event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Delete Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event My Event Edit Edit OK OK Delete All Future Events Delete All Future Events CSchceduleDlg New Event New Event Edit Event Edit Event All occurrences of a repeating event must have the same all-day status. All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Do you want to change all occurrences? Cancel Cancel Change All Change All You are changing the repeating rule of this event. You are changing the repeating rule of this event. You are changing a repeating event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? Do you want to change only this occurrence of the event, or all occurrences? All All Only This Event Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events All Future Events Never Never At time of event At time of event 15 minutes before 15 minutes before 30 minutes before 30 minutes before 1 hour before 1 hour before 1 day before 1 day before 2 days before 2 days before 1 week before 1 week before On start day (9:00 AM) On start day (9:00 AM) Type: Type: All Day: All Day: Remind Me: Remind Me: Repeat: Repeat: Daily Daily Weekdays Weekdays Weekly Weekly Monthly Monthly Yearly Yearly End Repeat: End Repeat: After After On On time(s) time(s) Save Save New event New event End time must be greater than start time End time must be greater than start time OK OK Type Type All Day All Day Starts Starts Ends Ends Remind Me Remind Me Repeat Repeat End Repeat End Repeat Ends: Ends: Description: Description: Description Description Starts: Starts: Work Work Life Life Other Other CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edit Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events All Day All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY ALL DAY CWeekWindow Week Week Y Y CYearSchceduleItem All Day All Day CYearSchceduleView All Day All Day No event No event CYearWindow Y Y CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendar Y Y M M W W D D CenterWidget All Day All Day DragInfoGraphicsView Edit Edit Delete Delete New event New event You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events New Event New Event Return Today Return Today Return Today Today Return Today Today Shortcut Help Help Delete event Delete event Copy Copy Cut Cut Paste Paste Select all Select all Delete Delete YearFrame Y Y today Today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_en_GB.ts000066400000000000000000000457061375021633200227150ustar00rootroot00000000000000 CDayMonthView Monday Monday Tuesday Tuesday Wednesday Wednesday Thursday Thursday Friday Friday Saturday Saturday Sunday Sunday CDayWindow Y Y M M D D CGraphicsView New Event New Event CMonthGraphiview Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events CMonthSchceduleNumButton %1 more %1 more CMonthView New event New event New Event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Delete Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event My Event Edit Edit OK OK Delete All Future Events Delete All Future Events CSchceduleDlg New Event New Event Edit Event Edit Event All occurrences of a repeating event must have the same all-day status. All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Do you want to change all occurrences? Cancel Cancel Change All Change All You are changing the repeating rule of this event. You are changing the repeating rule of this event. You are changing a repeating event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? Do you want to change only this occurrence of the event, or all occurrences? All All Only This Event Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? Do you want to change the occurrence of the event, or this and all future occurrences All Future Events All Future Events Never Never At time of event At time of event 15 minutes before 15 minutes before 30 minutes before 30 minutes before 1 hour before 1 hour before 1 day before 1 day before 2 days before 2 days before 1 week before 1 week before On start day (9:00 AM) On start day (9:00 AM) Type: Type: All Day: All Day: Remind Me: Remind Me: Repeat: Repeat: Daily Daily Weekdays Weekdays Weekly Weekly Monthly Monthly Yearly Yearly End Repeat: End Repeat: After After On On time(s) time(s) Save Save New event New event End time must be greater than start time End time must be greater than start time OK OK Type Type All Day All Day Starts Starts Ends Ends Remind Me Remind Me Repeat Repeat End Repeat End Repeat Ends: Ends: Description: Description: Description Dscription Starts: Starts: Work Work Life Life Other Other CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edit Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete the occurrence of this event, or the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events All Day All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY ALL DAY CWeekWindow Week Week Y Y CYearSchceduleItem All Day All Day CYearSchceduleView All Day All Day No event No event CYearWindow Y Y CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendar Y Y M M W W D D CenterWidget All Day All Day DragInfoGraphicsView Edit Edit Delete Delete New event New event You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events New Event New Event Return Today Return Today Return Today Today Return Today Today Shortcut Help Help Delete event Delete event Copy Copy Cut Cut Paste Paste Select all Select all Delete Delete YearFrame Y Y today Today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_en_US.ts000066400000000000000000000463261375021633200227530ustar00rootroot00000000000000 CDayMonthView Monday Monday Tuesday Tuesday Wednesday Wednesday Thursday Thursday Friday Friday Saturday Saturday Sunday Sunday CDayWindow Y Y M M D D CGraphicsView New Event New Event CMonthGraphiview Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events CMonthSchceduleNumButton %1 more %1 more CMonthView New event New event New Event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Delete Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event My Event Edit Edit OK OK Delete All Future Events Delete All Future Events CSchceduleDlg New Event New Event Edit Event Edit Event All occurrences of a repeating event must have the same all-day status. All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Do you want to change all occurrences? Cancel Cancel Change All Change All You are changing the repeating rule of this event. You are changing the repeating rule of this event. You are changing a repeating event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? Do you want to change only this occurrence of the event, or all occurrences? All All Only This Event Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events All Future Events Never Never At time of event At time of event 15 minutes before 15 minutes before 30 minutes before 30 minutes before 1 hour before 1 hour before 1 day before 1 day before 2 days before 2 days before 1 week before 1 week before On start day (9:00 AM) On start day (9:00 AM) Type: Type: All Day: All Day: Remind Me: Remind Me: Repeat: Repeat: Daily Daily Weekdays Weekdays Weekly Weekly Monthly Monthly Yearly Yearly End Repeat: End Repeat: After After On On time(s) time(s) Save Save New event New event End time must be greater than start time End time must be greater than start time OK OK Type Type All Day All Day Starts Starts Ends Ends Remind Me Remind Me Repeat Repeat End Repeat End Repeat Ends: Ends: Description: Description: Description Description Starts: Starts: Work Work Life Life Other Other CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edit Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events All Day All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY CWeekWindow Week Week Y Y CYearSchceduleItem All Day All Day CYearSchceduleView All Day All Day No event No event CYearWindow Y Y CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendar Y Y M M W W D D CenterWidget All Day All Day DragInfoGraphicsView Edit Edit Delete Delete New event New event You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events New Event New Event Return Today Return Today Return Today Today Return Today Today Shortcut Help Help Delete event Delete event Copy Copy Cut Cut Paste Paste Select all Select all Delete Delete YearFrame Y Y today Today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_eo.ts000066400000000000000000000452161375021633200223420ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y J M M D CGraphicsView New Event CMonthGraphiview Delete Forigi You are deleting an event. Are you sure you want to delete this event? Cancel Nuligi Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y J CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Nuligi Delete Forigi Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Redakti OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Nuligi Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Neniam At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Tipo: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Gardi New event End time must be greater than start time OK OK Type Tipo All Day Starts Ends Remind Me Repeat Ripeti End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y J M M D CSchceduleSearchItem Edit Redakti Delete Forigi You are deleting an event. Are you sure you want to delete this event? Cancel Nuligi Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Neniu serĉrezulton CScheduleView ALL DAY CWeekWindow Week Y J CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y J CalendarWindow Calendar Kalendaro Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalendaro Y J M M W D CenterWidget All Day DragInfoGraphicsView Edit Redakti Delete Forigi New event You are deleting an event. Are you sure you want to delete this event? Cancel Nuligi Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Hodiaŭ Return Today Today Return Today Hodiaŭ Shortcut Help Helpo Delete event Copy Kopii Cut Tranĉi Paste Alglui Select all Elekti ĉiujn Delete Forigi YearFrame Y J today Today Today Hodiaŭ dde-calendar-5.7.0.23/translations/dde-calendar_es.ts000066400000000000000000000463721375021633200223520ustar00rootroot00000000000000 CDayMonthView Monday Lunes Tuesday Martes Wednesday Miércoles Thursday Jueves Friday Viernes Saturday Sábado Sunday Domingo CDayWindow Y A M M D D CGraphicsView New Event Nuevo evento CMonthGraphiview Delete Borrar You are deleting an event. Esta borrando un evento. Are you sure you want to delete this event? ¿Está seguro que desea borrar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? ¿Desea borrar todas las instancias de este evento, o solo la instancia seleccionada? Delete All Borrar todo Delete Only This Event Borrar solo este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ¿Desea borrar esta y todas las instancias futuras de este evento, o solo la instancia seleccionada? Delete All Future Events Borrar todos los eventos futuros CMonthSchceduleNumButton %1 more %1 más CMonthView New event Nuevo evento New Event Nuevo evento CMonthWindow Y A CMySchceduleView You are deleting an event. Esta borrando un evento. Are you sure you want to delete this event? ¿Está seguro que desea borrar este evento? Cancel Cancelar Delete Borrar Do you want to delete all occurrences of this event, or only the selected occurrence? ¿Desea borrar todas las instancias de este evento, o solo la instancia seleccionada? Delete All Borrar todo Delete Only This Event Borrar solo este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ¿Desea borrar esta y todas las instancias futuras de este evento, o solo la instancia seleccionada? My Event Mi evento Edit Editar OK Aceptar Delete All Future Events Borrar todos los eventos futuros CSchceduleDlg New Event Nuevo evento Edit Event Editar evento All occurrences of a repeating event must have the same all-day status. Todas las instancias de un evento repetido debe tener el mismo estado todo el día. Do you want to change all occurrences? ¿Desea cambiar todas las instancias? Cancel Cancelar Change All Cambiar todos You are changing the repeating rule of this event. Está cambiando la regla de repetición de este evento. You are changing a repeating event. Esta cambiando una repetición de un evento. Do you want to change only this occurrence of the event, or all occurrences? ¿Desea cambiar solo la instancia de este evento, o todas las instancias? All Todos Only This Event Solo este evento Do you want to change only this occurrence of the event, or this and all future occurrences? ¿Desea cambiar solo este acontecimiento del evento, o este y todos los acontecimientos futuros? All Future Events Todos los futuros eventos Never Nunca At time of event En el momento del evento. 15 minutes before 15 minutos antes 30 minutes before 30 minutos antes 1 hour before 1 hora antes 1 day before 1 día antes 2 days before 2 días antes 1 week before 1 semana antes On start day (9:00 AM) El día de inicio (9:00 a.m.) Type: Tipo All Day: Todo el día Remind Me: Recordarme Repeat: Repetir Daily Diariamente Weekdays Fines de semana Weekly Semanalmente Monthly Mensualmente Yearly Anualmente End Repeat: Fin de repetición After Después On Encendido time(s) Hora(s) Save Guardar New event Nuevo evento End time must be greater than start time El tiempo final debe ser mayor que el tiempo inicial OK Aceptar Type Tipo All Day Todo el día Starts Inicia Ends Termina Remind Me Recordarme Repeat Repetir End Repeat Fin de repetición Ends: Termina Description: Descripción Description Descripción Starts: Inicia Work Trabajo Life Personal Other Otro CSchceduleSearchDateItem Y A M M D D CSchceduleSearchItem Edit Editar Delete Borrar You are deleting an event. Esta borrando un evento. Are you sure you want to delete this event? ¿Está seguro que desea borrar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? ¿Desea borrar todas las instancias de este evento, o solo la instancia seleccionada? Delete All Borrar todo Delete Only This Event Borrar solo este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ¿Desea borrar esta y todas las instancias futuras de este evento, o solo la instancia seleccionada? Delete All Future Events Borrar todos los eventos futuros All Day Todo el día CSchceduleSearchView No search results Sin resultados CScheduleView ALL DAY TODO EL DIA CWeekWindow Week Semana Y A CYearSchceduleItem All Day Todo el día CYearSchceduleView All Day Todo el día No event No hay eventos CYearWindow Y A CalendarWindow Calendar Calendario Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendario de Deepin es una herramienta para consultar fechas, y un conveniente planificador para agendar sus reuniones y eventos. Calendarmainwindow Calendar Calendario Y A M M W S D D CenterWidget All Day Todo el día DragInfoGraphicsView Edit Editar Delete Borrar New event Nuevo evento You are deleting an event. Esta borrando un evento. Are you sure you want to delete this event? ¿Está seguro que desea borrar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? ¿Desea borrar todas las instancias de este evento, o solo la instancia seleccionada? Delete All Borrar todo Delete Only This Event Borrar solo este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ¿Desea borrar esta y todas las instancias futuras de este evento, o solo la instancia seleccionada? Delete All Future Events Borrar todos los eventos futuros New Event Nuevo evento Return Today Return Hoy Return Today Today Return Today Hoy Shortcut Help Ayuda Delete event Borrar evento Copy Duplicar Cut Cortar Paste Pegar Select all Seleccionar todo Delete Borrar YearFrame Y A today Today Today Hoy dde-calendar-5.7.0.23/translations/dde-calendar_et.ts000066400000000000000000000457261375021633200223550ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Tühista Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Tühista Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Muuda OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Tühista Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Muuda Delete You are deleting an event. Are you sure you want to delete this event? Cancel Tühista Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalender Y M W D CenterWidget All Day DragInfoGraphicsView Edit Muuda Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Tühista Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Täna Return Today Today Return Today Täna Shortcut Help Delete event Copy Kopeeri Cut Paste Select all Delete YearFrame Y today Today Today Täna dde-calendar-5.7.0.23/translations/dde-calendar_fa.ts000066400000000000000000000456001375021633200223220ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete حذف You are deleting an event. Are you sure you want to delete this event? Cancel لغو Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel لغو Delete حذف Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit ویرایش OK تایید Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel لغو Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never هرگز At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: نوع: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save ذخیره New event End time must be greater than start time OK تایید Type All Day Starts Ends Remind Me Repeat تکرار End Repeat Ends: Description: Description توضیحات Starts: Work کار Life زندگی Other سایر CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit ویرایش Delete حذف You are deleting an event. Are you sure you want to delete this event? Cancel لغو Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results نتیجه جستجو یافت نشد CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar تقویم Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar تقویم Y M W D CenterWidget All Day DragInfoGraphicsView Edit ویرایش Delete حذف New event You are deleting an event. Are you sure you want to delete this event? Cancel لغو Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return امروز Return Today Today Return Today امروز Shortcut Help راهنما Delete event Copy کپی Cut برش Paste افزودن Select all انتخاب همه Delete حذف YearFrame Y today Today Today امروز dde-calendar-5.7.0.23/translations/dde-calendar_fi.ts000066400000000000000000000463141375021633200223350ustar00rootroot00000000000000 CDayMonthView Monday Maanantai Tuesday Tiistai Wednesday Keskiviikko Thursday Torstai Friday Perjantai Saturday Lauantai Sunday Sunnuntai CDayWindow Y V M K D P CGraphicsView New Event Uusi tapahtuma CMonthGraphiview Delete Poista You are deleting an event. Olet poistamassa tapahtumaa. Are you sure you want to delete this event? Haluatko varmasti poistaa tämän tapahtuman? Cancel Peruuta Do you want to delete all occurrences of this event, or only the selected occurrence? Haluatko poistaa kaikki tämän tapahtuman esiintymät vai vain valitun tapahtuman? Delete All Poista kaikki Delete Only This Event Poista vain tämä tapahtuma Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Haluatko poistaa tämän ja kaikki tämän tapahtuman tulevat esiintymät vai vain valitun tapahtuman? Delete All Future Events Poista kaikki tulevat tapahtumat CMonthSchceduleNumButton %1 more %1 lisää CMonthView New event Uusi tapahtuma New Event Uusi tapahtuma CMonthWindow Y V CMySchceduleView You are deleting an event. Olet poistamassa tapahtumaa. Are you sure you want to delete this event? Haluatko varmasti poistaa tämän tapahtuman? Cancel Peruuta Delete Poista Do you want to delete all occurrences of this event, or only the selected occurrence? Haluatko poistaa kaikki tämän tapahtuman esiintymät vai vain valitun tapahtuman? Delete All Poista kaikki Delete Only This Event Poista vain tämä tapahtuma Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Haluatko poistaa tämän ja kaikki tämän tapahtuman tulevat esiintymät vai vain valitun tapahtuman? My Event Tapahtuma Edit Muokkaa OK OK Delete All Future Events Poista kaikki tulevat tapahtumat CSchceduleDlg New Event Uusi tapahtuma Edit Event Muokkaa tapahtumaa All occurrences of a repeating event must have the same all-day status. Kaikilla toistuvilla tapahtumilla on oltava sama kokopäivän tila. Do you want to change all occurrences? Haluatko muuttaa kaikkia tapahtumia? Cancel Peruuta Change All Vaihda kaikki You are changing the repeating rule of this event. Olet muuttamassa tämän tapahtuman toistuvaa sääntöä. You are changing a repeating event. Olet vaihtamassa toistuvaa tapahtumaa. Do you want to change only this occurrence of the event, or all occurrences? Haluatko muuttaa vain tämän tapahtuman vai kaikki tapahtumat? All Kaikki Only This Event Vain tämä tapahtuma Do you want to change only this occurrence of the event, or this and all future occurrences? Haluatko muuttaa vain tämän tapahtuman ja tai kaikkien tulevien tapahtumien? All Future Events Kaikki tulevat tapahtumat Never Ei At time of event Tapahtuman aikaan 15 minutes before 15 min ennen 30 minutes before 30 min ennen 1 hour before 1 tunti ennen 1 day before 1 päivä ennen 2 days before 2 päivää ennen 1 week before 1 viikko ennen On start day (9:00 AM) Aloituspäivänä (9:00) Type: Tyyppi: All Day: Koko päivä: Remind Me: Muistuta: Repeat: Toista: Daily Päivittäin Weekdays Arkisin Weekly Viikoittain Monthly Kuukausittain Yearly Vuosittain End Repeat: Lopeta: After Jälkeen On Päällä time(s) kertaa Save Tallenna New event Uusi tapahtuma End time must be greater than start time Lopetusajan on oltava pidempi kuin aloitusaika OK OK Type Tyyppi All Day Koko päivä Starts Alkaa Ends Loppuu Remind Me Muistuta minua Repeat Toista End Repeat Lopeta toisto Ends: Loppuu: Description: Kuvaus: Description Kuvaus Starts: Alkaa: Work Työ Life Oma Other Muut CSchceduleSearchDateItem Y V M K D P CSchceduleSearchItem Edit Muokkaa Delete Poista You are deleting an event. Olet poistamassa tapahtumaa. Are you sure you want to delete this event? Haluatko varmasti poistaa tämän tapahtuman? Cancel Peruuta Do you want to delete all occurrences of this event, or only the selected occurrence? Haluatko poistaa kaikki tämän tapahtuman esiintymät vai vain valitun tapahtuman? Delete All Poista kaikki Delete Only This Event Poista vain tämä tapahtuma Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Haluatko poistaa tämän ja kaikki tämän tapahtuman tulevat esiintymät vai vain valitun tapahtuman? Delete All Future Events Poista kaikki tulevat tapahtumat All Day Koko päivä CSchceduleSearchView No search results Ei hakutuloksia CScheduleView ALL DAY AIKA CWeekWindow Week Viikko Y V CYearSchceduleItem All Day Koko päivä CYearSchceduleView All Day Koko päivä No event Ei tapahtumaa CYearWindow Y V CalendarWindow Calendar Kalenteri Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalenteri on työkalu almanakan tarkasteluun ja voit myös tehdä hälytykset ja muistutukset kalenteriin. Calendarmainwindow Calendar Kalenteri Y V M K W V D P CenterWidget All Day Koko päivä DragInfoGraphicsView Edit Muokkaa Delete Poista New event Uusi tapahtuma You are deleting an event. Olet poistamassa tapahtumaa. Are you sure you want to delete this event? Haluatko varmasti poistaa tämän tapahtuman? Cancel Peruuta Do you want to delete all occurrences of this event, or only the selected occurrence? Haluatko poistaa kaikki tämän tapahtuman esiintymät vai vain valitun tapahtuman? Delete All Poista kaikki Delete Only This Event Poista vain tämä tapahtuma Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Haluatko poistaa tämän ja kaikki tämän tapahtuman tulevat esiintymät vai vain valitun tapahtuman? Delete All Future Events Poista kaikki tulevat tapahtumat New Event Uusi tapahtuma Return Today Return Tänään Return Today Today Return Today Tänään Shortcut Help Ohje Delete event Poista tapahtuma Copy Kopioi Cut Leikkaa Paste Liitä Select all Valitse kaikki Delete Poista YearFrame Y V today Today Today Tänään dde-calendar-5.7.0.23/translations/dde-calendar_fil.ts000066400000000000000000000460201375021633200225030ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Ngayon Return Today Today Return Today Ngayon Shortcut Help Tulong Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today Ngayon dde-calendar-5.7.0.23/translations/dde-calendar_fr.ts000066400000000000000000000475701375021633200223530ustar00rootroot00000000000000 CDayMonthView Monday Lundi Tuesday Mardi Wednesday Mercredi Thursday Jeudi Friday Vendredi Saturday Samedi Sunday Dimanche CDayWindow Y A M M D J CGraphicsView New Event Nouvel événement CMonthGraphiview Delete Supprimer You are deleting an event. Vous allez supprimez un événement. Are you sure you want to delete this event? Voulez-vous vraiment le supprimer ? Cancel Annuler Do you want to delete all occurrences of this event, or only the selected occurrence? Voulez-vous supprimer toutes les occurrences de cet événement, ou uniquement l'occurrence sélectionnée ? Delete All Tout supprimer Delete Only This Event Supprimer uniquement cet événement Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voulez-vous supprimer cette occurence et toutes celles futures, ou uniquement l'occurrence de l'événement sélectionnée ? Delete All Future Events Supprimer tous les événements futurs CMonthSchceduleNumButton %1 more %1 de plus CMonthView New event Nouvel événement New Event Nouvel événement CMonthWindow Y A CMySchceduleView You are deleting an event. Vous supprimez un événement. Are you sure you want to delete this event? Voulez-vous vraiment supprimer cet événement ? Cancel Annuler Delete Supprimer Do you want to delete all occurrences of this event, or only the selected occurrence? Voulez-vous supprimer toutes les occurrences de cet événement, ou seulement l'occurrence sélectionnée? Delete All Supprimer tout Delete Only This Event Supprimer uniquement cet événement Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voulez-vous supprimer ceci et toutes les occurrences futures de cet événement, ou seulement l'occurrence sélectionnée? My Event Mon Evénement Edit Modifier OK OK Delete All Future Events Supprimer tous les événements futurs CSchceduleDlg New Event Nouvel événement Edit Event Modifier l'événement All occurrences of a repeating event must have the same all-day status. Toutes les occurrences d'un événement répétitif doivent avoir le même statut toute la journée. Do you want to change all occurrences? Voulez-vous modifier toutes les occurrences ? Cancel Annuler Change All Changer tout You are changing the repeating rule of this event. Vous modifiez la règle de répétition de cet événement. You are changing a repeating event. Vous modifiez un événement récurrent. Do you want to change only this occurrence of the event, or all occurrences? Voulez-vous modifier uniquement cette occurrence de l'événement ou toutes les occurrences ? All Tout Only This Event Uniquement cet événement Do you want to change only this occurrence of the event, or this and all future occurrences? Voulez-vous modifier uniquement cette occurrence de l'événement, ou celle-ci et toutes les occurrences futures? All Future Events Tous les événements futurs Never Jamais At time of event Au moment de l'événement 15 minutes before 15 minutes avant 30 minutes before 30 minutes avant 1 hour before 1 heure avant 1 day before 1 jour avant 2 days before 2 jours avant 1 week before 1 semaine avant On start day (9:00 AM) Le premier jour (9h00 matin) Type: Type : All Day: Toute la journée : Remind Me: Rappelez-moi : Repeat: Répéter : Daily Quotidien Weekdays En semaine Weekly Hebdomadaire Monthly Mensuel Yearly Annuellement End Repeat: Fin de répétition : After Après On Sur time(s) heure(s) Save Enregistrer New event Nouvel événement End time must be greater than start time L'heure de fin doit être supérieure à l'heure de début OK OK Type Type All Day Toute la journée Starts Début Ends Fin Remind Me Rappelez-moi Repeat Répéter End Repeat Fin de répétition Ends: Fin : Description: Description : Description Description Starts: Départs : Work Travail Life Vie Other Autre CSchceduleSearchDateItem Y A M M D J CSchceduleSearchItem Edit Modifier Delete Supprimer You are deleting an event. Vous supprimez un événement. Are you sure you want to delete this event? Voulez-vous vraiment supprimer cet événement ? Cancel Annuler Do you want to delete all occurrences of this event, or only the selected occurrence? Voulez-vous supprimer toutes les occurrences de cet événement, ou seulement l'occurrence sélectionnée? Delete All Supprimer tout Delete Only This Event Supprimer uniquement cet événement Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voulez-vous supprimer ceci et toutes les occurrences futures de cet événement, ou seulement l'occurrence sélectionnée? Delete All Future Events Supprimer tous les événements futurs All Day Toute la journée CSchceduleSearchView No search results Aucun résultat trouvé CScheduleView ALL DAY TOUTE LA JOURNÉE CWeekWindow Week Semaine Y A CYearSchceduleItem All Day Toute la journée CYearSchceduleView All Day Toute la journée No event Aucun événement CYearWindow Y A CalendarWindow Calendar Calendrier Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Le calendrier est un outil pour afficher les dates, et aussi un planificateur quotidien intelligent pour planifier toutes les choses de la vie. Calendarmainwindow Calendar Calendrier Y A M M W W D J CenterWidget All Day Toute la journée DragInfoGraphicsView Edit Éditer Delete Supprimer New event Nouvel événement You are deleting an event. Vous allez supprimez un événement. Are you sure you want to delete this event? Voulez-vous vraiment le supprimer ? Cancel Annuler Do you want to delete all occurrences of this event, or only the selected occurrence? Voulez-vous supprimer toutes les occurrences de cet événement, ou uniquement l'occurrence sélectionnée ? Delete All Tout supprimer Delete Only This Event Supprimer uniquement cet événement Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Voulez-vous supprimer cette occurence et toutes celles futures, ou uniquement l'occurrence de l'événement sélectionnée ? Delete All Future Events Supprimer tous les événements futurs New Event Nouvel événement Return Today Return Aujourd'hui Return Today Today Return Today Aujourd'hui Shortcut Help Aide Delete event Supprimer l'événement Copy Copier Cut Couper Paste Coller Select all Tout sélectionner Delete Supprimer YearFrame Y A today Today Today Aujourd'hui dde-calendar-5.7.0.23/translations/dde-calendar_gl_ES.ts000066400000000000000000000463631375021633200227340ustar00rootroot00000000000000 CDayMonthView Monday Luns Tuesday Martes Wednesday Mércores Thursday Xoves Friday Venres Saturday Sábado Sunday Domingo CDayWindow Y Y M M D D CGraphicsView New Event Novo evento CMonthGraphiview Delete Eliminar You are deleting an event. Estás eliminando un evento Are you sure you want to delete this event? Está seguro de que quere eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Quere eliminar todas as ocorrencias deste evento, ou só a ocorrencia seleccionada? Delete All Eliminar todo Delete Only This Event Eliminar só este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Quere eliminar esta e todas as ocurrencias futuras deste evento, ou só a ocorrencia seleccionada? Delete All Future Events Eliminar todo os eventos futuros CMonthSchceduleNumButton %1 more %1 máis CMonthView New event Novo evento New Event Novo evento CMonthWindow Y Y CMySchceduleView You are deleting an event. Estás eliminando un evento Are you sure you want to delete this event? Está seguro de que quere eliminar este evento? Cancel Cancelar Delete Eliminar Do you want to delete all occurrences of this event, or only the selected occurrence? Quere eliminar todas as ocorrencias deste evento, ou só a ocorrencia seleccionada? Delete All Eliminar todo Delete Only This Event Eliminar só este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Quere eliminar esta e todas as ocurrencias futuras deste evento, ou só a ocorrencia seleccionada? My Event O meu evento Edit Editar OK Aceptar Delete All Future Events Eliminar todo os eventos futuros CSchceduleDlg New Event Novo evento Edit Event Editar evento All occurrences of a repeating event must have the same all-day status. Todas as ocorrencias dun evento que se repite deben ter o mesmo estado durante todo o día. Do you want to change all occurrences? Quere cambiar todas as ocorrencias? Cancel Cancelar Change All Cambiar todo You are changing the repeating rule of this event. Estás a cambiar a regra deste evento. You are changing a repeating event. Está a cambiar un evento que se repite. Do you want to change only this occurrence of the event, or all occurrences? Queres cambiar só esta ocorrencia do evento ou todas as ocorrencias? All Todo Only This Event Só este evento Do you want to change only this occurrence of the event, or this and all future occurrences? Quere cambiar só esta ocorrencia do evento, ou esta e todas as futuras ocorrencias? All Future Events Todos os eventos futuros Never Nunca At time of event No momento do evento 15 minutes before 15 minutos antes 30 minutes before 30 minutos antes 1 hour before 1 hora antes 1 day before 1 día antes 2 days before 2 días antes 1 week before 1 semana antes On start day (9:00 AM) O día de inicio (9:00) Type: Tipo: All Day: Todo o día: Remind Me: Recórdame: Repeat: Repetir: Daily Diariamente Weekdays Días da semana Weekly Semanalmente Monthly Mensualmente Yearly Anualmente End Repeat: Finalizar a repetición: After Despois On Activado time(s) vez(ces) Save Gardar New event Novo evento End time must be greater than start time O tempo de finalización debe ser maior que o de inicio OK Aceptar Type Tipo All Day Todo o día Starts Comeza Ends Acaba Remind Me Recórdame Repeat Repetir End Repeat Finalizar a repetición: Ends: Acaba: Description: Descrición: Description Descrición Starts: Comeza: Work Traballo Life Vida Other Outros CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Editar Delete Eliminar You are deleting an event. Estás eliminando un evento Are you sure you want to delete this event? Está seguro de que quere eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Quere eliminar todas as ocorrencias deste evento, ou só a ocorrencia seleccionada? Delete All Eliminar todo Delete Only This Event Eliminar só este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Quere eliminar esta e todas as ocurrencias futuras deste evento, ou só a ocorrencia seleccionada? Delete All Future Events Eliminar todo os eventos futuros All Day Todo o día CSchceduleSearchView No search results Sen resultados CScheduleView ALL DAY Todo o día CWeekWindow Week Semana Y Y CYearSchceduleItem All Day Todo o día CYearSchceduleView All Day Todo o día No event Non hai eventos CYearWindow Y Y CalendarWindow Calendar Calendario Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. O calendario é unha ferramenta para ver as datas e tamén un planificador diario intelixente para programar todas as cousas da vida. Calendarmainwindow Calendar Calendario Y Y M M W W D D CenterWidget All Day Todo o día DragInfoGraphicsView Edit Editar Delete Eliminar New event Novo evento You are deleting an event. Estás eliminando un evento Are you sure you want to delete this event? Está seguro de que quere eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Quere eliminar todas as ocorrencias deste evento, ou só a ocorrencia seleccionada? Delete All Eliminar todo Delete Only This Event Eliminar só este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Quere eliminar esta e todas as ocurrencias futuras deste evento, ou só a ocorrencia seleccionada? Delete All Future Events Eliminar todo os eventos futuros New Event Novo evento Return Today Return Hoxe Return Today Today Return Today Hoxe Shortcut Help Axuda Delete event Eliminar evento Copy Copiar Cut Cortar Paste Pegar Select all Seleccionar todo Delete Eliminar YearFrame Y Y today Today Today Hoxe dde-calendar-5.7.0.23/translations/dde-calendar_he.ts000066400000000000000000000455311375021633200223330ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M M D CGraphicsView New Event CMonthGraphiview Delete מחיקה You are deleting an event. Are you sure you want to delete this event? Cancel ביטול Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel ביטול Delete מחיקה Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit ערוך OK אישור Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel ביטול Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never אף פעם At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: סוג All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On מופע time(s) Save שמור New event End time must be greater than start time OK אישור Type סוג All Day Starts Ends Remind Me Repeat חזרה שנית End Repeat Ends: Description: Description תיאור Starts: Work Life Other אחר CSchceduleSearchDateItem Y M M D CSchceduleSearchItem Edit ערוך Delete מחיקה You are deleting an event. Are you sure you want to delete this event? Cancel ביטול Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M M W D CenterWidget All Day DragInfoGraphicsView Edit ערוך Delete מחיקה New event You are deleting an event. Are you sure you want to delete this event? Cancel ביטול Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return היום Return Today Today Return Today היום Shortcut Help עזרה Delete event Copy העתקה Cut גזירה Paste הדבק Select all בחר הכל Delete מחיקה YearFrame Y today Today Today היום dde-calendar-5.7.0.23/translations/dde-calendar_hi_IN.ts000066400000000000000000000502601375021633200227200ustar00rootroot00000000000000 CDayMonthView Monday सोमवार Tuesday मंगलवार Wednesday बुधवार Thursday गुरुवार Friday शुक्रवार Saturday शनिवार Sunday रविवार CDayWindow Y Y M M D CGraphicsView New Event CMonthGraphiview Delete हटाएँ You are deleting an event. आप इस इवेंट को मिटाने वाले हैं Are you sure you want to delete this event? क्या आप निश्चित रूप से इस इवेंट को डीलिट करना चाहते है Cancel रद्द करें Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event केवल इसी इवेंट को मिटाये Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event नया इवेंट New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. आप इस इवेंट को मिटाने वाले हैं Are you sure you want to delete this event? क्या आप निश्चित रूप से इस इवेंट को डीलिट करना चाहते है Cancel रद्द करें Delete हटाएँ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event केवल इसी इवेंट को मिटाये Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit संपादित करें OK ठीक है Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel रद्द करें Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never कभी नहीं At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: प्रकार : All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On चालू time(s) Save संचित करें New event नया इवेंट End time must be greater than start time OK ठीक है Type प्रकार All Day पूरे दिन Starts Ends Remind Me Repeat दोहराएँ End Repeat Ends: Description: Description विवरण Starts: Work Life जीवन Other अन्य CSchceduleSearchDateItem Y Y M M D CSchceduleSearchItem Edit संपादित करें Delete हटाएँ You are deleting an event. आप इस इवेंट को मिटाने वाले हैं Are you sure you want to delete this event? क्या आप निश्चित रूप से इस इवेंट को डीलिट करना चाहते है Cancel रद्द करें Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event केवल इसी इवेंट को मिटाये Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day पूरे दिन CSchceduleSearchView No search results खोज का कोई परिणाम नहीं मिला CScheduleView ALL DAY CWeekWindow Week Y Y CYearSchceduleItem All Day पूरे दिन CYearSchceduleView All Day पूरे दिन No event CYearWindow Y Y CalendarWindow Calendar दिनदर्शिका Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar दिनदर्शिका Y Y M M W D CenterWidget All Day पूरे दिन DragInfoGraphicsView Edit संपादित करें Delete हटाएँ New event नया इवेंट You are deleting an event. आप इस इवेंट को मिटाने वाले हैं Are you sure you want to delete this event? क्या आप निश्चित रूप से इस इवेंट को डीलिट करना चाहते है Cancel रद्द करें Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event केवल इसी इवेंट को मिटाये Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return आज Return Today Today Return Today आज Shortcut Help सहायता Delete event Copy कॉपी करें Cut काटें Paste चिपकाएँ Select all सबको चुनें Delete हटाएँ YearFrame Y Y today Today Today आज dde-calendar-5.7.0.23/translations/dde-calendar_hr.ts000066400000000000000000000440541375021633200223470ustar00rootroot00000000000000 CDayMonthView Monday Ponedjeljak Tuesday Utorak Wednesday Srijeda Thursday Četvrtak Friday Petak Saturday Subota Sunday Nedjelja CDayWindow Y Y M M D CGraphicsView New Event Novi događaj CMonthGraphiview Delete Obriši You are deleting an event. Brišete događaj. Are you sure you want to delete this event? Jeste li sigurni da želite izbrisati ovaj događaj? Cancel Otkaži Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Obrišite sve Delete Only This Event Obrišite samo ovaj događaj Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Obrišite sve buduće događaje CMonthSchceduleNumButton %1 more CMonthView New event Novi događaj New Event Novi događaj CMonthWindow Y Y CMySchceduleView You are deleting an event. Brišete događaj. Are you sure you want to delete this event? Jeste li sigurni da želite izbrisati ovaj događaj? Cancel Otkaži Delete Obriši Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Obrišite sve Delete Only This Event Obrišite samo ovaj događaj Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Moj događaj Edit Uredi OK U redu Delete All Future Events Obrišite sve buduće događaje CSchceduleDlg New Event Novi događaj Edit Event Uredi događaj All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Otkaži Change All Promijeni sve You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Sve Only This Event Samo ovaj događaj Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Svi budući događaji Never Nikada At time of event U vrijeme događaja 15 minutes before 15 minuta prije 30 minutes before 30 minuta prije 1 hour before 1 sat prije 1 day before 1 dan prije 2 days before 2 dana prije 1 week before 1 tjedan prije On start day (9:00 AM) Type: Vrsta: All Day: Cijeli dan: Remind Me: Podsjeti me: Repeat: POnovi: Daily Dnevno Weekdays Dani vikenda Weekly Tjedno Monthly Mjesečno Yearly Godišnje End Repeat: After Poslije On Uključeno time(s) Save Spremi New event Novi događaj End time must be greater than start time Vrijeme završetka mora biti veće od vremena početka OK U redu Type Vrsta All Day Cijeli dan Starts Počinje Ends Završava Remind Me Podsjeti me Repeat Ponovi End Repeat Ends: Završava: Description: Opis: Description Opis Starts: Započinje: Work Posao Life Život Other Ostalo CSchceduleSearchDateItem Y Y M M D CSchceduleSearchItem Edit Uredi Delete Obriši You are deleting an event. Brišete događaj. Are you sure you want to delete this event? Jeste li sigurni da želite izbrisati ovaj događaj? Cancel Otkaži Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Obrišite sve Delete Only This Event Obrišite samo ovaj događaj Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Obrišite sve buduće događaje All Day Cijeli dan CSchceduleSearchView No search results Nema rezultata pretrage CScheduleView ALL DAY CIJELI DAN CWeekWindow Week Tjedan Y Y CYearSchceduleItem All Day Cijeli dan CYearSchceduleView All Day Cijeli dan No event CYearWindow Y Y CalendarWindow Calendar Kalendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalendar Y Y M M W D CenterWidget All Day Cijeli dan DragInfoGraphicsView Edit Uredi Delete Obriši New event Novi događaj You are deleting an event. Brišete događaj. Are you sure you want to delete this event? Jeste li sigurni da želite izbrisati ovaj događaj? Cancel Otkaži Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Obrišite sve Delete Only This Event Obrišite samo ovaj događaj Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Obrišite sve buduće događaje New Event Novi događaj Return Today Return Danas Return Today Today Return Today Danas Shortcut Help Pomoć Delete event Copy Kopiraj Cut Izreži Paste Zalijepi Select all Odaberi sve Delete Obriši YearFrame Y Y today Today Today Danas dde-calendar-5.7.0.23/translations/dde-calendar_hu.ts000066400000000000000000000470301375021633200223470ustar00rootroot00000000000000 CDayMonthView Monday Hétfő Tuesday Kedd Wednesday Szerda Thursday Csütörtök Friday Péntek Saturday Szombat Sunday Vasárnap CDayWindow Y É M H D N CGraphicsView New Event Új esemény CMonthGraphiview Delete Törlés You are deleting an event. Ön töröl egy eseményt. Are you sure you want to delete this event? Biztos benne, hogy törli ezt az eseményt? Cancel Mégsem Do you want to delete all occurrences of this event, or only the selected occurrence? Az esemény minden ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Összes törlése Delete Only This Event Csak ezen esemény törlése Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Az eseményt és minden jövőbeli ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Future Events Összes jövőbeli esemény törlése CMonthSchceduleNumButton %1 more %1 több CMonthView New event Új esemény New Event Új esemény CMonthWindow Y É CMySchceduleView You are deleting an event. Ön töröl egy eseményt. Are you sure you want to delete this event? Biztos benne, hogy törli ezt az eseményt? Cancel Mégsem Delete Törlés Do you want to delete all occurrences of this event, or only the selected occurrence? Az esemény minden ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Összes törlése Delete Only This Event Csak ezen esemény törlése Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Az eseményt és minden jövőbeli ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? My Event Eseményem Edit Szerkesztés OK OK Delete All Future Events Összes jövőbeli esemény törlése CSchceduleDlg New Event Új esemény Edit Event Esemény szerkesztése All occurrences of a repeating event must have the same all-day status. Az ismétlődő események valamennyiének "egész nap" állapotúnak kell lennie. Do you want to change all occurrences? Minden alkalmat módosítani szeretne? Cancel Mégsem Change All Összes módosítása You are changing the repeating rule of this event. Módosítja az esemény ismétlődési szabályát. You are changing a repeating event. Ön egy ismétlődő eseményt módosít. Do you want to change only this occurrence of the event, or all occurrences? Csak az esemény ezen előfordulását akarja megváltoztatni, vagy az összes jövőbeni eseményt? All Összes Only This Event Csak ezen esemény Do you want to change only this occurrence of the event, or this and all future occurrences? Csak az esemény ezen előfordulását akarja megváltoztatni, vagy ezt és az összes jövőbeni eseményt? All Future Events Minden jövőbeli esemény Never Soha At time of event Esemény idején 15 minutes before 15 perccel előtte 30 minutes before 30 perccel előtte 1 hour before 1 órával előtte 1 day before 1 nappal előtte 2 days before 2 nappal előtte 1 week before 1 héttel előtte On start day (9:00 AM) Esemény kezdete napján (09:00) Type: Típus: All Day: Egész nap: Remind Me: Emlékeztessen: Repeat: Ismétlés: Daily Naponta Weekdays Hétköznapokon Weekly Hetente Monthly Havonta Yearly Évente End Repeat: Ismétlés vége: After Után On Be time(s) időpont(ok) Save Mentés New event Új esemény End time must be greater than start time A befejezés időpontjának a kezdés időpontjánál későbbre kell esnie OK OK Type Típus All Day Egész nap Starts Kezdés Ends Befejezés Remind Me Emlékeztessen Repeat Ismétlés End Repeat Ismétlés vége Ends: Befejezés: Description: Leírás: Description Leírás Starts: Kezdés: Work Munka Life Magánélet Other Egyéb CSchceduleSearchDateItem Y É M H D N CSchceduleSearchItem Edit Szerkesztés Delete Törlés You are deleting an event. Ön töröl egy eseményt. Are you sure you want to delete this event? Biztos benne, hogy törli ezt az eseményt? Cancel Mégsem Do you want to delete all occurrences of this event, or only the selected occurrence? Az esemény minden ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Összes törlése Delete Only This Event Csak ezen esemény törlése Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Az eseményt és minden jövőbeli ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Future Events Összes jövőbeli esemény törlése All Day Egész nap CSchceduleSearchView No search results Nincs keresési eredmény CScheduleView ALL DAY EGÉSZ NAP CWeekWindow Week Hét Y É CYearSchceduleItem All Day Egész nap CYearSchceduleView All Day Egész nap No event Nincs esemény CYearWindow Y É CalendarWindow Calendar Naptár Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. A Naptár egy eszköz a dátumok megtekintésére, valamint egy intelligens napi tervező az élet minden dolgának ütemezéséhez. Calendarmainwindow Calendar Naptár Y É M H W H D N CenterWidget All Day Egész nap DragInfoGraphicsView Edit Szerkesztés Delete Törlés New event Új esemény You are deleting an event. Ön töröl egy eseményt. Are you sure you want to delete this event? Biztos benne, hogy törli ezt az eseményt? Cancel Mégsem Do you want to delete all occurrences of this event, or only the selected occurrence? Az esemény minden ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Összes törlése Delete Only This Event Csak ezen esemény törlése Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Az eseményt és minden jövőbeli ismétlődését szeretné törölni, vagy csak a kiválasztott alkalmakat? Delete All Future Events Összes jövőbeli esemény törlése New Event Új esemény Return Today Return Ma Return Today Today Return Today Ma Shortcut Help Segítség Delete event Esemény törlése Copy Másolás Cut Kivágás Paste Beillesztés Select all Összes kijelölése Delete Törlés YearFrame Y É today Today Today Ma dde-calendar-5.7.0.23/translations/dde-calendar_hy.ts000066400000000000000000000460331375021633200223550ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Ջնջել You are deleting an event. Are you sure you want to delete this event? Cancel Չեղարկել Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Չեղարկել Delete Ջնջել Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Լավ Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Չեղարկել Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Պահել New event End time must be greater than start time OK Լավ Type Ձև All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other Այլ CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete Ջնջել You are deleting an event. Are you sure you want to delete this event? Cancel Չեղարկել Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete Ջնջել New event You are deleting an event. Are you sure you want to delete this event? Cancel Չեղարկել Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete Ջնջել YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_id.ts000066400000000000000000000451601375021633200223310ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y T M B D CGraphicsView New Event CMonthGraphiview Delete Hapus You are deleting an event. Are you sure you want to delete this event? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y T CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Batal Delete Hapus Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Sunting OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Batal Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Tidak pernah At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Tipe: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Nyala time(s) Save Simpan New event End time must be greater than start time OK OK Type Tipe All Day Starts Ends Remind Me Repeat Ulangi End Repeat Ends: Description: Description Deskripsi Starts: Work Life Other Lainnya CSchceduleSearchDateItem Y T M B D CSchceduleSearchItem Edit Sunting Delete Hapus You are deleting an event. Are you sure you want to delete this event? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Tidak ada hasil pencarian CScheduleView ALL DAY CWeekWindow Week Y T CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y T CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalender Y T M B W D CenterWidget All Day DragInfoGraphicsView Edit Sunting Delete Hapus New event You are deleting an event. Are you sure you want to delete this event? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Hari ini Return Today Today Return Today Hari ini Shortcut Help Bantuan Delete event Copy Salin Cut Potong Paste Tempel Select all Pilih semua Delete Hapus YearFrame Y T today Today Today Hari ini dde-calendar-5.7.0.23/translations/dde-calendar_it.ts000066400000000000000000000466761375021633200223660ustar00rootroot00000000000000 CDayMonthView Monday Lunedì Tuesday Martedì Wednesday Mercoledì Thursday Giovedì Friday Venerdì Saturday Sabato Sunday Domenica CDayWindow Y Y M M D D CGraphicsView New Event Nuovo evento CMonthGraphiview Delete Elimina You are deleting an event. Stai eliminando un evento. Are you sure you want to delete this event? Sicuro di voler eliminare questo evento? Cancel Annulla Do you want to delete all occurrences of this event, or only the selected occurrence? Desideri eliminare tutte le occorrenze di questo evento, oppure solo quella selezionata? Delete All Eliminale tutte Delete Only This Event Elimina solo questa occorrenza Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Desideri eliminare questa e tutte le occorrenze successive di questo evento, oppure solo quella selezionata? Delete All Future Events Tutte le occorrenze future CMonthSchceduleNumButton %1 more %1 in più CMonthView New event Nuovo evento New Event Nuovo evento CMonthWindow Y Y CMySchceduleView You are deleting an event. Stai eliminando un evento. Are you sure you want to delete this event? Sicuro di voler eliminare questo evento? Cancel Annulla Delete Elimina Do you want to delete all occurrences of this event, or only the selected occurrence? Desideri eliminare tutte le occorrenze di questo evento, oppure solo quella selezionata? Delete All Eliminale tutte Delete Only This Event Elimina solo il singolo evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Desideri eliminare questa e tutte le occorrenze successive di questo evento, oppure solo quella selezionata? My Event I miei eventi Edit Modifica OK OK Delete All Future Events Tutte le occorrenze future CSchceduleDlg New Event Nuovo evento Edit Event Modifica evento All occurrences of a repeating event must have the same all-day status. Tutte le occorrenze di una ripetizione devono avere i medesimi parametri. Do you want to change all occurrences? Desideri modificare tutte le occorrenze? Cancel Annulla Change All Cambia tutti You are changing the repeating rule of this event. Stai cambiando le regole di pianificazione di questo evento. You are changing a repeating event. Stai modificando un evento ripetitivo Do you want to change only this occurrence of the event, or all occurrences? Desideri modificare solo questa occorrenza dell'evento, o tutte quelle ad esso associate? All Tutti Only This Event Solo questo evento Do you want to change only this occurrence of the event, or this and all future occurrences? Desideri modificare solo il singolo evento,oppure tutte le future ripetizioni? All Future Events Tutte le future ripetizioni Never Mai At time of event All'ora dell'evento 15 minutes before 15 minuti prima 30 minutes before 30 minuti prima 1 hour before 1 ora prima 1 day before 1 giorno prima 2 days before 2 giorni prima 1 week before 1 settimana prima On start day (9:00 AM) All'inizio della giornata (9:00 AM) Type: Tipo: All Day: Tutto il giorno: Remind Me: Promemoria: Repeat: Ripetizione Daily Giornaliera Weekdays Giorni della settimana Weekly Settimanale Monthly Mensile Yearly Annuale End Repeat: Fine ripetizione: After Dop On Acceso time(s) ora(s) Save Salva New event Nuovo evento End time must be greater than start time La data di fine deve essere maggiore di quella di inizio OK OK Type Tipo All Day Tutto il giorno Starts Inizio Ends Fine Remind Me Ricordamelo Repeat Ripeti End Repeat Termina la ripetizione Ends: Fine: Description: Descrizione: Description Descrizione Starts: Inizio: Work Lavoro Life Personale Other Altro CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Modifica Delete Elimina You are deleting an event. Stai eliminando un evento. Are you sure you want to delete this event? Sicuro di voler eliminare questo evento? Cancel Annulla Do you want to delete all occurrences of this event, or only the selected occurrence? Desideri eliminare tutte le occorrenze di questo evento, oppure solo quella selezionata? Delete All Eliminale tutte Delete Only This Event Elimina solo il singolo evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Desideri eliminare questa e tutte le occorrenze successive di questo evento, oppure solo quella selezionata? Delete All Future Events Tutte le occorrenze future All Day Tutto il giorno CSchceduleSearchView No search results Nessun risultato disponibile CScheduleView ALL DAY Tutto il giorno CWeekWindow Week Settimana Y Y CYearSchceduleItem All Day Tutto il giorno CYearSchceduleView All Day Tutto il giorno No event Nessun evento CYearWindow Y Y CalendarWindow Calendar Calendario Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendario è uno strumento per visualizzare il calendario ma anche per pianificare in modo intelligente tutti gli eventi della propria vita quotidiana. Localizzazione italiana a cura di Massimo A. Carofano. Calendarmainwindow Calendar Calendario Y Y M M W W D D CenterWidget All Day Tutto il giorno DragInfoGraphicsView Edit Modifica Delete Elimina New event Nuovo evento You are deleting an event. Stai eliminando un evento. Are you sure you want to delete this event? Sicuro di voler eliminare questo evento? Cancel Annulla Do you want to delete all occurrences of this event, or only the selected occurrence? Desideri eliminare tutte le occorrenze di questo evento, oppure solo quella selezionata? Delete All Eliminale tutte Delete Only This Event Elimina solo questa occorrenza Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Desideri eliminare questa e tutte le occorrenze successive di questo evento, oppure solo quella selezionata? Delete All Future Events Tutte le occorrenze future New Event Nuovo evento Return Today Return Oggi Return Today Today Return Today Oggi Shortcut Help Aiuto Delete event Elimina evento Copy Copia Cut Taglia Paste Incolla Select all Seleziona tutto Delete Elimina YearFrame Y Y today Today Today Oggi dde-calendar-5.7.0.23/translations/dde-calendar_ja.ts000066400000000000000000000457661375021633200223430ustar00rootroot00000000000000 CDayMonthView Monday 月曜日 Tuesday 火曜日 Wednesday 水曜日 Thursday 木曜日 Friday 金曜日 Saturday 土曜日 Sunday 日曜日 CDayWindow Y M M D CGraphicsView New Event CMonthGraphiview Delete 削除 You are deleting an event. イベントを削除しています。 Are you sure you want to delete this event? イベントを削除してもよろしいですか? Cancel キャンセル Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All 全て削除 Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events 未来のイベントを全て削除 CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. イベントを削除しています。 Are you sure you want to delete this event? イベントを削除してもよろしいですか? Cancel キャンセル Delete 削除 Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All 全て削除 Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit 編集 OK OK Delete All Future Events 未来のイベントを全て削除 CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel キャンセル Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never しない At time of event 15 minutes before 30 minutes before 1 hour before 1時間前 1 day before 1日前 2 days before 2日前 1 week before 1週間前 On start day (9:00 AM) Type: 種類: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On On time(s) Save 保存 New event End time must be greater than start time OK OK Type 種類 All Day Starts Ends Remind Me Repeat 繰り返す End Repeat Ends: Description: Description 説明 Starts: Work Life Other その他 CSchceduleSearchDateItem Y M M D CSchceduleSearchItem Edit 編集 Delete 削除 You are deleting an event. イベントを削除しています。 Are you sure you want to delete this event? イベントを削除してもよろしいですか? Cancel キャンセル Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All 全て削除 Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events 未来のイベントを全て削除 All Day CSchceduleSearchView No search results 検索結果なし CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar カレンダー Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar カレンダー Y M M W D CenterWidget All Day DragInfoGraphicsView Edit 編集 Delete 削除 New event You are deleting an event. イベントを削除しています。 Are you sure you want to delete this event? イベントを削除してもよろしいですか? Cancel キャンセル Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All 全て削除 Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events 未来のイベントを全て削除 New Event Return Today Return 今日 Return Today Today Return Today 今日 Shortcut Help ヘルプ Delete event Copy コピー Cut 切り取り Paste 貼り付け Select all 全選択 Delete 削除 YearFrame Y today Today Today 今日 dde-calendar-5.7.0.23/translations/dde-calendar_kk.ts000066400000000000000000000461341375021633200223440ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Бас тарту Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Бас тарту Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Бас тарту Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Сақтау New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other Басқа CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Бас тарту Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Іздеу нәтижелері жоқ CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Бас тарту Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Көмек Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_km_KH.ts000066400000000000000000000461021375021633200227230ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_kn_IN.ts000066400000000000000000000460521375021633200227340ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return ಇಂದು Return Today Today Return Today ಇಂದು Shortcut Help ಸಹಾಯ Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today ಇಂದು dde-calendar-5.7.0.23/translations/dde-calendar_ko.ts000066400000000000000000000473331375021633200223520ustar00rootroot00000000000000 CDayMonthView Monday 월요일 Tuesday 화요일 Wednesday 수요일 Thursday 목요일 Friday 금요일 Saturday 토요일 Sunday 일요일 CDayWindow Y M D CGraphicsView New Event 새 이벤트 CMonthGraphiview Delete 삭제 You are deleting an event. 이벤트를 삭제하는 중. Are you sure you want to delete this event? 이 이벤트를 삭제하시겠습니까? Cancel 취소 Do you want to delete all occurrences of this event, or only the selected occurrence? 이 이벤트의 모든 발생 항목을 삭제하시겠습니까, 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All 모두 삭제 Delete Only This Event 이 이벤트만 삭제 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 이 이벤트와 이 이벤트의 모든 향후 발생 항목을 삭제하시겠습니까? 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All Future Events 모든 향후 이벤트 삭제 CMonthSchceduleNumButton %1 more %1 더 CMonthView New event 새 이벤트 New Event 새 이벤트 CMonthWindow Y CMySchceduleView You are deleting an event. 이벤트를 삭제하는 중. Are you sure you want to delete this event? 이 이벤트를 삭제하시겠습니까? Cancel 취소 Delete 삭제 Do you want to delete all occurrences of this event, or only the selected occurrence? 이 이벤트의 모든 발생 항목을 삭제하시겠습니까, 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All 모두 삭제 Delete Only This Event 이 이벤트만 삭제 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 이 이벤트와 이 이벤트의 모든 향후 발생 항목을 삭제하시겠습니까? 아니면 선택한 발생 항목만 삭제하시겠습니까? My Event 내 이벤트 Edit 편집 OK 확인 Delete All Future Events 모든 향후 이벤트 삭제 CSchceduleDlg New Event 새 이벤트 Edit Event 이벤트 편집 All occurrences of a repeating event must have the same all-day status. 반복 이벤트의 모든 발생은 하루 종일 동일한 상태를 가져야 합니다. Do you want to change all occurrences? 모든 항목을 변경하시겠습니까? Cancel 취소 Change All 모두 변경 You are changing the repeating rule of this event. 이 이벤트의 반복 규칙을 변경하고 있습니다. You are changing a repeating event. 반복 이벤트를 변경하는 중입니다. Do you want to change only this occurrence of the event, or all occurrences? 이벤트의 이 발생만 변경하시겠습니까, 아니면 모든 발생을 변경하시겠습니까? All 모두 Only This Event 이 이벤트만 Do you want to change only this occurrence of the event, or this and all future occurrences? 이벤트의 이 발생만 변경하시겠습니까, 아니면 이 발생과 향후 모든 발생만 변경하시겠습니까? All Future Events 모든 향후 이벤트 Never 없음 At time of event 이벤트 시 15 minutes before 15분 전 30 minutes before 30분 전 1 hour before 1시간 전 1 day before 1일 전 2 days before 2일 전 1 week before 1주일 전 On start day (9:00 AM) 시작일 (오전 9:00) Type: 종류: All Day: 하루 종일: Remind Me: 알림 메시지: Repeat: 반복: Daily 매일 Weekdays 요일 Weekly 매주 Monthly 매달 Yearly 매년 End Repeat: 종료 반복: After 이후 On 진행 time(s) 시간 Save 저장 New event 새 이벤트 End time must be greater than start time 종료 시간은 시작 시간보다 커야 합니다. OK 확인 Type 타입 All Day 하루 종일 Starts 시작 Ends 종료 Remind Me 알림 Repeat 다시 End Repeat 반복 종료 Ends: 종료 Description: 설명: Description 설명 Starts: 시작: Work 작업 Life 생활 Other 기타 CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit 편집 Delete 삭제 You are deleting an event. 이벤트를 삭제하는 중. Are you sure you want to delete this event? 이 이벤트를 삭제하시겠습니까? Cancel 취소 Do you want to delete all occurrences of this event, or only the selected occurrence? 이 이벤트의 모든 발생 항목을 삭제하시겠습니까, 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All 모두 삭제 Delete Only This Event 이 이벤트만 삭제 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 이 이벤트와 이 이벤트의 모든 향후 발생 항목을 삭제하시겠습니까? 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All Future Events 모든 향후 이벤트 삭제 All Day 하루 종일 CSchceduleSearchView No search results 검색결과가 없습니다. CScheduleView ALL DAY 하루 종일 CWeekWindow Week 일주일 Y CYearSchceduleItem All Day 하루 종일 CYearSchceduleView All Day 하루 종일 No event 이벤트 없음 CYearWindow Y CalendarWindow Calendar 달력 Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. 캘린더는 날짜를 볼 수있는 도구이며, 일상의 모든 것을 예약 할 수있는 현명한 일일 플래너입니다 Calendarmainwindow Calendar 달력 Y M W D CenterWidget All Day 하루 종일 DragInfoGraphicsView Edit 편집 Delete 삭제 New event 새 이벤트 You are deleting an event. 이벤트를 삭제하는 중. Are you sure you want to delete this event? 이 이벤트를 삭제하시겠습니까? Cancel 취소 Do you want to delete all occurrences of this event, or only the selected occurrence? 이 이벤트의 모든 발생 항목을 삭제하시겠습니까, 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All 모두 삭제 Delete Only This Event 이 이벤트만 삭제 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 이 이벤트와 이 이벤트의 모든 향후 발생 항목을 삭제하시겠습니까? 아니면 선택한 발생 항목만 삭제하시겠습니까? Delete All Future Events 모든 향후 이벤트 삭제 New Event 새 이벤트 Return Today Return 오늘 Return Today Today Return Today 오늘 Shortcut Help 도움말 Delete event 이벤트 삭제 Copy 복사 Cut 잘라내기 Paste 붙여넣기 Select all 전체 선택 Delete 삭제 YearFrame Y today Today Today 오늘 dde-calendar-5.7.0.23/translations/dde-calendar_ku.ts000066400000000000000000000457071375021633200223630ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Jê Bibe You are deleting an event. Are you sure you want to delete this event? Cancel Betal Bike Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Betal Bike Delete Jê Bibe Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Serrast Bike OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Betal Bike Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Qeyd Bike New event End time must be greater than start time OK OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Serrast Bike Delete Jê Bibe You are deleting an event. Are you sure you want to delete this event? Cancel Betal Bike Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Tu encama lêgerînê tune ye CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Salname Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Salname Y M W D CenterWidget All Day DragInfoGraphicsView Edit Serrast Bike Delete Jê Bibe New event You are deleting an event. Are you sure you want to delete this event? Cancel Betal Bike Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Îro Return Today Today Return Today Îro Shortcut Help Delete event Copy Jê bigire Cut Paste Select all Delete Jê Bibe YearFrame Y today Today Today Îro dde-calendar-5.7.0.23/translations/dde-calendar_ku_IQ.ts000066400000000000000000000460631375021633200227500ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Jê bibe You are deleting an event. Are you sure you want to delete this event? Cancel پاشگەزبوونەوە Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel پاشگەزبوونەوە Delete Jê bibe Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Baş e Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel پاشگەزبوونەوە Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Cûre: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Baş e Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete Jê bibe You are deleting an event. Are you sure you want to delete this event? Cancel پاشگەزبوونەوە Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Salname Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Salname Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete Jê bibe New event You are deleting an event. Are you sure you want to delete this event? Cancel پاشگەزبوونەوە Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return ئەمڕۆ Return Today Today Return Today ئەمڕۆ Shortcut Help Delete event Copy لەبەرگرتنەوە Cut بڕین Paste لکاندن Select all دیاریکردنی هەمووی Delete Jê bibe YearFrame Y today Today Today ئەمڕۆ dde-calendar-5.7.0.23/translations/dde-calendar_ky.ts000066400000000000000000000462061375021633200223620ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel жокко чыгаруу Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel жокко чыгаруу Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel жокко чыгаруу Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel жокко чыгаруу Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel жокко чыгаруу Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_ky@Arab.ts000066400000000000000000000534741375021633200232550ustar00rootroot00000000000000 CDayMonthView Monday دۉيشەمبى Tuesday سەيشەمبى Wednesday چارشەمبى Thursday پەيشەمبى Friday جۇما Saturday ئشەمبى Sunday جەكشەمبى CDayWindow Y جىل M اي D كۉن CGraphicsView New Event جاڭى وقۇيا CMonthGraphiview Delete ۅچۉرۉۉ You are deleting an event. وقۇيانى جوق قىلىپ جاتاسىز. Are you sure you want to delete this event? بۇل وقۇيانى چىن ەلە جوق قىلعىڭىز كەلەبى؟ Cancel جوققو چىعارۇۇ Do you want to delete all occurrences of this event, or only the selected occurrence? بۇل وقۇيانىن باردىق وقۇيالارىن جوق قىلعىڭىز كەلەبى جە بئر عانا تاندالعان وقۇيا؟ Delete All باارىن جوق قىلۇۇ Delete Only This Event بۇل وقۇيانى عانا جوق قىلۇۇ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ۇشۇل جانا كىيىنكى وقۇيالاردىن كىيىنكى وقۇيالارىن جە تاندالعان وقۇيانى جوق قىلعىڭىز كەلەبى ؟ Delete All Future Events باردىق كەلەچەكتەگى وقۇيالاردى جوق قىلۇۇ CMonthSchceduleNumButton %1 more %1 كۅپتۅگۅن CMonthView New event جاڭى وقۇيا New Event جاڭى وقۇيا CMonthWindow Y جىل CMySchceduleView You are deleting an event. وقۇيانى جوق قىلىپ جاتاسىز. Are you sure you want to delete this event? بۇل وقۇيانى چىن ەلە جوق قىلعىڭىز كەلەبى؟ Cancel جوققو چىعارۇۇ Delete ۅچۉرۉۉ Do you want to delete all occurrences of this event, or only the selected occurrence? بۇل وقۇيانىن باردىق وقۇيالارىن جوق قىلعىڭىز كەلەبى جە بئر عانا تاندالعان وقۇيا؟ Delete All باارىن جوق قىلۇۇ Delete Only This Event بۇل وقۇيانى عانا جوق قىلۇۇ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ۇشۇل جانا كىيىنكى وقۇيالاردىن كىيىنكى وقۇيالارىن جە تاندالعان وقۇيانى جوق قىلعىڭىز كەلەبى ؟ My Event مەنىن وقۇيام Edit رەداكتسيالوو OK Delete All Future Events باردىق كەلەچەكتەگى وقۇيالاردى جوق قىلۇۇ CSchceduleDlg New Event جاڭى وقۇيا Edit Event وقۇيانى تۉزۅتۉۉ All occurrences of a repeating event must have the same all-day status. قايتالانۇۇچۇ وقۇيانىن باردىق كۅرۉنۉشتۅرۉ بئر كۉن بويۇ بئردەي ابالدا بولۇۇعا تئيئش. Do you want to change all occurrences? باردىق كۅرۉنۉشتۅردۉ ۅزگۅرتكۉڭۉز كەلەبى؟ Cancel جوققو چىعارۇۇ Change All باارىن ۅزگۅرتۉۉ You are changing the repeating rule of this event. بۇل وقۇيانىن قايتالانعان ەرەجەسىن ۅزگۅرتۉپ جاتاسىز. You are changing a repeating event. قايتالانىپ جاتقان وقۇيانى ۅزگۅرتۉپ جاتاسىز. Do you want to change only this occurrence of the event, or all occurrences? وقۇيانىن ۇشۇل كۅرۉنۉشۉن جە باردىق كۅرۉنۉشتۅرۉن عانا ۅزگۅرتكۉڭۉز كەلەبى؟ All بااردىق Only This Event بۇل وقۇيا عانا Do you want to change only this occurrence of the event, or this and all future occurrences? وقۇيانىن ۇشۇل كۅرۉنۉشۉن عانا ۅزگۅرتكۉڭۉز كەلەبى جە كىيىنكى جانا كىيىنكى وقۇيالاربى؟ All Future Events باردىق كەلەچەكتەگى وقۇيالار Never ەچ قاچان At time of event وقۇيا ۇچۇرۇندا 15 minutes before 15 مۉنۅت مۇرۇن 30 minutes before 30 مۉنۅت مۇرۇن 1 hour before 1 ساات مۇرۇن 1 day before 1 كۉن مۇرۇن 2 days before 2 كۉن مۇرۇن 1 week before 1 جۇما مۇرۇن On start day (9:00 AM) باشتالعان كۉنۉ (9:00 AM) Type: تۉرۉ: All Day: Күн бою: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event جاڭى وقۇيا End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: تۉشۉندۉرۉۉ: Description Starts: باشتالىشى: Work ئش Life جاشوو Other باشقا CSchceduleSearchDateItem Y جىل M اي D كۉن CSchceduleSearchItem Edit رەداكتسيالوو Delete ۅچۉرۉۉ You are deleting an event. وقۇيانى جوق قىلىپ جاتاسىز. Are you sure you want to delete this event? بۇل وقۇيانى چىن ەلە جوق قىلعىڭىز كەلەبى؟ Cancel جوققو چىعارۇۇ Do you want to delete all occurrences of this event, or only the selected occurrence? بۇل وقۇيانىن باردىق وقۇيالارىن جوق قىلعىڭىز كەلەبى جە بئر عانا تاندالعان وقۇيا؟ Delete All باارىن جوق قىلۇۇ Delete Only This Event بۇل وقۇيانى عانا جوق قىلۇۇ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ۇشۇل جانا كىيىنكى وقۇيالاردىن كىيىنكى وقۇيالارىن جە تاندالعان وقۇيانى جوق قىلعىڭىز كەلەبى ؟ Delete All Future Events باردىق كەلەچەكتەگى وقۇيالاردى جوق قىلۇۇ All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y جىل CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y جىل CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y جىل M اي W D كۉن CenterWidget All Day DragInfoGraphicsView Edit رەداكتسيالوو Delete ۅچۉرۉۉ New event جاڭى وقۇيا You are deleting an event. وقۇيانى جوق قىلىپ جاتاسىز. Are you sure you want to delete this event? بۇل وقۇيانى چىن ەلە جوق قىلعىڭىز كەلەبى؟ Cancel جوققو چىعارۇۇ Do you want to delete all occurrences of this event, or only the selected occurrence? بۇل وقۇيانىن باردىق وقۇيالارىن جوق قىلعىڭىز كەلەبى جە بئر عانا تاندالعان وقۇيا؟ Delete All باارىن جوق قىلۇۇ Delete Only This Event بۇل وقۇيانى عانا جوق قىلۇۇ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ۇشۇل جانا كىيىنكى وقۇيالاردىن كىيىنكى وقۇيالارىن جە تاندالعان وقۇيانى جوق قىلعىڭىز كەلەبى ؟ Delete All Future Events باردىق كەلەچەكتەگى وقۇيالاردى جوق قىلۇۇ New Event جاڭى وقۇيا Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete ۅچۉرۉۉ YearFrame Y جىل today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_la.ts000066400000000000000000000460641375021633200223350ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Effingo Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_lo.ts000066400000000000000000000462261375021633200223530ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel ຍົກເລີກ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel ຍົກເລີກ Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK ຕົກ​ລົງ Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel ຍົກເລີກ Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK ຕົກ​ລົງ Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel ຍົກເລີກ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results ບໍ່ມີຜົນການຊອກຫາ CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel ຍົກເລີກ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_lt.ts000066400000000000000000000453131375021633200223540ustar00rootroot00000000000000 CDayMonthView Monday Pirmadienis Tuesday Antradienis Wednesday Trečiadienis Thursday Ketvirtadienis Friday Penktadienis Saturday Šeštadienis Sunday Sekmadienis CDayWindow Y M M m D d CGraphicsView New Event CMonthGraphiview Delete Ištrinti You are deleting an event. Are you sure you want to delete this event? Ar tikrai norite ištrinti šį įvykį? Cancel Atsisakyti Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event Naujas įvykis New Event CMonthWindow Y M CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Ar tikrai norite ištrinti šį įvykį? Cancel Atsisakyti Delete Ištrinti Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Redaguoti OK Gerai Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Atsisakyti Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Niekada At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Tipas: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Įjungta time(s) Save Įrašyti New event Naujas įvykis End time must be greater than start time OK Gerai Type Tipas All Day Starts Ends Remind Me Repeat Pakartokite End Repeat Ends: Description: Aprašas: Description Aprašas Starts: Work Darbas Life Gyvenimas Other Kita CSchceduleSearchDateItem Y M M m D d CSchceduleSearchItem Edit Redaguoti Delete Ištrinti You are deleting an event. Are you sure you want to delete this event? Ar tikrai norite ištrinti šį įvykį? Cancel Atsisakyti Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Paieškos rezultatų nėra CScheduleView ALL DAY CWeekWindow Week Y M CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y M CalendarWindow Calendar Kalendorius Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalendorius Y M M m W D d CenterWidget All Day DragInfoGraphicsView Edit Redaguoti Delete Ištrinti New event Naujas įvykis You are deleting an event. Are you sure you want to delete this event? Ar tikrai norite ištrinti šį įvykį? Cancel Atsisakyti Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Šiandien Return Today Today Return Today Šiandien Shortcut Help Žinynas Delete event Ištrinti įvykį Copy Kopijuoti Cut Iškirpti Paste Įdėti Select all Žymėti viską Delete Ištrinti YearFrame Y M today Today Today Šiandien dde-calendar-5.7.0.23/translations/dde-calendar_lv.ts000066400000000000000000000457471375021633200223710ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Atcelt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Atcelt Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Rediģēt OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Atcelt Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Saglabāt New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Rediģēt Delete You are deleting an event. Are you sure you want to delete this event? Cancel Atcelt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Nav atrasts neviens rezultāts CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Kalendārs Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalendārs Y M W D CenterWidget All Day DragInfoGraphicsView Edit Rediģēt Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Atcelt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Šodiena Return Today Today Return Today Šodiena Shortcut Help Delete event Copy Kopēt Cut Paste Select all Delete YearFrame Y today Today Today Šodiena dde-calendar-5.7.0.23/translations/dde-calendar_ml.ts000066400000000000000000000465641375021633200223560ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete നീക്കം ചെയ്യുക You are deleting an event. Are you sure you want to delete this event? Cancel റദ്ദാക്കുക Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel റദ്ദാക്കുക Delete നീക്കം ചെയ്യുക Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel റദ്ദാക്കുക Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never ഒരിക്കലും വേണ്ട At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save സൂക്ഷിക്കുക New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete നീക്കം ചെയ്യുക You are deleting an event. Are you sure you want to delete this event? Cancel റദ്ദാക്കുക Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results ഫലങ്ങളൊന്നുമില്ല CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar കലണ്ടർ Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar കലണ്ടർ Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete നീക്കം ചെയ്യുക New event You are deleting an event. Are you sure you want to delete this event? Cancel റദ്ദാക്കുക Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return ഇന്ന് Return Today Today Return Today ഇന്ന് Shortcut Help Delete event Copy പകർത്തുക Cut Paste Select all Delete നീക്കം ചെയ്യുക YearFrame Y today Today Today ഇന്ന് dde-calendar-5.7.0.23/translations/dde-calendar_mn.ts000066400000000000000000000460071375021633200223500ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Устгах You are deleting an event. Are you sure you want to delete this event? Cancel Цуцлах Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Цуцлах Delete Устгах Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Засах OK ЗА Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Цуцлах Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Хэзээ ч At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Төрөл: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Хадгалах New event End time must be greater than start time OK ЗА Type All Day Starts Ends Remind Me Repeat Давтах End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Засах Delete Устгах You are deleting an event. Are you sure you want to delete this event? Cancel Цуцлах Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Хайлтын үр дүн олдсонгүй CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Хуанли Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Хуанли Y M W D CenterWidget All Day DragInfoGraphicsView Edit Засах Delete Устгах New event You are deleting an event. Are you sure you want to delete this event? Cancel Цуцлах Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Өнөөдөр Return Today Today Return Today Өнөөдөр Shortcut Help Тусламж Delete event Copy Хуулах Cut Огтлох Paste Наах Select all Бүгдийг сонгох Delete Устгах YearFrame Y today Today Today Өнөөдөр dde-calendar-5.7.0.23/translations/dde-calendar_mr.ts000066400000000000000000000460771375021633200223630ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_ms.ts000066400000000000000000000464151375021633200223600ustar00rootroot00000000000000 CDayMonthView Monday Isnin Tuesday Selasa Wednesday Rabu Thursday Khamis Friday Jumaat Saturday Sabtu Sunday Ahad CDayWindow Y T M B D H CGraphicsView New Event Peristiwa Baharu CMonthGraphiview Delete Padam You are deleting an event. Anda telah memadam satu peristiwa. Are you sure you want to delete this event? Anda pasti mahu memadam peristiwa ini? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Anda pasti mahu memadam semua kemunculan peristiwa ini, atau hanya kemunculan terpilih? Delete All Padam Semua Delete Only This Event Hanya Padam Peristiwa Ini Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Anda pasti mahu memadam peristiwa ini dan semua kemunculannya yang akan datang, atau hanya kemunculan terpilih? Delete All Future Events Padam Semua Peristiwa Akan Datang CMonthSchceduleNumButton %1 more %1 lagi CMonthView New event Peristiwa baharu New Event Peristiwa Baharu CMonthWindow Y T CMySchceduleView You are deleting an event. Anda memadam satu peristiwa. Are you sure you want to delete this event? Anda pasti mahu memadam peristiwa ini? Cancel Batal Delete Padam Do you want to delete all occurrences of this event, or only the selected occurrence? Anda mahu memadam semua kemunculan peristiwa ini, atau hanya kemunculan terpilih? Delete All Padam Semua Delete Only This Event Hanya Padam Peristiwa Ini Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Anda mahu memadam semua kemunculan peristiwa ini dan akan datang, atau hanya kemunculan terpilih? My Event Peristiwa Saya Edit Sunting OK OK Delete All Future Events Padam Semua Peristiwa Akan Datang CSchceduleDlg New Event Peristiwa Baharu Edit Event Sunting Peristiwa All occurrences of a repeating event must have the same all-day status. Semua kemunculan bagi peristiwa berulang mesti mempunyai status sepanjang-hari yang sama. Do you want to change all occurrences? Anda pasti mahu mengubah semua kemunculan? Cancel Batal Change All Ubah Semua You are changing the repeating rule of this event. Anda mengubah peraturan berulang bagi peristiwa ini. You are changing a repeating event. Anda mengubah satu peristiwa berulang. Do you want to change only this occurrence of the event, or all occurrences? Anda mahu mengubah hanya kemunculan peristiwa ini, atau semua kemunculan? All Semua Only This Event Hanya Peristiwa Ini Do you want to change only this occurrence of the event, or this and all future occurrences? Anda pasti mahu mengubah hanya kemunculan peristiwa ini, atau ini dan semua kemunculan masa hadapan? All Future Events Semua Peristiwa Masa Hadapan Never Tidak sesekali At time of event Semua tempoh peristiwa 15 minutes before 15 minit sebelum 30 minutes before 30 minit sebelum 1 hour before 1 jam sebelum 1 day before 1 hari sebelum 2 days before 2 hari sebelum 1 week before 1 minggu sebelum On start day (9:00 AM) Pada hari mula (9:00 AM) Type: Jenis: All Day: Sepanjang Hari: Remind Me: Ingat Saya: Repeat: Ulang: Daily Harian Weekdays Hari Bekerja Weekly Mingguan Monthly Bulanan Yearly Tahunan End Repeat: Tamat Ulang: After Selepas On Hidup time(s) masa Save Simpan New event Peristiwa baharu End time must be greater than start time Masa tamat mesti lebih besar dari masa mula OK OK Type Jenis All Day Sepanjang Hari Starts Ends Remind Me Repeat Ulang End Repeat Ends: Tamat: Description: Keterangan: Description Keterangan Starts: Mula: Work Kerja Life Lapang Other Lain-lain CSchceduleSearchDateItem Y T M B D H CSchceduleSearchItem Edit Sunting Delete Padam You are deleting an event. Anda memadam satu peristiwa. Are you sure you want to delete this event? Anda pasti mahu memadam peristiwa ini? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Anda mahu memadam semua kemunculan peristiwa ini, atau hanya kemunculan terpilih? Delete All Padam Semua Delete Only This Event Hanya Padam Peristiwa Ini Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Anda mahu memadam semua kemunculan peristiwa ini dan akan datang, atau hanya kemunculan terpilih? Delete All Future Events Padam Semua Peristiwa Akan Datang All Day Sepanjang Hari CSchceduleSearchView No search results Tiada keputusan gelintar CScheduleView ALL DAY SEPANJANG HARI CWeekWindow Week Minggu Y T CYearSchceduleItem All Day Sepanjang Hari CYearSchceduleView All Day Sepanjang Hari No event Tiada peristiwa CYearWindow Y T CalendarWindow Calendar Kalendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalendar ialah sebuah alat untuk melihat tarikh, dan juga satu perancang harian pintar yang dapat menjadualkan semua perkara dalam hidup ini. Calendarmainwindow Calendar Kalendar Y T M B W M D H CenterWidget All Day Sepanjang Hari DragInfoGraphicsView Edit Sunting Delete Padam New event Peristiwa baharu You are deleting an event. Anda telah memadam satu peristiwa. Are you sure you want to delete this event? Anda pasti mahu memadam peristiwa ini? Cancel Batal Do you want to delete all occurrences of this event, or only the selected occurrence? Anda pasti mahu memadam semua kemunculan peristiwa ini, atau hanya kemunculan terpilih? Delete All Padam Semua Delete Only This Event Hanya Padam Peristiwa Ini Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Anda pasti mahu memadam peristiwa ini dan semua kemunculannya yang akan datang, atau hanya kemunculan terpilih? Delete All Future Events Padam Semua Peristiwa Akan Datang New Event Peristiwa Baharu Return Today Return Hari ini Return Today Today Return Today Hari ini Shortcut Help Bantuan Delete event Padam peristiwa Copy Salin Cut Potong Paste Tampal Select all Pilih semua Delete Padam YearFrame Y T today Today Today Hari ini dde-calendar-5.7.0.23/translations/dde-calendar_nb.ts000066400000000000000000000451331375021633200223340ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y J M M D CGraphicsView New Event CMonthGraphiview Delete Slett You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y J CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Delete Slett Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Rediger OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Avbryt Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Aldri At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Lagre New event End time must be greater than start time OK OK Type Type All Day Starts Ends Remind Me Repeat Gjenta End Repeat Ends: Description: Description Beskrivelse Starts: Work Life Other Andre CSchceduleSearchDateItem Y J M M D CSchceduleSearchItem Edit Rediger Delete Slett You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Ingen søkeresultater CScheduleView ALL DAY CWeekWindow Week Y J CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y J CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalender Y J M M W D CenterWidget All Day DragInfoGraphicsView Edit Rediger Delete Slett New event You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return I dag Return Today Today Return Today I dag Shortcut Help Hjelp Delete event Copy Kopier Cut Klipp Paste Lim inn Select all Velg alle Delete Slett YearFrame Y J today Today Today I dag dde-calendar-5.7.0.23/translations/dde-calendar_ne.ts000066400000000000000000000464451375021633200223460ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete मेटाउनुहोस् You are deleting an event. Are you sure you want to delete this event? Cancel रद्द Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel रद्द Delete मेटाउनुहोस् Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit सम्पादन गर्नुहोस् OK ठिक छ Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel रद्द Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: प्रकार All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save सुरक्षित गर्नुहोस् New event End time must be greater than start time OK ठिक छ Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit सम्पादन गर्नुहोस् Delete मेटाउनुहोस् You are deleting an event. Are you sure you want to delete this event? Cancel रद्द Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar क्यालेन्डर Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar क्यालेन्डर Y M W D CenterWidget All Day DragInfoGraphicsView Edit सम्पादन गर्नुहोस् Delete मेटाउनुहोस् New event You are deleting an event. Are you sure you want to delete this event? Cancel रद्द Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return आज Return Today Today Return Today आज Shortcut Help सयोग Delete event Copy कपी Cut Paste Select all Delete मेटाउनुहोस् YearFrame Y today Today Today आज dde-calendar-5.7.0.23/translations/dde-calendar_nl.ts000066400000000000000000000460421375021633200223460ustar00rootroot00000000000000 CDayMonthView Monday Maandag Tuesday Dinsdag Wednesday Woensdag Thursday Donderdag Friday Vrijdag Saturday Zaterdag Sunday Zondag CDayWindow Y J M M D D CGraphicsView New Event Nieuwe afspraak CMonthGraphiview Delete Verwijderen You are deleting an event. Je verwijdert een afspraak. Are you sure you want to delete this event? Weet je zeker dat je deze afspraak wilt verwijderen? Cancel Annuleren Do you want to delete all occurrences of this event, or only the selected occurrence? Wil je alle afspraken in de reeks verwijderen of enkel deze? Delete All Reeks verwijderen Delete Only This Event Deze afspraak verwijderen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Wil je deze en toekomstige afspraken verwijderen of enkel deze? Delete All Future Events Toekomstige afspraken verwijderen CMonthSchceduleNumButton %1 more Nog %1 andere CMonthView New event Nieuwe afspraak New Event Nieuwe afspraak CMonthWindow Y J CMySchceduleView You are deleting an event. Je verwijdert een afspraak. Are you sure you want to delete this event? Weet je zeker dat je deze afspraak wilt verwijderen? Cancel Annuleren Delete Verwijderen Do you want to delete all occurrences of this event, or only the selected occurrence? Wil je alle afspraken in de reeks verwijderen of enkel deze? Delete All Reeks verwijderen Delete Only This Event Deze afspraak verwijderen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Wil je deze en toekomstige afspraken verwijderen of enkel deze? My Event Mijn afspraak Edit Aanpassen OK Oké Delete All Future Events Toekomstige afspraken verwijderen CSchceduleDlg New Event Nieuwe afspraak Edit Event Afspraak aanpassen All occurrences of a repeating event must have the same all-day status. Alle afspraken in reeks moeten voorzien zijn van de status 'hele dag'. Do you want to change all occurrences? Wil je alle afspraken in de reeks aanpassen? Cancel Annuleren Change All Reeks aanpassen You are changing the repeating rule of this event. Je past de herhaalinstellingen van deze afspraak aan. You are changing a repeating event. Je past een reeks afspraken aan. Do you want to change only this occurrence of the event, or all occurrences? Wil je deze en toekomstige afspraken aanpassen of enkel deze? All Reeks Only This Event Deze afspraak Do you want to change only this occurrence of the event, or this and all future occurrences? Wil je deze en toekomstige afspraken aanpassen of enkel deze? All Future Events Toekomstige afspraken Never Nooit At time of event Bij aanvang 15 minutes before 15 minuten van tevoren 30 minutes before 30 minuten van tevoren 1 hour before 1 uur van tevoren 1 day before 1 dag van tevoren 2 days before 2 dagen van tevoren 1 week before 1 week van tevoren On start day (9:00 AM) Op de dag van de afspraak (9:00 AM) Type: Soort: All Day: Hele dag: Remind Me: Herinneren: Repeat: Herhalen: Daily Dagelijks Weekdays Werkdagen Weekly Wekelijks Monthly Maandelijks Yearly Jaarlijks End Repeat: Herhaling eindigt op: After Na On Op time(s) keer Save Opslaan New event Nieuwe afspraak End time must be greater than start time De eindtijd moet later zijn dan de begintijd OK Oké Type Soort All Day Hele dag Starts Begint om Ends Eindigt om Remind Me Herinneren Repeat Herhalen End Repeat Herhaling stoppen Ends: Einde: Description: Omschrijving: Description Omschrijving Starts: Begin: Work Werk Life Privé Other Overig CSchceduleSearchDateItem Y J M M D D CSchceduleSearchItem Edit Aanpassen Delete Verwijderen You are deleting an event. Je verwijdert een afspraak. Are you sure you want to delete this event? Weet je zeker dat je deze afspraak wilt verwijderen? Cancel Annuleren Do you want to delete all occurrences of this event, or only the selected occurrence? Wil je alle afspraken in de reeks verwijderen of enkel deze? Delete All Reeks verwijderen Delete Only This Event Deze afspraak verwijderen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Wil je deze en toekomstige afspraken verwijderen of enkel de deze? Delete All Future Events Toekomstige afspraken verwijderen All Day Hele dag CSchceduleSearchView No search results Geen zoekresultaten CScheduleView ALL DAY HELE DAG CWeekWindow Week Week Y J CYearSchceduleItem All Day Hele dag CYearSchceduleView All Day Hele dag No event Geen afspraak CYearWindow Y J CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Met Kalender kun je je afspraken en planning beheren, zowel werk als privé. Calendarmainwindow Calendar Kalender Y J M M W W D D CenterWidget All Day Hele dag DragInfoGraphicsView Edit Aanpassen Delete Verwijderen New event Nieuwe afspraak You are deleting an event. Je verwijdert een afspraak. Are you sure you want to delete this event? Weet je zeker dat je deze afspraak wilt verwijderen? Cancel Annuleren Do you want to delete all occurrences of this event, or only the selected occurrence? Wil je alle afspraken in de reeks verwijderen of enkel deze? Delete All Reeks verwijderen Delete Only This Event Deze afspraak verwijderen Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Wil je deze en toekomstige afspraken verwijderen of enkel deze? Delete All Future Events Toekomstige afspraken verwijderen New Event Nieuwe afspraak Return Today Return Vandaag Return Today Today Return Today Vandaag Shortcut Help Hulp Delete event Afspraak verwijderen Copy Kopiëren Cut Knippen Paste Plakken Select all Alles selecteren Delete Verwijderen YearFrame Y J today Today Today Vandaag dde-calendar-5.7.0.23/translations/dde-calendar_pa.ts000066400000000000000000000461461375021633200223420ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete ਹਟਾਓ You are deleting an event. Are you sure you want to delete this event? Cancel ਰੱਦ ਕਰੋ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel ਰੱਦ ਕਰੋ Delete ਹਟਾਓ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK ਠੀਕ ਹੈ Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel ਰੱਦ ਕਰੋ Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save ਸੰਭਾਲੋ New event End time must be greater than start time OK ਠੀਕ ਹੈ Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other ਹੋਰ CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete ਹਟਾਓ You are deleting an event. Are you sure you want to delete this event? Cancel ਰੱਦ ਕਰੋ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results ਕੋਈ ਖੋਜ ਨਤੀਜਾ ਨਹੀਂ ਹੈ CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar ਕੈਲੰਡਰ Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar ਕੈਲੰਡਰ Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete ਹਟਾਓ New event You are deleting an event. Are you sure you want to delete this event? Cancel ਰੱਦ ਕਰੋ Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return ਅੱਜ Return Today Today Return Today ਅੱਜ Shortcut Help ਮਦਦ Delete event Copy ਕਾਪੀ ਕਰੋ Cut Paste Select all Delete ਹਟਾਓ YearFrame Y today Today Today ਅੱਜ dde-calendar-5.7.0.23/translations/dde-calendar_pam.ts000066400000000000000000000456411375021633200225160ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Buran You are deleting an event. Are you sure you want to delete this event? Cancel I-cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel I-cancel Delete Buran Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Alilan OK OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel I-cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Buklat time(s) Save Isinup New event End time must be greater than start time OK OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Alilan Delete Buran You are deleting an event. Are you sure you want to delete this event? Cancel I-cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Alilan Delete Buran New event You are deleting an event. Are you sure you want to delete this event? Cancel I-cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Kopyan Cut Pututan Paste Dikit Select all Pilinan ngan Delete Buran YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_pl.ts000066400000000000000000000466231375021633200223550ustar00rootroot00000000000000 CDayMonthView Monday Poniedziałek Tuesday Wtorek Wednesday Środa Thursday Czwartek Friday Piątek Saturday Sobota Sunday Niedziela CDayWindow Y Y M M D D CGraphicsView New Event Nowe wydarzenie CMonthGraphiview Delete Usuń You are deleting an event. Usuwasz wydarzenie. Are you sure you want to delete this event? Czy na pewno chcesz usunąć to wydarzenie? Cancel Anuluj Do you want to delete all occurrences of this event, or only the selected occurrence? Czy chcesz usunąć wszystkie wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Usuń wszystko Delete Only This Event Usuń tylko to wydarzenie Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Czy chcesz usunąć to i wszystkie przyszłe wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Future Events Usuń wszystkie przyszłe zdarzenia CMonthSchceduleNumButton %1 more Jeszcze %1 CMonthView New event New event New Event Nowe wydarzenie CMonthWindow Y Y CMySchceduleView You are deleting an event. Usuwasz wydarzenie. Are you sure you want to delete this event? Czy na pewno chcesz usunąć to wydarzenie? Cancel Anuluj Delete Usuń Do you want to delete all occurrences of this event, or only the selected occurrence? Czy chcesz usunąć wszystkie wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Usuń wszystko Delete Only This Event Usuń tylko to wydarzenie Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Czy chcesz usunąć to i wszystkie przyszłe wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? My Event Moje wydarzenie Edit Edycja OK OK Delete All Future Events Usuń wszystkie przyszłe zdarzenia CSchceduleDlg New Event Nowe wydarzenie Edit Event Edytuj wydarzenie All occurrences of a repeating event must have the same all-day status. Wszystkie wystąpienia powtarzającego się zdarzenia muszą mieć ten sam status przez cały dzień. Do you want to change all occurrences? Czy chcesz zmienić wszystkie wystąpienia? Cancel Anuluj Change All Zmienić wszystko You are changing the repeating rule of this event. Zmieniasz powtarzającą się regułę tego wydarzenia. You are changing a repeating event. Zmieniasz powtarzające się wydarzenie. Do you want to change only this occurrence of the event, or all occurrences? Czy chcesz zmienić tylko to wystąpienie zdarzenia, czy wszystkie wystąpienia? All Wszystko Only This Event Tylko to wydarzenie Do you want to change only this occurrence of the event, or this and all future occurrences? Czy chcesz zmienić tylko to wystąpienie zdarzenia, czy to i wszystkie przyszłe zdarzenia? All Future Events Wszystkie przyszłe wydarzenia Never Nigdy At time of event W momencie zdarzenia 15 minutes before 15 minut wcześniej 30 minutes before 30 minut wcześniej 1 hour before 1 godzinę wcześniej 1 day before 1 dzień wcześniej 2 days before 2 dni wcześniej 1 week before 1 tydzień wcześniej On start day (9:00 AM) W dniu rozpoczęcia (9:00) Type: Rodzaj: All Day: Cały dzień: Remind Me: Przypomnij mi: Repeat: Powtarzać: Daily Codziennie Weekdays Dni powszednie Weekly Co tydzień Monthly Miesięcznie Yearly Rocznie End Repeat: Koniec powtórzenia: After Po On Włącz time(s) raz(y) Save Zapisz New event New event End time must be greater than start time Czas zakończenia musi być dłuższy niż czas rozpoczęcia OK OK Type Typ All Day Cały dzień Starts Zaczyna się Ends Kończy się Remind Me Przypomnij mi Repeat Powtórzenie End Repeat Zakończ powtarzanie Ends: Kończy się: Description: Opis: Description Opis Starts: Zaczyna się: Work Praca Life Życie Other Inne CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edycja Delete Usuń You are deleting an event. Usuwasz wydarzenie. Are you sure you want to delete this event? Czy na pewno chcesz usunąć to wydarzenie? Cancel Anuluj Do you want to delete all occurrences of this event, or only the selected occurrence? Czy chcesz usunąć wszystkie wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Usuń wszystko Delete Only This Event Usuń tylko to wydarzenie Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Czy chcesz usunąć to i wszystkie przyszłe wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Future Events Usuń wszystkie przyszłe zdarzenia All Day Cały dzień CSchceduleSearchView No search results Brak wyników wyszukiwania CScheduleView ALL DAY CAŁY DZIEŃ CWeekWindow Week Tydzień Y Y CYearSchceduleItem All Day Cały dzień CYearSchceduleView All Day Cały dzień No event Brak zdarzenia CYearWindow Y Y CalendarWindow Calendar Kalendarz Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalendarz to narzędzie do przeglądania dat, a także inteligentny planer dzienny do planowania wszystkich rzeczy w życiu. Calendarmainwindow Calendar Kalendarz Y Y M M W W D D CenterWidget All Day Cały dzień DragInfoGraphicsView Edit Edycja Delete Usuń New event Nowe wydarzenie You are deleting an event. Usuwasz wydarzenie. Are you sure you want to delete this event? Czy na pewno chcesz usunąć to wydarzenie? Cancel Anuluj Do you want to delete all occurrences of this event, or only the selected occurrence? Czy chcesz usunąć wszystkie wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Usuń wszystko Delete Only This Event Usuń tylko to wydarzenie Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Czy chcesz usunąć to i wszystkie przyszłe wystąpienia tego zdarzenia, czy tylko wybrane wystąpienie? Delete All Future Events Usuń wszystkie przyszłe zdarzenia New Event Nowe wydarzenie Return Today Return Dzisiaj Return Today Today Return Today Dzisiaj Shortcut Help Pomoc Delete event Usuń wydarzenie Copy Kopiuj Cut Wytnij Paste Wklej Select all Zaznacz wszystko Delete Usuń YearFrame Y Y today Today Today Dzisiaj dde-calendar-5.7.0.23/translations/dde-calendar_pt.ts000066400000000000000000000463341375021633200223640ustar00rootroot00000000000000 CDayMonthView Monday Seg Tuesday Ter Wednesday Qua Thursday Qui Friday Sex Saturday Sáb Sunday Dom CDayWindow Y A M M D D CGraphicsView New Event Novo evento CMonthGraphiview Delete Eliminar You are deleting an event. Está a eliminar um evento. Are you sure you want to delete this event? Tem a certeza que deseja eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Deseja eliminar todas as ocorrências deste evento ou apenas a ocorrência selecionada? Delete All Eliminar tudo Delete Only This Event Eliminar apenas este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Deseja eliminar esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? Delete All Future Events Eliminar todos os eventos futuros CMonthSchceduleNumButton %1 more mais %1 CMonthView New event Novo evento New Event Novo evento CMonthWindow Y A CMySchceduleView You are deleting an event. Está a eliminar um evento. Are you sure you want to delete this event? Tem a certeza que deseja eliminar este evento? Cancel Cancelar Delete Eliminar Do you want to delete all occurrences of this event, or only the selected occurrence? Deseja eliminar todas as ocorrências para este evento ou apenas a ocorrência selecionada? Delete All Eliminar tudo Delete Only This Event Eliminar apenas este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Deseja eliminar esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? My Event O meu evento Edit Editar OK Aceitar Delete All Future Events Eliminar todos os eventos futuros CSchceduleDlg New Event Novo evento Edit Event Editar evento All occurrences of a repeating event must have the same all-day status. Todas as ocorrências de um evento repetido devem ter o mesmo estado durante todo o dia. Do you want to change all occurrences? Deseja mudar todas as ocorrências? Cancel Cancelar Change All Alterar tudo You are changing the repeating rule of this event. Está a mudar a regra da repetição deste evento. You are changing a repeating event. Está a mudar um evento repetitivo. Do you want to change only this occurrence of the event, or all occurrences? Deseja mudar apenas esta ocorrência do evento, ou todas as ocorrências? All Tudo Only This Event Apenas este evento Do you want to change only this occurrence of the event, or this and all future occurrences? Deseja mudar apenas esta ocorrência do evento ou esta e todas as ocorrências futuras? All Future Events Todos os eventos futuros Never Nunca At time of event Na hora do evento 15 minutes before 15 minutos antes 30 minutes before 30 minutos antes 1 hour before 1 hora antes 1 day before 1 dia antes 2 days before 2 dias antes 1 week before 1 semana antes On start day (9:00 AM) No início do dia (9:00 AM) Type: Tipo: All Day: Dia todo: Remind Me: Lembrar-me: Repeat: Repetir: Daily Diário Weekdays Dias da semana Weekly Semanal Monthly Mensal Yearly Anual End Repeat: Fim de repetição: After Depois On Ligado time(s) vez(es) Save Guardar New event Novo evento End time must be greater than start time A hora de fim deve ser maior do que a hora de início OK Aceitar Type Tipo All Day Dia todo Starts Inicia Ends Termina Remind Me Lembrar Repeat Repetir End Repeat Fim repetição Ends: Termina: Description: Descrição: Description Descrição Starts: Começa: Work Trabalho Life Vida Other Outro CSchceduleSearchDateItem Y A M M D D CSchceduleSearchItem Edit Editar Delete Eliminar You are deleting an event. Está a eliminar um evento. Are you sure you want to delete this event? Tem a certeza que deseja eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Deseja eliminar todas as ocorrências para este evento ou apenas a ocorrência selecionada? Delete All Eliminar tudo Delete Only This Event Eliminar apenas este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Deseja eliminar esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? Delete All Future Events Eliminar todos os eventos futuros All Day Dia todo CSchceduleSearchView No search results Sem resultados CScheduleView ALL DAY DIA TODO CWeekWindow Week Semana Y A CYearSchceduleItem All Day Dia todo CYearSchceduleView All Day Dia todo No event Nenhum evento CYearWindow Y A CalendarWindow Calendar Calendário Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. O Calendário é uma ferramenta para visualizar datas e também uma agenda diária inteligente para agendar todas as coisas na vida. Calendarmainwindow Calendar Calendário Y A M M W S D D CenterWidget All Day Dia todo DragInfoGraphicsView Edit Editar Delete Eliminar New event Novo evento You are deleting an event. Está a eliminar um evento. Are you sure you want to delete this event? Tem a certeza que deseja eliminar este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Deseja eliminar todas as ocorrências deste evento ou apenas a ocorrência selecionada? Delete All Eliminar tudo Delete Only This Event Eliminar apenas este evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Deseja eliminar esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? Delete All Future Events Eliminar todos os eventos futuros New Event Novo evento Return Today Return Hoje Return Today Today Return Today Hoje Shortcut Help Ajuda Delete event Eliminar evento Copy Copiar Cut Cortar Paste Colar Select all Selecionar tudo Delete Eliminar YearFrame Y A today Today Today Hoje dde-calendar-5.7.0.23/translations/dde-calendar_pt_BR.ts000066400000000000000000000460331375021633200227430ustar00rootroot00000000000000 CDayMonthView Monday Segunda-feira Tuesday Terça-feira Wednesday Quarta-feira Thursday Quinta-feira Friday Sexta-feira Saturday Sábado Sunday Domingo CDayWindow Y A M M D D CGraphicsView New Event Novo Evento CMonthGraphiview Delete Excluir You are deleting an event. Está excluindo um evento. Are you sure you want to delete this event? Excluir este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Excluir todas as ocorrências deste evento, ou apenas a ocorrência selecionada? Delete All Excluir Tudo Delete Only This Event Excluir Apenas Este Evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Excluir esta e todas as ocorrências futuras deste evento, ou apenas a ocorrência selecionada? Delete All Future Events Excluir Todos os Eventos Futuros CMonthSchceduleNumButton %1 more %1 mais CMonthView New event Novo evento New Event Novo Evento CMonthWindow Y A CMySchceduleView You are deleting an event. Está excluindo um evento. Are you sure you want to delete this event? Excluir este evento? Cancel Cancelar Delete Excluir Do you want to delete all occurrences of this event, or only the selected occurrence? Excluir todas as ocorrências deste evento ou apenas a ocorrência selecionada? Delete All Excluir Tudo Delete Only This Event Excluir Apenas Este Evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Excluir esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? My Event Evento Edit Editar OK Ok Delete All Future Events Excluir Todos os Eventos Futuros CSchceduleDlg New Event Novo Evento Edit Event Editar Evento All occurrences of a repeating event must have the same all-day status. Todas as ocorrências de um evento repetido, devem ter o mesmo status de dia inteiro. Do you want to change all occurrences? Alterar todas as ocorrências? Cancel Cancelar Change All Alterar Tudo You are changing the repeating rule of this event. Está alterando a regra de repetição deste evento. You are changing a repeating event. Alterando um evento repetido. Do you want to change only this occurrence of the event, or all occurrences? Alterar apenas esta ocorrência do evento ou todas as ocorrências? All Tudo Only This Event Apenas Este Evento Do you want to change only this occurrence of the event, or this and all future occurrences? Alterar apenas esta ocorrência do evento ou esta e todas as ocorrências futuras? All Future Events Todos os Eventos Futuros Never Nunca At time of event Na hora do evento 15 minutes before 15 minutos antes 30 minutes before 30 minutos antes 1 hour before 1 hora antes 1 day before 1 dia antes 2 days before 2 dias antes 1 week before 1 semana antes On start day (9:00 AM) No Dia de Início (9:00 AM) Type: Tipo: All Day: Dia Inteiro: Remind Me: Lembre-me: Repeat: Repetir: Daily Diariamente Weekdays Dias da Semana Weekly Semanal Monthly Mensal Yearly Anual End Repeat: Repetição Final: After Depois On Ligado time(s) tempo(s) Save Salvar New event Novo evento End time must be greater than start time A hora de término deve ser maior que a hora de início OK Ok Type Tipo All Day Dia Inteiro Starts Começa em Ends Termina em Remind Me Lembrar-me Repeat Repetir End Repeat Repetir até Ends: Termina em: Description: Descrição: Description Descrição Starts: Começa em: Work Trabalho Life Social Other Outro CSchceduleSearchDateItem Y A M M D D CSchceduleSearchItem Edit Editar Delete Excluir You are deleting an event. Está excluindo um evento. Are you sure you want to delete this event? Excluir este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Excluir todas as ocorrências deste evento ou apenas a ocorrência selecionada? Delete All Excluir Tudo Delete Only This Event Excluir Apenas Este Evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Excluir esta e todas as ocorrências futuras deste evento ou apenas a ocorrência selecionada? Delete All Future Events Excluir Todos os Eventos Futuros All Day Dia Inteiro CSchceduleSearchView No search results Nenhum resultado CScheduleView ALL DAY DIA INTEIRO CWeekWindow Week Semana Y A CYearSchceduleItem All Day Dia Inteiro CYearSchceduleView All Day Dia Inteiro No event Nenhum Evento CYearWindow Y A CalendarWindow Calendar Calendário Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. O Calendário é uma ferramenta que permite agendar e visualizar eventos. Calendarmainwindow Calendar Calendário Y A M M W S D D CenterWidget All Day Dia Inteiro DragInfoGraphicsView Edit Editar Delete Excluir New event Novo evento You are deleting an event. Está excluindo um evento. Are you sure you want to delete this event? Excluir este evento? Cancel Cancelar Do you want to delete all occurrences of this event, or only the selected occurrence? Excluir todas as ocorrências deste evento, ou apenas a ocorrência selecionada? Delete All Excluir Tudo Delete Only This Event Excluir Apenas Este Evento Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Excluir esta e todas as ocorrências futuras deste evento, ou apenas a ocorrência selecionada? Delete All Future Events Excluir Todos os Eventos Futuros New Event Novo Evento Return Today Return Hoje Return Today Today Return Today Hoje Shortcut Help Ajuda Delete event Excluir evento Copy Copiar Cut Recortar Paste Colar Select all Selecionar Tudo Delete Excluir YearFrame Y A today Today Today Hoje dde-calendar-5.7.0.23/translations/dde-calendar_ro.ts000066400000000000000000000466511375021633200223630ustar00rootroot00000000000000 CDayMonthView Monday Luni Tuesday Marţi Wednesday Miercuri Thursday Joi Friday Vineri Saturday Sâmbătă Sunday Duminică CDayWindow Y Y M l D z CGraphicsView New Event Eveniment nou CMonthGraphiview Delete Ștergeți You are deleting an event. Ştergeţi un eveniment. Are you sure you want to delete this event? Sigur doriţi să ştergeţi acest eveniment? Cancel Anulează Do you want to delete all occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Şterge tot Delete Only This Event Şterge doar acest eveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Future Events Şterge toate evenimentele viitoare CMonthSchceduleNumButton %1 more %1 mai mult CMonthView New event Eveniment nou New Event Eveniment nou CMonthWindow Y A CMySchceduleView You are deleting an event. Ştergeţi un eveniment. Are you sure you want to delete this event? Sigur doriţi să ştergeţi acest eveniment? Cancel Anulare Delete Ștergeți Do you want to delete all occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Şterge tot Delete Only This Event Şterge doar acest eveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? My Event Evenimentul meu Edit Editare OK Ok Delete All Future Events Şterge toate evenimentele viitoare CSchceduleDlg New Event Eveniment nou Edit Event Editare eveniment All occurrences of a repeating event must have the same all-day status. Toate aparițiile unui eveniment repetat trebuie să aibă același statut toată ziua. Do you want to change all occurrences? Doriți să schimbați toate aparițiile? Cancel Anulare Change All Schimbă tot You are changing the repeating rule of this event. Modificați regula de repetare a acestui eveniment. You are changing a repeating event. Modificați un eveniment care se repetă. Do you want to change only this occurrence of the event, or all occurrences? Doriți să schimbați doar această apariție a evenimentului sau toate evenimentele? All Tot Only This Event Doar acest eveniment Do you want to change only this occurrence of the event, or this and all future occurrences? Doriți să schimbați doar această apariție a evenimentului sau aceasta și toate evenimentele viitoare? All Future Events Toate evenimentele viitoare Never Niciodată At time of event La momentul evenimentului 15 minutes before Cu 15 minute înainte 30 minutes before Cu 30 minute înainte 1 hour before Cu 1 oră înainte 1 day before Cu 1 zi înainte 2 days before Cu 2 zile înainte 1 week before Cu 1 săptămână înainte On start day (9:00 AM) Începutul zilei (9:00 AM) Type: Tip: All Day: Toată ziua: Remind Me: Aminteşte-mi: Repeat: Repetă: Daily Zilnic Weekdays Zilele lucrătoare Weekly Săptămânal Monthly Lunar Yearly Anual End Repeat: Repetarea se termină: After După On Pornire time(s) ori Save Salvare New event Eveniment nou End time must be greater than start time Ora de încheiere trebuie să fie mai mare decât ora de început OK Ok Type Tip All Day Toată ziua Starts Încep: Ends Se termină: Remind Me Aminteşte-mi Repeat Repetă End Repeat Opreşte repetarea Ends: Se termină: Description: Descriere: Description Descriere Starts: Încep: Work Serviciu Life Viaţă Other Altul CSchceduleSearchDateItem Y A M l D z CSchceduleSearchItem Edit Editare Delete Ștergeți You are deleting an event. Ştergeţi un eveniment. Are you sure you want to delete this event? Sigur doriţi să ştergeţi acest eveniment? Cancel Anulare Do you want to delete all occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Şterge tot Delete Only This Event Şterge doar acest eveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Future Events Şterge toate evenimentele viitoare All Day Toată ziua CSchceduleSearchView No search results Niciun rezultat la căutare CScheduleView ALL DAY TOATĂ ZIUA CWeekWindow Week Săptămână Y A CYearSchceduleItem All Day Toată ziua CYearSchceduleView All Day Toată ziua No event Nici nu eveniment CYearWindow Y A CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarul este un instrument pentru a vizualiza datele și, de asemenea, un planificator inteligent zilnic pentru a programa toate lucrurile din viață. Calendarmainwindow Calendar Calendar Y A M l W S D z CenterWidget All Day Toată ziua DragInfoGraphicsView Edit Editare Delete Ștergeți New event Eveniment nou You are deleting an event. Ştergeţi un eveniment. Are you sure you want to delete this event? Sigur doriţi să ştergeţi acest eveniment? Cancel Anulează Do you want to delete all occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Şterge tot Delete Only This Event Şterge doar acest eveniment Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doriți să ștergeți toate aparițiile acestui eveniment sau doar evenimentul selectat? Delete All Future Events Şterge toate evenimentele viitoare New Event Eveniment nou Return Today Return Astăzi Return Today Today Return Today Astăzi Shortcut Help Ajutor Delete event Ştergere eveniment Copy Copiere Cut Tăiere Paste Lipire Select all Selectează totul Delete Ștergeți YearFrame Y A today Today Today Astăzi dde-calendar-5.7.0.23/translations/dde-calendar_ru.ts000066400000000000000000000522371375021633200223660ustar00rootroot00000000000000 CDayMonthView Monday Понедельник Tuesday Вторник Wednesday Среда Thursday Четверг Friday Пятница Saturday Суббота Sunday Воскресенье CDayWindow Y Г M М D Д CGraphicsView New Event Новое Событие CMonthGraphiview Delete Удалить You are deleting an event. Вы удаляете событие. Are you sure you want to delete this event? Вы уверены, что хотите удалить это событие? Cancel Отмена Do you want to delete all occurrences of this event, or only the selected occurrence? Вы хотите удалить все записи этого события или только выбранную запись? Delete All Удалить все Delete Only This Event Удалить только это событие Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Вы хотите удалить эту и все будущие записи этого события или только выбранную запись? Delete All Future Events Удалить все будущие события CMonthSchceduleNumButton %1 more %1 более CMonthView New event Новое событие New Event Новое Событие CMonthWindow Y Г CMySchceduleView You are deleting an event. Вы удаляете событие. Are you sure you want to delete this event? Вы уверены, что хотите удалить это событие? Cancel Отмена Delete Удалить Do you want to delete all occurrences of this event, or only the selected occurrence? Вы хотите удалить все записи этого события или только выбранную запись? Delete All Удалить Всё Delete Only This Event Удалить Только Это Событие Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Вы хотите удалить эту и все будущие записи этого события или только выбранную запись? My Event Моё Событие Edit Редактировать OK OK Delete All Future Events Удалить Все Будущие События CSchceduleDlg New Event Новое Событие Edit Event Изменить Событие All occurrences of a repeating event must have the same all-day status. Все повторяющиеся события должны иметь одинаковый статус в течение всего дня. Do you want to change all occurrences? Хотите изменить все записи? Cancel Отмена Change All Изменить Всё You are changing the repeating rule of this event. Вы меняете повторяющееся правило этого события. You are changing a repeating event. Вы меняете повторяющееся событие. Do you want to change only this occurrence of the event, or all occurrences? Вы хотите изменить только эту запись события или все записи? All Всё Only This Event Только Это Событие Do you want to change only this occurrence of the event, or this and all future occurrences? Вы хотите изменить только эту запись события или эту и все будущие записи? All Future Events Все Будущие События Never Никогда At time of event Во время события 15 minutes before За 15 минут до 30 minutes before За 30 минут до 1 hour before За 1 час до 1 day before За 1 день до 2 days before За 2 дня до 1 week before За 1 неделю до On start day (9:00 AM) В начале дня (9:00 утра) Type: Тип: All Day: Весь День: Remind Me: Напомнить Мне: Repeat: Повторять: Daily Ежедневно Weekdays По будням Weekly Еженедельно Monthly Ежемесячно Yearly Ежегодно End Repeat: Окончание Повтора: After После On Вкл. time(s) раз(а) Save Сохранить New event Новое событие End time must be greater than start time Время окончания должно быть больше времени начала OK ОК Type Тип All Day Весь День: Starts Начало Ends Завершение Remind Me Напомнить Repeat Повторить End Repeat Завершить повтор Ends: Окончания: Description: Описание: Description Описание Starts: Начинания: Work Работа Life Семья Other Другое CSchceduleSearchDateItem Y Г M М D Д CSchceduleSearchItem Edit Редактировать Delete Удалить You are deleting an event. Вы удаляете событие. Are you sure you want to delete this event? Вы уверены, что хотите удалить это событие? Cancel Отмена Do you want to delete all occurrences of this event, or only the selected occurrence? Вы хотите удалить все записи этого события или только выбранную запись? Delete All Удалить Всё Delete Only This Event Удалить Только Это Событие Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Вы хотите удалить эту и все будущие записи этого события или только выбранную запись? Delete All Future Events Удалить Все Будущие События All Day Весь День: CSchceduleSearchView No search results Ничего не найдено CScheduleView ALL DAY ВЕСЬ ДЕНЬ CWeekWindow Week Неделя Y Г CYearSchceduleItem All Day Весь День: CYearSchceduleView All Day Весь День: No event Нет событий CYearWindow Y Г CalendarWindow Calendar Календарь Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Календарь - это инструмент для просмотра дат, а также умный ежедневник для планирования всех событий вашей повседневной жизни. Calendarmainwindow Calendar Календарь Y Г M М W Н D Д CenterWidget All Day Весь День: DragInfoGraphicsView Edit Редактировать Delete Удалить New event Новое событие You are deleting an event. Вы удаляете событие. Are you sure you want to delete this event? Вы уверены, что хотите удалить это событие? Cancel Отмена Do you want to delete all occurrences of this event, or only the selected occurrence? Вы хотите удалить все записи этого события или только выбранную запись? Delete All Удалить все Delete Only This Event Удалить только это событие Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Вы хотите удалить эту и все будущие записи этого события или только выбранную запись? Delete All Future Events Удалить все будущие события New Event Новое Событие Return Today Return Сегодня Return Today Today Return Today Сегодня Shortcut Help Помощь Delete event Удалить событие Copy Копировать Cut Вырезать Paste Вставить Select all Выбрать всё Delete Удалить YearFrame Y Г today Today Today Сегодня dde-calendar-5.7.0.23/translations/dde-calendar_sc.ts000066400000000000000000000460771375021633200223520ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_si.ts000066400000000000000000000576551375021633200223640ustar00rootroot00000000000000 CDayMonthView Monday සඳුදා Tuesday අඟහරුවාදා Wednesday බදාදා Thursday බ්‍රහස්පතින්දා Friday සිකුරාදා Saturday සෙනසුරාදා Sunday ඉරිදා CDayWindow Y වස M මස D දින CGraphicsView New Event නව හමුවක් CMonthGraphiview Delete මකන්න You are deleting an event. ඔබ සිදුවීමක් මකා දමයි. Are you sure you want to delete this event? මෙම සිදුවීම මකා දැමීමට අවශ්‍ය බව ඔබට විශ්වාසද? Cancel අවලංගු කරන්න Do you want to delete all occurrences of this event, or only the selected occurrence? මෙම සිද්ධියේ සියලුම සිදුවීම් මකා දැමීමට ඔබට අවශ්‍යද, නැතහොත් තෝරාගත් සිදුවීම පමණක්ද? Delete All සියල්ල මකා දමන්න Delete Only This Event මෙම හමුව පමණක් මකා දමන්න Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ඔබට මෙම හමුව සහ මෙම හමුවේ සැලසුම් කල සියලු හමුවන් මකා දැමීමට අවශ්‍යද, නැතහොත් මෙම තෝරාගත් හමුව පමණද? Delete All Future Events සියලු යොදාගත් හමුවන් මකා දමන්න CMonthSchceduleNumButton %1 more තවත් %1 CMonthView New event නව සිදුවීමක් New Event නව හමුවක් CMonthWindow Y වස CMySchceduleView You are deleting an event. ඔබ සිදුවීමක් මකා දමයි. Are you sure you want to delete this event? මෙම සිදුවීම මකා දැමීමට අවශ්‍ය බව ඔබට විශ්වාසද? Cancel අවලංගු කරන්න Delete මකන්න Do you want to delete all occurrences of this event, or only the selected occurrence? මෙම සිද්ධියේ සියලුම සිදුවීම් මකා දැමීමට ඔබට අවශ්‍යද, නැතහොත් තෝරාගත් සිදුවීම පමණක්ද? Delete All සියල්ල මකා දමන්න Delete Only This Event මෙම හමුව පමණක් මකා දමන්න Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ඔබට මෙම හමුව සහ මෙම හමුවේ සැලසුම් කල සියලු හමුවන් මකා දැමීමට අවශ්‍යද, නැතහොත් මෙම තෝරාගත් හමුව පමණද? My Event මගේ හමුව Edit සංස්කරණය කරන්න OK හරි Delete All Future Events සියලු යොදාගත් හමුවන් මකා දමන්න CSchceduleDlg New Event නව හමුවක් Edit Event හමුව සංස්කරණය කරන්න All occurrences of a repeating event must have the same all-day status. පුනරාවර්තන හමුවන්ගේ සියලු හමුවන් දිනය පුරා තත්වයේ තිබිය යුතුය. Do you want to change all occurrences? ඔබට සියලු පුනරාවර්ථනයන් වෙනස් කිරීමද අවශ්‍යද? Cancel අවලංගු කරන්න Change All සියල්ල වෙනස් කරන්න You are changing the repeating rule of this event. ඔබ මෙම හමුවේ පුනරාවර්තන රීතීන් වෙනස් කරමින් සිටී. You are changing a repeating event. ඔබ පුනරාවර්තන හමුවක් වෙනස් කරමින් සිටී. Do you want to change only this occurrence of the event, or all occurrences? ඔබට මෙම පුනරාවර්තන හමුවේ මෙම හමුව පමණක් වෙනස් කිරීමට අවශ්‍යද, නැතිනම් සියලු පුනරාවර්තනයන් වෙනස් කල යුතුද? All සියල්ලම Only This Event මෙම හමුව පමණි Do you want to change only this occurrence of the event, or this and all future occurrences? ඔබට මෙම හමුව සහ මෙම හමුවේ සැලසුම් කල සියලු හමුවන් වෙනස් කිරීමට අවශ්‍යද, නැතහොත් මෙම තෝරාගත් හමුව පමණද? All Future Events සියලුම අනාගත හමුවන් Never කිසිදා නැත At time of event හමුව යොදාගත් වේලාවේදී 15 minutes before මිනිත්තු 15 කට පෙර 30 minutes before මින්ත්තු 30 කට පෙර 1 hour before පැය 1 කට පෙර 1 day before දින 1 කට පෙර 2 days before දින 2 කට පෙර 1 week before සති 1 කට පෙර On start day (9:00 AM) ඇරඹෙන දින (පෙ.ව 9.00) Type: වර්ගය: All Day: දිනය පුරාම: Remind Me: මට මතක් කරන්න: Repeat: නැවත කරන්න: Daily දිනපතා Weekdays සතියේ දින Weekly සති පතා Monthly මාසිකව Yearly වාර්ෂිකව End Repeat: පුනරාවර්තනය අවසන් කරන්න: After පසුව On මත time(s) වේලාව (න්) Save සුරකින්න New event නව සිදුවීමක් End time must be greater than start time අවසන් කෙරෙන වේලාව ආරම්භ කෙරෙන වේලාවට වඩා වැඩි විය යුතුය OK හරි Type වර්ගය All Day දිනය පුරාම Starts ආරම්භය Ends අවසානය Remind Me මට මතක් කරන්න Repeat පුනරාවර්තන End Repeat පුනරාවර්තනය අවසන් කරන්න Ends: අවසානය: Description: විස්තරය: Description විස්තරය Starts: අ‍ාරම්භය: Work කාර්යය Life ජීවිතය Other වෙනත් CSchceduleSearchDateItem Y වර් M මස D දින CSchceduleSearchItem Edit සංස්කරණය කරන්න Delete මකන්න You are deleting an event. ඔබ සිදුවීමක් මකා දමයි. Are you sure you want to delete this event? මෙම සිදුවීම මකා දැමීමට අවශ්‍ය බව ඔබට විශ්වාසද? Cancel අවලංගු කරන්න Do you want to delete all occurrences of this event, or only the selected occurrence? මෙම සිද්ධියේ සියලුම සිදුවීම් මකා දැමීමට ඔබට අවශ්‍යද, නැතහොත් තෝරාගත් සිදුවීම පමණක්ද? Delete All සියල්ල මකා දමන්න Delete Only This Event මෙම හමුව පමණක් මකා දමන්න Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ඔබට මෙම හමුව සහ මෙම හමුවේ සැලසුම් කල සියලු හමුවන් මකා දැමීමට අවශ්‍යද, නැතහොත් මෙම තෝරාගත් හමුව පමණද? Delete All Future Events සියලු යොදාගත් හමුවන් මකා දමන්න All Day දිනය පුරාම CSchceduleSearchView No search results සෙවුම් ප්‍රතිඵල නොමැත CScheduleView ALL DAY දිනය පුරාම CWeekWindow Week සතිය Y වර් CYearSchceduleItem All Day දිනය පුරාම CYearSchceduleView All Day දිනය පුරාම No event හමුවන් නොමැත CYearWindow Y වර් CalendarWindow Calendar දින දසුන Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. දින දසුන යනු දිනයන් බැලීමට මෙන්ම ජීවිතයේ සෑම දෙයක්ම සැලසුම් කිරීමට ‍භාවිත කල හැකි දෛනික සැලසුම්කරන යෙදවුමකි. Calendarmainwindow Calendar දින දසුන Y වර් M මස W සති D දින CenterWidget All Day දිනය පුරාම DragInfoGraphicsView Edit සංස්කරණය කරන්න Delete මකා දමන්න New event නව සිදුවීමක් You are deleting an event. ඔබ හමුවක් මකා දමයි. Are you sure you want to delete this event? මෙම හමුව මකා දැමීමට අවශ්‍ය බව ඔබට විශ්වාසද? Cancel අවලංගු කරන්න Do you want to delete all occurrences of this event, or only the selected occurrence? මෙම හමුවේ සියලුම පුනරාවර්තනයන් මකා දැමීමට ඔබට අවශ්‍යද, නැතහොත් තෝරාගත් හමුව පමණක්ද? Delete All සියල්ල මකා දමන්න Delete Only This Event මෙම හමුව පමණක් මකා දමන්න Do you want to delete this and all future occurrences of this event, or only the selected occurrence? ඔබට මෙම හමුව සහ මෙම හමුවේ සැලසුම් කල සියලු හමුවන් මකා දැමීමට අවශ්‍යද, නැතහොත් මෙම තෝරාගත් හමුව පමණද? Delete All Future Events සියලු යොදාගත් හමුවන් මකා දමන්න New Event නව හමුවක් Return Today Return අද Return Today Today Return Today අද Shortcut Help උදව් Delete event හමුව මකා දමන්න Copy පිටපත් කරන්න Cut කපන්න Paste අලවන්න Select all සියල්ල ලකුණු කරන්න Delete මකන්න YearFrame Y වර් today Today Today අද dde-calendar-5.7.0.23/translations/dde-calendar_sk.ts000066400000000000000000000463111375021633200223510ustar00rootroot00000000000000 CDayMonthView Monday Pondelok Tuesday Utorok Wednesday Streda Thursday Štvrtok Friday Piatok Saturday Sobota Sunday Nedeľa CDayWindow Y R M M D D CGraphicsView New Event Nová udalosť CMonthGraphiview Delete Vymazať You are deleting an event. Odstraňujete udalosť. Are you sure you want to delete this event? Naozaj chcete odstrániť túto udalosť? Cancel Zrušiť Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete odstrániť všetky výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Vymazať všetko Delete Only This Event Vymazať iba túto udalosť Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete odstrániť tento a všetky budúce výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Future Events Vymazať všetky budúce udalosti CMonthSchceduleNumButton %1 more ešte %1 CMonthView New event Nová udalosť New Event Nová udalosť CMonthWindow Y R CMySchceduleView You are deleting an event. Odstraňujete udalosť. Are you sure you want to delete this event? Naozaj chcete odstrániť túto udalosť? Cancel Zrušiť Delete Vymazať Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete odstrániť všetky výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Vymazať všetko Delete Only This Event Vymazať iba túto udalosť Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete odstrániť tento a všetky budúce výskyty tejto udalosti alebo iba vybratú udalosť? My Event Moja udalosť Edit Upraviť OK OK Delete All Future Events Vymazať všetky budúce udalosti CSchceduleDlg New Event Nová udalosť Edit Event Upraviť udalosť All occurrences of a repeating event must have the same all-day status. Všetky výskyty opakujúcej sa udalosti musia mať rovnaký celodenný stav. Do you want to change all occurrences? Chcete zmeniť všetky výskyty? Cancel Zrušiť Change All Zmeniť všetky You are changing the repeating rule of this event. Meníte pravidlo opakovania tejto udalosti. You are changing a repeating event. Meníte opakujúcu sa udalosť. Do you want to change only this occurrence of the event, or all occurrences? Chcete zmeniť iba tento výskyt udalosti alebo všetky jej výskyty? All Všetky Only This Event Iba táto udalosť Do you want to change only this occurrence of the event, or this and all future occurrences? Chcete zmeniť iba tento výskyt udalosti alebo túto a aj všetky budúce udalosti? All Future Events Všetky budúce udalosti Never Nikdy At time of event V čase udalosti 15 minutes before 15 minút pred 30 minutes before 30 minút pred 1 hour before 1 hodinu pred 1 day before 1 deň pred 2 days before 2 dni pred 1 week before 1 týždeň pred On start day (9:00 AM) V deň začiatku (9:00) Type: Typ: All Day: Celý deň: Remind Me: Pripomenúť Repeat: Opakovať: Daily Denne Weekdays Pracovné dni Weekly Týždenne Monthly Mesačne Yearly Ročne End Repeat: Ukončiť opakovanie: After Po On Zapnuté time(s) krát Save Uložiť New event Nová udalosť End time must be greater than start time Čas ukončenia musí byť neskôr ako čas začiatku OK OK Type Typ All Day Celý deň Starts Začína Ends Končí Remind Me Pripomenúť Repeat Opakovať End Repeat Ukončiť opakovanie Ends: Končí: Description: Popis: Description Popis Starts: Začína: Work Práca Life Život Other Ostatné CSchceduleSearchDateItem Y R M M D D CSchceduleSearchItem Edit Upraviť Delete Vymazať You are deleting an event. Odstraňujete udalosť. Are you sure you want to delete this event? Naozaj chcete odstrániť túto udalosť? Cancel Zrušiť Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete odstrániť všetky výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Vymazať všetko Delete Only This Event Vymazať iba túto udalosť Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete odstrániť tento a všetky budúce výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Future Events Vymazať všetky budúce udalosti All Day Celý deň CSchceduleSearchView No search results Žiadne výsledky vyhľadávania CScheduleView ALL DAY CELÝ DEŇ CWeekWindow Week Týždeň Y R CYearSchceduleItem All Day Celý deň CYearSchceduleView All Day Celý deň No event Žiadna udalosť CYearWindow Y R CalendarWindow Calendar Kalendár Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalendár je nástroj na prezeranie dátumov a tiež inteligentný denný plánovač na plánovanie všetkých vecí v živote. Calendarmainwindow Calendar Kalendár Y R M M W T D D CenterWidget All Day Celý deň DragInfoGraphicsView Edit Upraviť Delete Vymazať New event Nová udalosť You are deleting an event. Odstraňujete udalosť. Are you sure you want to delete this event? Naozaj chcete odstrániť túto udalosť? Cancel Zrušiť Do you want to delete all occurrences of this event, or only the selected occurrence? Chcete odstrániť všetky výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Vymazať všetko Delete Only This Event Vymazať iba túto udalosť Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Chcete odstrániť tento a všetky budúce výskyty tejto udalosti alebo iba vybratú udalosť? Delete All Future Events Vymazať všetky budúce udalosti New Event Nová udalosť Return Today Return Dnes Return Today Today Return Today Dnes Shortcut Help Nápoveda Delete event Vymazať udalosť Copy Kopírovať Cut Vystrihnúť Paste Prilepiť Select all Vybrať všetko Delete Vymazať YearFrame Y R today Today Today Dnes dde-calendar-5.7.0.23/translations/dde-calendar_sl.ts000066400000000000000000000452021375021633200223500ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y Y M M D CGraphicsView New Event CMonthGraphiview Delete Izbriši You are deleting an event. Are you sure you want to delete this event? Cancel Prekliči Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Prekliči Delete Izbriši Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Uredi OK V redu Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Prekliči Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Nikoli At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Vrsta: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On Vklopi time(s) Save Shrani New event End time must be greater than start time OK V redu Type Vrsta All Day Starts Ends Remind Me Repeat Ponovitev End Repeat Ends: Description: Description Opis Starts: Work Life Other Ostalo CSchceduleSearchDateItem Y Y M M D CSchceduleSearchItem Edit Uredi Delete Izbriši You are deleting an event. Are you sure you want to delete this event? Cancel Prekliči Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Ni rezultatov iskanja CScheduleView ALL DAY CWeekWindow Week Y Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y Y CalendarWindow Calendar Koledar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Koledar Y Y M M W D CenterWidget All Day DragInfoGraphicsView Edit Uredi Delete Izbriši New event You are deleting an event. Are you sure you want to delete this event? Cancel Prekliči Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Danes Return Today Today Return Today Danes Shortcut Help Pomoč Delete event Copy Kopiraj Cut Izreži Paste Prilepi Select all Izberi vse Delete Izbriši YearFrame Y Y today Today Today Danes dde-calendar-5.7.0.23/translations/dde-calendar_sq.ts000066400000000000000000000472571375021633200223710ustar00rootroot00000000000000 CDayMonthView Monday E hënë Tuesday E martë Wednesday E mërkurë Thursday E enjte Friday E premte Saturday E shtunë Sunday E diel CDayWindow Y V M M D D CGraphicsView New Event Veprimtari e Re CMonthGraphiview Delete Fshije You are deleting an event. Po fshini një veprimtari. Are you sure you want to delete this event? Jeni i sigurt se doni të fshihet kjo veprimtari? Cancel Anuloje Do you want to delete all occurrences of this event, or only the selected occurrence? Doni të fshihen krejt përsëritjet e kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Fshiji Krejt Delete Only This Event Fshi Vetëm Këtë Veprimtari Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doni të fshihet kjo dhe krejt përsëritjet në të ardhmen të kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Future Events Fshi Krejt Veprimtaritë e Ardhshme CMonthSchceduleNumButton %1 more %1 më tepër CMonthView New event Veprimtari e re New Event Veprimtari e Re CMonthWindow Y V CMySchceduleView You are deleting an event. Po fshini një veprimtari. Are you sure you want to delete this event? Jeni i sigurt se doni të fshihet kjo veprimtari? Cancel Anuloje Delete Fshije Do you want to delete all occurrences of this event, or only the selected occurrence? Doni të fshihen krejt përsëritjet e kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Fshiji Krejt Delete Only This Event Fshi Vetëm Këtë Veprimtari Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doni të fshihet kjo dhe krejt përsëritjet në të ardhmen të kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? My Event Veprimtari e Imja Edit Përpunim OK OK Delete All Future Events Fshi Krejt Veprimtaritë e Ardhshme CSchceduleDlg New Event Veprimtari e Re Edit Event Përpunoni Veprimtari All occurrences of a repeating event must have the same all-day status. Krejt përsëritjet e një veprimtarie që përsëritet duhet të kenë të njëjtën gjendje gjithë-ditën. Do you want to change all occurrences? Doni të ndryshohen krejt përsëritjet? Cancel Anuloje Change All Ndryshoji Krejt You are changing the repeating rule of this event. Po ndryshoni rregullin e përsëritjes së kësaj veprimtarie. You are changing a repeating event. Po ndryshoni një veprimtari me përsëritje. Do you want to change only this occurrence of the event, or all occurrences? Doni të ndryshohet vetëm kjo përsëritje e veprimtarisë, apo krejt përsëritjet? All Krejt Only This Event Vetëm Këtë Veprimtari Do you want to change only this occurrence of the event, or this and all future occurrences? Doni të ndryshohet vetëm kjo përsëritje e veprimtarisë, apo këtë dhe krejt përsëritjet në të ardhmen? All Future Events Krejt Veprimtaritë e Ardhshme Never Kurrë At time of event Në kohën e veprimtarisë 15 minutes before 15 minuta para 30 minutes before 30 minuta para 1 hour before 1 orë para 1 day before 1 ditë para 2 days before 2 ditë para 1 week before 1 javë para On start day (9:00 AM) Ditën e fillimit (9:00 AM) Type: Lloj: All Day: Tërë Ditën: Remind Me: Kujtoma: Repeat: Përsërite: Daily Ditore Weekdays Ditë të javës Weekly Javore Monthly Mujore Yearly Vjetore End Repeat: Përfundoje Përsëritjen më: After Pas On time(s) kohë(ra) Save Ruaje New event Veprimtari e re End time must be greater than start time Koha e përfundimit duhet të jetë më e madhe se koha e fillimit OK OK Type Lloj All Day Tërë Ditën Starts Fillon më Ends Përfundon më Remind Me Kujtoma më Repeat Përsërite End Repeat Përfundoje Përsëritjen Më Ends: Përfundon më: Description: Përshkrim: Description Përshkrim Starts: Fillon më: Work Pune Life Jete Other Tjetër CSchceduleSearchDateItem Y V M M D D CSchceduleSearchItem Edit Përpunim Delete Fshije You are deleting an event. Po fshini një veprimtari. Are you sure you want to delete this event? Jeni i sigurt se doni të fshihet kjo veprimtari? Cancel Anuloje Do you want to delete all occurrences of this event, or only the selected occurrence? Doni të fshihen krejt përsëritjet e kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Fshiji Krejt Delete Only This Event Fshi Vetëm Këtë Veprimtari Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doni të fshihet kjo dhe krejt përsëritjet në të ardhmen të kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Future Events Fshi Krejt Veprimtaritë e Ardhshme All Day Tërë Ditën CSchceduleSearchView No search results S’ka përfundime kërkimi CScheduleView ALL DAY TËRË DITËN CWeekWindow Week Javë Y V CYearSchceduleItem All Day Tërë Ditën CYearSchceduleView All Day Tërë Ditën No event S’ka veprimtari CYearWindow Y V CalendarWindow Calendar Kalendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Kalendari është një mjet për parje datash, dhe gjithashtu edhe një planifikues i përditshëm për të vënë në plan krejt gjërat e jetës së përditshme. Calendarmainwindow Calendar Kalendar Y V M M W M D D CenterWidget All Day Tërë Ditën DragInfoGraphicsView Edit Përpunim Delete Fshije New event Veprimtari e re You are deleting an event. Po fshini një veprimtari. Are you sure you want to delete this event? Jeni i sigurt se doni të fshihet kjo veprimtari? Cancel Anuloje Do you want to delete all occurrences of this event, or only the selected occurrence? Doni të fshihen krejt përsëritjet e kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Fshiji Krejt Delete Only This Event Fshi Vetëm Këtë Veprimtari Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Doni të fshihet kjo dhe krejt përsëritjet në të ardhmen të kësaj veprimtarie, apo vetëm përsëritjen e përzgjedhur? Delete All Future Events Fshi Krejt Veprimtaritë e Ardhshme New Event Veprimtari e Re Return Today Return Sot Return Today Today Return Today Sot Shortcut Help Ndihmë Delete event Fshije veprimtarinë Copy Kopjoje Cut Prije Paste Ngjite Select all Përzgjidhi krejt Delete Fshije YearFrame Y V today Today Today Sot dde-calendar-5.7.0.23/translations/dde-calendar_sr.ts000066400000000000000000000514011375021633200223540ustar00rootroot00000000000000 CDayMonthView Monday Понедељак Tuesday Уторак Wednesday Среда Thursday Четвртак Friday Петак Saturday Субота Sunday Недеља CDayWindow Y Г M М D Д CGraphicsView New Event Нови догађај CMonthGraphiview Delete Обриши You are deleting an event. Бришете догађај. Are you sure you want to delete this event? Заиста желите да обришете овај догађај? Cancel Откажи Do you want to delete all occurrences of this event, or only the selected occurrence? Желите ли да обришете све појаве овог догађаја или само изабрану ставку? Delete All Обриши све Delete Only This Event Обриши само овај догађај Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Желите ли да обришете ову и све будуће појаве овог догађаја или само изабрану ставку? Delete All Future Events Обриши све будуће догађаје CMonthSchceduleNumButton %1 more Још %1 CMonthView New event Нови догађај New Event Нови догађај CMonthWindow Y Г CMySchceduleView You are deleting an event. Бришете догађај. Are you sure you want to delete this event? Заиста желите да обришете овај догађај? Cancel Откажи Delete Обриши Do you want to delete all occurrences of this event, or only the selected occurrence? Желите ли да обришете све појаве овог догађаја или само изабрану ставку? Delete All Обриши све Delete Only This Event Обриши само овај догађај Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Желите ли да обришете ову и све будуће појаве овог догађаја или само изабрану ставку? My Event Мој догађај Edit Уреди OK У реду Delete All Future Events Обриши све будуће догађаје CSchceduleDlg New Event Нови догађај Edit Event Уреди догађај All occurrences of a repeating event must have the same all-day status. Све појаве понављајућег догађаја морају имати исти целодневни статус. Do you want to change all occurrences? Желите ли да промените све појаве? Cancel Откажи Change All Промени све You are changing the repeating rule of this event. Мењате правило понављања овог догађаја. You are changing a repeating event. Мењате понаљајући догађај. Do you want to change only this occurrence of the event, or all occurrences? Желите ли да промените само ову појаву догађаја или све? All Све Only This Event Само овај догађај Do you want to change only this occurrence of the event, or this and all future occurrences? Желите ли да промените ову појаву догађаја или ову појаву и све будуће појаве? All Future Events Сви будући догађаји Never Никад At time of event У време догађаја 15 minutes before 15 минута раније 30 minutes before 30 минута раније 1 hour before 1 сат раније 1 day before 1 дан раније 2 days before 2 дана раније 1 week before 1 седмица раније On start day (9:00 AM) На дан почетка (9:00 АМ) Type: Врста: All Day: Цео дан: Remind Me: Подсетник: Repeat: Понављај: Daily Свакодневно Weekdays Радним данима Weekly Седмично Monthly Месечно Yearly Годишње End Repeat: Окончај: After Након On На дан time(s) пут(а) Save Сачувај New event Нови догађај End time must be greater than start time Крајње време мора бити након почетног OK У реду Type Врста All Day Цео дан Starts Почетак Ends Крај Remind Me Подсетник Repeat Понови End Repeat Окончај Ends: Крај: Description: Опис: Description Опис Starts: Почетак: Work Посао Life Живот Other Остало CSchceduleSearchDateItem Y Г M М D Д CSchceduleSearchItem Edit Уреди Delete Обриши You are deleting an event. Бришете догађај. Are you sure you want to delete this event? Заиста желите да обришете овај догађај? Cancel Откажи Do you want to delete all occurrences of this event, or only the selected occurrence? Желите ли да обришете све појаве овог догађаја или само изабрану ставку? Delete All Обриши све Delete Only This Event Обриши само овај догађај Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Желите ли да обришете ову и све будуће појаве овог догађаја или само изабрану ставку? Delete All Future Events Обриши све будуће догађаје All Day Цео дан CSchceduleSearchView No search results Нема резултата претраге CScheduleView ALL DAY ЦЕО ДАН CWeekWindow Week Седмица Y Г CYearSchceduleItem All Day Цео дан CYearSchceduleView All Day Цео дан No event Нема догађаја CYearWindow Y Г CalendarWindow Calendar Календар Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Календар је алат за приказ датума и паметан роковник за подсећање на све догађаје у животу. Calendarmainwindow Calendar Календар Y Г M М W С D Д CenterWidget All Day Цео дан DragInfoGraphicsView Edit Уреди Delete Обриши New event Нови догађај You are deleting an event. Бришете догађај. Are you sure you want to delete this event? Заиста желите да обришете овај догађај? Cancel Откажи Do you want to delete all occurrences of this event, or only the selected occurrence? Желите ли да обришете све појаве овог догађаја или само изабрану ставку? Delete All Обриши све Delete Only This Event Обриши само овај догађај Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Желите ли да обришете ову и све будуће појаве овог догађаја или само изабрану ставку? Delete All Future Events Обриши све будуће догађаје New Event Нови догађај Return Today Return Данас Return Today Today Return Today Данас Shortcut Help Помоћ Delete event Обриши догађај Copy Копирај Cut Исеци Paste Убаци Select all Изабери све Delete Обриши YearFrame Y Г today Today Today Данас dde-calendar-5.7.0.23/translations/dde-calendar_sv.ts000066400000000000000000000451461375021633200223710ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y J M M D CGraphicsView New Event CMonthGraphiview Delete Radera You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y J CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Delete Radera Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Ändra OK Okej Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Avbryt Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never Aldrig At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: Typ: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Spara New event End time must be greater than start time OK Okej Type Typ All Day Starts Ends Remind Me Repeat Repetera End Repeat Ends: Description: Description Beskrivning Starts: Work Life Other Övrigt CSchceduleSearchDateItem Y J M M D CSchceduleSearchItem Edit Ändra Delete Radera You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Inga sökresultat CScheduleView ALL DAY CWeekWindow Week Y J CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y J CalendarWindow Calendar Kalender Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalender Y J M M W D CenterWidget All Day DragInfoGraphicsView Edit Ändra Delete Radera New event You are deleting an event. Are you sure you want to delete this event? Cancel Avbryt Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Idag Return Today Today Return Today Idag Shortcut Help Hjälp Delete event Copy Kopiera Cut Klipp ut Paste Klistra in Select all Välj alla Delete Radera YearFrame Y J today Today Today Idag dde-calendar-5.7.0.23/translations/dde-calendar_sw.ts000066400000000000000000000455651375021633200223770ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete Futa You are deleting an event. Are you sure you want to delete this event? Cancel Katisha Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Katisha Delete Futa Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit Hariri OK Sawa Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Katisha Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save Hifadhi New event End time must be greater than start time OK Sawa Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other Ingine CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Hariri Delete Futa You are deleting an event. Are you sure you want to delete this event? Cancel Katisha Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results Hakuna matokeo ya utafutaji CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Kalenda Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Kalenda Y M W D CenterWidget All Day DragInfoGraphicsView Edit Hariri Delete Futa New event You are deleting an event. Are you sure you want to delete this event? Cancel Katisha Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Leo Return Today Today Return Today Leo Shortcut Help Usaidizi Delete event Copy Nakili Cut Paste Select all Delete Futa YearFrame Y today Today Today Leo dde-calendar-5.7.0.23/translations/dde-calendar_ta.ts000066400000000000000000000462641375021633200223470ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete அழி You are deleting an event. Are you sure you want to delete this event? Cancel நிறுத்து Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel நிறுத்து Delete அழி Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit தொகு OK சரி Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel நிறுத்து Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never ஒருபோதும் தேவைஇல்லை At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save சேமி New event End time must be greater than start time OK சரி Type வகை All Day Starts Ends Remind Me Repeat இன்னொரு முறை End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit தொகு Delete அழி You are deleting an event. Are you sure you want to delete this event? Cancel நிறுத்து Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit தொகு Delete அழி New event You are deleting an event. Are you sure you want to delete this event? Cancel நிறுத்து Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return இன்று Return Today Today Return Today இன்று Shortcut Help Delete event Copy படியெடு Cut வெட்டு Paste ஒட்டு Select all அனைத்தையும் தெரிவுசெய் Delete அழி YearFrame Y today Today Today இன்று dde-calendar-5.7.0.23/translations/dde-calendar_th.ts000066400000000000000000000562631375021633200223560ustar00rootroot00000000000000 CDayMonthView Monday วันจันทร์ Tuesday วันอังคาร Wednesday วันพุธ Thursday วันพฤหัสบดี Friday วันศุกร์ Saturday วันศุกร์ Sunday วันอาทิตย์ CDayWindow Y M D CGraphicsView New Event กิจกรรมใหม่ CMonthGraphiview Delete ลบ You are deleting an event. คุณกำลังลบกิจกรรม Are you sure you want to delete this event? คุณแน่ใจหรือไม่ว่าคุณต้องการที่จะลบกิจกรรมนี้ Cancel ยกเลิก Do you want to delete all occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมทั้งหมดที่เกิดขึ้นหรือเฉพาะกิจกรรมที่เลือกไว้หรือไม่ ? Delete All ลบทั้งหมด Delete Only This Event ลบเฉพาะกิจกรรมนี้ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมนี้และกิจกรรมที่จะเกิดขึ้นในอนาคตทั้งหมดหรือเฉพาะกิจกรรมที่เลือก ? Delete All Future Events ลบกิจกรรมในอนาคตทั้งหมด CMonthSchceduleNumButton %1 more อีก 1% CMonthView New event เหตุการณ์ใหม่ New Event กิจกรรมใหม่ CMonthWindow Y CMySchceduleView You are deleting an event. คุณกำลังลบกิจกรรม Are you sure you want to delete this event? คุณแน่ใจหรือไม่ว่าคุณต้องการที่จะลบกิจกรรมนี้ Cancel ยกเลิก Delete ลบ Do you want to delete all occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมทั้งหมดที่เกิดขึ้นหรือเฉพาะกิจกรรมที่เลือกไว้หรือไม่ ? Delete All ลบทั้งหมด Delete Only This Event ลบเฉพาะกิจกรรมนี้ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมนี้และกิจกรรมที่จะเกิดขึ้นในอนาคตทั้งหมดหรือเฉพาะกิจกรรมที่เลือก ? My Event กิจกรรมของฉัน Edit แก้ไข OK ตกลง Delete All Future Events ลบกิจกรรมในอนาคตทั้งหมด CSchceduleDlg New Event กิจกรรมใหม่ Edit Event แก้ไขกิจกรรม All occurrences of a repeating event must have the same all-day status. กิจกรรมที่เกิดขึ้นซ้ำทั้งหมดต้องมีสถานะตลอดทั้งวันเหมือนกัน Do you want to change all occurrences? คุณต้องการเปลี่ยนกิจกรรมทั้งหมดหรือไม่? Cancel ยกเลิก Change All เปลี่ยนทั้งหมด You are changing the repeating rule of this event. คุณกำลังเปลี่ยนกฎการทำซ้ำของกิจกรรมนี้ You are changing a repeating event. คุณกำลังเปลี่ยนกิจกรรมที่เกิดซ้ำ Do you want to change only this occurrence of the event, or all occurrences? คุณต้องการเปลี่ยนเฉพาะกิจกรรมนี้หรือกิจกรรมทั้งหมดหรือไม่ All ทั้งหมด Only This Event กิจกรรมนี้เท่านั้น Do you want to change only this occurrence of the event, or this and all future occurrences? คุณต้องการเปลี่ยนเฉพาะกิจกรรมที่เกิดขึ้นนี้หรือกิจกรรมนี้และกิจกรรมในอนาคตทั้งหมดหรือไม่ All Future Events กิจกรรมในอนาคตทั้งหมด Never ไม่เคย At time of event ในช่วงเวลาของกิจกรรม 15 minutes before 15 นาทีก่อน 30 minutes before 30 นาทีก่อน 1 hour before 1 ชั่วโมงก่อน 1 day before 1 วันก่อน 2 days before 2 วันก่อน 1 week before 1 สัปดาห์ก่อน On start day (9:00 AM) ทําการในเวลา (09:00 น.) Type: ประเภท: All Day: ทั้งวัน: Remind Me: เตือนฉัน: Repeat: ทำซ้ำ: Daily ประจำวัน Weekdays วันธรรมดา Weekly รายสัปดาห์ Monthly รายเดือน Yearly รายปี End Repeat: สิ้นสุดการทำซ้ำ: After หลังจาก On time(s) เวลา (s) Save บันทึก New event เหตุการณ์ใหม่ End time must be greater than start time เวลาสิ้นสุดต้องมากกว่าเวลาเริ่มต้น OK ตกลง Type ประเภท All Day ทั้งวัน Starts เริ่ม Ends สิ้นสุด Remind Me เตือนฉัน Repeat ทำซ้ำ End Repeat สิ้นสุดการทำซ้ำ Ends: สิ้นสุด: Description: รายละเอียด: Description รายละเอียด Starts: เริ่ม: Work งาน Life ชีวิต Other อื่น ๆ CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit แก้ไข Delete ลบ You are deleting an event. คุณกำลังลบกิจกรรม Are you sure you want to delete this event? คุณแน่ใจหรือไม่ว่าคุณต้องการที่จะลบกิจกรรมนี้ Cancel ยกเลิก Do you want to delete all occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมทั้งหมดที่เกิดขึ้นหรือเฉพาะกิจกรรมที่เลือกไว้หรือไม่ ? Delete All ลบทั้งหมด Delete Only This Event ลบเฉพาะกิจกรรมนี้ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมนี้และกิจกรรมที่จะเกิดขึ้นในอนาคตทั้งหมดหรือเฉพาะกิจกรรมที่เลือก ? Delete All Future Events ลบกิจกรรมในอนาคตทั้งหมด All Day ทั้งวัน CSchceduleSearchView No search results ไม่มีผลลัพธ์การค้นหา CScheduleView ALL DAY ทั้งวัน CWeekWindow Week สัปดาห์ Y CYearSchceduleItem All Day ทั้งวัน CYearSchceduleView All Day ทั้งวัน No event ไม่มีกิจกรรม CYearWindow Y CalendarWindow Calendar ปฏิทิน Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. ปฏิทินเป็นเครื่องมือในการดูวันที่และยังเป็นนักวางแผนรายวันที่ชาญฉลาดเพื่อกำหนดเวลาทุกสิ่งในชีวิต Calendarmainwindow Calendar ปฏิทิน Y M W D CenterWidget All Day ทั้งวัน DragInfoGraphicsView Edit แก้ไข Delete ลบ New event กิจกรรมใหม่ You are deleting an event. คุณกำลังลบกิจกรรม Are you sure you want to delete this event? คุณแน่ใจหรือไม่ว่าคุณต้องการที่จะลบกิจกรรมนี้ Cancel ยกเลิก Do you want to delete all occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมทั้งหมดที่เกิดขึ้นหรือเฉพาะกิจกรรมที่เลือกไว้หรือไม่ ? Delete All ลบทั้งหมด Delete Only This Event ลบเฉพาะกิจกรรมนี้ Do you want to delete this and all future occurrences of this event, or only the selected occurrence? คุณต้องการลบกิจกรรมนี้และกิจกรรมที่จะเกิดขึ้นในอนาคตทั้งหมดหรือเฉพาะกิจกรรมที่เลือก ? Delete All Future Events ลบกิจกรรมในอนาคตทั้งหมด New Event กิจกรรมใหม่ Return Today Return วันนี้ Return Today Today Return Today วันนี้ Shortcut Help วิธีใช้ Delete event ลบกิจกรรม Copy ทำสำเนา Cut ตัด Paste วาง Select all เลือกทั้งหมด Delete ลบ YearFrame Y today Today Today วันนี้ dde-calendar-5.7.0.23/translations/dde-calendar_tr.ts000066400000000000000000000470221375021633200223610ustar00rootroot00000000000000 CDayMonthView Monday Pazartesi Tuesday Salı Wednesday Çarşamba Thursday Perşembe Friday Cuma Saturday Cumartesi Sunday Pazar CDayWindow Y Y M A D G CGraphicsView New Event Yeni Etkinlik CMonthGraphiview Delete Sil You are deleting an event. Bir etkinliği siliyorsunuz. Are you sure you want to delete this event? Bu etkinliği silmek istediğinizden emin misiniz? Cancel İptal Do you want to delete all occurrences of this event, or only the selected occurrence? Bu etkinliğin tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Tümünü Sil Delete Only This Event Yalnızca Bu Etkinliği Sil Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bunu ve bu etkinliğin gelecekteki tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Future Events Gelecekteki Tüm Etkinlikleri Sil CMonthSchceduleNumButton %1 more %1 daha fazla CMonthView New event Yeni etkinlik New Event Yeni Etkinlik CMonthWindow Y Y CMySchceduleView You are deleting an event. Bir etkinliği siliyorsunuz. Are you sure you want to delete this event? Bu etkinliği silmek istediğinizden emin misiniz? Cancel İptal Delete Sil Do you want to delete all occurrences of this event, or only the selected occurrence? Bu etkinliğin tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Tümünü Sil Delete Only This Event Yalnızca Bu Etkinliği Sil Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bunu ve bu etkinliğin gelecekteki tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? My Event Etkinliğim Edit Düzenle OK Tamam Delete All Future Events Gelecekteki Tüm Etkinlikleri Sil CSchceduleDlg New Event Yeni Etkinlik Edit Event Etkinliği Düzenle All occurrences of a repeating event must have the same all-day status. Tekrarlanan bir etkinliğin tüm tekrarlamaları, tüm gün boyunca aynı duruma sahip olmalıdır. Do you want to change all occurrences? Tüm tekrarlamaları değiştirmek ister misiniz? Cancel İptal Change All Tümünü Değiştir You are changing the repeating rule of this event. Bu etkinliğin tekrarlama kuralını değiştiriyorsunuz. You are changing a repeating event. Tekrarlanan bir etkinliği değiştiriyorsunuz. Do you want to change only this occurrence of the event, or all occurrences? Etkinliğin yalnızca bu tekrarlamasını mı yoksa tüm tekrarlamalarını mı değiştirmek istiyorsunuz? All Tümü Only This Event Sadece Bu Etkinlik Do you want to change only this occurrence of the event, or this and all future occurrences? Yalnızca etkinliğin bu etkinliğini mi, yoksa bunu ve gelecekteki tüm etkinlikleri değiştirmek istiyorsunuz? All Future Events Gelecekteki Tüm Etkinlikler Never Asla At time of event Etkinlik anında 15 minutes before 15 dakika önce 30 minutes before 30 dakika önce 1 hour before 1 saat önce 1 day before 1 gün önce 2 days before 2 gün önce 1 week before 1 hafta önce On start day (9:00 AM) Başlangıç ​​gününde (09:00) Type: Tür: All Day: Tüm Gün: Remind Me: Hatırlat: Repeat: Tekrar: Daily Günlük Weekdays Hafta içi Weekly Haftalık Monthly Aylık Yearly Yıllık End Repeat: Tekrar Sonu: After Sonra On Açık time(s) zaman(lar) Save Kaydet New event Yeni etkinlik End time must be greater than start time Bitiş zamanı başlangıç ​​zamanından büyük olmalıdır OK Tamam Type Tür All Day Tüm Gün Starts Başlangıç Ends Bitiş Remind Me Hatırlat Repeat Tekrar End Repeat Tekrar Sonu Ends: Bitiş: Description: Açıklama: Description Açıklama Starts: Başlangıç: Work İş Life Yaşam Other Diğer CSchceduleSearchDateItem Y Y M A D G CSchceduleSearchItem Edit Düzenle Delete Sil You are deleting an event. Bir etkinliği siliyorsunuz. Are you sure you want to delete this event? Bu etkinliği silmek istediğinizden emin misiniz? Cancel İptal Do you want to delete all occurrences of this event, or only the selected occurrence? Bu etkinliğin tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Tümünü Sil Delete Only This Event Yalnızca Bu Etkinliği Sil Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bunu ve bu etkinliğin gelecekteki tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Future Events Gelecekteki Tüm Etkinlikleri Sil All Day Tüm Gün CSchceduleSearchView No search results Arama sonucu bulunamadı CScheduleView ALL DAY TÜM GÜN CWeekWindow Week Hafta Y Y CYearSchceduleItem All Day Tüm Gün CYearSchceduleView All Day Tüm Gün No event Etkinlik yok CYearWindow Y Y CalendarWindow Calendar Takvim Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Takvim tarihleri ​​görüntülemek için bir araçtır ve aynı zamanda hayattaki her şeyi planlamak için akıllı bir günlük planlayıcısıdır. Calendarmainwindow Calendar Takvim Y Y M A W H D G CenterWidget All Day Tüm Gün DragInfoGraphicsView Edit Düzenle Delete Sil New event Yeni etkinlik You are deleting an event. Bir etkinliği siliyorsunuz. Are you sure you want to delete this event? Bu etkinliği silmek istediğinizden emin misiniz? Cancel İptal Do you want to delete all occurrences of this event, or only the selected occurrence? Bu etkinliğin tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Tümünü Sil Delete Only This Event Yalnızca Bu Etkinliği Sil Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bunu ve bu etkinliğin gelecekteki tüm tekrarlarını mı yoksa yalnızca seçilen etkinliği mi silmek istiyorsunuz? Delete All Future Events Gelecekteki Tüm Etkinlikleri Sil New Event Yeni Etkinlik Return Today Return Bugün Return Today Today Return Today Bugün Shortcut Help Yardım Delete event Etkinliği sil Copy Kopyala Cut Kes Paste Yapıştır Select all Tümünü seç Delete Sil YearFrame Y Y today Today Today Bugün dde-calendar-5.7.0.23/translations/dde-calendar_ug.ts000066400000000000000000000460121375021633200223450ustar00rootroot00000000000000 CDayMonthView Monday Monday Tuesday Tuesday Wednesday Wednesday Thursday Thursday Friday Friday Saturday Saturday Sunday Sunday CDayWindow Y Y M M D D CGraphicsView New Event New Event CMonthGraphiview Delete ئۆچۈرۈش You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel بىكار قىلىش Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events CMonthSchceduleNumButton %1 more %1 more CMonthView New event New event New Event New Event CMonthWindow Y Y CMySchceduleView You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Delete Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event My Event Edit Edit OK OK Delete All Future Events Delete All Future Events CSchceduleDlg New Event New Event Edit Event Edit Event All occurrences of a repeating event must have the same all-day status. All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Do you want to change all occurrences? Cancel Cancel Change All Change All You are changing the repeating rule of this event. You are changing the repeating rule of this event. You are changing a repeating event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? Do you want to change only this occurrence of the event, or all occurrences? All All Only This Event Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events All Future Events Never Never At time of event At time of event 15 minutes before 15 minutes before 30 minutes before 30 minutes before 1 hour before 1 hour before 1 day before 1 day before 2 days before 2 days before 1 week before 1 week before On start day (9:00 AM) On start day (9:00 AM) Type: Type: All Day: All Day: Remind Me: Remind Me: Repeat: Repeat: Daily Daily Weekdays Weekdays Weekly Weekly Monthly Monthly Yearly Yearly End Repeat: End Repeat: After After On On time(s) time(s) Save Save New event New event End time must be greater than start time End time must be greater than start time OK OK Type Type All Day All Day Starts Starts Ends Ends Remind Me Remind Me Repeat Repeat End Repeat End Repeat Ends: Ends: Description: Description: Description Description Starts: Starts: Work Work Life Life Other Other CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Edit Delete Delete You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events All Day All Day CSchceduleSearchView No search results No search results CScheduleView ALL DAY ALL DAY CWeekWindow Week Week Y Y CYearSchceduleItem All Day All Day CYearSchceduleView All Day All Day No event No event CYearWindow Y Y CalendarWindow Calendar Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Calendar Y Y M M W W D D CenterWidget All Day All Day DragInfoGraphicsView Edit تەھرىرلەش Delete ئۆچۈرۈش New event New event You are deleting an event. You are deleting an event. Are you sure you want to delete this event? Are you sure you want to delete this event? Cancel بىكار قىلىش Do you want to delete all occurrences of this event, or only the selected occurrence? Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete All Delete Only This Event Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events Delete All Future Events New Event New Event Return Today Return Today Return Today Today Return Today Today Shortcut Help Help Delete event Delete event Copy Copy Cut Cut Paste Paste Select all Select all Delete Delete YearFrame Y Y today Today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_uk.ts000066400000000000000000000523611375021633200223550ustar00rootroot00000000000000 CDayMonthView Monday Понеділок Tuesday Вівторок Wednesday Середа Thursday Четвер Friday П'ятниця Saturday Субота Sunday Неділя CDayWindow Y Р M М D Д CGraphicsView New Event Нова подія CMonthGraphiview Delete Видалити You are deleting an event. Ви вилучаєте запис події. Are you sure you want to delete this event? Ви справді хочете вилучити цей запис події? Cancel Скасувати Do you want to delete all occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі повторення цієї події чи лише позначений запис? Delete All Вилучити всі Delete Only This Event Вилучити лише цей запис Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі майбутні повторення цієї події чи лише позначені записи? Delete All Future Events Вилучити усі майбутні повторення CMonthSchceduleNumButton %1 more і ще %1 CMonthView New event Нова подія New Event Нова подія CMonthWindow Y Р CMySchceduleView You are deleting an event. Ви вилучаєте запис події. Are you sure you want to delete this event? Ви впевнені, що бажаєте вилучити цей запис події? Cancel Скасувати Delete Вилучити Do you want to delete all occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі повторення цієї події чи лише позначений запис? Delete All Вилучити всі Delete Only This Event Вилучити лише цей запис Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі майбутні повторення цієї події чи лише позначені записи? My Event Моя подія Edit Редагувати OK Гаразд Delete All Future Events Вилучити усі майбутні повторення CSchceduleDlg New Event Нова подія Edit Event Редагування події All occurrences of a repeating event must have the same all-day status. В усіх повторень події має бути однаковий стан щодо заповнення подією усього дня. Do you want to change all occurrences? Хочете змінити усі повторення? Cancel Скасувати Change All Змінити усі You are changing the repeating rule of this event. Ви змінюєте правило повторення цієї події. You are changing a repeating event. Ви вносите зміни до повторюваної події. Do you want to change only this occurrence of the event, or all occurrences? Хочете змінити лише це повторення події чи усі повторення? All Усі Only This Event Лише цей запис Do you want to change only this occurrence of the event, or this and all future occurrences? Хочете змінити лише це повторення події чи усі майбутні повторення? All Future Events Усі майбутні повторення Never Ніколи At time of event У час події 15 minutes before За 15 хвилин до події 30 minutes before За 30 хвилин до події 1 hour before За годину до події 1 day before За день до події 2 days before За 2 дні до події 1 week before За тиждень до події On start day (9:00 AM) У день початку (9:00) Type: Тип: All Day: Увесь день: Remind Me: Нагадати мені: Repeat: Повторення: Daily Щодня Weekdays Дні тижня Weekly Щотижня Monthly Щомісяця Yearly Щорічно End Repeat: Завершення повторення: After Після On Увімк. time(s) раз Save Зберегти New event Нова подія End time must be greater than start time Час завершення має бути не меншим за час початку OK Гаразд Type Друкувати All Day Весь день Starts Починається Ends Завершується Remind Me Нагадати Repeat Повторити End Repeat Завершити повторення Ends: Завершується: Description: Опис: Description Опис Starts: Починається: Work Робота Life Життя Other Інше CSchceduleSearchDateItem Y Р M М D Д CSchceduleSearchItem Edit Редагувати Delete Вилучити You are deleting an event. Ви вилучаєте запис події. Are you sure you want to delete this event? Ви впевнені, що бажаєте вилучити цей запис події? Cancel Скасувати Do you want to delete all occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі повторення цієї події чи лише позначений запис? Delete All Вилучити всі Delete Only This Event Вилучити лише цей запис Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі майбутні повторення цієї події чи лише позначені записи? Delete All Future Events Вилучити усі майбутні повторення All Day Весь день CSchceduleSearchView No search results Немає результатів пошуку CScheduleView ALL DAY Увесь день CWeekWindow Week Тиждень Y Р CYearSchceduleItem All Day Весь день CYearSchceduleView All Day Весь день No event Немає подій CYearWindow Y Р CalendarWindow Calendar Календар Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. «Календар» — інструмент для перегляду календаря дат, також чудовий планувальник для створення розкладів на кожен день. Calendarmainwindow Calendar Календар Y Р M М W Т D Д CenterWidget All Day Весь день DragInfoGraphicsView Edit Редагувати Delete Видалити New event Нова подія You are deleting an event. Ви вилучаєте запис події. Are you sure you want to delete this event? Ви справді хочете вилучити цей запис події? Cancel Скасувати Do you want to delete all occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі повторення цієї події чи лише позначений запис? Delete All Вилучити всі Delete Only This Event Вилучити лише цей запис Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Ви хочете вилучити усі майбутні повторення цієї події чи лише позначені записи? Delete All Future Events Вилучити усі майбутні повторення New Event Нова подія Return Today Return Сьогодні Return Today Today Return Today Сьогодні Shortcut Help Допомога Delete event Вилучити подію Copy Копіювати Cut Вирізати Paste Вставити Select all Вибрати все Delete Вилучити YearFrame Y Р today Today Today Сьогодні dde-calendar-5.7.0.23/translations/dde-calendar_ur.ts000066400000000000000000000460771375021633200223730ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_uz.ts000066400000000000000000000460771375021633200224030ustar00rootroot00000000000000 CDayMonthView Monday Tuesday Wednesday Thursday Friday Saturday Sunday CDayWindow Y M D CGraphicsView New Event CMonthGraphiview Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events CMonthSchceduleNumButton %1 more CMonthView New event New Event CMonthWindow Y CMySchceduleView You are deleting an event. Are you sure you want to delete this event? Cancel Delete Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? My Event Edit OK Delete All Future Events CSchceduleDlg New Event Edit Event All occurrences of a repeating event must have the same all-day status. Do you want to change all occurrences? Cancel Change All You are changing the repeating rule of this event. You are changing a repeating event. Do you want to change only this occurrence of the event, or all occurrences? All Only This Event Do you want to change only this occurrence of the event, or this and all future occurrences? All Future Events Never At time of event 15 minutes before 30 minutes before 1 hour before 1 day before 2 days before 1 week before On start day (9:00 AM) Type: All Day: Remind Me: Repeat: Daily Weekdays Weekly Monthly Yearly End Repeat: After On time(s) Save New event End time must be greater than start time OK Type All Day Starts Ends Remind Me Repeat End Repeat Ends: Description: Description Starts: Work Life Other CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit Delete You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events All Day CSchceduleSearchView No search results CScheduleView ALL DAY CWeekWindow Week Y CYearSchceduleItem All Day CYearSchceduleView All Day No event CYearWindow Y CalendarWindow Calendar Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Calendarmainwindow Calendar Y M W D CenterWidget All Day DragInfoGraphicsView Edit Delete New event You are deleting an event. Are you sure you want to delete this event? Cancel Do you want to delete all occurrences of this event, or only the selected occurrence? Delete All Delete Only This Event Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Delete All Future Events New Event Return Today Return Return Today Today Return Today Shortcut Help Delete event Copy Cut Paste Select all Delete YearFrame Y today Today Today dde-calendar-5.7.0.23/translations/dde-calendar_vi.ts000066400000000000000000000504301375021633200223470ustar00rootroot00000000000000 CDayMonthView Monday Thứ hai Tuesday Thứ ba Wednesday Thứ tư Thursday Thứ năm Friday Thứ sáu Saturday Thứ bảy Sunday Chủ nhật CDayWindow Y Y M M D D CGraphicsView New Event Sự kiện mới CMonthGraphiview Delete Xóa You are deleting an event. Bạn đã xóa một sự kiện Are you sure you want to delete this event? Bạn có muốn xóa sự kiện này không Cancel Hủy Do you want to delete all occurrences of this event, or only the selected occurrence? Bạn có muốn xóa tất cả các lần xuất hiện của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Xóa tất cả Delete Only This Event Chỉ xóa sự kiện này Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bạn có muốn xóa sự kiện này và tất cả các lần xuất hiện trong tương lai của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Future Events Xóa tất cả các sự kiện trong tương lai CMonthSchceduleNumButton %1 more %1 nữa CMonthView New event Sự kiện mới New Event Sự kiện mới CMonthWindow Y Y CMySchceduleView You are deleting an event. Bạn đã xóa một sự kiện Are you sure you want to delete this event? Bạn có muốn xóa sự kiện này không Cancel Hủy Delete Xóa Do you want to delete all occurrences of this event, or only the selected occurrence? Bạn có muốn xóa tất cả các lần xuất hiện của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Xóa tất cả Delete Only This Event Chỉ xóa sự kiện này Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bạn có muốn xóa sự kiện này và tất cả các lần xuất hiện trong tương lai của sự kiện này hay chỉ xảy ra sự kiện đã chọn? My Event Sự kiện của tôi Edit Chỉnh sửa OK OK Delete All Future Events Xóa tất cả các sự kiện trong tương lai CSchceduleDlg New Event Sự kiện mới Edit Event Sửa sự kiện All occurrences of a repeating event must have the same all-day status. Tất cả các lần xuất hiện của một sự kiện lặp lại phải có cùng trạng thái ngày. Do you want to change all occurrences? Bạn có muốn thay đổi tất cả các lần xuất hiện? Cancel Hủy Change All Thay đổi tất cả You are changing the repeating rule of this event. Bạn đang thay đổi quy tắc lặp lại của sự kiện này. You are changing a repeating event. Bạn đang thay đổi một sự kiện lặp lại. Do you want to change only this occurrence of the event, or all occurrences? Bạn có muốn chỉ thay đổi sự xuất hiện của sự kiện này hay tất cả các sự kiện? All Tất cả Only This Event Chỉ sự kiện này Do you want to change only this occurrence of the event, or this and all future occurrences? Bạn có muốn chỉ thay đổi sự xuất hiện của sự kiện này, hoặc tất cả các lần xuất hiện trong tương lai? All Future Events Tất cả các sự kiện trong tương lai Never Không bao giờ At time of event Tại thời điểm diễn ra sự kiện 15 minutes before 15 phút trước 30 minutes before 30 phút trước 1 hour before 1 giờ trước 1 day before 1 ngày trước 2 days before 2 ngày trước 1 week before 1 tuần trước On start day (9:00 AM) Bắt đầu lúc (9:00 AM) Type: Loại: All Day: Tất cả các ngày: Remind Me: Nhắc nhở tôi: Repeat: Lặp lại: Daily Hằng ngày Weekdays Các ngày trong tuần Weekly Hàng tuần Monthly Hàng tháng Yearly Hàng năm End Repeat: Kết thúc lặp lại: After Sau On Mở time(s) thời gian(s) Save Lưu New event Sự kiện mới End time must be greater than start time Thời gian kết thúc phải lớn hơn thời gian bắt đầu OK OK Type Loại All Day Tất cả các ngày Starts Bắt đầu Ends Kết thúc Remind Me Nhắc nhở tôi Repeat Lặp lại End Repeat Kết thúc lặp lại Ends: Kết thúc: Description: Mô tả: Description Mô tả Starts: Bắt đầu: Work Công việc Life Cuộc sống Other Khác CSchceduleSearchDateItem Y Y M M D D CSchceduleSearchItem Edit Chỉnh sửa Delete Xóa You are deleting an event. Bạn đã xóa một sự kiện Are you sure you want to delete this event? Bạn có muốn xóa sự kiện này không Cancel Hủy Do you want to delete all occurrences of this event, or only the selected occurrence? Bạn có muốn xóa tất cả các lần xuất hiện của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Xóa tất cả Delete Only This Event Chỉ xóa sự kiện này Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bạn có muốn xóa sự kiện này và tất cả các lần xuất hiện trong tương lai của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Future Events Xóa tất cả các sự kiện trong tương lai All Day Tất cả các ngày CSchceduleSearchView No search results Không có kết quả tìm kiếm nào CScheduleView ALL DAY Tất cả các ngày CWeekWindow Week Tuần Y Y CYearSchceduleItem All Day Tất cả các ngày CYearSchceduleView All Day Tất cả các ngày No event Không có sự kiện nào CYearWindow Y Y CalendarWindow Calendar Lịch Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. Lịch là một công cụ để xem ngày, và cũng là công cụ sắp xếp kế hoạch, sự kiện hàng ngày thông minh. Calendarmainwindow Calendar Lịch Y Y M M W W D D CenterWidget All Day Tất cả các ngày DragInfoGraphicsView Edit Chỉnh sửa Delete Xóa New event Sự kiện mới You are deleting an event. Bạn đã xóa một sự kiện Are you sure you want to delete this event? Bạn có muốn xóa sự kiện này không Cancel Hủy Do you want to delete all occurrences of this event, or only the selected occurrence? Bạn có muốn xóa tất cả các lần xuất hiện của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Xóa tất cả Delete Only This Event Chỉ xóa sự kiện này Do you want to delete this and all future occurrences of this event, or only the selected occurrence? Bạn có muốn xóa sự kiện này và tất cả các lần xuất hiện trong tương lai của sự kiện này hay chỉ xảy ra sự kiện đã chọn? Delete All Future Events Xóa tất cả các sự kiện trong tương lai New Event Sự kiện mới Return Today Return Hôm nay Return Today Today Return Today Hôm nay Shortcut Help Giúp đỡ Delete event Xóa sự kiện Copy Sao chép Cut Cắt Paste Dán Select all Chọn tất cả Delete Xóa YearFrame Y Y today Today Today Hôm nay dde-calendar-5.7.0.23/translations/dde-calendar_zh_CN.ts000066400000000000000000000455371375021633200227460ustar00rootroot00000000000000 CDayMonthView Monday 星期一 Tuesday 星期二 Wednesday 星期三 Thursday 星期四 Friday 星期五 Saturday 星期六 Sunday 星期天 CDayWindow Y M D CGraphicsView New Event 新建日程 CMonthGraphiview Delete 删除 You are deleting an event. 您正在删除日程。 Are you sure you want to delete this event? 您确定要删除此日程吗? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要删除此日程的所有重复,还是只删除所选重复? Delete All 全部删除 Delete Only This Event 仅删除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要删除此日程的这个重复和所有将来重复,还是只删除所选重复? Delete All Future Events 删除所有将来日程 CMonthSchceduleNumButton %1 more 还有%1项 CMonthView New event 新建日程 New Event 新建日程 CMonthWindow Y CMySchceduleView You are deleting an event. 您正在删除日程。 Are you sure you want to delete this event? 您确定要删除此日程吗? Cancel 取消 Delete 删除 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要删除此日程的所有重复,还是只删除所选重复? Delete All 全部删除 Delete Only This Event 仅删除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要删除此日程的这个重复和所有将来重复,还是只删除所选重复? My Event 我的日程 Edit 编辑 OK 确定 Delete All Future Events 删除所有将来日程 CSchceduleDlg New Event 新建日程 Edit Event 编辑日程 All occurrences of a repeating event must have the same all-day status. 重复日程的所有重复必须具有相同的全天状态。 Do you want to change all occurrences? 您要更改所有重复吗? Cancel 取消 Change All 全部更改 You are changing the repeating rule of this event. 您正在更改日程的重复规则。 You are changing a repeating event. 您正在更改重复日程。 Do you want to change only this occurrence of the event, or all occurrences? 您要更改此日程的仅这一个重复,还是更改它的所有重复? All 全部日程 Only This Event 仅此日程 Do you want to change only this occurrence of the event, or this and all future occurrences? 您要更改此日程的这个重复和所有将来重复,还是只更改所选重复? All Future Events 所有将来日程 Never 从不 At time of event 日程开始时 15 minutes before 15分钟前 30 minutes before 30分钟前 1 hour before 1小时前 1 day before 1天前 2 days before 2天前 1 week before 1周前 On start day (9:00 AM) 日程发生当天(上午9点) Type: 类型: All Day: 全天: Remind Me: 提醒: Repeat: 重复: Daily 每天 Weekdays 工作日 Weekly 每周 Monthly 每月 Yearly 每年 End Repeat: 结束重复: After On 于日期 time(s) 次后 Save 保存 New event 新建日程 End time must be greater than start time 结束时间需晚于开始时间 OK 确定 Type 类型 All Day 全天 Starts 开始时间 Ends 结束时间 Remind Me 提醒 Repeat 重复 End Repeat 结束重复 Ends: 结束时间: Description: 内容: Description 内容 Starts: 开始时间: Work 工作 Life 生活 Other 其他 CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit 编辑 Delete 删除 You are deleting an event. 您正在删除日程。 Are you sure you want to delete this event? 您确定要删除此日程吗? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要删除此日程的所有重复,还是只删除所选重复? Delete All 全部删除 Delete Only This Event 仅删除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要删除此日程的这个重复和所有将来重复,还是只删除所选重复? Delete All Future Events 删除所有将来日程 All Day 全天 CSchceduleSearchView No search results 无搜索结果 CScheduleView ALL DAY 全天 CWeekWindow Week Y CYearSchceduleItem All Day 全天 CYearSchceduleView All Day 全天 No event 无日程 CYearWindow Y CalendarWindow Calendar 日历 Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. 日历是一款查看日期、管理日程的小工具。 Calendarmainwindow Calendar 日历 Y M W D CenterWidget All Day 全天 DragInfoGraphicsView Edit 编辑 Delete 删除 New event 新建日程 You are deleting an event. 您正在删除日程。 Are you sure you want to delete this event? 您确定要删除此日程吗? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要删除此日程的所有重复,还是只删除所选重复? Delete All 全部删除 Delete Only This Event 仅删除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要删除此日程的这个重复和所有将来重复,还是只删除所选重复? Delete All Future Events 删除所有将来日程 New Event 新建日程 Return Today Return 返回今天 Return Today Today Return Today 返回今天 Shortcut Help 帮助 Delete event 删除日程 Copy 复制 Cut 剪切 Paste 粘贴 Select all 全选 Delete 删除 YearFrame Y today Today Today 今天 dde-calendar-5.7.0.23/translations/dde-calendar_zh_HK.ts000066400000000000000000000455311375021633200227420ustar00rootroot00000000000000 CDayMonthView Monday 星期一 Tuesday 星期二 Wednesday 星期三 Thursday 星期四 Friday 星期五 Saturday 星期六 Sunday 星期日 CDayWindow Y M D CGraphicsView New Event 新建日程 CMonthGraphiview Delete 删除 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 CMonthSchceduleNumButton %1 more 還有%1項 CMonthView New event 新建日程 New Event 新建日程 CMonthWindow Y CMySchceduleView You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Delete 刪除 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? My Event 我的日程 Edit 更改 OK 確定 Delete All Future Events 刪除所有將來日程 CSchceduleDlg New Event 新建日程 Edit Event 更改日程 All occurrences of a repeating event must have the same all-day status. 重複日程的所有重複必須具有相同的全天狀態。 Do you want to change all occurrences? 您要更改所有重複嗎? Cancel 取消 Change All 全部更改 You are changing the repeating rule of this event. 您正在更改日程的重複規則。 You are changing a repeating event. 您正在更改重複日程。 Do you want to change only this occurrence of the event, or all occurrences? 您要更改此日程的僅這一個重複,還是更改它的所有重複? All 全部日程 Only This Event 僅此日程 Do you want to change only this occurrence of the event, or this and all future occurrences? 您要更改此日程的這個重複和所有將來重複,還是只更改所選重複? All Future Events 所有將來日程 Never 永不 At time of event 日程開始時 15 minutes before 15分鐘前 30 minutes before 30分鐘前 1 hour before 1小時前 1 day before 1天前 2 days before 2天前 1 week before 1週前 On start day (9:00 AM) 日程發生當天(上午9點) Type: 類型: All Day: 全天: Remind Me: 提醒: Repeat: 重複: Daily 每天 Weekdays 工作日 Weekly 每週 Monthly 每月 Yearly 每年 End Repeat: 結束重複: After On 於日期 time(s) 次後 Save 儲存 New event 新建日程 End time must be greater than start time 結束時間需晚於開始時間 OK 確定 Type 類型 All Day 全天 Starts 開始時間 Ends 結束時間 Remind Me 提醒 Repeat 重複 End Repeat 結束重複 Ends: 結束時間: Description: 描述: Description 描述 Starts: 開始時間: Work 工作 Life 生活 Other 其他 CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit 更改 Delete 刪除 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 All Day 全天 CSchceduleSearchView No search results 無搜索結果 CScheduleView ALL DAY 全天 CWeekWindow Week Y CYearSchceduleItem All Day 全天 CYearSchceduleView All Day 全天 No event 無日程 CYearWindow Y CalendarWindow Calendar 日曆 Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. 日曆是一款查看日期、管理日程的小工具。 Calendarmainwindow Calendar 日曆 Y M W D CenterWidget All Day 全天 DragInfoGraphicsView Edit 更改 Delete 删除 New event 新建日程 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 New Event 新建日程 Return Today Return 今天 Return Today Today Return Today 今天 Shortcut Help 幫助 Delete event 刪除日程 Copy 複製 Cut 剪下 Paste 貼上 Select all 選擇全部 Delete 刪除 YearFrame Y today Today Today 今天 dde-calendar-5.7.0.23/translations/dde-calendar_zh_TW.ts000066400000000000000000000455371375021633200230000ustar00rootroot00000000000000 CDayMonthView Monday 星期一 Tuesday 星期二 Wednesday 星期三 Thursday 星期四 Friday 星期五 Saturday 星期六 Sunday 星期日 CDayWindow Y M D CGraphicsView New Event 建立日程 CMonthGraphiview Delete 刪除 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 CMonthSchceduleNumButton %1 more 還有%1項 CMonthView New event 建立日程 New Event 建立日程 CMonthWindow Y CMySchceduleView You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Delete 刪除 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? My Event 我的日程 Edit 編輯 OK 確認 Delete All Future Events 刪除所有將來日程 CSchceduleDlg New Event 建立日程 Edit Event 編輯日程 All occurrences of a repeating event must have the same all-day status. 重複日程的所有重複必須具有相同的全天狀態。 Do you want to change all occurrences? 您要更改所有重複嗎? Cancel 取消 Change All 全部更改 You are changing the repeating rule of this event. 您正在更改日程的重複規則。 You are changing a repeating event. 您正在更改重複日程。 Do you want to change only this occurrence of the event, or all occurrences? 您要更改此日程的僅這一個重複,還是更改它的所有重複? All 全部日程 Only This Event 僅此日程 Do you want to change only this occurrence of the event, or this and all future occurrences? 您要更改此日程的這個重複和所有將來重複,還是只更改所選重複? All Future Events 所有將來日程 Never 從不 At time of event 日程開始時 15 minutes before 15分鐘前 30 minutes before 30分鐘前 1 hour before 1小時前 1 day before 1天前 2 days before 2天前 1 week before 1週前 On start day (9:00 AM) 日程發生當天(上午9點) Type: 類型: All Day: 全天: Remind Me: 提醒: Repeat: 重複: Daily 每天 Weekdays 工作日 Weekly 每週 Monthly 每月 Yearly 每年 End Repeat: 結束重複: After On 於日期 time(s) 次後 Save 儲存 New event 建立日程 End time must be greater than start time 結束時間需晚於開始時間 OK 確定 Type 類型 All Day 全天 Starts 開始時間 Ends 結束時間 Remind Me 提醒 Repeat 重新輸入密碼 End Repeat 結束重複 Ends: 結束時間: Description: 內容: Description 簡介 Starts: 開始時間: Work 工作 Life 生活 Other 其他 CSchceduleSearchDateItem Y M D CSchceduleSearchItem Edit 編輯 Delete 刪除 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 All Day 全天 CSchceduleSearchView No search results 找不到結果 CScheduleView ALL DAY 全天 CWeekWindow Week Y CYearSchceduleItem All Day 全天 CYearSchceduleView All Day 全天 No event 無日程 CYearWindow Y CalendarWindow Calendar 日曆 Calendar is a tool to view dates, and also a smart daily planner to schedule all things in life. 日曆是一款查看日期、管理日程的小工具。 Calendarmainwindow Calendar 日曆 Y M W D CenterWidget All Day 全天 DragInfoGraphicsView Edit 編輯 Delete 刪除 New event 建立日程 You are deleting an event. 您正在刪除日程。 Are you sure you want to delete this event? 您確定要刪除此日程嗎? Cancel 取消 Do you want to delete all occurrences of this event, or only the selected occurrence? 您要刪除此日程的所有重複,還是只刪除所選重複? Delete All 全部刪除 Delete Only This Event 僅刪除此日程 Do you want to delete this and all future occurrences of this event, or only the selected occurrence? 您要刪除此日程的這個重複和所有將來重複,還是只刪除所選重複? Delete All Future Events 刪除所有將來日程 New Event 建立日程 Return Today Return 今天 Return Today Today Return Today 今天 Shortcut Help 說明 Delete event 刪除日程 Copy 複製 Cut 剪下 Paste 貼上 Select all 全選 Delete 刪除 YearFrame Y today Today Today 今天 dde-calendar-5.7.0.23/translations/desktop/000077500000000000000000000000001375021633200204455ustar00rootroot00000000000000dde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ady.ts000066400000000000000000000010131375021633200257010ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_af.ts000066400000000000000000000010121375021633200255110ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ak.ts000066400000000000000000000010121375021633200255160ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_am_ET.ts000066400000000000000000000011151375021633200261140ustar00rootroot00000000000000desktopCalendarቀን መቁጠሪያCalendar is a date tool.ቀን መቁጠሪያDeepin Calendarዲፕኢን ቀን መቁጠሪያdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ar.ts000066400000000000000000000011221375021633200255270ustar00rootroot00000000000000desktopCalendarالتقويمCalendar is a date tool.التقويم هو أداة عرض التاريخ .Deepin Calendarتقويم ديبينdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ast.ts000066400000000000000000000010741375021633200257220ustar00rootroot00000000000000desktopCalendarCalendariuCalendar is a date tool.Calendariu ye una ferramienta de dates.Deepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_az.ts000066400000000000000000000010541375021633200255430ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar tarix alətidirDeepin CalendarDeepin Kalendarıdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_bg.ts000066400000000000000000000011711375021633200255210ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.Календарът е приложение за показване на датата.Deepin CalendarDeepin Календарdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_bn.ts000066400000000000000000000012251375021633200255300ustar00rootroot00000000000000desktopCalendarক্যালেন্ডারCalendar is a date tool.ক্যালেন্ডার একটি তারিখ টুলDeepin Calendarডিপিন ক্যালেন্ডারdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ca.ts000066400000000000000000000010731375021633200255150ustar00rootroot00000000000000desktopCalendarCalendariCalendar is a date tool.El calendari és una eina de cites.Deepin CalendarCalendari del Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_cs.ts000066400000000000000000000011011375021633200255270ustar00rootroot00000000000000desktopCalendarKalendářCalendar is a date tool.Kalendář je nástroj pro práci s datumy.Deepin CalendarDeepin Kalendářdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_da.ts000066400000000000000000000010571375021633200255200ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender er et datoværktøj.Deepin CalendarDeepin kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_de.ts000066400000000000000000000010621375021633200255200ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender ist ein Datumswerkzeug.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_el.ts000066400000000000000000000011221375021633200255250ustar00rootroot00000000000000desktopCalendarΗμερολόγιοCalendar is a date tool.Εφαρμογή Ημερολογίου Deepin CalendarΗμερολόγιο Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_en.ts000066400000000000000000000010521375021633200255310ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendar is a date tool.Deepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_en_AU.ts000066400000000000000000000010551375021633200261210ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendar is a date tool.Deepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_en_GB.ts000066400000000000000000000010541375021633200261030ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendar is a date toolDeepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_eo.ts000066400000000000000000000010531375021633200255330ustar00rootroot00000000000000desktopCalendarKalendaroCalendar is a date tool.Kalendaro estas datilo.Deepin CalendarDeepin kalendarodde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_es.ts000066400000000000000000000011131375021633200255340ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.Calendario es una herramienta de gestión de eventos.Deepin CalendarCalendario Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_et.ts000066400000000000000000000010631375021633200255410ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender on kuupäeva tööriist.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_fa.ts000066400000000000000000000011031375021633200255120ustar00rootroot00000000000000desktopCalendarتقویمCalendar is a date tool.تقویم یک ابزار تاریخ است.Deepin Calendarتقویم Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_fi.ts000066400000000000000000000010711375021633200255260ustar00rootroot00000000000000desktopCalendarKalenteriCalendar is a date tool.Kalenteri on ajankäytön apuohjelma.Deepin CalendarDeepin kalenteridde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_fil.ts000066400000000000000000000010131375021633200256760ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_fr.ts000066400000000000000000000010501375021633200255340ustar00rootroot00000000000000desktopCalendarCalendrierCalendar is a date tool.Simple calendrier.Deepin CalendarDeepin Calendrierdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_gl_ES.ts000066400000000000000000000011051375021633200261170ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.O calendario é unha ferramenta de datas.Deepin CalendarCalendario do Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_he.ts000066400000000000000000000010121375021633200255170ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_hi_IN.ts000066400000000000000000000012401375021633200261140ustar00rootroot00000000000000desktopCalendarदिनदर्शिकाCalendar is a date tool.दिनदर्शिका तिथि हेतु एक साधन है।Deepin Calendarडीपिन दिनदर्शिकाdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_hr.ts000066400000000000000000000010661375021633200255450ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar je alat za rad sa vremenom.Deepin CalendarDeepin kalendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_hu.ts000066400000000000000000000010431375021633200255430ustar00rootroot00000000000000desktopCalendarNaptárCalendar is a date tool.Naptár alkalmazásDeepin CalendarDeepin Naptárdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_hy.ts000066400000000000000000000010121375021633200255430ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_id.ts000066400000000000000000000010771375021633200255320ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender adalah sebuah peralatan penanggalan.Deepin CalendarKalender Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_it.ts000066400000000000000000000011671375021633200255520ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.Calendario è un tool calendario. Localizzazione italiana a cura di Carofano Massimo Antonio.Deepin CalendarCalendario di Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ja.ts000066400000000000000000000011121375021633200255160ustar00rootroot00000000000000desktopCalendarカレンダーCalendar is a date tool.カレンダーは日時ツールです。Deepin CalendarDeepin カレンダーdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_kk.ts000066400000000000000000000010121375021633200255300ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_km_KH.ts000066400000000000000000000010151375021633200261170ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_kn_IN.ts000066400000000000000000000012131375021633200261240ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.ಕ್ಯಾಲೆಂಡರ್ ಒಂದು ದಿನದರ್ಶಕವಾಗಿದೆ.Deepin Calendarಡೀಪಿನ್ ಕ್ಯಾಲೆಂಡರ್dde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ko.ts000066400000000000000000000010571375021633200255450ustar00rootroot00000000000000desktopCalendar달력Calendar is a date tool.달력은 날짜 도구입니다.Deepin CalendarDeepin 달력dde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ku.ts000066400000000000000000000010611375021633200255460ustar00rootroot00000000000000desktopCalendarSalnameCalendar is a date tool.Salname navgîneke tarîxê ye.Deepin CalendarSalnameya Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ku_IQ.ts000066400000000000000000000011141375021633200261360ustar00rootroot00000000000000desktopCalendarSalnameCalendar is a date tool.ساڵنامە ئامرازێکی بەروارەDeepin Calendarساڵنامەی Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ky.ts000066400000000000000000000010121375021633200255460ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ky@Arab.ts000066400000000000000000000010171375021633200264410ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_la.ts000066400000000000000000000010121375021633200255170ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_lo.ts000066400000000000000000000010121375021633200255350ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_lt.ts000066400000000000000000000010671375021633200255540ustar00rootroot00000000000000desktopCalendarKalendoriusCalendar is a date tool.Kalendorius yra datų įrankis.Deepin CalendarDeepin kalendoriusdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_lv.ts000066400000000000000000000010611375021633200255500ustar00rootroot00000000000000desktopCalendarKalendārsCalendar is a date tool.Kalendārs ir datumu rīks.Deepin CalendarDeepin kalendārsdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ml.ts000066400000000000000000000011711375021633200255410ustar00rootroot00000000000000desktopCalendarകലണ്ടർCalendar is a date tool.കലണ്ടർ ഒരു തീയതി ഉപകരണം ആണ് Deepin Calendarഡീപിൻ കലണ്ടർdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_mn.ts000066400000000000000000000011441375021633200255430ustar00rootroot00000000000000desktopCalendarХуанлиCalendar is a date tool.Хуанли нь огноо, цагалбарын хэрэгсэл.Deepin CalendarДеепин Хуанлиdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_mr.ts000066400000000000000000000010121375021633200255410ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ms.ts000066400000000000000000000010611375021633200255460ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar merupakan alat tarikh.Deepin CalendarKalendar Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_nb.ts000066400000000000000000000011371375021633200255320ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalander er et redskap for å organisere hendelser etter dato og klokkeslett.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ne.ts000066400000000000000000000012231375021633200255310ustar00rootroot00000000000000desktopCalendarक्यालेन्डरCalendar is a date tool.क्यालेन्डर एक मिति उपकरण हो।Deepin Calendarडिपिन क्यालेन्डरdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_nl.ts000066400000000000000000000011161375021633200255410ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender is een hulpmiddel voor het bijhouden van afspraken.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_pa.ts000066400000000000000000000011501375021633200255260ustar00rootroot00000000000000desktopCalendarਕੈਲੰਡਰCalendar is a date tool.ਕੈਲੰਡਰ ਤਾਰੀਖ ਸਾਧਨ ਹੈ।Deepin Calendarਡੀਪਿਨ ਕੈਲੰਡਰdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_pam.ts000066400000000000000000000010131375021633200257010ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_pl.ts000066400000000000000000000011001375021633200255340ustar00rootroot00000000000000desktopCalendarKalendarzCalendar is a date tool.Kalendarz to narzędzie zarządzania czasem.Deepin CalendarKalendarz Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_pt.ts000066400000000000000000000011001375021633200255440ustar00rootroot00000000000000desktopCalendarCalendárioCalendar is a date tool.O Calendário é uma ferramenta de data.Deepin CalendarCalendário Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_pt_BR.ts000066400000000000000000000011351375021633200261370ustar00rootroot00000000000000desktopCalendarCalendárioCalendar is a date tool.O Calendário é uma ferramenta que permite agendar e visualizar eventos.Deepin CalendarCalendáriodde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ro.ts000066400000000000000000000010751375021633200255540ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendarul este un instrument pentru dateDeepin CalendarCalendarul Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ru.ts000066400000000000000000000012351375021633200255600ustar00rootroot00000000000000desktopCalendarКалендарьCalendar is a date tool.Календарь является приложением для планирования Вашего времени.Deepin CalendarКалендарь Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sc.ts000066400000000000000000000010121375021633200255300ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_si.ts000066400000000000000000000010121375021633200255360ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sk.ts000066400000000000000000000010651375021633200255500ustar00rootroot00000000000000desktopCalendarKalendárCalendar is a date tool.Kalendár je dátumový nástroj.Deepin CalendarDeepin Kalendárdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sl.ts000066400000000000000000000010661375021633200255520ustar00rootroot00000000000000desktopCalendarKoledarCalendar is a date tool.Koledar je orodje za urejanje datumov.Deepin CalendarKoledar Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sq.ts000066400000000000000000000010651375021633200255560ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendari është një mjet datash.Deepin CalendarKalendar Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sr.ts000066400000000000000000000011561375021633200255600ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.Календар је алат за приказивање датума.Deepin CalendarДипин Календарdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sv.ts000066400000000000000000000010601375021633200255560ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender är ett datumverktyg.Deepin CalendarDeepin kalenderdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_sw.ts000066400000000000000000000010561375021633200255640ustar00rootroot00000000000000desktopCalendarKalendaCalendar is a date tool.Kalenda ni chombo ya tareheDeepin CalendarKalenda ya Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ta.ts000066400000000000000000000011651375021633200255400ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.அட்டவணை தேதி கருவியாகும்Deepin Calendarடீபின் நாள்காட்டிdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_th.ts000066400000000000000000000010271375021633200255440ustar00rootroot00000000000000desktopCalendarปฏิทินCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_tr.ts000066400000000000000000000010731375021633200255570ustar00rootroot00000000000000desktopCalendarTakvimCalendar is a date tool.Takvim, tarihi görüntüleyen bir araçtır.Deepin CalendarDeepin Takvimdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ug.ts000066400000000000000000000011221375021633200255400ustar00rootroot00000000000000desktopCalendarكالىندار Calendar is a date tool.كالىندار ئۇ ۋاقىت قۇرالىDeepin CalendarDeepin كالىندارىdde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_uk.ts000066400000000000000000000010621375021633200255470ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.КалендарDeepin CalendarКалендар Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_ur.ts000066400000000000000000000010121375021633200255510ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_uz.ts000066400000000000000000000010121375021633200255610ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.Deepin Calendardde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_vi.ts000066400000000000000000000010671375021633200255530ustar00rootroot00000000000000desktopCalendarLịchCalendar is a date tool.Lịch là một công cụ ngày tháng.Deepin CalendarLịch Deepindde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_zh_CN.ts000066400000000000000000000010721375021633200261320ustar00rootroot00000000000000desktopCalendar日历Calendar is a date tool.日历是一款查看日期的小工具。Deepin Calendar深度日历dde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_zh_HK.ts000066400000000000000000000010721375021633200261340ustar00rootroot00000000000000desktopCalendar日曆Calendar is a date tool.日曆是一款查看日期的小工具。Deepin Calendar深度日曆dde-calendar-5.7.0.23/translations/desktop/dde-calendar_desktop_zh_TW.ts000066400000000000000000000010511375021633200261610ustar00rootroot00000000000000desktopCalendar日曆Calendar is a date tool.簡易日期顯示工具Deepin CalendarDeepin 日曆dde-calendar-5.7.0.23/translations/desktop/desktop.ts000066400000000000000000000010171375021633200224650ustar00rootroot00000000000000 desktopCalendarCalendar is a date tool.Deepin Calendar dde-calendar-5.7.0.23/translations/desktop/desktop_am_ET.ts000066400000000000000000000011151375021633200235310ustar00rootroot00000000000000desktopCalendarቀን መቁጠሪያCalendar is a date tool.ቀን መቁጠሪያDeepin Calendarዲፕኢን ቀን መቁጠሪያdde-calendar-5.7.0.23/translations/desktop/desktop_ar.ts000066400000000000000000000011221375021633200231440ustar00rootroot00000000000000desktopCalendarالتقويمCalendar is a date tool.التقويم هو أداة عرض التاريخ .Deepin Calendarتقويم ديبينdde-calendar-5.7.0.23/translations/desktop/desktop_ast.ts000066400000000000000000000010741375021633200233370ustar00rootroot00000000000000desktopCalendarCalendariuCalendar is a date tool.Calendariu ye una ferramienta de dates.Deepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/desktop_az.ts000066400000000000000000000010541375021633200231600ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar tarix alətidirDeepin CalendarDeepin Kalendarıdde-calendar-5.7.0.23/translations/desktop/desktop_bg.ts000066400000000000000000000011711375021633200231360ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.Календарът е приложение за показване на датата.Deepin CalendarDeepin Календарdde-calendar-5.7.0.23/translations/desktop/desktop_bn.ts000066400000000000000000000012251375021633200231450ustar00rootroot00000000000000desktopCalendarক্যালেন্ডারCalendar is a date tool.ক্যালেন্ডার একটি তারিখ টুলDeepin Calendarডিপিন ক্যালেন্ডারdde-calendar-5.7.0.23/translations/desktop/desktop_bo.ts000066400000000000000000000013231375021633200231450ustar00rootroot00000000000000desktopCalendarལོ་ཐོ།Calendar is a date tool.ལོ་ཐོ་ནི་ཚེས་གྲངས་ལྟ་བའི་ཡོ་བྱད་ཆུང་ཆུང་ཞིག་རེད།Deepin Calendarགྲ་རྒྱས་པའི་ལོ་ཐོ།dde-calendar-5.7.0.23/translations/desktop/desktop_ca.ts000066400000000000000000000010731375021633200231320ustar00rootroot00000000000000desktopCalendarCalendariCalendar is a date tool.El calendari és una eina de cites.Deepin CalendarCalendari del Deepindde-calendar-5.7.0.23/translations/desktop/desktop_cs.ts000066400000000000000000000010701375021633200231510ustar00rootroot00000000000000desktopCalendarKalendářCalendar is a date tool.Kalendář je nástroj pro práci s daty.Deepin CalendarKalendářdde-calendar-5.7.0.23/translations/desktop/desktop_da.ts000066400000000000000000000010571375021633200231350ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender er et datoværktøj.Deepin CalendarDeepin kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_de.ts000066400000000000000000000010621375021633200231350ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender ist ein Datumswerkzeug.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_el.ts000066400000000000000000000011221375021633200231420ustar00rootroot00000000000000desktopCalendarΗμερολόγιοCalendar is a date tool.Εφαρμογή Ημερολογίου Deepin CalendarΗμερολόγιο Deepindde-calendar-5.7.0.23/translations/desktop/desktop_en_AU.ts000066400000000000000000000010551375021633200235360ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendar is a date tool.Deepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/desktop_en_GB.ts000066400000000000000000000010541375021633200235200ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendar is a date toolDeepin CalendarDeepin Calendardde-calendar-5.7.0.23/translations/desktop/desktop_eo.ts000066400000000000000000000010531375021633200231500ustar00rootroot00000000000000desktopCalendarKalendaroCalendar is a date tool.Kalendaro estas datilo.Deepin CalendarDeepin kalendarodde-calendar-5.7.0.23/translations/desktop/desktop_es.ts000066400000000000000000000011161375021633200231540ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.Calendario de Deepin es una herramienta de gestión de eventos.Deepin CalendarCalendariodde-calendar-5.7.0.23/translations/desktop/desktop_et.ts000066400000000000000000000010631375021633200231560ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender on kuupäeva tööriist.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_fa.ts000066400000000000000000000011031375021633200231270ustar00rootroot00000000000000desktopCalendarتقویمCalendar is a date tool.تقویم یک ابزار تاریخ است.Deepin Calendarتقویم Deepindde-calendar-5.7.0.23/translations/desktop/desktop_fi.ts000066400000000000000000000010711375021633200231430ustar00rootroot00000000000000desktopCalendarKalenteriCalendar is a date tool.Kalenteri on ajankäytön apuohjelma.Deepin CalendarDeepin kalenteridde-calendar-5.7.0.23/translations/desktop/desktop_fr.ts000066400000000000000000000010501375021633200231510ustar00rootroot00000000000000desktopCalendarCalendrierCalendar is a date tool.Simple calendrier.Deepin CalendarCalendrier Deepindde-calendar-5.7.0.23/translations/desktop/desktop_gl_ES.ts000066400000000000000000000011051375021633200235340ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.O calendario é unha ferramenta de datas.Deepin CalendarCalendario do Deepindde-calendar-5.7.0.23/translations/desktop/desktop_hi_IN.ts000066400000000000000000000012401375021633200235310ustar00rootroot00000000000000desktopCalendarदिनदर्शिकाCalendar is a date tool.दिनदर्शिका तिथि हेतु एक साधन है।Deepin Calendarडीपिन दिनदर्शिकाdde-calendar-5.7.0.23/translations/desktop/desktop_hr.ts000066400000000000000000000010661375021633200231620ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar je alat za rad sa vremenom.Deepin CalendarDeepin kalendardde-calendar-5.7.0.23/translations/desktop/desktop_hu.ts000066400000000000000000000010731375021633200231630ustar00rootroot00000000000000desktopCalendarNaptárCalendar is a date tool.A Naptár egy dátum megjelenítő eszköz.Deepin CalendarDeepin Naptárdde-calendar-5.7.0.23/translations/desktop/desktop_id.ts000066400000000000000000000010771375021633200231470ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender adalah sebuah peralatan penanggalan.Deepin CalendarKalender Deepindde-calendar-5.7.0.23/translations/desktop/desktop_it.ts000066400000000000000000000011671375021633200231670ustar00rootroot00000000000000desktopCalendarCalendarioCalendar is a date tool.Calendario è un tool calendario. Localizzazione italiana a cura di Carofano Massimo Antonio.Deepin CalendarCalendario di Deepindde-calendar-5.7.0.23/translations/desktop/desktop_ja.ts000066400000000000000000000011121375021633200231330ustar00rootroot00000000000000desktopCalendarカレンダーCalendar is a date tool.カレンダーは日時ツールです。Deepin CalendarDeepin カレンダーdde-calendar-5.7.0.23/translations/desktop/desktop_kn_IN.ts000066400000000000000000000012131375021633200235410ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.ಕ್ಯಾಲೆಂಡರ್ ಒಂದು ದಿನದರ್ಶಕವಾಗಿದೆ.Deepin Calendarಡೀಪಿನ್ ಕ್ಯಾಲೆಂಡರ್dde-calendar-5.7.0.23/translations/desktop/desktop_ko.ts000066400000000000000000000010571375021633200231620ustar00rootroot00000000000000desktopCalendar달력Calendar is a date tool.달력은 날짜 도구입니다.Deepin CalendarDeepin 달력dde-calendar-5.7.0.23/translations/desktop/desktop_ku.ts000066400000000000000000000010611375021633200231630ustar00rootroot00000000000000desktopCalendarSalnameCalendar is a date tool.Salname navgîneke tarîxê ye.Deepin CalendarSalnameya Deepindde-calendar-5.7.0.23/translations/desktop/desktop_ku_IQ.ts000066400000000000000000000011141375021633200235530ustar00rootroot00000000000000desktopCalendarSalnameCalendar is a date tool.ساڵنامە ئامرازێکی بەروارەDeepin Calendarساڵنامەی Deepindde-calendar-5.7.0.23/translations/desktop/desktop_lt.ts000066400000000000000000000010671375021633200231710ustar00rootroot00000000000000desktopCalendarKalendoriusCalendar is a date tool.Kalendorius yra datų įrankis.Deepin CalendarDeepin kalendoriusdde-calendar-5.7.0.23/translations/desktop/desktop_lv.ts000066400000000000000000000010611375021633200231650ustar00rootroot00000000000000desktopCalendarKalendārsCalendar is a date tool.Kalendārs ir datumu rīks.Deepin CalendarDeepin kalendārsdde-calendar-5.7.0.23/translations/desktop/desktop_ml.ts000066400000000000000000000011711375021633200231560ustar00rootroot00000000000000desktopCalendarകലണ്ടർCalendar is a date tool.കലണ്ടർ ഒരു തീയതി ഉപകരണം ആണ് Deepin Calendarഡീപിൻ കലണ്ടർdde-calendar-5.7.0.23/translations/desktop/desktop_mn.ts000066400000000000000000000011441375021633200231600ustar00rootroot00000000000000desktopCalendarХуанлиCalendar is a date tool.Хуанли нь огноо, цагалбарын хэрэгсэл.Deepin CalendarДеепин Хуанлиdde-calendar-5.7.0.23/translations/desktop/desktop_ms.ts000066400000000000000000000010611375021633200231630ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendar merupakan alat tarikh.Deepin CalendarKalendar Deepindde-calendar-5.7.0.23/translations/desktop/desktop_nb.ts000066400000000000000000000011371375021633200231470ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalander er et redskap for å organisere hendelser etter dato og klokkeslett.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_ne.ts000066400000000000000000000012231375021633200231460ustar00rootroot00000000000000desktopCalendarक्यालेन्डरCalendar is a date tool.क्यालेन्डर एक मिति उपकरण हो।Deepin Calendarडिपिन क्यालेन्डरdde-calendar-5.7.0.23/translations/desktop/desktop_nl.ts000066400000000000000000000011161375021633200231560ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender is een hulpmiddel voor het bijhouden van afspraken.Deepin CalendarDeepin Kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_pa.ts000066400000000000000000000011501375021633200231430ustar00rootroot00000000000000desktopCalendarਕੈਲੰਡਰCalendar is a date tool.ਕੈਲੰਡਰ ਤਾਰੀਖ ਸਾਧਨ ਹੈ।Deepin Calendarਡੀਪਿਨ ਕੈਲੰਡਰdde-calendar-5.7.0.23/translations/desktop/desktop_pl.ts000066400000000000000000000011001375021633200231510ustar00rootroot00000000000000desktopCalendarKalendarzCalendar is a date tool.Kalendarz to narzędzie zarządzania czasem.Deepin CalendarKalendarz Deepindde-calendar-5.7.0.23/translations/desktop/desktop_pt.ts000066400000000000000000000011001375021633200231610ustar00rootroot00000000000000desktopCalendarCalendárioCalendar is a date tool.O Calendário é uma ferramenta de data.Deepin CalendarCalendário Deepindde-calendar-5.7.0.23/translations/desktop/desktop_pt_BR.ts000066400000000000000000000011441375021633200235540ustar00rootroot00000000000000desktopCalendarCalendárioCalendar is a date tool.O Calendário é uma ferramenta que permite agendar e visualizar eventos.Deepin Calendardeepin Calendáriodde-calendar-5.7.0.23/translations/desktop/desktop_ro.ts000066400000000000000000000010751375021633200231710ustar00rootroot00000000000000desktopCalendarCalendarCalendar is a date tool.Calendarul este un instrument pentru dateDeepin CalendarCalendarul Deepindde-calendar-5.7.0.23/translations/desktop/desktop_ru.ts000066400000000000000000000012351375021633200231750ustar00rootroot00000000000000desktopCalendarКалендарьCalendar is a date tool.Календарь является приложением для планирования Вашего времени.Deepin CalendarКалендарь Deepindde-calendar-5.7.0.23/translations/desktop/desktop_si.ts000066400000000000000000000011451375021633200231620ustar00rootroot00000000000000desktopCalendarදින දසුනCalendar is a date tool.දින දසුන දින මෙවලමකි.Deepin CalendarDeepin දින දසුනdde-calendar-5.7.0.23/translations/desktop/desktop_sk.ts000066400000000000000000000010651375021633200231650ustar00rootroot00000000000000desktopCalendarKalendárCalendar is a date tool.Kalendár je dátumový nástroj.Deepin CalendarDeepin Kalendárdde-calendar-5.7.0.23/translations/desktop/desktop_sl.ts000066400000000000000000000010661375021633200231670ustar00rootroot00000000000000desktopCalendarKoledarCalendar is a date tool.Koledar je orodje za urejanje datumov.Deepin CalendarKoledar Deepindde-calendar-5.7.0.23/translations/desktop/desktop_sq.ts000066400000000000000000000010651375021633200231730ustar00rootroot00000000000000desktopCalendarKalendarCalendar is a date tool.Kalendari është një mjet datash.Deepin CalendarKalendar Deepindde-calendar-5.7.0.23/translations/desktop/desktop_sr.ts000066400000000000000000000011561375021633200231750ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.Календар је алат за приказивање датума.Deepin CalendarДипин Календарdde-calendar-5.7.0.23/translations/desktop/desktop_sv.ts000066400000000000000000000010601375021633200231730ustar00rootroot00000000000000desktopCalendarKalenderCalendar is a date tool.Kalender är ett datumverktyg.Deepin CalendarDeepin kalenderdde-calendar-5.7.0.23/translations/desktop/desktop_sw.ts000066400000000000000000000010561375021633200232010ustar00rootroot00000000000000desktopCalendarKalendaCalendar is a date tool.Kalenda ni chombo ya tareheDeepin CalendarKalenda ya Deepindde-calendar-5.7.0.23/translations/desktop/desktop_ta.ts000066400000000000000000000011651375021633200231550ustar00rootroot00000000000000desktopCalendarCalendar is a date tool.அட்டவணை தேதி கருவியாகும்Deepin Calendarடீபின் நாள்காட்டிdde-calendar-5.7.0.23/translations/desktop/desktop_tr.ts000066400000000000000000000010731375021633200231740ustar00rootroot00000000000000desktopCalendarTakvimCalendar is a date tool.Takvim, tarihi görüntüleyen bir araçtır.Deepin CalendarDeepin Takvimdde-calendar-5.7.0.23/translations/desktop/desktop_ug.ts000066400000000000000000000011221375021633200231550ustar00rootroot00000000000000desktopCalendarكالىندار Calendar is a date tool.كالىندار ئۇ ۋاقىت قۇرالىDeepin CalendarDeepin كالىندارىdde-calendar-5.7.0.23/translations/desktop/desktop_uk.ts000066400000000000000000000010621375021633200231640ustar00rootroot00000000000000desktopCalendarКалендарCalendar is a date tool.КалендарDeepin CalendarКалендар Deepindde-calendar-5.7.0.23/translations/desktop/desktop_vi.ts000066400000000000000000000010671375021633200231700ustar00rootroot00000000000000desktopCalendarLịchCalendar is a date tool.Lịch là một công cụ ngày tháng.Deepin CalendarLịch Deepindde-calendar-5.7.0.23/translations/desktop/desktop_zh_CN.ts000066400000000000000000000010721375021633200235470ustar00rootroot00000000000000desktopCalendar日历Calendar is a date tool.日历是一款查看日期的小工具。Deepin Calendar深度日历dde-calendar-5.7.0.23/translations/desktop/desktop_zh_HK.ts000066400000000000000000000010721375021633200235510ustar00rootroot00000000000000desktopCalendar日曆Calendar is a date tool.日曆是一款查看日期的小工具。Deepin Calendar深度日曆dde-calendar-5.7.0.23/translations/desktop/desktop_zh_TW.ts000066400000000000000000000010511375021633200235760ustar00rootroot00000000000000desktopCalendar日曆Calendar is a date tool.簡易日期顯示工具Deepin CalendarDeepin 日曆