From: Sandro Knauß Date: Tue, 26 May 2020 21:57:57 +0000 (+0100) Subject: Import kdeclarative_5.70.0.orig.tar.xz X-Git-Tag: archive/raspbian/5.70.0-1+rpi1~1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f44b9ccb5e0c19fa8d192db14aedcd9b9dabb26;p=kdeclarative.git Import kdeclarative_5.70.0.orig.tar.xz [dgit import orig kdeclarative_5.70.0.orig.tar.xz] --- 1f44b9ccb5e0c19fa8d192db14aedcd9b9dabb26 diff --git a/.arcconfig b/.arcconfig new file mode 100644 index 0000000..377c7ec --- /dev/null +++ b/.arcconfig @@ -0,0 +1,3 @@ +{ + "phabricator.uri" : "https://phabricator.kde.org/" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3330ae3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Ignore the following files +*~ +*.[oa] +*.diff +*.kate-swp +*.kdev4 +.kdev_include_paths +*.kdevelop.pcs +*.moc +*.moc.cpp +*.orig +*.user +.*.swp +.swp.* +Doxyfile +Makefile +avail +random_seed +/build*/ +CMakeLists.txt.user* +*.unc-backup* +.cmake/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..499502b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,145 @@ +cmake_minimum_required(VERSION 3.5) + +set(KF5_VERSION "5.70.0") # handled by release scripts +set(KF5_DEP_VERSION "5.70.0") # handled by release scripts +project(KDeclarative VERSION ${KF5_VERSION}) + +# Dependencies +include(FeatureSummary) +find_package(ECM 5.70.0 NO_MODULE) +set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") +feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH}) + +set(REQUIRED_QT_VERSION 5.12.0) + +find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick Gui) +include(KDEInstallDirs) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) +include(KDECMakeSettings) + +find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5I18n ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5IconThemes ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5KIO ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5WidgetsAddons ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5WindowSystem ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5GlobalAccel ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5GuiAddons ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5Package ${KF5_DEP_VERSION} REQUIRED) + +######################################################################### + +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400) + +#add_definitions(-Wno-deprecated) + +# Includes + +include(ECMGenerateExportHeader) +include(ECMSetupVersion) +include(ECMGenerateHeaders) +include(CMakePackageConfigHelpers) +include(ECMAddQch) + +set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") + +option(BUILD_EXAMPLES "Build and install examples." OFF) +option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) +add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") + + +# ECM setup +ecm_setup_version( + PROJECT + VARIABLE_PREFIX KDECLARATIVE + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdeclarative_version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5DeclarativeConfigVersion.cmake" + SOVERSION 5) + +# Subdirectories +add_definitions(-DTRANSLATION_DOMAIN=\"kdeclarative5\") +if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") + ki18n_install(po) +endif() + +find_package(epoxy) +set_package_properties(epoxy PROPERTIES DESCRIPTION "libepoxy" + URL "https://github.com/anholt/libepoxy" + TYPE OPTIONAL + PURPOSE "OpenGL dispatch library" + ) + +set(HAVE_EPOXY 0) +if(epoxy_FOUND) + set(HAVE_EPOXY 1) +endif() +add_definitions(-DQT_NO_FOREACH) +add_subdirectory(src) +if (BUILD_TESTING) + add_subdirectory(autotests) + add_subdirectory(tests) +endif() + +# Create a Config.cmake and a ConfigVersion.cmake file and install them +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Declarative") + +if (BUILD_QCH) + ecm_install_qch_export( + TARGETS KF5Declarative_QCH + FILE KF5DeclarativeQchTargets.cmake + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel + ) + set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5DeclarativeQchTargets.cmake\")") +endif() + +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/KF5DeclarativeConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/KF5DeclarativeConfig.cmake" + INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}" +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/KF5DeclarativeConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/KF5DeclarativeConfigVersion.cmake" + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel +) + +install(EXPORT + KF5DeclarativeTargets + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + FILE KF5DeclarativeTargets.cmake + NAMESPACE KF5:: + COMPONENT Devel +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/kdeclarative_version.h" + DESTINATION "${KDE_INSTALL_INCLUDEDIR_KF5}" + COMPONENT Devel +) + +feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) + +if(KF5Config_FOUND AND KF5I18n_FOUND AND KF5IconThemes_FOUND AND KF5KIO_FOUND) + message("Dependencies for libkdeclarative found: it will be built") +else() + message("In order to build libkdeclarative you need KF5Config, KF5I18n, KF5IconThemes and KF5KIO") +endif() + +if(KF5I18n_FOUND AND KF5WidgetsAddons_FOUND AND KF5WindowSystem_FOUND AND KF5GlobalAccel_FOUND AND KF5KIO_FOUND AND KF5GuiAddons_FOUND) + message("Dependencies for KQuickControls found: it will be built") +else() + message("In order to build KQuickControls you need KF5I18n, KF5WidgetsAddons, KF5WindowSystem, KF5GlobalAccel, KF5KIO and KF5GuiAddons") +endif() + +if(KF5CoreAddons_FOUND) + message("Dependencies for KCoreAddons QML bindings found; it will be built") +else() + message("In order to build KCoreAddons QML bindings you need KCoreAddons") +endif() + diff --git a/COPYING.LIB b/COPYING.LIB new file mode 100644 index 0000000..2d2d780 --- /dev/null +++ b/COPYING.LIB @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/KF5DeclarativeConfig.cmake.in b/KF5DeclarativeConfig.cmake.in new file mode 100644 index 0000000..a155e97 --- /dev/null +++ b/KF5DeclarativeConfig.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(Qt5Quick "@REQUIRED_QT_VERSION@") +find_dependency(KF5Config "@KF5_DEP_VERSION@") +find_dependency(KF5Package "@KF5_DEP_VERSION@") + +include("${CMAKE_CURRENT_LIST_DIR}/KF5DeclarativeTargets.cmake") +@PACKAGE_INCLUDE_QCHTARGETS@ diff --git a/README.md b/README.md new file mode 100644 index 0000000..531a023 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# KDeclarative + +Integration of QML and KDE work spaces + +## Introduction + +KDeclarative provides integration of QML and KDE work spaces. +It's comprises two parts: a library used by the C++ part of your application +to intergrate QML with KDE Frameworks specific features, and a series of +QML imports that offer bindings to some of the Frameworks. + +## KDeclarative library + +KDeclarative exposes 3 namespaced classes: KDeclarative::KDeclarative, KDeclarative::QmlObject, KDeclarative::ConfigPropertyMap + +### KDeclarative::KDeclarative + +The KDeclarative class is used to manipulate the QQmlEngine instance used by +the application and to get some informations about the platform, +that influences the behavior of the QML components. + +In order to use it, create an instance of KDeclarative. You will need a +pointer to a QQmlEngine, and call **both** `setDeclarativeEngine(engine)` and +`setupContext()` on your instance. You need to call `setupEngine(engine)` +at least once on the engine as well. + + KDeclarative::setupEngine(engine); // if not done elsewhere + KDeclarative::KDeclarative decl; + decl.setDeclarativeEngine(engine); + decl.setupContext(); + +This will add the following things to the engine: +* Use a KIOAccessManagerFactory instead of the stock QQmlNetworkAccessManagerFactory +* Add a QML icon provider, that makes possible for the Image {} element to load images using the scheme "image:/" +* Use the given engine for this context. +* Set a new rootContextObject() that exposes all the i18n() functions from the KI18n framework. + They will be available in the global QML context: just call i18n() from anywhere in your QML code. + +### KDeclarative::QmlObject + + + +### KDeclarative::ConfigPropertyMap + diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt new file mode 100644 index 0000000..d53f0e5 --- /dev/null +++ b/autotests/CMakeLists.txt @@ -0,0 +1,17 @@ +INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/..") + +include(ECMAddTests) + +find_package(Qt5Test REQUIRED) + +ecm_add_test(columnproxymodeltest.cpp + ../src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.cpp + TEST_NAME fullmodelaccesstest + LINK_LIBRARIES Qt5::Gui Qt5::Test) + +ecm_add_test(quickviewsharedengine.cpp + util.cpp + TEST_NAME quickviewsharedengine + LINK_LIBRARIES Qt5::Quick KF5::QuickAddons Qt5::Test) + + diff --git a/autotests/columnproxymodeltest.cpp b/autotests/columnproxymodeltest.cpp new file mode 100644 index 0000000..2989a65 --- /dev/null +++ b/autotests/columnproxymodeltest.cpp @@ -0,0 +1,90 @@ +/* + * Copyright 2012 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#include "columnproxymodeltest.h" +#include "../src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.h" +#include +#include +#include +#include + +QTEST_MAIN(ColumnProxyModelTest) + +void ColumnProxyModelTest::testInit() +{ + qRegisterMetaType("QModelIndex"); + + ColumnProxyModel* listify = new ColumnProxyModel; + QSignalSpy spy(listify, SIGNAL(rowsInserted(QModelIndex,int,int))); + + new QAbstractItemModelTester(listify, listify); + QStandardItemModel* m = new QStandardItemModel(listify); + listify->setRootIndex(QModelIndex()); + listify->setSourceModel(m); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + QStandardItem* item = new QStandardItem(QStringLiteral("lalalal")); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + m->appendRow(item); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + + QCOMPARE(listify->rowCount(), 5); + QCOMPARE(spy.count(), 5); + + ColumnProxyModel* listifyB = new ColumnProxyModel; + new QAbstractItemModelTester(listifyB, listifyB); + listifyB->setSourceModel(m); + QCOMPARE(listifyB->rowCount(), 5); + + ColumnProxyModel* listifyC = new ColumnProxyModel; + new QAbstractItemModelTester(listifyC, listifyC); + listifyC->setRootIndex(item->index()); + QCOMPARE(listifyC->rowCount(), 3); + + delete listify; + delete listifyB; + delete listifyC; +} + +void ColumnProxyModelTest::testSet() +{ + ColumnProxyModel* listify = new ColumnProxyModel; + QSignalSpy spy(listify, SIGNAL(rowsInserted(QModelIndex,int,int))); + + new QAbstractItemModelTester(listify, listify); + QStandardItemModel* m = new QStandardItemModel(listify); + listify->setRootIndex(QModelIndex()); + listify->setSourceModel(m); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + m->appendRow(new QStandardItem(QStringLiteral("lalalal"))); + QStandardItem* item = new QStandardItem(QStringLiteral("lalalal")); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + m->appendRow(item); + item->appendRow(new QStandardItem(QStringLiteral("lelele"))); + + const QString newString = QStringLiteral("fu"); + QModelIndex changeIndex = listify->indexAt(0); + listify->setData(changeIndex, QVariant::fromValue(newString), Qt::DisplayRole); + QCOMPARE(changeIndex.data(Qt::DisplayRole).toString(), newString); +} diff --git a/autotests/columnproxymodeltest.h b/autotests/columnproxymodeltest.h new file mode 100644 index 0000000..c7c57cb --- /dev/null +++ b/autotests/columnproxymodeltest.h @@ -0,0 +1,33 @@ +/* + * Copyright 2012 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef COLUMNPROXYMODELTEST_H +#define COLUMNPROXYMODELTEST_H + +#include + +class ColumnProxyModelTest : public QObject +{ + Q_OBJECT + + private Q_SLOTS: + void testInit(); + void testSet(); +}; + +#endif diff --git a/autotests/data/resizemodeitem.qml b/autotests/data/resizemodeitem.qml new file mode 100644 index 0000000..ed73009 --- /dev/null +++ b/autotests/data/resizemodeitem.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 +Item { + width: 200 + height: 200 +} diff --git a/autotests/quickviewsharedengine.cpp b/autotests/quickviewsharedengine.cpp new file mode 100644 index 0000000..1edfe01 --- /dev/null +++ b/autotests/quickviewsharedengine.cpp @@ -0,0 +1,212 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include +#include +#include "util.h" +#include +#include +#include + +class QuickViewSharedEngineTest : public QQmlDataTest +{ + Q_OBJECT +public: + QuickViewSharedEngineTest(); + +private Q_SLOTS: + void resizemodeitem(); + void errors(); + void engine(); +}; + + +QuickViewSharedEngineTest::QuickViewSharedEngineTest() +{ +} + +void QuickViewSharedEngineTest::resizemodeitem() +{ + QWindow window; + window.setGeometry(0, 0, 400, 400); + + KQuickAddons::QuickViewSharedEngine *view = new KQuickAddons::QuickViewSharedEngine(&window); + QVERIFY(view); + view->setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeRootObjectToView); + QCOMPARE(QSize(0,0), view->initialSize()); + view->setSource(testFileUrl("resizemodeitem.qml")); + QQuickItem* item = qobject_cast(view->rootObject()); + QVERIFY(item); + window.show(); + + view->showNormal(); + + // initial size from root object + QCOMPARE(item->width(), 200.0); + QCOMPARE(item->height(), 200.0); + QCOMPARE(view->size(), QSize(200, 200)); + QCOMPARE(view->size(), view->sizeHint()); + QCOMPARE(view->size(), view->initialSize()); + + // size update from view + view->resize(QSize(80,100)); + + QTRY_COMPARE(item->width(), 80.0); + QCOMPARE(item->height(), 100.0); + QCOMPARE(view->size(), QSize(80, 100)); + QCOMPARE(view->size(), view->sizeHint()); + + view->setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeViewToRootObject); + + // size update from view disabled + view->resize(QSize(60,80)); + QCOMPARE(item->width(), 80.0); + QCOMPARE(item->height(), 100.0); + QTest::qWait(50); + QCOMPARE(view->size(), QSize(60, 80)); + + // size update from root object + item->setWidth(250); + item->setHeight(350); + QCOMPARE(item->width(), 250.0); + QCOMPARE(item->height(), 350.0); + QTRY_COMPARE(view->size(), QSize(250, 350)); + QCOMPARE(view->size(), QSize(250, 350)); + QCOMPARE(view->size(), view->sizeHint()); + + // reset window + window.hide(); + delete view; + view = new KQuickAddons::QuickViewSharedEngine(&window); + QVERIFY(view); + view->setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeViewToRootObject); + view->setSource(testFileUrl("resizemodeitem.qml")); + item = qobject_cast(view->rootObject()); + QVERIFY(item); + window.show(); + + view->showNormal(); + + // initial size for root object + QCOMPARE(item->width(), 200.0); + QCOMPARE(item->height(), 200.0); + QCOMPARE(view->size(), view->sizeHint()); + QCOMPARE(view->size(), view->initialSize()); + + // size update from root object + item->setWidth(80); + item->setHeight(100); + QCOMPARE(item->width(), 80.0); + QCOMPARE(item->height(), 100.0); + QTRY_COMPARE(view->size(), QSize(80, 100)); + QCOMPARE(view->size(), QSize(80, 100)); + QCOMPARE(view->size(), view->sizeHint()); + + // size update from root object disabled + view->setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeRootObjectToView); + item->setWidth(60); + item->setHeight(80); + QCOMPARE(view->width(), 80); + QCOMPARE(view->height(), 100); + QCOMPARE(QSize(item->width(), item->height()), view->sizeHint()); + + // size update from view + view->resize(QSize(200,300)); + QTRY_COMPARE(item->width(), 200.0); + QCOMPARE(item->height(), 300.0); + QCOMPARE(view->size(), QSize(200, 300)); + QCOMPARE(view->size(), view->sizeHint()); + + delete view; + + // if we set a specific size for the view then it should keep that size + // for SizeRootObjectToView mode. + view = new KQuickAddons::QuickViewSharedEngine(&window); + view->resize(300, 300); + view->setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeRootObjectToView); + QCOMPARE(QSize(0,0), view->initialSize()); + view->setSource(testFileUrl("resizemodeitem.qml"));qWarning()<<"bbb"<size(); + view->resize(300, 300);qWarning()<<"ccc"<size(); + item = qobject_cast(view->rootObject()); + QVERIFY(item); + + view->showNormal(); + QTest::qWait(50); + + // initial size from root object + QCOMPARE(item->width(), 300.0); + QCOMPARE(item->height(), 300.0); + QCOMPARE(view->size(), QSize(300, 300)); + QCOMPARE(view->size(), view->sizeHint()); + QCOMPARE(view->initialSize(), QSize(200, 200)); // initial object size + + delete view; +} + +void QuickViewSharedEngineTest::errors() +{ + KQuickAddons::QuickViewSharedEngine *view = new KQuickAddons::QuickViewSharedEngine; + QVERIFY(view); + QQmlTestMessageHandler messageHandler; + view->setSource(testFileUrl("error1.qml")); + QCOMPARE(view->status(), QQmlComponent::Error); + QCOMPARE(view->errors().count(), 1); + delete view; +} + +void QuickViewSharedEngineTest::engine() +{ + //test if engines are actually shared + //test if the engine gets deleted when the last view dies + KQuickAddons::QuickViewSharedEngine *view = new KQuickAddons::QuickViewSharedEngine(); + QQmlEngine *engine = view->engine(); + + KQuickAddons::QuickViewSharedEngine *view2 = new KQuickAddons::QuickViewSharedEngine(); + QQmlEngine *engine2 = view2->engine(); + + delete view; + delete view2; + + view = new KQuickAddons::QuickViewSharedEngine(); + QQmlEngine *engine3 = view->engine(); + + QCOMPARE(engine, engine2); + QVERIFY(engine != engine3); +} + +QTEST_MAIN(QuickViewSharedEngineTest) + +#include "quickviewsharedengine.moc" diff --git a/autotests/util.cpp b/autotests/util.cpp new file mode 100644 index 0000000..4a3c129 --- /dev/null +++ b/autotests/util.cpp @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "util.h" + +#include +#include +#include +#include +#include +#include +#include + +QQmlDataTest *QQmlDataTest::m_instance = nullptr; + +QQmlDataTest::QQmlDataTest() : + m_dataDirectory(QFINDTESTDATA("data")), + + m_dataDirectoryUrl(QUrl::fromLocalFile(m_dataDirectory + QLatin1Char('/'))) +{ + m_instance = this; +} + +QQmlDataTest::~QQmlDataTest() +{ + m_instance = nullptr; +} + +void QQmlDataTest::initTestCase() +{ + QVERIFY2(!m_dataDirectory.isEmpty(), "'data' directory not found"); + m_directory = QFileInfo(m_dataDirectory).absolutePath(); + QVERIFY2(QDir::setCurrent(m_directory), qPrintable(QLatin1String("Could not chdir to ") + m_directory)); +} + +QString QQmlDataTest::testFile(const QString &fileName) const +{ + if (m_directory.isEmpty()) + qFatal("QQmlDataTest::initTestCase() not called."); + QString result = m_dataDirectory; + result += QLatin1Char('/'); + result += fileName; + return result; +} + +QByteArray QQmlDataTest::msgComponentError(const QQmlComponent &c, + const QQmlEngine *engine /* = 0 */) +{ + QString result; + const QList errors = c.errors(); + QTextStream str(&result); + str << "Component '" << c.url().toString() << "' has " << errors.size() + << " errors: '"; + for (int i = 0; i < errors.size(); ++i) { + if (i) + str << ", '"; + str << errors.at(i).toString() << '\''; + + } + if (!engine) + if (QQmlContext *context = c.creationContext()) + engine = context->engine(); + if (engine) { + str << " Import paths: (" << engine->importPathList().join(QLatin1String(", ")) + << ") Plugin paths: (" << engine->pluginPathList().join(QLatin1String(", ")) + << ')'; + } + return result.toLocal8Bit(); +} + +Q_GLOBAL_STATIC(QMutex, qQmlTestMessageHandlerMutex) + +QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = nullptr; + +void QQmlTestMessageHandler::messageHandler(QtMsgType, const QMessageLogContext &, const QString &message) +{ + QMutexLocker locker(qQmlTestMessageHandlerMutex()); + if (QQmlTestMessageHandler::m_instance) + QQmlTestMessageHandler::m_instance->m_messages.push_back(message); +} + +QQmlTestMessageHandler::QQmlTestMessageHandler() +{ + QMutexLocker locker(qQmlTestMessageHandlerMutex()); + Q_ASSERT(!QQmlTestMessageHandler::m_instance); + QQmlTestMessageHandler::m_instance = this; + m_oldHandler = qInstallMessageHandler(messageHandler); +} + +QQmlTestMessageHandler::~QQmlTestMessageHandler() +{ + QMutexLocker locker(qQmlTestMessageHandlerMutex()); + Q_ASSERT(QQmlTestMessageHandler::m_instance); + qInstallMessageHandler(m_oldHandler); + QQmlTestMessageHandler::m_instance = nullptr; +} diff --git a/autotests/util.h b/autotests/util.h new file mode 100644 index 0000000..7af71c4 --- /dev/null +++ b/autotests/util.h @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQMLTESTUTILS_H +#define QQMLTESTUTILS_H + +#include +#include +#include + +QT_FORWARD_DECLARE_CLASS(QQmlComponent) +QT_FORWARD_DECLARE_CLASS(QQmlEngine) + +/* Base class for tests with data that are located in a "data" subfolder. */ + +class QQmlDataTest : public QObject +{ + Q_OBJECT +public: + QQmlDataTest(); + virtual ~QQmlDataTest(); + + QString testFile(const QString &fileName) const; + inline QString testFile(const char *fileName) const + { return testFile(QLatin1String(fileName)); } + inline QUrl testFileUrl(const QString &fileName) const + { return QUrl::fromLocalFile(testFile(fileName)); } + inline QUrl testFileUrl(const char *fileName) const + { return testFileUrl(QLatin1String(fileName)); } + + inline QString dataDirectory() const { return m_dataDirectory; } + inline QUrl dataDirectoryUrl() const { return m_dataDirectoryUrl; } + inline QString directory() const { return m_directory; } + + static inline QQmlDataTest *instance() { return m_instance; } + + static QByteArray msgComponentError(const QQmlComponent &, + const QQmlEngine *engine = nullptr); + +public Q_SLOTS: + virtual void initTestCase(); + +private: + static QQmlDataTest *m_instance; + + const QString m_dataDirectory; + const QUrl m_dataDirectoryUrl; + QString m_directory; +}; + +class QQmlTestMessageHandler +{ + Q_DISABLE_COPY(QQmlTestMessageHandler) +public: + QQmlTestMessageHandler(); + ~QQmlTestMessageHandler(); + + const QStringList &messages() const { return m_messages; } + const QString messageString() const { return m_messages.join(QLatin1Char('\n')); } + + void clear() { m_messages.clear(); } + +private: + static void messageHandler(QtMsgType, const QMessageLogContext &, const QString &message); + + static QQmlTestMessageHandler *m_instance; + QStringList m_messages; + QtMessageHandler m_oldHandler; +}; + +#endif // QQMLTESTUTILS_H diff --git a/cmake/Findepoxy.cmake b/cmake/Findepoxy.cmake new file mode 100644 index 0000000..6163859 --- /dev/null +++ b/cmake/Findepoxy.cmake @@ -0,0 +1,48 @@ +# - Try to find libepoxy +# Once done this will define +# +# epoxy_FOUND - System has libepoxy +# epoxy_LIBRARY - The libepoxy library +# epoxy_INCLUDE_DIR - The libepoxy include dir +# epoxy_DEFINITIONS - Compiler switches required for using libepoxy + +# Copyright (c) 2014 Fredrik Höglund +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +if (NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PKG_epoxy QUIET epoxy) + + set(epoxy_DEFINITIONS ${PKG_epoxy_CFLAGS}) + + find_path(epoxy_INCLUDE_DIR NAMES epoxy/gl.h HINTS ${PKG_epoxy_INCLUDEDIR} ${PKG_epoxy_INCLUDE_DIRS}) + find_library(epoxy_LIBRARY NAMES epoxy HINTS ${PKG_epoxy_LIBDIR} ${PKG_epoxy_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(epoxy DEFAULT_MSG epoxy_LIBRARY epoxy_INCLUDE_DIR) + + mark_as_advanced(epoxy_INCLUDE_DIR epoxy_LIBRARY) +endif() diff --git a/docs/Doxyfile.local b/docs/Doxyfile.local new file mode 100644 index 0000000..e487f09 --- /dev/null +++ b/docs/Doxyfile.local @@ -0,0 +1,10 @@ +### KApiDox Project-specific Overrides File + +# define so that deprecated API is not skipped +PREDEFINED += \ + "KDECLARATIVE_ENABLE_DEPRECATED_SINCE(x, y)=1" \ + "KDECLARATIVE_BUILD_DEPRECATED_SINCE(x, y)=1" \ + "KDECLARATIVE_DEPRECATED_VERSION(x, y, t)=" \ + "QUICKADDONS_ENABLE_DEPRECATED_SINCE(x, y)=1" \ + "QUICKADDONS_BUILD_DEPRECATED_SINCE(x, y)=1" \ + "QUICKADDONS_DEPRECATED_VERSION(x, y, t)=" diff --git a/metainfo.yaml b/metainfo.yaml new file mode 100644 index 0000000..96900e0 --- /dev/null +++ b/metainfo.yaml @@ -0,0 +1,21 @@ +maintainer: mart +description: Provides integration of QML and KDE Frameworks +tier: 3 +type: functional +platforms: + - name: Linux + - name: FreeBSD + - name: Windows + - name: MacOSX + note: The supported remote Urls depends from what runtime kio slaves plugins are installed +portingAid: false +deprecated: false +release: true +libraries: + - qmake: KDeclarative + cmake: "KF5::Declarative" +cmakename: KF5Declarative + +public_lib: true +group: Frameworks +subgroup: Tier 3 diff --git a/po/af/kdeclarative5.po b/po/af/kdeclarative5.po new file mode 100644 index 0000000..369faa8 --- /dev/null +++ b/po/af/kdeclarative5.po @@ -0,0 +1,112 @@ +# UTF-8 test:äëïöü +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4 stable\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2006-01-12 16:33+0200\n" +"Last-Translator: JUANITA FRANZ \n" +"Language-Team: AFRIKAANS \n" +"Language: af\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Frikkie Thirion,Juanita Franz " + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "frix@expertron.co.za,juanita.franz@vr-web.de " + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definieër die program skrif tipe." + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Kortpad" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflik met Standaard Program Kortpad" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Die '%1' sleutel kombinasie is alreeds toegekan aan die standaard aksie " +"\"%2\" geallokeer.\n" +"Wil jy dit eerder aan die nuwe aksie allokeer?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reassign" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +#| msgid "Input file" +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Invoer lêer" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "Geen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Untrusted" +msgid "Unsupported Key" +msgstr "Wantrou" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ongeldige sertifikaat!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ar/kdeclarative5.po b/po/ar/kdeclarative5.po new file mode 100644 index 0000000..5620005 --- /dev/null +++ b/po/ar/kdeclarative5.po @@ -0,0 +1,133 @@ +# translation of kdelibs4.po to Arabic +# translation of kdelibs4.po to +# Copyright (C) 2001-2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# Isam Bayazidi , 2001,2003. +# Sayed Jaffer Al-Mosawi , 2002. +# Hicham Amaoui , 2002. +# Youcef Rabah Rahal , 2003. +# Ahmad M. Zawawi , 2004. +# Mohammed Gamal , 2004. +# Usamah Ali Al-Maqdad , 2004. +# Munzir Taha , 2004. +# Mohamed SAAD , 2006. +# Khaled Hosny , 2007. +# Youssef Chahibi , 2007. +# zayed , 2008, 2009. +# Zayed Al-Saidi , 2009. +# hanny , 2012. +# Abderrahim Kitouni , 2012. +# Safa Alfulaij , 2013, 2017, 2018. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2018-06-09 19:24+0300\n" +"Last-Translator: Safa Alfulaij \n" +"Language-Team: Arabic \n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Lokalize 2.0\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "زايد السعيدي,محمد هاني صباغ,صفا الفليج" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"zayed.alsaidi@gmail.com,hannysabbagh@hotmail.com,safa1996alfulaij@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "صدفة تطبيقات «حزمتك» لِ‍QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "اسم التطبيق الفريد (إلزامي)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"انقر الزر ثمّ أدخل الاختصار الذي تريد في البرنامج.\n" +"فمثلًا إن أردت Ctrl+A: أبقِ مفتاح Ctrl مضغوطًا واضغط A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "اختصار محجوز" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"مفتاح F12 محجوز في «وندوز»، لذا لا يمكن استخدامه كاختصار عمومي.\n" +"رجاءً اختر غيره." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "تضارب مع اختصار تطبيق قياسي" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"تجميعة الأزرار ’%1‘ يستخدمها الإجراء القياسي ”%2“ أيضًا، والذي تستخدمه بعض " +"التطبيقات.\n" +"أمتأكّد من استخدامه كاختصار عمومي أيضًا؟" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "أعد التعيين" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "الدخل" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "بلا" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "المفتاح الذي ضغطته لا تدعمه «كيوت»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "مفتاح غير مدعوم" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "عنصر غير صالح." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/as/kdeclarative5.po b/po/as/kdeclarative5.po new file mode 100644 index 0000000..e80fa9b --- /dev/null +++ b/po/as/kdeclarative5.po @@ -0,0 +1,112 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Amitakhya Phukan , 2008. +# Amitakhya Phukan <অমিতাক্ষ ফুকন>, 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4_as\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-12-26 15:19+0530\n" +"Last-Translator: Amitakhya Phukan <অমিতাক্ষ ফুকন>\n" +"Language-Team: Assamese \n" +"Language: as\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 0.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "অমিতাক্ষ ফুকন" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "aphukan@fedoraproject.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "অনুপ্ৰয়োগৰ আখৰ নিৰ্ধাৰিত কৰা হয়" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "নতুন ৱেব চমু পথ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "অনুপ্ৰয়োগৰ মানপ্ৰাপ্ত চমু পথৰ সৈতে দ্বন্দ্ব" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "পুনঃ নিৰ্ধাৰণ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "নিবেশ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "শূণ্য" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "অসমৰ্থিত চাবি" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "অবৈধ ফ্লেগ" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/be/kdeclarative5.po b/po/be/kdeclarative5.po new file mode 100644 index 0000000..41ae0b9 --- /dev/null +++ b/po/be/kdeclarative5.po @@ -0,0 +1,128 @@ +# translation of kdelibs4.po to Belarusian +# translation of kdelibs4.po to +# +# Eugene Zelenko , 2002-2004. +# Ihar Hrachyshka , 2006. +# Darafei Praliaskouski , 2007. +# Komяpa , 2007. +# Komяpa , 2007. +# Darafei Praliaskoski , 2007. +# Darafei Praliaskouski , 2008, 2009. +# Siarhei Liantsevich , 2008. +# kom , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-09-06 15:21+0300\n" +"Last-Translator: Darafei Praliaskouski \n" +"Language-Team: Belarusian \n" +"Language: be\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Дарафей Праляскоўскі" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "komzpa@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "вызначае шрыфт праграмы" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Скарот" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Канфліктуе з стандартным скаротам праграмы" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +#| msgid "" +#| "The '%1' key combination has already been allocated to the standard " +#| "action \"%2\" that many applications use.\n" +#| "You cannot use it for global shortcuts for this reason." +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Клавіша '%1' ужо прывязана да стандартнага дзеяння \"%2\", якім карыстаюцца " +"шмат праграмаў.\n" +"Вы не можаце пераназначыць яе." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Пераназначыць" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Увод" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Няма" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Unsorted" +msgid "Unsupported Key" +msgstr "Несартаваны" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid Filenames" +msgid "Invalid KPackage '%1'" +msgstr "Недапушчальныя назвы файлаў" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/be@latin/kdeclarative5.po b/po/be@latin/kdeclarative5.po new file mode 100644 index 0000000..d6fb7d3 --- /dev/null +++ b/po/be@latin/kdeclarative5.po @@ -0,0 +1,116 @@ +# translation of kdelibs4.po to Belarusian Latin +# Copyright (C) 2008 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdelibs4 package. +# +# Ihar Hrachyshka , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-08-30 01:10+0300\n" +"Last-Translator: Ihar Hrachyshka \n" +"Language-Team: Belarusian Latin \n" +"Language: be@latin\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Ihar HračyÅ¡ka" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "ihar.hrachyshka@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "aznačaje Å¡ryft aplikacyi" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "Novy sieciÅ­ny skarot" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Niazhoda z zvyčajnym klavijaturnym skarotam aplikacyi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Spałučeńnie klaviÅ¡aÅ­ „%1” taksama pryviazanaje da standartnaha dziejańnia " +"„%2”, jakim karystajucca niekatoryja aplikacyi.\n" +"Ci ty sapraÅ­dy chočaÅ¡ zrabić hetaje spałučeńnie paÅ­siudnym?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Pieraviažy" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Uvod" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Niama" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Niepadtrymanaja klaviÅ¡a" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "niapravilnyja ŭłaścivaści" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/bg/kdeclarative5.po b/po/bg/kdeclarative5.po new file mode 100644 index 0000000..c3eff93 --- /dev/null +++ b/po/bg/kdeclarative5.po @@ -0,0 +1,113 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Zlatko Popov , 2006, 2007, 2008, 2009. +# Yasen Pramatarov , 2009, 2010, 2011, 2012, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-07-23 01:52+0300\n" +"Last-Translator: Yasen Pramatarov \n" +"Language-Team: Bulgarian \n" +"Language: bg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Ясен Праматаров,Радостин Раднев,Златко Попов" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "yasen@lindeas.com,radnev@yahoo.com,zlatkopopov@fsa-bg.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "задаване на шрифта за програмата" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Запазен бърз клавиш" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Конфликт с програмна клавишна комбинация" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Клавишната комбинация \"%1\" вече е зададена за действието \"%2\".\n" +"Искате ли да я използвате и като глобален бърз клавиш." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Прехвърляне" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Въведени данни" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Без" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Клавишът, който натиснахте, не се поддържа от Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Неподдържан клавиш" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Неправилен запис." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/bn/kdeclarative5.po b/po/bn/kdeclarative5.po new file mode 100644 index 0000000..5f16820 --- /dev/null +++ b/po/bn/kdeclarative5.po @@ -0,0 +1,117 @@ +# Bengali (Bangla) translation of kdelibs4. +# Copyright (C) 2009, Free Software Foundation, Inc. +# translation of kdelibs4.po to Bengali +# Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +# Deepayan Sarkar,,, , 2003. +# Deepayan Sarkar , 2003, 2004, 2005. +# Deepayan Sarkar , 2006, 2008, 2009.. +# Deepayan Sarkar , 2009, 2010, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-07-16 14:27+0530\n" +"Last-Translator: Deepayan Sarkar \n" +"Language-Team: American English \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "দীপায়ন সরকার" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "deepayan.sarkar@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "অ্যাপলিকেশনে ব্যবহৃত ফন্ট নির্ধারণ করে" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "অন্য কাজের জন্য নির্দিষ্ট শর্টকাট" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "স্ট্যাণ্ডার্ড অ্যাপলিকেশন শর্টকাটের সঙ্গে বিরোধ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +" '%1' মূখ্য সম্মিলন প্রমাণ ক্রিয়া\"%2\"এর জন্য ও ব্যবহার করা হয় যে কিছু অ্যাপলিকেশন " +"ব্যবহার করো।\n" +"আপনি কি ভাল হিসেবে একটি সার্বিক শর্টকাট হিসেবে এইটি ব্যবহার করতে সত্যি চাও?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, fuzzy, kde-format +msgid "Reassign" +msgstr "Reassign" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ইনপুট" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "কিছু না" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "আপনি যে key-টি চেপেছেন সেটি কিউ-টি (Qt) সমর্থন করে না।" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "অসমর্থিত কী (key)" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "অবৈধ বস্তু।" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/bn_IN/kdeclarative5.po b/po/bn_IN/kdeclarative5.po new file mode 100644 index 0000000..51201b1 --- /dev/null +++ b/po/bn_IN/kdeclarative5.po @@ -0,0 +1,113 @@ +# translation of kdelibs4.po to Bengali INDIA +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Runa Bhattacharjee , 2007. +# Runa Bhattacharjee , 2008, 2009. +# Runa Bhattacharjee , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-12-28 14:35+0530\n" +"Last-Translator: Runa Bhattacharjee \n" +"Language-Team: Bengali INDIA \n" +"Language: bn_IN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "রুণা ভট্টাচার্য্য" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "runabh@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "অ্যাপ্লিকেশন ফন্ট নির্ধারিত করা হয়" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "সংরক্ষিত শর্ট-কাট" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "অ্যাপ্লিকেশনের প্রমিত শর্ট-কাটের সাথে দ্বন্দ্ব" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "পুনরায় নির্ধারণ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ইনপুট" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "শূণ্য" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "টেপা কি-টি Qt-র মধ্যে সমর্থিত হয় না।" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "অসমর্থিত-কি" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "অবৈধ ফ্ল্যাগ" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/br/kdeclarative5.po b/po/br/kdeclarative5.po new file mode 100644 index 0000000..f997564 --- /dev/null +++ b/po/br/kdeclarative5.po @@ -0,0 +1,116 @@ +# KDE breton translation +# Copyright (C) 1998-2001 Free Software Foundation, Inc. +# Jañ-Mai Drapier , 1998 +# Thierry Vignaud , 2001-2005 +# $Id$ +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4-1.1\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2007-10-15 22:19+0200\n" +"Last-Translator: Jañ-Mai Drapier \n" +"Language-Team: Brezhoneg \n" +"Language: br\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Thierry Vignaud, Jañ-Mai Drapier" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "tvignaud@mandriva.com, jdrapier@club-internet.fr" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Kas ur bostel da ratreer an arload" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Berradennoù" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Ar blokad stokelloù %1 zo bet derannet c'hoazh d'an obererezh standard " +"« %2 ».\n" +"Diuzit mar plij ur blokad stokelloù dieil." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, fuzzy, kde-format +msgid "Reassign" +msgstr "Rusianeg" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Restr enkas" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ebet" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Unsorted" +msgid "Unsupported Key" +msgstr "N'eo ket rummet" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Install Script Package" +msgid "Invalid KPackage '%1'" +msgstr "Staliañ ur pakad urzhiaoueg" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/bs/kdeclarative5.po b/po/bs/kdeclarative5.po new file mode 100644 index 0000000..976a21c --- /dev/null +++ b/po/bs/kdeclarative5.po @@ -0,0 +1,133 @@ +# translation of kdelibs4.po to bosanski +# Marko Rosic , 2003. +# Toplica Tanaskovic , 2003, 2004, 2005. +# Chusslove Illich , 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Dalibor Djuric , 2009, 2010. +# Dalibor Djuric , 2010. +# KDE 4 , 2011. +# Bosnian translation of kdelibs4 +# Initially converted from translation of kdelibs4.po by +# Samir Ribić +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-12-21 17:26+0000\n" +"Last-Translator: Ademovic Saudin \n" +"Language-Team: bosanski \n" +"Language: bosnian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Launchpad (build 16872)\n" +"X-Launchpad-Export-Date: 2013-12-22 05:52+0000\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Samir Ribić,Ademovic Saudin,Vedran Ljubovic" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "samir.ribic@etf.unsa.ba,sademovic1@etf.unsa.ba,vljubovic@smartnet.ba" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definiÅ¡e font programa" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kliknite na dugme, pa unesite prečicu kao Å¡to biste u programu.\n" +"Primjer za Ctrl+A: držite taster Ctrl i pritisnite A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervisana prečica" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Taster F12 je rezervisan na Windowsu, pa se ne može koristiti kao globalna " +"prečica.\n" +"Izaberite neku drugu." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Sukob sa standardnom programskom prečicom" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacija tastera '%1' već je dodijeljena standardnoj radnji „%2“, koju " +"koriste neki programi.\n" +"Želite li zaista da je koristite i kao globalnu prečicu?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ponovo dodijeli" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ulaz" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "nijedna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ne podržava taster koji ste upravo pritisnuli." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodržani taster" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "LoÅ¡a stavka." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ca/kdeclarative5.po b/po/ca/kdeclarative5.po new file mode 100644 index 0000000..a92657f --- /dev/null +++ b/po/ca/kdeclarative5.po @@ -0,0 +1,125 @@ +# Translation of kdeclarative5.po to Catalan +# Copyright (C) 1998-2020 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Sebastià Pla i Sanz , 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007. +# Antoni Bella Pérez , 2003, 2006, 2011, 2012, 2013, 2014. +# Albert Astals Cid , 2004, 2005, 2007. +# Josep Ma. Ferrer , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2020. +# Robert Millan , 2009. +# Orestes Mas , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 20:40+0100\n" +"Last-Translator: Josep Ma. Ferrer \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Sebastià Pla i Sanz" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sps@sastia.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Intèrpret d'aplicació QML del KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "El nom únic de l'aplicació (obligatori)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Cliqueu en el botó, llavors introduïu la drecera com ho faríeu en el " +"programa.\n" +"Exemple per Ctrl+A: premeu la tecla Ctrl mentre premeu la «A»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Drecera reservada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"La tecla F12 està reservada en el Windows, no es pot utilitzar com a drecera " +"global.\n" +"Si us plau, seleccioneu-ne una altra." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflicte amb la drecera estàndard de l'aplicació" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La combinació de tecla «%1» ja s'ha assignat a l'acció estàndard «%2» que " +"usen algunes aplicacions.\n" +"Esteu segur que també voleu usar-la com a drecera global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reassigna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Cap" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "La tecla que heu premut no està admesa a les Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla no admesa" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage «%1» no vàlid" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "No s'han proporcionat cap fitxer QML" diff --git a/po/ca@valencia/kdeclarative5.po b/po/ca@valencia/kdeclarative5.po new file mode 100644 index 0000000..9c82e5e --- /dev/null +++ b/po/ca@valencia/kdeclarative5.po @@ -0,0 +1,125 @@ +# Translation of kdeclarative5.po to Catalan (Valencian) +# Copyright (C) 1998-2019 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Sebastià Pla i Sanz , 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007. +# Antoni Bella Pérez , 2003, 2006, 2011, 2012, 2013, 2014. +# Albert Astals Cid , 2004, 2005, 2007. +# Josep Ma. Ferrer , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019. +# Robert Millan , 2009. +# Orestes Mas , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-02-04 20:27+0100\n" +"Last-Translator: Josep Ma. Ferrer \n" +"Language-Team: Catalan \n" +"Language: ca@valencia\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Sebastià Pla i Sanz" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sps@sastia.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Intèrpret d'aplicació QML del KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "El nom únic de l'aplicació (obligatori)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Cliqueu en el botó, llavors introduïu la drecera com ho faríeu en el " +"programa.\n" +"Exemple per Ctrl+A: premeu la tecla Ctrl mentre premeu la «A»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Drecera reservada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"La tecla F12 està reservada en el Windows, no es pot utilitzar com a drecera " +"global.\n" +"Per favor, seleccioneu-ne una altra." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflicte amb la drecera estàndard de l'aplicació" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La combinació de tecla «%1» ja s'ha assignat a l'acció estàndard «%2» que " +"usen algunes aplicacions.\n" +"Esteu segur que també voleu usar-la com a drecera global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reassigna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Cap" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "La tecla que heu premut no està admesa a les Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla no admesa" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/crh/kdeclarative5.po b/po/crh/kdeclarative5.po new file mode 100644 index 0000000..edadf3d --- /dev/null +++ b/po/crh/kdeclarative5.po @@ -0,0 +1,115 @@ +# translation of kdelibs4.po to Qırımtatarca (Qırım Türkçesi) +# Copyright (C) 2008 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdelibs package. +# +# Reşat SABIQ , 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-02-12 23:29-0600\n" +"Last-Translator: Reşat SABIQ \n" +"Language-Team: Qırımtatarca (Qırım Türkçesi)\n" +"Language: crh\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Reşat SABIQ" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "tilde.birlik@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "uyğulamanıñ urufatını belgiley" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "Yañı İnternet Qısqa-yolu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Standart Uyğulama Qısqa-yolunen Çatışma" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' tuş kombinatsiyası bazı uyğulamalarnıñ qullanğanı standart \"%2\" ameli " +"içün de qullanılır.\n" +"Onı kerçekten de umumiy qısqa-yol olaraq ta qullanmağa isteysiñizmi?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Kene-tayinle" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Kirdi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "İç biri" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Desteklenmegen Tuş" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "keçersiz bayraqlar" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/cs/kdeclarative5.po b/po/cs/kdeclarative5.po new file mode 100644 index 0000000..be39d76 --- /dev/null +++ b/po/cs/kdeclarative5.po @@ -0,0 +1,119 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Lukáš Tinkl , 2010, 2011, 2012. +# Vít Pelčák , 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Tomáš Chvátal , 2012, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-02-11 11:12+0100\n" +"Last-Translator: Vit Pelcak \n" +"Language-Team: Czech \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Lokalize 19.12.1\n" +"X-Language: cs_CZ\n" +"X-Source-Language: en_US\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Vít Pelčák" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "vit@pelcak.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell aplikace KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Unikátní název aplikace (povinné)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klikněte na tlačítko a poté zadejte zkratku, kterou si přejete v programu.\n" +"Příklad pro Ctrl+A: držte klávesu Ctrl a stiskněte A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervovaná klávesová zkratka" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Klávesa F12 je na Windows rezervována a nelze ji tedy použít jako globální.\n" +"Vyberte prosím jinou." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt se standardní zkratkou aplikace" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Klávesová kombinace '%1' již byla přiřazena standardní činnosti \"%2\", " +"kterou mnoho aplikací využívá.\n" +"Opravdu si ji přejete použít jako globální klávesovou zkratku?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Přeřadit" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Vstup" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Žádná" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Právě stisknutá klávesa není podporována v Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodporovaná klávesa" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Neplatný KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nebyl poskytnut soubor QML" diff --git a/po/csb/kdeclarative5.po b/po/csb/kdeclarative5.po new file mode 100644 index 0000000..83cae3d --- /dev/null +++ b/po/csb/kdeclarative5.po @@ -0,0 +1,116 @@ +# translation of kdelibs4.po to Kaszëbsczi +# +# Michôł Òstrowsczi , 2006, 2007, 2008, 2009. +# Mark Kwidzińsczi , 2006, 2007, 2008, 2009. +# Mark Kwidzińśczi , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-12-04 22:09+0100\n" +"Last-Translator: Mark Kwidzińśczi \n" +"Language-Team: Kaszëbsczi \n" +"Language: csb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2)\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Michôł Òstrowsczi, Mark Kwidzińsczi" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "michol@linuxcsb.org, mark@linuxcsb.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "òpisëwô fònt programë" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "Nowô sécowô skrodzëna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Zwada ze sztandardową skrodzëną programë" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Zestawienié klawiszów '%1' òstałó przëpisóné sztandardowemù dzejaniu \"%2\", " +"jaczégò brëkùje jinszô aplikacëjô.\n" +"Chcesz je pò prôwdze przëpisac do globalnëch skrodzrnów?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Przëpiszë" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Nowô skrodzënô" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Felëjë" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Niezortowóné klucze" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "lëché fanë" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/cy/kdeclarative5.po b/po/cy/kdeclarative5.po new file mode 100644 index 0000000..6e1480a --- /dev/null +++ b/po/cy/kdeclarative5.po @@ -0,0 +1,129 @@ +# Cyfieithiad o kdelibs4.po i Cymraeg +# translation of kdelibs4.po to Cymraeg +# Translation of kdelibs4.po to Cymraeg +# Translation of clearfuzzytest.po to Cymraeg +# translation of clearfuzzytest.po to Cymraeg +# translation of clearfuzzy.po to Cymraeg +# KDE yn Gymraeg. +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# www.kyfieithu.co.uk , 2003. +# Kgyfieithu , 2003. +# KGyfieithu , 2003. +# KD at KGyfieithu , 2003, 2004. +# Kyfieithu , 2004. +# Kevin Donnelly , 2005. +# +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2005-01-28 17:54+0000\n" +"Last-Translator: Kevin Donnelly \n" +"Language-Team: Cymraeg\n" +"Language: cy\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.9\n" +"\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "KD wrth KGyfieithu" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kyfieithu@dotmon.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "diffinio wynebfath y cymhwysiad" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Byrlwybr" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Croestyniad efo Byrlwybr Cymhwysiad Arferol" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Mae cyfuniad bysell '%1' wedi ei dyrannu yn barod i'r weithred safonol " +"\"%2\".\n" +"Ydych eisiau ei ail-neilltuo o'r weithred yna i'r un gyfredol?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, fuzzy, kde-format +msgid "Reassign" +msgstr "Rwsieg" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +#| msgid "Input file" +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ffeil fewnbwn" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "Dim" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Untrusted" +msgid "Unsupported Key" +msgstr "Ni ymddiriedir" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Tystysgrif annilys!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/da/kdeclarative5.po b/po/da/kdeclarative5.po new file mode 100644 index 0000000..4ee2391 --- /dev/null +++ b/po/da/kdeclarative5.po @@ -0,0 +1,118 @@ +# translation of kdelibs4.po to +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Martin Schlander , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Keld Simonsen , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-30 19:42+0100\n" +"Last-Translator: Martin Schlander \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 18.12.3\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Erik Kjær Pedersen,Martin Schlander,Keld Simonsen" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "erik@binghamton.edu,mschlander@opensuse.org,keld@keldix.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage skal til QML-programmer" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Programmets unikke navn (obligatorisk)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Tryk pÃ¥ knappen, angiv sÃ¥ genvejen ligesom du vil gøre i programmet.\n" +"Eksempel med Ctrl+A, hold Ctrl-tasten nede og tryk A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reserveret genvej" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12-tasten er reserveret pÃ¥ Windows, og kan derfor ikke bruges som en global " +"genvej.\n" +"Vælg venligst en anden." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt med programmets standardgenvejstast" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tastekombinationen \"%1\" bruges allerede til standardhandlingen \"%2\" som " +"mange programmer benytter.\n" +"Vil du bruge den som en global genvej ogsÃ¥?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Tilknyt igen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Input" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ingen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Tasten du netop trykkede pÃ¥, understøttes ikke af Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ikke understøttet tast" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ugyldig KPackage \"%1\"" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Ingen QML-fil angivet" diff --git a/po/de/kdeclarative5.po b/po/de/kdeclarative5.po new file mode 100644 index 0000000..1c266cb --- /dev/null +++ b/po/de/kdeclarative5.po @@ -0,0 +1,125 @@ +# Thomas Diehl , 2002, 2003, 2004, 2005. +# Stefan Winter , 2004. +# Thomas Fischer , 2004. +# Stephan Johach , 2004, 2005, 2006, 2007. +# Georg Schuster , 2005. +# Thomas Reitelbach , 2005, 2006, 2007, 2008, 2009. +# Burkhard Lück , 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Frederik Schwarzer , 2007, 2008, 2009, 2010, 2011, 2012, 2013. +# Johannes Obermayr , 2010. +# Panagiotis Papadopoulos , 2010. +# Rolf Eike Beer , 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 07:31+0100\n" +"Last-Translator: Burkhard Lück \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 18.12.3\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Thomas Reitelbach, Stephan Johach, Thomas Diehl" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "tr@erdfunkstelle.de, hunsum@gmx.de, thd@kde.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage-QML-Anwendungs-Shell" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Der eindeutige Name der Anwendung (erforderlich)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klicken Sie auf den Knopf und drücken Sie dann die Tasten für den Kurzbefehl " +"auf der Tastatur.\n" +"Beispielsweise für Strg+A: Halten Sie die Strg-Taste gedrückt und drücken " +"Sie dann „A“." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reservierter Kurzbefehl" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Die Taste „F12“ ist unter Windows reserviert, kann also nicht als globaler " +"Kurzbefehl verwendet werden.\n" +"Bitte wählen Sie eine andere Taste." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt mit Standard-Kurzbefehl des Programms" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Die Tastenkombination „%1“ ist bereits der Standard-Aktion „%2“ zugeordnet, " +"die von einigen Anwendungen benutzt wird.\n" +"Möchten Sie sie wirklich als globales Tastenkürzel verwenden?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Neu zuordnen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Eingabe" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Keiner" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Die gerade gedrückte Taste wird von Qt nicht unterstützt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nicht unterstützte Taste" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ungültiges KPackage „%1“" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Keine QML-Datei angegeben" diff --git a/po/el/kdeclarative5.po b/po/el/kdeclarative5.po new file mode 100644 index 0000000..ecf40e8 --- /dev/null +++ b/po/el/kdeclarative5.po @@ -0,0 +1,131 @@ +# translation of kdelibs4.po to Greek +# translation of kdelibs4.po to +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Last MAJOR revision (whole file) (29-03-2003 - Stergios Dramis). +# +# Dimitris Kamenopoulos , 2000-2002. +# Stergios Dramis , 2002-2004. +# Κώστας Μπουκουβάλας , 2005. +# Spiros Georgaras , 2005, 2006, 2007, 2008. +# Toussis Manolis , 2006, 2007, 2008, 2009. +# Spiros Georgaras , 2007, 2008. +# Σπύρος Γεωργαράς , 2008. +# Petros , 2009. +# Petros Vidalis , 2010, 2011. +# Dimitrios Glentadakis , 2010, 2011, 2012, 2013, 2014. +# nikos, 2011. +# Stelios , 2012, 2013, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2015-10-27 00:12+0100\n" +"Last-Translator: Stelios \n" +"Language-Team: Greek \n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Σπύρος Γεωργαράς, Τούσης Μανώλης, Πέτρος Βιδάλης" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sng@hellug.gr, manolis@koppermind.homelinux.org, p_vidalis@hotmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML κέλυφος εφαρμογής" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Το μοναδικό όνομα της εφαρμογής (υποχρεωτικό)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Πατήστε το κουμπί, έπειτα εισάγετε την συντόμευση που επιθυμείτε στο " +"πρόγραμμα.\n" +"Παράδειγμα για Ctrl+A: κρατήστε πατημένο το Ctrl και πιέστε το A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Δεσμευμένη συντόμευση" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Το πλήκτρο F12 είναι δεσμευμένο στα Windows και δεν μπορεί χρησιμοποιηθεί " +"για καθολική συντόμευση.\n" +"Παρακαλώ επιλέξτε μία άλλη." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Σύγκρουση με πρότυπη συντόμευση εφαρμογής" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Ο συνδυασμός πλήκτρων « %1 » χρησιμοποιείται ήδη για την τυπική ενέργεια « " +"%2 » η οποία είναι σε χρήση από διάφορες εφαρμογές.\n" +"Επιθυμείτε πραγματικά τη χρήση της ως καθολική συντόμευση επίσης;" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Επανάθεση" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Είσοδος" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Καμία" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Το πλήκτρο που μόλις πιέσατε δεν υποστηρίζεται από την Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Μη υποστηριζόμενο πλήκτρο" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Μη έγκυρο αντικείμενο." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/en_GB/kdeclarative5.po b/po/en_GB/kdeclarative5.po new file mode 100644 index 0000000..c2295eb --- /dev/null +++ b/po/en_GB/kdeclarative5.po @@ -0,0 +1,117 @@ +# translation of kdelibs4.po to British English +# Malcolm Hunter , 2002,2003,2004, 2005, 2006, 2007, 2008, 2009. +# Jonathan Riddell , 2003. +# Andrew Coles , 2004, 2005, 2009, 2010. +# Steve Allewell , 2014, 2015, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-03-30 19:59+0100\n" +"Last-Translator: Steve Allewell \n" +"Language-Team: British English \n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 19.07.70\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Andrew Coles" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "andrew_coles@yahoo.co.uk" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML application shell" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "The unique name of the application (mandatory)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reserved Shortcut" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflict with Standard Application Shortcut" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reassign" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Input" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "None" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "The key you just pressed is not supported by Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Unsupported Key" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Invalid KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "No QML file provided" diff --git a/po/eo/kdeclarative5.po b/po/eo/kdeclarative5.po new file mode 100644 index 0000000..f6f7851 --- /dev/null +++ b/po/eo/kdeclarative5.po @@ -0,0 +1,129 @@ +# translation of kdelibs4.po to Esperanto +# Esperantaj mesaĝoj por "kdelibs" +# Copyright (C) 1998,2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# +# Minuskloj: ĉ ĝ ĵ Ä¥ ŝ Å­ Majuskloj: Ĉ Ĝ Ä´ Ĥ Ŝ Ŭ +# +# Wolfram Diestel , 1998. +# Heiko Evermann , 2002, 2003. +# Matthias Peick , 2004, 2005. +# Oliver Kellogg ,2007. +# Cindy McKee , 2007, 2008. +# Axel Rousseau , 2009. +# Michael Moroni , 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-05-22 12:30+0200\n" +"Last-Translator: Michael Moroni \n" +"Language-Team: Esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Matthias Peick, Oliver Kellogg, Cindy McKee, Axel Rousseau, Michael Moroni" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"matthias@peick.de, okellogg@users.sourceforge.net, cfmckee@gmail.com, " +"axel@esperanto-jeunes.org, michael.moroni@mailoo.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "difinas la tiparon de la aplikaĵo" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervita Klavkombino" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikto kun defaÅ­lta aplikaĵa klavokombino" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +#| msgid "" +#| "The '%1' key combination has already been allocated to the standard " +#| "action \"%2\" that many applications use.\n" +#| "You cannot use it for global shortcuts for this reason." +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La klavkombino '%1' jam estas ligita al la norma ago \"%2\" kiun uzas multaj " +"aplikaĵoj.\n" +"Tial vi ne rajtas uzi ĝin por ĉieaj mallongigoj." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reatribui" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Enigo" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nenio" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ne subtenata ŝlosilo" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Nevalida ero." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/es/kdeclarative5.po b/po/es/kdeclarative5.po new file mode 100644 index 0000000..698280e --- /dev/null +++ b/po/es/kdeclarative5.po @@ -0,0 +1,126 @@ +# translation of kdelibs4.po to Spanish +# Translation of kdelibs4 to Spanish +# Copyright (C) 2000-2007 +# +# Pablo de Vicente , 2000-2002,2003, 2004. +# Pablo de Vicente , 2003. +# Pablo de Vicente , 2004, 2005. +# Eloy Cuadra , 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Pablo de Vicente , 2005, 2006, 2007. +# Enrique Matias Sanchez (aka Quique) , 2007. +# Jaime Robles , 2007. +# Javier Viñal , 2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-10 01:02+0100\n" +"Last-Translator: Eloy Cuadra \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"First-Translator: Boris Wesslowski \n" +"X-Generator: Lokalize 19.12.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Eloy Cuadra" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "ecuadra@eloihr.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Entorno de aplicación QML de KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "El nombre único de la aplicación (obligatorio)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Pulse sobre el botón e introduzca a continuación el acceso rápido que desee " +"para el programa.\n" +"Ejemplo para «Ctrl+A»: mantenga pulsada la tecla «Ctrl» y luego pulse «A»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Acceso rápido reservado" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"La tecla F12 está reservada en Windows y no se puede usar como acceso rápido " +"global.\n" +"Seleccione otra tecla." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflicto con el acceso rápido de la aplicación estándar" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La combinación de teclas «%1» ya está asignada a la acción estándar «%2», " +"que es usada por algunas aplicaciones.\n" +"¿Realmente quiere usarla también como acceso rápido global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reasignar" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ninguna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "La tecla que acaba de pulsar no está contemplada por Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla no funcional" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage «%1» no válido" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "No se ha proporcionado ningún archivo QML" diff --git a/po/et/kdeclarative5.po b/po/et/kdeclarative5.po new file mode 100644 index 0000000..f4b1b45 --- /dev/null +++ b/po/et/kdeclarative5.po @@ -0,0 +1,119 @@ +# translation of kdelibs4.po to Estonian +# Copyright (C) 1999-2004, 2005, 2006, 2009 Free Software Foundation, Inc. +# +# Hasso Tepper , 1999-2004, 2005, 2006. +# Marek Laane , 2003-2009. +# Peeter Russak , 2005. +# Marek Laane , 2009, 2010, 2011, 2012, 2014, 2016, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 10:59+0200\n" +"Last-Translator: Marek Laane \n" +"Language-Team: Estonian \n" +"Language: et\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.08.1\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Marek Laane" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "qiilaq69@mail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage'i QML rakenduse kest" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Rakenduse unikaalne nimi (kohustuslik)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klõpsa nupule ja sisesta meelepärane kiirklahv.\n" +"Näide Ctrl+A kohta: hoia all Ctrl-klahvi ja vajuta klahvi A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reserveeritud kiirklahv" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Klahv F12 on reserveeritud Windowsile ja seda ei saa kasutada globaalse " +"kiirklahvina.\n" +"Palun vali mõni muu klahv." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt rakenduse standardse kiirklahviga" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Klahvikombinatsioon '%1' on juba kasutusel standardseks toiminguks \"%2\", " +"mida kasutavad mitmed rakendused.\n" +"Kas soovid seda kasutada ka globaalse kiirklahvina?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Asenda" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Sisend" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Puudub" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ei toeta klahvi, mida sa praegu vajutasid." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Toetamata klahv" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Vigane KPackage \"%1\"" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "QML-faili pole antud" diff --git a/po/eu/kdeclarative5.po b/po/eu/kdeclarative5.po new file mode 100644 index 0000000..188129f --- /dev/null +++ b/po/eu/kdeclarative5.po @@ -0,0 +1,123 @@ +# Translation of kdeclarative5.po to Euskara/Basque (eu). +# Copyright (C) 1999-2017, Free Software Foundation, Inc. +# This file is distributed under the same license as the frameworks package. +# KDE Euskaratzeko proiektuaren arduraduna . +# +# Translators: +# Marcos , 2002,2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Ion Gaztañaga , 2005. +# Iñaki Larrañaga Murgoitio , 2009. +# Iñigo Salvador Azurmendi , 2010, 2011, 2012, 2013, 2014, 2017, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-10 22:17+0100\n" +"Last-Translator: Iñigo Salvador Azurmendi \n" +"Language-Team: Basque \n" +"Language: eu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.12.1\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Marcos,Ion Gaztañaga,Iñigo Salvador Azurmendi" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "marcos@euskalgnu.org,igaztanaga@gmail.com,xalba@euskalnet.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML aplikazioaren shell" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Aplikazioaren izen esklusiboa (nahitaezkoa)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klik egin botoian, ondoren sartu lasterbidea programan egingo zenukeen " +"moduan.\n" +"Adibidez Ktrl+A: sakatuta mantendu Ktrl tekla eta sakatu A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Lasterbide erreserbatua" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 tekla erreserbatuta dago Windows-en, beraz ezin da erabili lasterbide " +"orokor gisa.\n" +"Mesedez hautatu beste bat." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Aplikazioaren lasterbide estandarrekin gatazkan" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' tekla-konbinazioa \"%2\" ekintza estandarrekin erabiltzen da. Aplikazio " +"askok erabiltzen dute tekla-konbinazio hau.\n" +"Benetan erabili nahi duzu laster-tekla orokor gisa?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Lotu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Egin tekla konbinazioa" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Bat ere ez" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt-ek ez du onartzen sakatu duzun tekla." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tekla ez da onartzen" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage baliogabea '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Ez da QML fitxategirik hornitu" diff --git a/po/fa/kdeclarative5.po b/po/fa/kdeclarative5.po new file mode 100644 index 0000000..5760183 --- /dev/null +++ b/po/fa/kdeclarative5.po @@ -0,0 +1,119 @@ +# translation of kdelibs4.po to Persian +# Nazanin Kazemi , 2006, 2007. +# Mahdi Foladgar , 2006. +# Nasim Daniarzadeh , 2006, 2007. +# Tahereh Dadkhahfar , 2006. +# MaryamSadat Razavi , 2007. +# Nooshin Asiaie , 2007. +# Mohamad Reza Mirdamadi , 2009, 2010, 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-06-28 16:40+0430\n" +"Last-Translator: Mohammad Reza Mirdamadi \n" +"Language-Team: Farsi (Persian) \n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "محمدرضا میردامادی , نازنین کاظمی , محمد ابراهیم محمدی پناه , سعید تقوی" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"mohi@linuxshop.ir , kazemi@itland.ir , mebrahim@gmail.com , s.taghavi@gmail." +"com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "قلم کاربرد را تعریف می‌کند" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "میان‌بر رزرو شده" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ناسازگاری با میان‌بر کاربرد استاندارد" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"کلید ترکیبی »%1« قبلاً به کنش استاندارد »%2« که کاربردهای بسیاری استفاده " +"می‌کنند، اختصاص یافته است.\n" +"نمی‌توانید آن را برای میان‌برهای سراسری برای این نشست استفاده کنید." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "انتساب مجدد" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ورودی" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "هیچ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "کلیدی که هم‌اکنون فشرده شد به‌وسیله Qt پشتیبانی نمیشود." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "کلید پشتیبانی نشده" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid Filenames" +msgid "Invalid KPackage '%1'" +msgstr "نام پرونده‌های نامعتبر" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/fi/kdeclarative5.po b/po/fi/kdeclarative5.po new file mode 100644 index 0000000..7dfbea3 --- /dev/null +++ b/po/fi/kdeclarative5.po @@ -0,0 +1,136 @@ +# Finnish messages for kdelibs4. +# Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdelibs package. +# Kim Enkovaara , 2002,2003, 2005, 2006, 2007. +# Tapio Kautto , 2003, 2004. +# Mikko Ikola , 2003. +# Teemu Rytilahti , 2003, 2008. +# Mikko Ikola , 2003. +# Teemu Rytilahti , 2003, 2004, 2008. +# Niklas Laxström , 2006, 2007. +# Joonas Niilola , 2006. +# Mikko Piippo , 2007. +# Teemu Rytilahti , 2008. +# Tommi Nieminen , 2009, 2010, 2011, 2020. +# Jorma Karvonen , 2010. +# Lasse Liehu , 2006, 2010, 2011, 2012, 2013, 2014, 2015. +# +# KDE Finnish translation sprint participants: +# Author: Artnay +# Author: Jl +# Author: Lliehu +# Author: Niklas Laxström +# Author: Suhviksi +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-17 18:07+0200\n" +"Last-Translator: Tommi Nieminen \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 18.12.3\n" +"X-POT-Import-Date: 2013-01-13 20:43:21+0000\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Lasse Liehu, Tommi Nieminen" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "lasse.liehu@gmail.com, translator@legisign.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackagen QML-sovelluskuori" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Sovelluksen yksilöllinen nimi (pakollinen)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Napsauta painiketta ja paina sen jälkeen haluamasi pikanäppäin.\n" +"Esim. Ctrl+A:lle: paina Ctrl-näppäintä, sitten paina A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Varattu pikanäppäin" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12-näppäin on Windowsissa varattu, joten sitä ei voi käyttää " +"työpöydänlaajuisena pikanäppäimenä.\n" +"Valitse toinen pikanäppäin." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Ristiriita sovelluksen vakiopikanäppäimen kanssa" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Näppäinyhdistelmä %1 on jo vakiotoiminnon %2 käytössä.\n" +"Haluatko varmasti käyttää näppäinyhdistelmää myös työpöydänlaajuisena " +"pikanäppäimenä?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Sijoita uudelleen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Yhdistelmä" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ei asetettu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ei tue painamaasi näppäintä." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ei-tuettu näppäin" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Virheellinen KPackage ”%1”" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "QML-tiedostoa ei annettu" diff --git a/po/fr/kdeclarative5.po b/po/fr/kdeclarative5.po new file mode 100644 index 0000000..291ee6d --- /dev/null +++ b/po/fr/kdeclarative5.po @@ -0,0 +1,138 @@ +# translation of kdelibs4.po to Français +# translation of kdelibs4.po to +# Matthieu Robin , 2002,2003, 2004. +# Robert Jacolin , 2003,2004. +# Gilles Caulier , 2003. +# Gérard Delafond , 2003, 2004. +# Matthieu Robin , 2004, 2005, 2006. +# Cedric Pasteur , 2004. +# Nicolas Ternisien , 2004, 2005, 2006, 2007, 2008. +# Matthieu Robin , 2005. +# Éric Bischoff , 2005. +# Sébastien Renard , 2006, 2007, 2008. +# Anne-Marie Mahfouf , 2007, 2008, 2012. +# Ludovic Grossard , 2008. +# Mickael Sibelle , 2008. +# Nicolas Lécureuil , 2010. +# Joëlle Cornavin , 2007, 2008, 2009, 2010, 2011, 2012, 2013. +# Sebastien Renard , 2013, 2014. +# Vincent Pinon , 2016. +# Simon Depiets , 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-02-02 18:04+0800\n" +"Last-Translator: Simon Depiets \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 19.07.70\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Vincent Pinon, Simon Depiets" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "vpinon@kde.org, sdepiets@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Navigateur d'applications QML KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Le nom unique de l'application (obligatoire)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Cliquez sur le bouton puis saisissez le raccourci comme vous le feriez dans " +"le programme.\n" +"Exemple pour Ctrl+A : maintenez enfoncée la touche Ctrl et appuyez sur la " +"touche « A »." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Raccourci réservé" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"La touche F12 étant réservée sous Windows, il n'est pas possible de " +"l'utiliser pour un raccourci global.\n" +"Veuillez en choisir une autre." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflit avec un raccourci d'application standard" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La combinaison de touches « %1 » est aussi employée pour l'action standard " +"« %2 » que certaines applications utilisent.\n" +"Voulez-vous vraiment l'employer comme raccourci global également ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Réaffecter" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Saisie" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Aucun" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" +"La touche sur laquelle vous venez d'appuyer n'est pas prise en charge par Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Touche non prise en charge" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage « %1 » non valable" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Aucun fichier QML fourni" diff --git a/po/fy/kdeclarative5.po b/po/fy/kdeclarative5.po new file mode 100644 index 0000000..7ca2a0b --- /dev/null +++ b/po/fy/kdeclarative5.po @@ -0,0 +1,122 @@ +# translation of kdelibs4.po to Nederlands +# translation of kdelibs4.po to +# KTranslator Generated File +# Fryske oersetting fan kdelibs. +# Copyright (C) 2000,2001,2002,2003 KDE e.v.. +# let op! het bestand bevat ter hoogte van string 2470 +# een gesplitste zinnen die mbv. %1 of %2 weer worden samengevoegd!! +# Bauke Nicolai , 2002. +# KDE-oersetgroep Frysk , 2000, 2001, 2002,2003. +# Rinse de Vries , 2004, 2005, 2006, 2007. +# Berend ytsma , 2004. +# Rinse de Vries , 2006, 2008. +# Berend Ytsma , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-07-22 09:48+0100\n" +"Last-Translator: Berend Ytsma \n" +"Language-Team: nl \n" +"Language: fy\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KAider 0.1\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Berend Ytsma" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "Berendy@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definiearret it lettertype foar de applikaasjes" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reservearre fluchtoets" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt mei standert applikaasje-fluchtoets" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"De toetskombinaasje '%1' wurdt ek brûkt foar de standert aksje \"%2\" hokker " +"troch guon applikaasje brûkt wurdt.\n" +"Wolle jo it wier ek brûke as in globale fluchtoets?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Opnij tawize" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ynfier" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Gjint" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Net stipe toets" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Unjildige item." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ga/kdeclarative5.po b/po/ga/kdeclarative5.po new file mode 100644 index 0000000..91b31a0 --- /dev/null +++ b/po/ga/kdeclarative5.po @@ -0,0 +1,128 @@ +# translation of kdelibs4.po to Irish +# Translation of kdelibs4.po to Irish +# Copyright (C) 1999,2003,2004 Free Software Foundation, Inc. +# Sean V. Kelley , 1999 +# Séamus Ó Ciardhuáin , 2003,2004 +# Kevin Scannell , 2004-2009 +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2004-12-14 09:11-0600\n" +"Last-Translator: Kevin Scannell \n" +"Language-Team: Irish \n" +"Language: ga\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.9.1\n" +"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n < 11 ? " +"3 : 4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Séamus Ó Ciardhuáin,Kevin Scannell,Sean V. Kelley" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "seoc@iolfree.ie,kscanne@gmail.com,s_oceallaigh@yahoo.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "socraíonn cló an fheidhmchláir" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Cliceáil an cnaipe, ansin cuir isteach an t-aicearra ba mhaith leat sa " +"ríomhchlár.\n" +"Mar shampla, le haghaidh Ctrl+a: coinnigh an eochair Ctrl síos agus brúigh " +"'a'." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Aicearra In Áirithe" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tá an eochair F12 in áirithe ar chóras Windows, agus mar sin ní féidir é a " +"úsáid mar aicearra comhchoiteann.\n" +"Roghnaigh ceann eile." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Coimhlint le hAicearra Feidhmchláir Chaighdeánaithe" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tá '%1' comhcheangailte leis an ngníomh caighdeánach \"%2\" cheana, gníomh a " +"úsáideann roinnt feidhmchlár.\n" +"An bhfuil tú cinnte gur mian leat é a úsáid mar aicearra comhchoiteann " +"freisin?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Athshann" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ionchur" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Gan aicearra" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Ní thacaíonn Qt leis an eochair a bhrúigh tú anois beag." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Eochair nach dtacaítear léi" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid certificate" +msgid "Invalid KPackage '%1'" +msgstr "Teastas neamhbhailí" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/gd/kdeclarative5.po b/po/gd/kdeclarative5.po new file mode 100644 index 0000000..b0f8c83 --- /dev/null +++ b/po/gd/kdeclarative5.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# GunChleoc , 2014, 2015, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2016-04-30 12:50+0100\n" +"Last-Translator: GunChleoc \n" +"Language-Team: Fòram na Gàidhlig\n" +"Language: gd\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : " +"(n > 2 && n < 20) ? 2 : 3;\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Project-Style: kde\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "GunChleoc" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "fios@foramnagaidhlig.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell aplacaid KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Ainm sònraichte na h-aplacaid (riatanach)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Briog air a' phutan agus cuir a-steach an ath-ghoirid an uairsin mar a " +"dhèanadh tu sa phrògram.\n" +"Ball-eisimpleir airson \"Ctrl+A\": cum an iuchair \"Ctrl\" sìos agus brùth " +"air \"A\"." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Ath-ghoirid ghlèidhte" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tha an iuchair F12 glèidhte air Windows agus cha ghabh a cleachdadh 'na h-" +"ath-ghoirid uile-choitcheann ri linn seo.\n" +"Feuch an tagh thu tè eile." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Còmhstri le ath-ghoirid thùsail na h-aplacaid" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Thèid na co-iuchraichean \"%1\" a chleachdadh cuideachd airson a' ghnìomha " +"thùsail \"%2\" a chleachdas cuid a dh'aplacaidean.\n" +"A bheil thu cinnteach gu bheil thu airson a chleachdadh na ath-ghoirid uile-" +"choitcheann cuideachd?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Sònraich às ùr" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ion-chur" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Chan eil gin" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Cha chuir Qt taic ris an iuchair a tha thu air a bhrùthadh." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Iuchair ris nach eil taic" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/gl/kdeclarative5.po b/po/gl/kdeclarative5.po new file mode 100644 index 0000000..854b435 --- /dev/null +++ b/po/gl/kdeclarative5.po @@ -0,0 +1,127 @@ +# translation of kdelibs4.po to galician +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# mvillarino , 2007, 2008, 2009. +# Marce Villarino , 2008, 2009. +# marce villarino , 2009. +# marce villarino , 2009. +# Marce Villarino , 2009, 2010, 2011, 2012. +# Xosé , 2010. +# Marce Villarino , 2011, 2012, 2013, 2014. +# Adrián Chaves Fernández , 2015. +# Adrian Chaves , 2018, 2019. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-10-19 22:29+0200\n" +"Last-Translator: Adrián Chaves (Gallaecio) \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 19.11.70\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Xabier García Feal, marce villarino, Xosé Calvo" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "xosecalvo@gmail.com, mvillarino@gmail.com, proxecto@trasno.gal" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Intérprete de ordes de aplicacións en QML de KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Nome único para a aplicación (obrigatorio)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Prema o botón, logo insira o atallo que desexe ter no programa.\n" +"Exemplo para Ctrl+A: manteña premida a tecla Ctrl e prema A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Atallo reservado" + +# skip-rule: PT-2010-window +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"A tecla F12 está reservada en Windows polo que non se pode empregar como " +"atallo global.\n" +"Escolla outro." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflito cun atallo estándar de aplicación" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"A combinación de teclas «%1» tamén se usa para a acción estándar «%2» que " +"usan algunhas aplicacións.\n" +"Seguro que quere usala tamén como atallo global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reasignar" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ningún" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "A tecla que acaba de premer non é admitida por Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla non admitida" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid KPackage" +msgid "Invalid KPackage '%1'" +msgstr "KPackage incorrecto" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Non se forneceu un ficheiro de QML" diff --git a/po/gu/kdeclarative5.po b/po/gu/kdeclarative5.po new file mode 100644 index 0000000..4f3711f --- /dev/null +++ b/po/gu/kdeclarative5.po @@ -0,0 +1,115 @@ +# translation of kdelibs4.po to Gujarati +# Copyright (C) 2008 This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Kartik Mistry , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-11-22 00:01+0530\n" +"Last-Translator: Kartik Mistry \n" +"Language-Team: Gujarati \n" +"Language: gu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Kartik Mistry" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kartik.mistry@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "કાર્યક્રમ ફોન્ટ વ્યાખ્યાયિત કરે છે" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "નવો વેબ ટુંકાણ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "પ્રમાણભૂત કાર્યક્રમ ટૂંકાણ સાથે તકરાર થાય છે" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' કળ જોડાણ પ્રમાણભૂત ક્રિયા \"%2\" માટે પણ વપરાય છે જે કેટલાક કાર્યક્રમો ઉપયોગ કરે " +"છે.\n" +"તમે તેને ખરેખર વૈશ્વિક ટૂંકાણો તરીકે પણ વાપરવા માંગો છો?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "પુનઃસોંપણી" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ઈનપુટ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "કંઇ નહી" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "તમે હમણાં દબાવેલ કળ Qt વડે આધાર આપવામાં આવતી નથી." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "આધાર ન અપાતી કળ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "અયોગ્ય ફ્લેગો" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ha/kdeclarative5.po b/po/ha/kdeclarative5.po new file mode 100644 index 0000000..78998bf --- /dev/null +++ b/po/ha/kdeclarative5.po @@ -0,0 +1,109 @@ +# Hausa translation for kdelibs strings. +# Copyright 2009 Adriaan de Groot, Mustapha Abubakar, Ibrahim Dasuna +# This file is distributed under the same license as the kdelibs package. +# +# Adriaan de Groot , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-03-17 11:22+0100\n" +"Last-Translator: Adriaan de Groot \n" +"Language-Team: Hausa \n" +"Language: ha\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 0.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Mustapha Abubakar,Adriaan de Groot,Ibrahim Dasuna" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr ",groot@kde.org," + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/he/kdeclarative5.po b/po/he/kdeclarative5.po new file mode 100644 index 0000000..870fb1e --- /dev/null +++ b/po/he/kdeclarative5.po @@ -0,0 +1,130 @@ +# translation of kdelibs4.po to hebrew +# Translation of kdelibs4.po to Hebrew +# translation of kdelibs4.po to +# KDE Hebrew Localization Project +# +# In addition to the copyright owners of the program +# which this translation accompanies, this translation is +# Copyright (C) 1998 Erez Nir +# Copyright (C) 1999-2003 Meni Livne +# +# This translation is subject to the same Open Source +# license as the program which it accompanies. +# +# Diego Iastrubni , 2003. +# Diego Iastrubni , 2003, 2004. +# Diego Iastrubni , 2005, 2006, 2007, 2008, 2009, 2012, 2014. +# Meni Livne , 2007. +# tahmar1900 , 2008, 2009. +# Elkana Bardugo , 2017. #zanata +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2017-05-16 06:49-0400\n" +"Last-Translator: Copied by Zanata \n" +"Language-Team: Hebrew \n" +"Language: he\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Zanata 3.9.6\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "צוות התרגום של KDE ישראל" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kde-l10n-he@kde.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "מגדיר את הגופן של התכנית" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"לחץ על הכפתור, ואז תוכל ליצור קיצור מקשים לשימוש בתוכנית.\n" +"דוגמא: לקיצור Ctrl+a: לחץ על המקש Ctrl ועל המקש a" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "קיצורי מקשים שמורים" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"מקש ה-F12 הוא מקש שמור בWindows, ולכן אינו יכול לשמש כמקש קיצור גלובלי.אנא " +"לבחור מקש אחר." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "התנגשות עם קיצור סטנדרטי של ישומים" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"שילוב המקשים \"%1\" כבר הוקצה לפעולה הסטנדרטית \"%2\", בה משתמשות תוכניות " +"רבות.\n" +"מסיבה זו אין באפשרותך להשתמש בו עבור קיצורים גלובליים." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "שייך מחדש" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "קלט" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ללא" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "המקש שלחצת אינו נתמך על ידי Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "מקש לא נתמך" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/hi/kdeclarative5.po b/po/hi/kdeclarative5.po new file mode 100644 index 0000000..3932a39 --- /dev/null +++ b/po/hi/kdeclarative5.po @@ -0,0 +1,116 @@ +# translation of kdelibs4.po to Hindi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Ravishankar Shrivastava , 2007. +# Ravishankar Shrivastava , 2008. +# G Karunakar , 2009, 2010, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-06-25 15:27+0530\n" +"Last-Translator: G Karunakar \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: Lokalize 1.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "करुणाकर गुंटुपल्ली" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "karunakar@indlinux.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "अनुप्रयोग फ़ॉन्ट पारिभाषित करता है" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "आरक्षित शॉर्टकट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "प्रामाणिक अनुप्रयोग शॉर्टकट के परस्पर विरोध में है" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"कुंजी '%1' संयोजन पहले से ही \"%2\" मानक क्रिया के लिए सम्बद्ध है जो कुछ अनुप्रयोगों में " +"इस्तेमाल किया जाता है.\n" +"क्या आप इसे वैश्विक शॉर्टकट के रूप में भी सम्बद्ध करना चाहते हैं?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "फिर से आबंटित करें" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "इनपुट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "कुछ नहीं" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "जो कुँजी आपने दबाई वह Qt द्वारा समर्थित नहीं है" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "असमर्थित कुँजी" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "अवैध मद." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/hne/kdeclarative5.po b/po/hne/kdeclarative5.po new file mode 100644 index 0000000..bb6763f --- /dev/null +++ b/po/hne/kdeclarative5.po @@ -0,0 +1,116 @@ +# translation of kdelibs4.po to Hindi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Ravishankar Shrivastava , 2007. +# Ravishankar Shrivastava , 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-02-10 20:44+0530\n" +"Last-Translator: Ravishankar Shrivastava \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: Lokalize 0.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "रविसंकर सिरीवास्तव, जी. करूनाकर" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "raviratlami@aol.in," + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "अनुपरयोग फोंट परिभासित करथे " + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "नवा वेब सार्टकट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "प्रामानिक अनुपरयोग सार्टकट के आपसी विरोध मं हे" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"कुंजी '%1' संयोजन पहिली से ही \"%2\" मानक काम बर सम्बद्ध हे जऊन कुछ अनुपरयोग मन मं " +"उपयोग होथे.\n" +"का आप मन एला वैस्विक सार्टकट के रूप मं घलोक सम्बद्ध करना चाहथो ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "फिर से आबंटित करव" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "इनपुट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "कुछ नइ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, fuzzy, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "जऊन कुंजी आप मन दबाय हो वो हर क्यूटी द्वारा समर्थित नइ हे." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "असमर्थित कुंजी" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid Filenames" +msgid "Invalid KPackage '%1'" +msgstr "अवैध फाइल नाम" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/hr/kdeclarative5.po b/po/hr/kdeclarative5.po new file mode 100644 index 0000000..2c76cd6 --- /dev/null +++ b/po/hr/kdeclarative5.po @@ -0,0 +1,136 @@ +# Translation of kdelibs4 to Croatian +# +# Renato Pavicic , 2006. +# Zarko Pintar , 2009. +# Marko Dimjasevic , 2009, 2010, 2011. +# Andrej Dundović , 2009, 2010. +# DoDo , 2009. +# Andrej Dundovic , 2009, 2010, 2011. +# Marko DimjaÅ¡ević , 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-07-22 16:08+0200\n" +"Last-Translator: Marko DimjaÅ¡ević \n" +"Language-Team: Croatian \n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 1.2\n" +"X-Poedit-Language: Croatian\n" +"X-Poedit-Country: CROATIA\n" +"X-Poedit-Bookmarks: 1601,-1,-1,-1,-1,-1,-1,-1,-1,-1\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Renato Pavičić, Žarko Pintar, Marko DimjaÅ¡ević, Andrej Dundović" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"renato@translator-shop.org, zarko.pintar@gmail.com, marko@dimjasevic.net, " +"adundovi@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definira pismo aplikacije." + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Pritisnite gumb, zatim unesite prečac kao Å¡to bi napravili u samom programu." +"\\ Primjer za Ctrl+a: držite tipku Ctrl i pritisnite a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervirani prečaci" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tipka F12 rezervirana je na Windowsima i ne može biti koriÅ¡tena kao globalni " +"prečac.\n" +"Molim da izaberete drugu tipku." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Sukob sa zadanim prečacem aplikacije" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacija tipki '%1' već je dodijeljena standardnoj aktivnosti \"%2\" " +"koju neka aplikacija koristi.\n" +"Želite li je zaista koristiti kao opći prečac? " + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Prenamjeni" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ulaz" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Bez" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ne podržava tipku koju ste upravo pritisnuli." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodržana tipka" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Neispravna stavka." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/hsb/kdeclarative5.po b/po/hsb/kdeclarative5.po new file mode 100644 index 0000000..d2a7e86 --- /dev/null +++ b/po/hsb/kdeclarative5.po @@ -0,0 +1,120 @@ +# translation of kdelibs4.po to Upper Sorbian +# translation of kdelibs4.po to +# Copyright (C) 2003,2004, 2005, 2007 Free Software Foundation, Inc. +# Eduard Werner , 2003. +# Prof. Dr. Eduard Werner , 2003,2004. +# Eduard Werner , 2005. +# Eduard Werner/Edward Wornar , 2007, 2008. +# Bianka Å wejdźic , 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-12-19 22:49+0100\n" +"Last-Translator: Eduard Werner \n" +"Language-Team: en_US \n" +"Language: hsb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: KAider 0.1\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Edward Wornar" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "edi.werner@gmx.de" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definuje pismo programa." + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "Nowa skrótÅ¡enka za web" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt ze standardowym outputom programa" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacija '%1' je so tež za standardnu akciju '%2' wužiwa, kiž je w " +"někotrych aplikacijach definowana.\n" +" Chceće ju woprawdźe tež jako globalnu skrótÅ¡enku wužiwać?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Zwjazanje změnić" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Input" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Žane" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, fuzzy, kde-format +#| msgid "The key you just pressed isn't supported by Qt." +msgid "The key you just pressed is not supported by Qt." +msgstr "Tasta, kotruž sće runje stłóčili, so wot Qt njepodpěruje." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Njepodpěrana tasta" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "njekorektne opcije" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/hu/kdeclarative5.po b/po/hu/kdeclarative5.po new file mode 100644 index 0000000..a749ce8 --- /dev/null +++ b/po/hu/kdeclarative5.po @@ -0,0 +1,117 @@ +# Kiszel Kristóf , 2010. +# Kristóf Kiszel , 2010, 2011, 2012, 2014, 2019. +# Balázs Úr , 2012, 2013. +# Kristof Kiszel , 2018. +msgid "" +msgstr "" +"Project-Id-Version: KDE 4.4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-11-12 19:44+0100\n" +"Last-Translator: Kristóf Kiszel \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 20.03.70\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Kiszel Kristóf,Szántó Tamás" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "ulysses@kubuntu.org,taszanto@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML alkalmazáshéj" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Az alkalmazás egyedi neve (kötelező)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kattintson a gombra, majd adja meg a kívánt billentyűkombinációt.\n" +"Példa Ctrl+A-ra: a Ctrl lenyomva tartása mellett nyomja le az A-t." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Foglalt keresőazonosító" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Az F12 foglalt billentyű a Windowsban, ezért nem használható globális " +"billentyűparancsban.\n" +"Válasszon más billentyűt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Ütközés egy alkalmazásbeli billentyűkombinációval" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"A(z) „%1” billentyűkombináció már hozzá van rendelve a standard „%2” " +"művelethez.\n" +"Azt szeretné, hogy ez globális billentyűparancs is legyen?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Igen, az új" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Bemenet" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nincs" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "A most lenyomott billentyűt a Qt nem támogatja." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nem támogatott billentyű" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid KPackage" +msgid "Invalid KPackage '%1'" +msgstr "Érvénytelen KPackage" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nincs megadva QML-fájl" diff --git a/po/hy/kdeclarative5.po b/po/hy/kdeclarative5.po new file mode 100644 index 0000000..970ac72 --- /dev/null +++ b/po/hy/kdeclarative5.po @@ -0,0 +1,127 @@ +# KDE - kdelibs/kdelibs4.po Armenian translation. +# Copyright (C) 2005, KDE Armenian translation team. +# +# Davit Nikoghosyan , 2013 +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-01-31 01:08+0400\n" +"Last-Translator: Davit \n" +"Language-Team: Armenian Language: hy\n" +"Language: hy\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Ô´Õ¡Õ¾Õ«Õ© Նիկողոսյան" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "nikdavnik@mail.ru" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "որոշում Õ§ ծրագրի տառաձևը" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Սեղմեք Õ¯Õ¸Õ³Õ¡Õ¯Õ« վրա և մուտքագրեք կոմբինացիան:\n" +"Օրինակ ` Ctrl+A կոճակների կոմբինացիայի համար Õ½Õ¥Õ²Õ´Õ¡Õ® պահեք Ctrl Õ¯Õ¸Õ³Õ¡Õ¯Õ¨ և " +"սեղմեք A։" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Պահեստավորված կոճակների համադրություն" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Windows F12 Õ¯Õ¸Õ³Õ¡Õ¯Õ¨ ÕºÕ¡Õ·Õ¿ÕºÕ¡Õ¶Õ¾Õ¡Õ® Õ§, Õ¡ÕµÕ¤ ÕºÕ¡Õ¿Õ³Õ¡Õ¼Õ¸Õ¾ Õ¡ÕµÕ¶ Õ¹Õ« կարելի օգտագործել " +"կոճակների Õ£Õ¬Õ¸Õ¢Õ¡Õ¬ կոմբինացիաներում:\n" +"Ընտրեք կոճակների Õ¡ÕµÕ¬ կոմբինացիա:" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Կոնֆլիկտ ծրագրի ստանդարտ Õ¯Õ¸Õ³Õ¡Õ¯Õ« Õ°Õ¥Õ¿" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +" %1 ստեղների կոմբինացիան արդեն Õ¯Õ¡ÕºÕ¾Õ¡Õ® Õ§ «%2» ստանդարտ գործողության Õ°Õ¥Õ¿, որն " +"օգտագործվում Õ§ Õ´Õ« շարք ծրագրերում։\n" +"Ուզու՞մ եք օգտագործել Õ¡ÕµÕ½ կոմբինացիան որպես գլոբալ։" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ô¿Õ¡ÕºÕ¥Õ¬ նորի Õ°Õ¥Õ¿" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Հիմա" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ընտրված Õ¹Õ§" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Սեղմված Õ¯Õ¸Õ³Õ¡Õ¯Õ¨ Õ¹Õ« համապատասխանում Qt հետ։" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ô¿Õ¸Õ³Õ¡Õ¯Õ¨ Õ¹Õ« համապատասխանում" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Չհամապատասխանող տարր։" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ia/kdeclarative5.po b/po/ia/kdeclarative5.po new file mode 100644 index 0000000..40b82de --- /dev/null +++ b/po/ia/kdeclarative5.po @@ -0,0 +1,119 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# g.sora , 2010, 2011, 2012, 2013, 2014, 2017, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-02-08 23:04+0100\n" +"Last-Translator: Giovanni Sora \n" +"Language-Team: Interlingua \n" +"Language: ia\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 2.0\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Giovanni Sora" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "g.sora@tiscali.it" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell de application QML de KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Il define le nomine unic del application (obligatori)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Tu pressa sur le button, postea inserta le via breve como tu facerea in le " +"programma\n" +"Exemplo per CTRL+A: tu pressa le clave CTRL e pressa A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Via breve reservate" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Le clave F12 es reservate sur Windows, assi non pote usar se como via breve " +"global.\n" +"Pro favor tu selectiona un altere." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "" +"Conflicto con Standard Application Shortcut (Via Breve de application " +"standard)" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Le combination de clave '%1' es etiam usate per le action standard \"%2\" " +"que alicun applicationes usa.\n" +"Etiam tu vole realmente usar lo como via breve global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reassigna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ingresso" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nulle" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Le clave que tu tosto pressava non es supportate per Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Clave non supportate" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Invalide KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Necun file QML fornite" diff --git a/po/id/kdeclarative5.po b/po/id/kdeclarative5.po new file mode 100644 index 0000000..2413c6c --- /dev/null +++ b/po/id/kdeclarative5.po @@ -0,0 +1,119 @@ +# Indonesian translations for kdelibs4 package. +# Copyright (C) 2010 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdelibs4 package. +# Andhika Padmawan , 2010-2014. +# Wantoyo , 2017, 2018, 2019, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-14 07:27+0700\n" +"Last-Translator: Wantoyo \n" +"Language-Team: Indonesian \n" +"Language: id\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 19.12.0\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Andhika Padmawan,Wantoyo" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "andhika.padmawan@gmail.com,wantoyek@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell aplikasi KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Nama unik dari aplikasi (mandat)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klik pada tombol, lalu masukkan pintasan seperti yang anda inginkan di " +"program.\n" +"Misalnya untuk Ctrl+A: tahan tombol Ctrl lalu tekan A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Pintasan Dipesan" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tombol F12 dipesan di Windows, sehingga tidak dapat digunakan untuk pintasan " +"global.\n" +"Silakan pilih yang lain" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflik dengan Pintasan Aplikasi Standar" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinasi tombol '%1' digunakan pula untuk aksi standar \"%2\" yang " +"digunakan oleh beberapa aplikasi.\n" +"Anda yakin ingin menggunakannya sebagai pintasan global juga?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Tugaskan Ulang" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Input" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nihil" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Tombol yang baru anda tekan tidak didukung oleh Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tuts Tak Didukung" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage '%1' tidak absah" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Tidak ada file QML yang disediakan" diff --git a/po/is/kdeclarative5.po b/po/is/kdeclarative5.po new file mode 100644 index 0000000..93bc971 --- /dev/null +++ b/po/is/kdeclarative5.po @@ -0,0 +1,138 @@ +# translation of kdelibs4.po to Icelandic +# íslensk þýðing á kdelibs4.po +# Copyright (C) 1998,2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# +# Logi Ragnarsson , 1998-2003. +# Richard Allen , 1998-2004. +# Pjetur G. Hjaltason , 2003. +# Arnar Leósson , 2003, 2005. +# Sveinn í Felli , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2016-04-08 22:57+0000\n" +"Last-Translator: Sveinn í Felli \n" +"Language-Team: Icelandic \n" +"Language: is\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: Plural-Forms: nplurals=2; plural=n != 1;\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Richard Allen, Logi Ragnarsson, Pjetur G. Hjaltason, Arnar Leósson, Svanur " +"Pálsson, Sveinn í Felli" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"ra@ra.is, logi@logi.org, pjetur@pjetur.net, leosson@frisurf.no, svanur@tern." +"is, sv1@fellsnet.is" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "skilgreinir letur forritsins" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Smelltu á hnappinn, settu síðan inn flýtilykilinn sem þú vilt nota í " +"forritinu.\n" +"Til dæmis Ctrl+a: halda niðri 'Ctrl' lyklinum og ýta á 'a'." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Frátekinn flýtilykill" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 lykillinn er frátekinn í Windows og er ekki hægt að nota sem víðværan " +"flýtilykil.\n" +"Veldu einhvern annan." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Árekstur við staðlaða fýtilykla forrita" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Lyklasamsetningin '%1' er nú þegar í notkun fyrir stöðluðu aðgerðina \"%2\" " +"sem mörg forrit nota.\n" +"Vilt þú í alvörunni nota hana jafnframt sem víðværan flýtilykil?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Endurúthluta" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Inntak" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Engin" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Lykillinn sem þú varst að ýta á er ekki studdur í Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Óstuddur lykill" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Ógilt atriði" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/it/kdeclarative5.po b/po/it/kdeclarative5.po new file mode 100644 index 0000000..1cd4a29 --- /dev/null +++ b/po/it/kdeclarative5.po @@ -0,0 +1,126 @@ +# translation of kdelibs4.po to Italian +# Andrea Rizzi , 2003, 2004, 2005. +# Federico Cozzi , 2004. +# Federico Zenith , 2004, 2008, 2009, 2010, 2011. +# Andrea Rizzi , 2004. +# Nicola Ruggero , 2005, 2006. +# Nicola Ruggero , 2006, 2007, 2010. +# Luciano Montanaro , 2007. +# Dario Panico , 2008. +# Pino Toscano , 2008. +# Federico Zenith , 2008, 2012, 2013, 2014, 2015. +# Innocenzo Ventre , 2012. +# Vincenzo Reale , 2014, 2015, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 20:30+0100\n" +"Last-Translator: Vincenzo Reale \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 19.12.0\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Vincenzo Reale" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "smart2128@baslug.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell applicazione KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Il nome univoco dell'applicazione (obbligatorio)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Fai clic sul pulsante, quindi digita la scorciatoia come la vorresti nel " +"programma.\n" +"Esempio per Ctrl+A: tieni premuto il tasto Ctrl e premi A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Scorciatoia riservata" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Il tasto F12 è riservato sotto Windows, quindi non può essere usato per una " +"scorciatoia globale.\n" +"Scegline un altro." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflitto con una scorciatoia standard delle applicazioni" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"La combinazione di tasti «%1» è anche usata per l'azione standard «%2» che " +"alcune applicazioni usano.\n" +"Vuoi veramente usarla anche come scorciatoia globale?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Riassegna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Immissione" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nessuna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Il tasto che hai appena premuto non è supportato da Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tasto non supportato" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage «%1» non valido" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nessun file QML fornito" diff --git a/po/ja/kdeclarative5.po b/po/ja/kdeclarative5.po new file mode 100644 index 0000000..37d603e --- /dev/null +++ b/po/ja/kdeclarative5.po @@ -0,0 +1,126 @@ +# Translation of kdelibs4 into Japanese. +# This file is distributed under the same license as the kdelibs package. +# Taiki Komoda , 2002, 2004, 2006, 2010. +# Noboru Sinohara , 2004. +# Toyohiro Asukai , 2004. +# Kurose Shushi , 2004. +# AWASHIRO Ikuya , 2004. +# Shinichi Tsunoda , 2005. +# Yukiko Bando , 2006, 2007, 2008, 2009, 2010. +# Fumiaki Okushi , 2006, 2007, 2008, 2010, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-08-27 14:05-0700\n" +"Last-Translator: Fumiaki Okushi \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Generator: Lokalize 1.1\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "予約済みのショートカット" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 は Windows で予約済みになっているため、グローバルショートカットには使えま" +"せん。\n" +"他のキーを選択してください。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "標準アプリケーションショートカットと競合します" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"キーの組み合わせ %1 は、複数のアプリケーションが使用する標準アクション「%2」" +"に割り当てられています。\n" +"本当にこれをグローバルショートカットとしても使いますか?|/|キーの組み合わせ " +"%1 は、複数のアプリケーションが使用する標準アクション「$[~stripAccel " +"$[~getForm %2 ~full]]」に割り当てられています。\n" +"本当にこれをグローバルショートカットとしても使いますか?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "割り当て直す" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "入力" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "なし" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "あなたが押したキーは Qt でサポートされていません。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "サポートされていないキー" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ka/kdeclarative5.po b/po/ka/kdeclarative5.po new file mode 100644 index 0000000..1c8f33a --- /dev/null +++ b/po/ka/kdeclarative5.po @@ -0,0 +1,114 @@ +# KDE3 - Georgian translation of kdelibs4.po +# Gia Shervashidze , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-12-17 02:11+0400\n" +"Last-Translator: George Machitidze \n" +"Language-Team: Georgian \n" +"Language: ka\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.9\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "გია შერვაშიძე" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "giasher@telenet.ge" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "მიუთითებს პროგრამის შრიფტს" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "მალმხმობი" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "კონფლიქტი პროგრამის სტანდარტულ მალმხმობთან" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"კლავიშების ბმული %1 უკვე გამოიყენება \"%2\" სტანდარტული ქმედებისთვის.\n" +"გადმოვამისამართო იგი ახალ ქმედებაზე?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "გადამისამართება" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +#| msgid "Input file" +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "შეტანის ფაილი" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "არა" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Untrusted" +msgid "Unsupported Key" +msgstr "შეუმოწმებელი" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "მცდარი სერთიფიკატი!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/kk/kdeclarative5.po b/po/kk/kdeclarative5.po new file mode 100644 index 0000000..8438595 --- /dev/null +++ b/po/kk/kdeclarative5.po @@ -0,0 +1,131 @@ +# translation of kdelibs4.po to Karakh +# +# Sairan Kikkarin , 2005, 2006, 2007, 2008, 2009. +# Sairan Kikkarin , 2010, 2011, 2012. +# Sairan Kikkarin , 2010, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-11-08 01:24+0600\n" +"Last-Translator: Sairan Kikkarin \n" +"Language-Team: Kazakh \n" +"Language: kk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"\n" +"\n" +"\n" +"\n" +"\n" + +# +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Сайран Киккарин" + +# +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sairan@computer.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "қолданбаның қаріпін анықтайды" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Осы батырманы басыңыз да, қалаған тіркесімді келтіріңіз.\n" +"Мысалы, Ctrl+a: дегенді келтіру үшін 'Ctrl' пернені басып тұрып \n" +"'a' пернесін басыңыз." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Арналған тіркесімі" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 пернесі Windows-қа арналған, сондықтан жалпы жүйелік тіркесімге " +"жарамайды.\n" +"Басқа пернені таңдаңыз." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Қолданбаның стандартты перне тіркесімімен қайшылық" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' деген перне тіркесімі әлден \"%2\" деген стандартты әрекетпен " +"байланысқан.\n" +"Оны жалпы жүйелік тіркесімі ретінде пайдаланбақсыз ба?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ауыстыру" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Енгізу" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Жоқ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Жаңа ғана басқан пернені Qt танымайды." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Танымайтын перне" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Жарамсыз нәрсе." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/km/kdeclarative5.po b/po/km/kdeclarative5.po new file mode 100644 index 0000000..75259d6 --- /dev/null +++ b/po/km/kdeclarative5.po @@ -0,0 +1,121 @@ +# translation of kdelibs4.po to Khmer +# Khoem Sokhem , 2008, 2009, 2010, 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-06-27 10:04+0700\n" +"Last-Translator: Khoem Sokhem \n" +"Language-Team: Khmer\n" +"Language: km\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: KBabel 1.11.4\n" +"X-Language: km-KH\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr " ខឹម សុខែម, ម៉ន ម៉េត, សេង សុត្ថា​​, ចាន់ សម្បត្តិរតនៈ, សុខ សុភា" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"khoemsokhem@khmeros.info,​​mornmet@khmeros.info,sutha@khmeros.info," +"ratanak@khmeros.info,sophea@khmeros.info" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "កំណត់​ពុម្ពអក្សរ​របស់​កម្មវិធី" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"ចុច​ប៊ូតុង បន្ទាប់មក​បញ្ចូលផ្លូវកាត់​​តាម​ដែល​អ្នក​ចង់​បាន​នៅ​ក្នុង​កម្មវិធី ។\n" +"ឧទាហរណ៍ បញ្ជា(Ctrl)+a ៖ ចុច​គ្រាប់ចុច​បញ្ជា(Ctrl) ហើយ​ចុច​ a ។" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "ផ្លូវកាត់​ដែល​បានបម្រុង​ទុក" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"គ្រាប់​ចុច F12 ត្រូវ​បាន​បម្រុង​ទុក​នៅ​លើ​វីនដូ ដូច្នេះ​មិនអាច​ត្រូវ​បានប្រើ​សម្រាប់​គ្រាប់​ចុច​ផ្លូវកាត់​សកល​ទេ ។\n" +"សូម​ជ្រើស​គ្រាប់ចុច​ផ្លូវកាត់​ផ្សេង ។" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ប៉ះទង្គិច​ជាមួយ​នឹង​ផ្លូវកាត់​កម្មវិធី​ស្តង់ដា" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"បន្សំ​គ្រាប់​ចុច '%1' ក៏​ត្រូវ​កំពុង​ត្រូវ​បាន​ប្រើ​សម្រាប់​សកម្មភាព​ស្តង់ដារ \"%2\" ដែល​កម្មវិធី​មួយ​ចំនួន​ប្រើ ។\n" +"តើ​អ្នក​ពិត​ជា​ចង់​ប្រើ​វា​ជា​ផ្លូវកាត់​សកល​ដែរ​ឬ ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "ផ្ដល់ឡើង​វិញ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "បញ្ចូល" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "គ្មាន" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "គ្រាប់ចុច​ដែល​អ្នក​ទើបតែ​បាន​ចុច​មិន​ត្រូវ​បានគាំទ្រ​ដោយ Qt ទេ ។" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "គ្រាប់ចុច​មិនបានគាំទ្រ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "ធាតុ​មិន​ត្រឹមត្រូវ ។" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/kn/kdeclarative5.po b/po/kn/kdeclarative5.po new file mode 100644 index 0000000..26b3056 --- /dev/null +++ b/po/kn/kdeclarative5.po @@ -0,0 +1,117 @@ +# translation of kdelibs4.po to Kannada +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Umesh Rudrapatna , 2007. +# Umesh Rudrapatna , 2007, 2008, 2009. +# Shankar Prasad , 2008, 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-06-24 18:32+0530\n" +"Last-Translator: Shankar Prasad \n" +"Language-Team: kn_IN \n" +"Language: kn\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"\n" +"X-Generator: Lokalize 1.0\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ಉಮೇಶ್ ರುದ್ರಪಟ್ಟಣ, ಸಿದ್ಧಾರೂಢ ಪಿ ಟಿ, ಶಂಕರ ಪ್ರಸಾದ್ ಎಂ ವಿ" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "umeshrs@gmail.com, siddharudh@gmail.com, svenkate@redhat.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "ಅನ್ವಯದ ಲಿಪಿಶೈಲಿಯನ್ನು ನಿರೂಪಿಸುತ್ತದೆ" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "ಕಾದಿರಿಸಲಾದ ಸಮೀಪಮಾರ್ಗ (ಶಾರ್ಟ್ ಕಟ್)" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ಮಾನಕ (standard) ಅನ್ವಯಿಕ ಸಮೀಪಮಾರ್ಗಗಳೊಡನೆ ಕಲಹ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' ಕೀಲಿಕೈ ಹೊಂದಾಣಿಕೆಯು ಅನೇಕ ಅನ್ವಯಿಕಗಳು ಬಳಸುವ ಮಾನಕ (standard) ಕ್ರಿಯೆ \"%2\" ಗೆ " +"ಈಗಾಗಲೇ ನಿಗದಿಗೊಳಿಸಲಾಗೆದೆ.\n" +"ನೀವು ನಿಜಕ್ಕೂ ಇದನ್ನು ಸಾರ್ವತ್ರಿಕ ಸಮೀಪಮಾರ್ಗವಾಗಿ ಬಳಸಲಿಚ್ಛಿಸುವಿರೇನು?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "ಮರುನಿಗದಿಗೊಳಿಸು" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ಆದಾನ (ಇನ್ ಪುಟ್)" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ಯಾವುದೂ ಇಲ್ಲ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "ನೀವು ಈಗ ಒತ್ತಿದ ಕೀಲಿಕೈಗೆ Qt ಯ ಬೆಂಬಲವಿಲ್ಲ." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ಬೆಂಬಲವಿಲ್ಲದೆ ಇರುವ ಕೀಲಿ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "ಅಮಾನ್ಯವಾದ ಅಂಶ." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ko/kdeclarative5.po b/po/ko/kdeclarative5.po new file mode 100644 index 0000000..cbb264c --- /dev/null +++ b/po/ko/kdeclarative5.po @@ -0,0 +1,116 @@ +# Korean messages for kdelibs. +# Copyright (C) Free Software Foundation, Inc. +# Cho Sung Jae , 2007. +# Shinjo Park , 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-26 23:10+0100\n" +"Last-Translator: Shinjo Park \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 19.04.3\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "박신조" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kde@peremen.name" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML 프로그램 셸" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "프로그램의 식별 가능한 이름(필수)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"단추를 누른 다음 프로그램에 사용할 단축 키를 누르십시오.\n" +"Ctrl+A를 사용하려면 Ctrl 키를 누르고 A를 누르십시오." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "예약된 바로 가기" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 키는 Windows에서 예약되어 있으므로 전역 단축키로 사용할 수 없습니다.\n" +"다른 키를 선택하십시오" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "표준 프로그램 단축키와 충돌" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' 키 조합은 많은 프로그램이 사용하는 \"%2\" 표준 동작에 할당되어 있습니" +"다.\n" +"그래도 전역 단축키로 사용하시겠습니까?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "재할당" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "입력" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "없음" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt에서 방금 누른 키를 지원하지 않습니다." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "지원하지 않는 키" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "잘못된 KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "QML 파일을 지정하지 않았음" diff --git a/po/ku/kdeclarative5.po b/po/ku/kdeclarative5.po new file mode 100644 index 0000000..592009f --- /dev/null +++ b/po/ku/kdeclarative5.po @@ -0,0 +1,127 @@ +# translation of kdelibs4.po to Kurdish +# Kurdish translation for kdelibs +# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006 +# This file is distributed under the same license as the kdelibs package. +# FIRST AUTHOR , 2006. +# Erdal Ronahi , 2006, 2008. +# Erdal Ronahi , 2007, 2008, 2009. +# Amed Çeko Jiyan , 2008. +# Erdal Ronahî , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-08-13 15:45+0200\n" +"Last-Translator: Erdal Ronahî \n" +"Language-Team: Kurdish Team http://pckurd.net\n" +"Language: ku\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.6.1\n" +"X-Launchpad-Export-Date: 2007-11-26 09:44+0000\n" +"X-Poedit-Language: Kurdish\n" +"X-Poedit-Country: Kurdistan\n" +"X-Poedit-SourceCharset: utf-8\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Erdal Ronahi" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "erdal.ronahi@nospam.gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "curetîpê sepandinê diyar dike" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Pêl bişkojkê bikin, paşê jî kurterê têkevnê wek we di bernamê de dikin.\n" +"Mînak ji bo Ctrl+a: Ctrl pêlêkirî bigirin û pêl a bikin." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Kurteriya Veqetandî" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 di Windowsê de heye, ji ber vê ji bo kurteriyên giştî nayê bikaranîn.\n" +"Ji kerema xwe yekî din hilbijêrin." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Lihevnekirina Bi Kurteriya Sepana Standard" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Tayînkirina ji nû ve" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ketan" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ti yek" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Bişkojka te pêlêkirî ji aliyê Qt ve nayê naskirin." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Mifteya Bêpiştgir" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Hêmana nederbasdar." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/lb/kdeclarative5.po b/po/lb/kdeclarative5.po new file mode 100644 index 0000000..87af073 --- /dev/null +++ b/po/lb/kdeclarative5.po @@ -0,0 +1,114 @@ +# translation of kdelibs4.po to Luxembourgish +# kevin claude everard , 2005. +# Michel Ludwig , 2005, 2006. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2006-06-22 16:29+0200\n" +"Last-Translator: Michel Ludwig \n" +"Language-Team: Luxembourgish \n" +"Language: lb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Kevin Claude Everard,Michel Ludwig" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kevin@math.uni-sb.de,miclud@studcs.uni-sb.de" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "Definéiert d'Schrëft vun der Uwendung" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Tastekombinatioun" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt mat der Standardkombinatioun vum Programm" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"D'Tastekombinatioun \"%1\" ass scho mat der Standardaktioun \"%2\" verbonn.\n" +"Wëllt dir trotzdem déi nei Zouuerdnung auswielen?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Nei zouuerdnen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +#| msgid "Input file" +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Quelldatei" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "Keng" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Untrusted" +msgid "Unsupported Key" +msgstr "Net als sëcher agestuft" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ongültegen Zertifikat!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/lt/kdeclarative5.po b/po/lt/kdeclarative5.po new file mode 100644 index 0000000..cbe5c93 --- /dev/null +++ b/po/lt/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to Lithuanian +# Ričardas Čepas , 2002-2004. +# Donatas Glodenis , 2004-2009. +# Gintautas Miselis , 2008. +# Andrius Å tikonas , 2009. +# Tomas Straupis , 2011. +# Remigijus Jarmalavičius , 2011. +# Liudas AliÅ¡auskas , 2011, 2012, 2013, 2014. +# Liudas Alisauskas , 2013, 2015. +# Mindaugas Baranauskas , 2015. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-11 23:54+0200\n" +"Last-Translator: Moo\n" +"Language-Team: lt \n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n%10>=2 && (n%100<10 || n" +"%100>=20) ? 1 : n%10==0 || (n%100>10 && n%100<20) ? 2 : 3);\n" +"X-Generator: Poedit 2.0.6\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Moo" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "<>" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML programos apvalkalas" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Unikalus programos pavadinimas (privalomas)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Spustelėkite ant mygtuko, tada įveskite klavišų kombinaciją taip, tarsi " +"bÅ«tumėte programoje.\n" +"Pavyzdžiui kombinacijai Vald+A: laikykite Vald klavišą ir paspauskite A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervuota klavišų kombinacija" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 klaviÅ¡as yra rezervuotas Windows sistemoje, taigi negali bÅ«ti naudojamas " +"visuotine klavišų kombinacija.\n" +"PraÅ¡ome pasirinkti kitą." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konfliktas su standartine programos klavišų kombinacija" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Klavišų kombinacija „%1“ jau priskirta standartiniam veiksmui „%2“, kurį " +"naudoja kai kurios programos.\n" +"Ar tikrai norite ją naudoti ir kaip visuotinę sparčiųjų klavišų kombinaciją?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Priskirti iÅ¡ naujo" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ä®vestis" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nėra" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "KlaviÅ¡as, kurį ką tik paspaudėte, nepalaikomas Qt sistemoje." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepalaikomas klaviÅ¡as" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Neteisingas KPackage \"%1\"" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nepateikta jokio QML failo" diff --git a/po/lv/kdeclarative5.po b/po/lv/kdeclarative5.po new file mode 100644 index 0000000..4b3d586 --- /dev/null +++ b/po/lv/kdeclarative5.po @@ -0,0 +1,130 @@ +# translation of kdelibs4.po to Latvian +# kdelibs.po tulkojums uz LatvieÅ¡u valodu +# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# +# Maris Nartiss , 2005. +# Maris Nartiss , 2006, 2007, 2008, 2009, 2010, 2011. +# Linux localization project , 2007. +# Viesturs Zarins , 2007, 2008, 2010. +# Viesturs Zariņš , 2009. +# Einars Sprugis , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-07-06 12:57+0300\n" +"Last-Translator: Maris Nartiss \n" +"Language-Team: Latvian\n" +"Language: lv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " +"2);\n" +"X-Launchpad-Export-Date: 2007-11-22 17:44+0000\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Viesturs Zariņš, Māris NartiÅ¡s" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "viesturs.zarins@mi.lu.lv, maris.kde@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definē programmas fontu" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Nospiediet pogu, tad ievadiet Ä«sceļu, kuru vēlaties lietot programmā.\n" +"Piemēram, priekÅ¡ Ctrl+a: turiet Ctrl taustiņu un tad nospiediet a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervērts Ä«sceļš" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 taustiņš ir rezervēts Windows operētājsistēmā, tāpēc to nevar izmantot " +"kā globālu Ä«sceļu.\n" +"LÅ«dzu izvēlieties citu taustiņu." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikts ar standarta programmu Ä«sceļu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Taustiņu kombinācija '%1' jau ir piešķirta standarta darbÄ«bai \"%2\", ko " +"lieto daudzas programmas.\n" +"Vai jÅ«s tiešām vēlaties to izmantot arÄ« kā globālo Ä«sceļu?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Piešķirt" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ievade" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nav" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt neatbalsta jÅ«su nospiesto taustiņu." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "NeatbalstÄ«ts taustiņš" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "NederÄ«gs vienums." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/mai/kdeclarative5.po b/po/mai/kdeclarative5.po new file mode 100644 index 0000000..6ceb709 --- /dev/null +++ b/po/mai/kdeclarative5.po @@ -0,0 +1,117 @@ +# translation of kdelibs4.po to Hindi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Sangeeta Kumari , 2008. +# Rajesh Ranjan , 2010. +# Rajesh Ranjan , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-09-24 15:44+0530\n" +"Last-Translator: Rajesh Ranjan \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "संगीता कुमारी" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sangeeta09@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "अनुप्रयोग फोन्ट पारिभाषित करैत अछि" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "शार्टकट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "प्रामाणिक अनुप्रयोग शार्टकट केर परस्पर विरोध मे अछि" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"कुंजी '%1' संयोजन पहिने सँ \"%2\" मानक काज क' लेल सम्बद्ध अछि जे किछु अनुप्रयोगसभ मे " +"इस्तेमाल कएल जाइत अछि.\n" +"की अहाँ एकरा वैश्विक शार्टकट केर रूपेँ सम्बद्ध कएनाइ चाहैत छी?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "फिनु सँ आबंटित करू" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "इनपुट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "किछु नहि" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "असमर्थित कुंजी" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "अवैध मद." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/mk/kdeclarative5.po b/po/mk/kdeclarative5.po new file mode 100644 index 0000000..29d0a41 --- /dev/null +++ b/po/mk/kdeclarative5.po @@ -0,0 +1,136 @@ +# translation of kdelibs4.po to Macedonian +# +# Copyright (C) 2000,2002,2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Dimitar Indovski +# Damjan Janevski +# Dragan Sekulovski +# +# Maratonec , 2002. +# Dragan Bocevski , 2002. +# Danko Ilik , 2002,2003. +# Bozidar Proevski , 2002,2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Danko Ilik , 2003. +# Darko Nikolovski , 2003. +# Ivan Dimitrov , 2003. +# Magdica Shambevska , 2004. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-01-27 10:39+0100\n" +"Last-Translator: Bozidar Proevski \n" +"Language-Team: Macedonian \n" +"Language: mk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: Plural-Forms: nplurals=3; plural=n%10==1 ? 0 : n%10==2 ? 1 : " +"2;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Божидар Проевски" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "bobibobi@freemail.com.mk" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "го дефинира фонтот на апликацијата" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Кликнете на копчето, потоа внесете ја кратенката како што би ја активирале " +"во некоја програма.\n" +"На пример за „Ctrl+a“: задржете го притиснато копчето „Ctrl“ и притиснете " +"„a“." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Резервирана кратенка" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Копчето F12 е резервирано на „Windows“, па не може да се користи како " +"глобална кратенка.\n" +"Молам изберете друга." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Конфликт со стандардна кратенка на апликација" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбинацијата на копчиња „%1“ исто така се користи за стандардното дејство " +"“%2“ што го користат некои апликации.\n" +"Дали навистина сакате да ја користите и како глобална кратенка?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Преповрзи" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Внес" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Нема" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Тастерот што го притиснавте не е поддржан од Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Неподдржан тастер" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "невалидни знаменца" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ml/kdeclarative5.po b/po/ml/kdeclarative5.po new file mode 100644 index 0000000..3d19374 --- /dev/null +++ b/po/ml/kdeclarative5.po @@ -0,0 +1,117 @@ +# translation of kdelibs4.po to +# Malayalam translation of kdelibs4. +# Copyright (C) 2007-2010 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdelibs package. +# Anoop | അനൂപ് Panavalappil | പനവളപ്പില്‍ , 2008. +# ANI PETER|അനി പീറ്റര്‍ , 2008. +# Maxin B. John , 2007. +# Manu S Madhav | മനു എസ് മാധവ് , 2008. +# Praveen Arimbrathodiyil , 2007, 2008, 2009, 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-12-12 21:03+0000\n" +"Last-Translator: Vivek KJ Pazhedath \n" +"Language-Team: SMC \n" +"Language: ml\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Weblate 3.9.1\n" +"X-Poedit-Country: INDIA\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "പ്രവീണ്‍ അരിമ്പ്രത്തൊടിയില്‍, അനി പീറ്റര്‍, മാക്സിന്‍ ജോണ്‍, അനൂപ് പനവളപ്പില്‍, മനു എസ് മാധവ്" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "shijualexonline@gmail.com,snalledam@dataone.in,vivekkj2004@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "പ്രയോഗത്തിനുള്ള അക്ഷരസഞ്ചയം നിര്‍വ്വചിക്കുന്നു " + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "പറഞ്ഞുവച്ച കുറുക്കുവഴി" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 കീ വിന്‍ഡോസില്‍ പറഞ്ഞുവച്ചിട്ടുള്ളതായതിനാല്‍ ആഗോള കുറുക്കുവഴിയായി ഉപയോഗിയ്ക്കാന്‍ സാധ്യമല്ല.\n" +"ദയവായി മറ്റൊരെണ്ണം തെരഞ്ഞെടുക്കൂ." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "നിലവാരത്തിലുള്ള പ്രയോഗ കുറുക്കുവഴിയുമായി പ്രശ്നം" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "വീണ്ടും ഏല്‍പ്പിക്കുക" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ഇന്‍പുട്ട്" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ഒന്നുമല്ല" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "നിങ്ങള്‍ അമര്‍ത്തിയ കീ ക്യൂട്ടി പിന്തുണയ്ക്കുന്നതല്ല." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "പിന്തുണയില്ലാത്ത കീ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "തെറ്റായ വസ്തു." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/mr/kdeclarative5.po b/po/mr/kdeclarative5.po new file mode 100644 index 0000000..f4c94a8 --- /dev/null +++ b/po/mr/kdeclarative5.po @@ -0,0 +1,116 @@ +# translation of kdelibs4.po to marathi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Sandeep Shedmake , 2008, 2009. +# Chetan Khona , 2012, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-03-29 16:14+0530\n" +"Last-Translator: Chetan Khona \n" +"Language-Team: Marathi \n" +"Language: mr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: Lokalize 1.5\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"संदिप शेडमाके, \n" +"चेतन खोना" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"sandeep.shedmake@gmail.com, \n" +"chetan@kompkin.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "अनुप्रयोग फॉन्टचे वर्णन करतो" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "आरक्षित शॉर्टकट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "प्रमाणित अनुप्रयोग शॉर्टकट सह मतभेद" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "पुन्हा नेमणे" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "माहिती" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "काहीच नाही" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "तुम्ही जी कळ दाबली ती Qt मध्ये समर्थीत नाही." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "असमर्थीत कि" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "अवैध वस्तु." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ms/kdeclarative5.po b/po/ms/kdeclarative5.po new file mode 100644 index 0000000..4903998 --- /dev/null +++ b/po/ms/kdeclarative5.po @@ -0,0 +1,126 @@ +# kdelibs4 Bahasa Melayu (Malay) (ms) +# Hasbullah bin Pit , 2003. +# Muhammad Najmi Ahmad Zabidi , 2003. +# Mohd Nasir bin Che Embee , 2003. +# Muhammad Najmi bin Ahmad Zabidi , 2006. +# Sharuzzaman Ahmat Raslan , 2006, 2007, 2008, 2009, 2010. +# Sharuzzaman Ahmat Raslan , 2010, 2011. +# Copyright (C) 2008, 2009 K Desktop Environment +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-07-16 00:57+0800\n" +"Last-Translator: Sharuzzaman Ahmat Raslan \n" +"Language-Team: Malay \n" +"Language: ms\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Sharuzzaman Ahmat Raslan" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sharuzzaman@myrealbox.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "mentakrifkan font aplikasi" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klik pada butang, kemudian masukkan pintasan yang anda mahukan dalam " +"program.\n" +"Contoh untuk Ctrl+a: pegang kekunci Ctrl dan tekan a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Pintasan Dikhaskan" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Kekunci F12 adalah dikhaskan pada Windows, jadi tidak boleh digunakan untuk " +"pintasan global.\n" +"Sila pilih yang lain." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflik dengan Piawaian Kekunci Pintas Aplikasi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinasi kekunci '%1' juga telah digunakan untuk tindakan standard \"%2\" " +"yang digunakan oleh kebanyakan aplikasi.\n" +"Adakah anda betul-betul hendak menggunakannya sebagai pintasan global juga?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ulangtugas" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Masukan" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Tiada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Kekunci yang anda baru tekan tidak disokong oleh Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Kekunci Tidak Disokong" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Tidak sah." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/nb/kdeclarative5.po b/po/nb/kdeclarative5.po new file mode 100644 index 0000000..8f7110e --- /dev/null +++ b/po/nb/kdeclarative5.po @@ -0,0 +1,125 @@ +# Translation of kdeclarative5 to Norwegian BokmÃ¥l +# +# Knut Yrvin , 2002, 2003, 2004, 2005. +# Bjørn Steensrud , 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. +# Eskild Hustvedt , 2004, 2005. +# Gaute Hvoslef Kvalnes , 2004, 2005. +# Axel Bojer , 2005, 2006. +# Nils Kristian Tomren , 2005, 2007. +# Øyvind A. Holm , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2015-04-28 08:55+0200\n" +"Last-Translator: Bjørn Steensrud \n" +"Language-Team: Norwegian BokmÃ¥l \n" +"Language: nb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Bjørn Steensrud" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "bjornst@skogkatt.homelinux.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML programskall" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Det entydige navnet pÃ¥ programmet (obligatorisk)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Trykk pÃ¥ knappen, og tast inn snarveien slik du ville gjort det i " +"programmet.\n" +"Eksempel for CTRL+A: Hold CTRL-tasten og trykk A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reservert snarvei" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12-tasten er reservert under Windows, sÃ¥ den kan ikke brukes som global " +"snarvei.\n" +"Velg en annen tast." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt med en standard programsnarvei" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tastekombinasjonen «%1» er allerede i bruk for standardhandlinga «%2» som " +"mange programmer bruker.\n" +"Er du sikker pÃ¥ at du vil bruke den som en global snarvei ogsÃ¥?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Tilordne pÃ¥ nytt" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Inndata" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ingen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt støtter ikke den tasten du nettopp trykket." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ustøttet tast" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/nds/kdeclarative5.po b/po/nds/kdeclarative5.po new file mode 100644 index 0000000..c8d3d84 --- /dev/null +++ b/po/nds/kdeclarative5.po @@ -0,0 +1,121 @@ +# Translation of kdelibs4.po to Low Saxon +# Heiko Evermann , 2004. +# Heiko Evermann , 2004, 2005. +# Volker Jockheck , 2004. +# Sönke Dibbern , 2004, 2005, 2006, 2007, 2008, 2009, 2014. +# Manfred Wiese , 2008, 2009, 2010, 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2014-05-11 00:55+0200\n" +"Last-Translator: Sönke Dibbern \n" +"Language-Team: Low Saxon \n" +"Language: nds\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Sönke Dibbern, Manfred Wiese" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "s_dibbern@web.de, m.j.wiese@web.de" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "stellt de Schriftoort för't Programm in" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klick op den Knoop un giff denn de Tastkombinatschoon so in, as Du dat ok " +"in't Programm deest.\n" +"Bispill för Strg+A: Holl de Strg-Tast daal un drück denn de A-Tast." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reserveert Tastkombinatschoon" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"De F12-Tast is op Windows reserveert un lett sik nich as globaal " +"Tastkombinatschoon bruken.\n" +"Söök bitte en anner ut." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Problem mit'n Standard-Programmkombinatschoon" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"De Kombinatschoon „%1“ höört al de Standardakschoon „%2“ to, de en Reeg " +"Programmen bruukt.\n" +"Wullt Du ehr redig as en globaal Tastkombinatschoon bruken?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Nieg toornen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ingaav" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Keen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ünnerstütt de Tast nich, de Du jüst drückt hest." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nich ünnerstütt Tast" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Leeg Indrag" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ne/kdeclarative5.po b/po/ne/kdeclarative5.po new file mode 100644 index 0000000..abf5510 --- /dev/null +++ b/po/ne/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to Nepali +# Mahesh Subedi , 2006, 2007. +# Shiva Prasad Pokharel , 2006, 2007. +# shyam krishna ball , 2006. +# shyam krishna bal , 2006, 2007. +# Shiva Pokharel , 2007. +# Nabin Gautam , 2007. +# Shiva Prasad Pokharel , 2007. +# Shyam Krishna Bal , 2007. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2007-11-05 15:41+0545\n" +"Last-Translator: Shyam Krishna Bal \n" +"Language-Team: Nepali \n" +"Language: ne\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n !=1\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Mahesh Subedi, श्यामकृष्ण बल, Nabin Gautam" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "submanesh@gmail.com, shyamkrishna_bal@yahoo.com, Nabin@mpp.org.np" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "अनुप्रयोग फन्ट परिभाषित गर्दछ" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "सर्टकट" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "मानक अनुप्रयोग सर्टकटसँग द्वन्द्व" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +#| msgid "" +#| "The '%1' key combination has already been allocated to the standard " +#| "action \"%2\" that many applications use.\n" +#| "You cannot use it for global shortcuts for this reason." +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' कुञ्जी संयोजन \"%2\" मानक कार्यमा पहिल्यै बाँडफाँट गरिएको छ ।\n" +"तपाईँ हालको कार्यबाट यसलाई फेरि मानाङ्कन गर्न चाहनुहुन्छ ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "फेरि मानाङ्कन गर्नुहोस्" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "आगत" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "कुनै पनि होइन" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Unsorted" +msgid "Unsupported Key" +msgstr "क्रमबद्ध नगरिएका" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid Filenames" +msgid "Invalid KPackage '%1'" +msgstr "अवैध फाइल नाम" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/nl/kdeclarative5.po b/po/nl/kdeclarative5.po new file mode 100644 index 0000000..5c19976 --- /dev/null +++ b/po/nl/kdeclarative5.po @@ -0,0 +1,136 @@ +# translation of kdelibs4.po to Dutch +# Copyright (C) 2000,2001,2002,2003, 2004 KDE e.v.. +# KTranslator Generated File +# Nederlandse vertaling van kdelibs. +# KDE-vertaalgroep Nederlands , 2000, 2001, 2002. +# Rinse de Vries ,2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009. +# Wilbert Berendsen , 2003, 2004. +# Bram Schoenmakers , 2004, 2005, 2006, 2007. +# Tom Albers , 2004. +# Sander Koning , 2005. +# Tijmen Baarda , 2005. +# Freek de Kruijf , 2008, 2009. +# Kristof Bal , 2008, 2009. +# Freek de Kruijf , 2009, 2010. +# Freek de Kruijf , 2010, 2011, 2012. +# Freek de Kruijf , 2010, 2011, 2013, 2014, 2015, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 11:01+0100\n" +"Last-Translator: Freek de Kruijf \n" +"Language-Team: Dutch \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Files: kfarch.cpp kfdird.cpp kfind.cpp kfindtop.cpp kfoptions.cpp kfsave.cpp " +"kftabdlg.cpp kftypes.cpp kfwin.cpp main.cpp mkfdird.cpp mkfind.cpp\n" +"X-Generator: Lokalize 19.12.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Rinse de Vries - 2000 t/m 2008,Wilbert Berendsen - 2003; 2004,Bram " +"Schoenmakers - 2004 t/m 2007,Tom Albers - 2004,Tijmen Baarda - 2005,Sander " +"Koning - 2005, Freek de Kruijf - 2009 t/m 2020" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"rinsedevries@kde.nl,wbsoft@xs4all.nl,bramschoenmakers@kde.nl,tomalbers@kde." +"nl,tijmenbaarda@kde.nl,,freekdekruijf@kde.nl" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML toepassingsshell" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "De unieke naam van de toepassingen" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klik op de knop, voer dan de sneltoets in zoals u zou doen in het " +"programma.\n" +"Voorbeeld voor Ctrl+A: houdt de Ctrl-toets in en druk op A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Gereserveerde snelkoppeling" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"De F12-toets is gereserveerd in Windows, en kan dus niet gebruikt worden " +"voor een globale sneltoets.\n" +"Graag een andere kiezen." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflict met standaard-sneltoets" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"De toetscombinatie '%1' is reeds toegewezen aan de standaardactie \"%2\". " +"Deze actie wordt door enkele programma's gebruikt.\n" +"Wilt u de combinatie ook gebruiken als globale toetsencombinatie?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Opnieuw toewijzen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Invoer" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Geen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "De toets die u net indrukte wordt niet door Qt ondersteund." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Niet ondersteunde sleutel" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ongeldige KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Geen QML-bestand aangeleverd" diff --git a/po/nn/kdeclarative5.po b/po/nn/kdeclarative5.po new file mode 100644 index 0000000..3d62d1e --- /dev/null +++ b/po/nn/kdeclarative5.po @@ -0,0 +1,121 @@ +# Translation of kdeclarative5 to Norwegian Nynorsk +# +# Gaute Hvoslef Kvalnes , 2003, 2004, 2005, 2006. +# HÃ¥vard Korsvoll , 2003, 2005. +# Karl Ove Hufthammer , 2004, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2020. +# Eirik U. Birkeland , 2008, 2009, 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-02-16 14:31+0100\n" +"Last-Translator: Karl Ove Hufthammer \n" +"Language-Team: Norwegian Nynorsk \n" +"Language: nn\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.12.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Karl Ove Hufthammer" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "karl@huftis.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Skal for KPackage-QML-program" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Eintydig namn pÃ¥ programmet (obligatorisk)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Trykk pÃ¥ knappen, og skriv sÃ¥ inn snarvegen du ønskjer Ã¥ bruka.\n" +"For eksempel for «Ctrl + A»: Hald inne «Ctrl»-tasten og trykk «A»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reservert snarveg" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"«F12»-tasten er reservert pÃ¥ Windows, og kan derfor ikkje brukast som ein " +"global snarveg.\n" +"Vel ein annan snarvegtast." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt med standardprogramsnarveg" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tastekombinasjonen «%1» er alt i bruk for standardhandlinga «%2», som nokre " +"program brukar.\n" +"Er du sikker pÃ¥ at du likevel vil bruka han som ein global snarveg?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Tilordna pÃ¥ nytt" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Inndata" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ingen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Tasten du trykte er ikkje støtta av Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Ustøtta tast" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ugyldig KPackage «%1»" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Manglar QML-fil" diff --git a/po/oc/kdeclarative5.po b/po/oc/kdeclarative5.po new file mode 100644 index 0000000..474a0d2 --- /dev/null +++ b/po/oc/kdeclarative5.po @@ -0,0 +1,111 @@ +# translation of kdelibs4.po to Occitan +# Copyright (C) 2008 This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Yannig Marchegay (Kokoyaya) , 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-08-06 00:07+0200\n" +"Last-Translator: \n" +"Language-Team: Occitan \n" +"Language: oc\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Yannig Marchegay (Kokoyaya)" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "yannig@marchegay.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Acorchi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflicte amb un acorchi clavièr d'aplicacion estandarda" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reatribuir" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Pas cap" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid URL" +msgid "Invalid KPackage '%1'" +msgstr "URL invalida" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/or/kdeclarative5.po b/po/or/kdeclarative5.po new file mode 100644 index 0000000..0003766 --- /dev/null +++ b/po/or/kdeclarative5.po @@ -0,0 +1,117 @@ +# translation of kdelibs4.po to Oriya +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Manoj Kumar Giri , 2008. +# Manoj Kumar Giri , 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-01-02 17:37+0530\n" +"Last-Translator: Manoj Kumar Giri \n" +"Language-Team: Oriya \n" +"Language: or\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"\n" +"\n" +"\n" +"\n" +"X-Generator: KBabel 1.11.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ମନୋଜ କୁମାର ଗିରି" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "mgiri@redhat.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "ପ୍ରୟୋଗ ଅକ୍ଷରରୂପକୁ ବ୍ୟାଖ୍ୟା କରିଥାଏ" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "New Web Shortcut" +msgid "Reserved Shortcut" +msgstr "ନୂତନ ୱେବ ସଂକ୍ଷିପ୍ତ ପଥ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ମାନକ ପ୍ରୟୋଗ ସଂକ୍ଷିପ୍ତ ପଥ ସହିତ ଦ୍ୱନ୍ଦ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "ପୁନଃ ନିରୂପଣ କରିବା" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ନିବେଶ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "କେହିନୁହଁ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ଅସମର୍ଥିତ କି" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "ଅବୈଧ ଚିହ୍ନକଗୁଡିକ" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/pa/kdeclarative5.po b/po/pa/kdeclarative5.po new file mode 100644 index 0000000..9a5cb06 --- /dev/null +++ b/po/pa/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to Punjabi +# Punjabi translation of kdelibs. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. +# +# Amanpreet Singh Alam , 2004. +# Amanpreet Singh Alam , 2004. +# A S Alam , 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. +# ASB , 2007. +# Amanpreet Singh Alam , 2008. +# Amanpreet Singh , 2008. +# Amanpreet Singh Alam , 2008, 2009, 2013, 2014. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2014-03-16 23:21-0500\n" +"Last-Translator: A S Alam \n" +"Language-Team: Punjabi/Panjabi \n" +"Language: pa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"ਅ.ਸ.ਆਲਮ. ੨੦੦੪-੨੦੧੪\n" +"http://code.google.com/p/gurmukhi/" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "aalam@users.sf.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "ਐਪਲੀਕੇਸ਼ਨ ਫੋਂਟ ਪਰਭਾਸ਼ਿਤ ਕਰੋ" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "ਰਾਖਵਾਂ ਸ਼ਾਰਟਕੱਟ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 ਨੂੰ ਵਿੰਡੋਜ਼ ਲਈ ਰਾਖਵਾਂ ਰੱਖਿਆ ਗਿਆ ਹੈ, ਇਸਕਰਕੇ ਇਸਨੂੰ ਗਲੋਬਲ ਸ਼ਾਰਟਕੱਟ ਵਜੋਂ ਨਹੀਂ ਵਰਤਿਆ ਜਾ ਸਕਦਾ।\n" +"ਹੋਰ ਚੁਣੋ ਜੀ।" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ਸਟੈਂਡਰਡ ਐਪਲੀਕੇਸ਼ਨ ਸ਼ਾਰਟਕੱਟਾਂ ਨਾਲ ਟਕਰਾਅ ਹੋ ਰਿਹਾ ਹੈ।" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"ਸਵਿੱਚ ਕੰਬੀਨੇਸ਼ਨ '%1' ਪਹਿਲਾਂ ਹੀ ਇੱਕ ਸਟੈਂਡਰਡ ਐਕਸ਼ਨ \"%2\" ਲਈ ਜਾਰੀ ਕੀਤਾ ਜਾ ਚੁੱਕਾ ਹੈ, ਜੋ ਕਿ " +"ਕੁਝ ਐਪਲੀਕੇਸ਼ਨਾਂ ਵਰਤਦੀਆਂ ਹਨ।\n" +"ਕੀ ਤੁਸੀਂ ਇਸ ਨੂੰ ਗਲੋਬਲ ਸ਼ਾਰਟਕੱਟ ਲਈ ਇਹ ਵਰਤਣਾ ਚਾਹੁੰਦੇ ਹੋ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "ਮੁੜ-ਜਾਰੀ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ਇੰਪੁੱਟ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ਕੋਈ ਨਹੀਂ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "ਸਵਿੱਚ, ਜੋ ਦੱਬੀ ਹੈ, Qt ਵਲੋਂ ਸਹਾਇਕ ਨਹੀਂ ਹੈ।" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ਗ਼ੈਰ-ਸਹਾਇਕ ਸਵਿੱਚ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "ਗਲਤ ਆਈਟਮ।" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/pl/kdeclarative5.po b/po/pl/kdeclarative5.po new file mode 100644 index 0000000..2942f73 --- /dev/null +++ b/po/pl/kdeclarative5.po @@ -0,0 +1,213 @@ +# translation of kdelibs4.po to Polish +# translation of kdelibs4.po to +# Version: $Revision: 685926 $ +# Ostatnie poprawki przed 2.0 Jacek Stolarczyk +# Jacek Stolarczyk , 2001. +# Piotr Roszatycki , 1997-2000. +# Artur Górniak , 2000. +# Michał Rudolf , 2002. +# Michal Rudolf , 2002,2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Krzysztof Lichota , 2005, 2006. +# Marta Rybczyńska , 2007, 2008, 2009, 2010, 2011, 2012, 2013. +# Michal Rudolf , 2010. +# Artur Chłond , 2010. +# Łukasz Wojniłowicz , 2011, 2012, 2013, 2014, 2015, 2016, 2019. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-10-20 11:42+0200\n" +"Last-Translator: Łukasz Wojniłowicz \n" +"Language-Team: Polish \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +">\n" +"X-Generator: Lokalize 19.07.70\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Michał Rudolf, Artur Chłond, Łukasz Wojniłowicz" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "mrudolf@kdewebdev.org, eugenewolfe@o2.pl, lukasz.wojnilowicz@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Powłoka aplikacji QML KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Niepowtarzalna nazwa aplikacji (obowiązkowo)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Naciśnij przycisk, a potem wciśnij kombinację, której chcesz użyć w " +"programie.\n" +"Na przykład, żeby użyć skrótu Ctrl+A, przytrzymaj klawisz Ctrl i wciśnij A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Skrót zarezerwowany" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Skrót F12 jest zarezerwowany w Windows, więc nie można go użyć jako skrótu " +"globalnego.\n" +"Wybierz inny." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt ze standardowym skrótem programu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacja klawiszy '%1' została przypisana standardowemu działaniu \"%2\" " +"używanemu przez wiele programów.\n" +"Użyć jej także jako skrótu globalnego?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Przypisz ponownie" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Nowy skrót" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Brak" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Klawisz, który wcisnąłeś, nie jest obsługiwany przez Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nieobsługiwany klawisz" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid KPackage" +msgid "Invalid KPackage '%1'" +msgstr "Nieprawidłowy KPackage" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nie podano pliku QML" diff --git a/po/ps/kdeclarative5.po b/po/ps/kdeclarative5.po new file mode 100644 index 0000000..0992bfc --- /dev/null +++ b/po/ps/kdeclarative5.po @@ -0,0 +1,114 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the Kde package. +# Zabeeh Khan , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-08-16 16:01-0800\n" +"Last-Translator: Zabeeh Khan \n" +"Language-Team: Pashto \n" +"Language: ps\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Language: Pashto, Pushto\n" +"X-Poedit-Country: AFGHANISTAN\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ستاسو نومونه" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "zabeehkhan@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "د کاريال ليکبڼه ټاکي" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "لنډلار" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "د کره کاريال لنډلارې سره ټکر" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "بياټاکل" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ننوتۍ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "هېڅ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Unsorted" +msgid "Unsupported Key" +msgstr "نا اڼلي" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid Filenames" +msgid "Invalid KPackage '%1'" +msgstr "ناسم دوتنه نومونه" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/pt/kdeclarative5.po b/po/pt/kdeclarative5.po new file mode 100644 index 0000000..3825f27 --- /dev/null +++ b/po/pt/kdeclarative5.po @@ -0,0 +1,207 @@ +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 11:46+0000\n" +"Last-Translator: José Nuno Pires \n" +"Language-Team: pt \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-POFile-IgnoreConsistency: &Discard\n" +"X-POFile-IgnoreConsistency: Enter\n" +"X-POFile-IgnoreConsistency: Author\n" +"X-POFile-IgnoreConsistency: Open &File\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-POFile-Allow: 2\n" +"X-POFile-IgnoreConsistency: Far\n" +"X-POFile-SpellExtra: Hspell Koenig KHTML Thaana Telugu KScript Sycoca\n" +"X-POFile-SpellExtra: artsmessage KDEInit SOCKS kcmkresources\n" +"X-POFile-SpellExtra: ChavePrivadaFalhou KIOTest Han Thaani Jumaada Hangul\n" +"X-POFile-SpellExtra: Cherokee Meh KSpell chaveSessao TestWritevCard\n" +"X-POFile-SpellExtra: Thulatha Javascript Tagbanwa End Tagalog LTR Oriya\n" +"X-POFile-IgnoreConsistency: H:\n" +"X-POFile-IgnoreConsistency: Untrusted\n" +"X-POFile-IgnoreConsistency: Export\n" +"X-POFile-SpellExtra: Hiragana Backspace Print PgUp Ins\n" +"X-POFile-SpellExtra: ModificadoresEspaço Yi Lao Return gpg Caps Lock kab\n" +"X-POFile-SpellExtra: aRts tags Buhid Insert Gurmukhi Malayalam Scroll\n" +"X-POFile-SpellExtra: Delete Ogham PgDn Kannada Tab Home Katakana SysReq\n" +"X-POFile-SpellExtra: KConvertTest Khmer OutraOpção Bopomofo\n" +"X-POFile-SpellExtra: MarcasCombinatórias Enter UmaOpção Devanagari\n" +"X-POFile-SpellExtra: Hanunoo Sinhala JanelaAutoExemplo Lars Ian help\n" +"X-POFile-IgnoreConsistency: Try Different\n" +"X-POFile-IgnoreConsistency: Delete\n" +"X-POFile-IgnoreConsistency: Comment\n" +"X-POFile-IgnoreConsistency: &Restore\n" +"X-POFile-IgnoreConsistency: Reset\n" +"X-POFile-IgnoreConsistency: 0.1\n" +"X-POFile-IgnoreConsistency: Forward\n" +"X-POFile-SpellExtra: Kanbun CTRL Klash Syloti JS Jan TETest QObject\n" +"X-POFile-SpellExtra: Sebastian Geiser Far kdeinit Weis Mordad Yau Hausmann\n" +"X-POFile-SpellExtra: execprefix autostart Dirk Nov Elul shanbe Farvardin\n" +"X-POFile-SpellExtra: KApplication bin tagcloudtest displayname IFrame yo\n" +"X-POFile-SpellExtra: Aza Adar Sáb dah XIM Sha Sonnet testregression Jamo\n" +"X-POFile-SpellExtra: Shawwal Bah KConf IPA Hijri Sab Testkhtml Jeroen\n" +"X-POFile-SpellExtra: QWidget dumps KJSEmbed Arb qttest stderr Kho ban Kha\n" +"X-POFile-SpellExtra: PathLengthExceeded Tai shn Ago KrossTest Ithnain\n" +"X-POFile-SpellExtra: klauncher tempfile Aban frame ThreadWeaver Kun yeyo\n" +"X-POFile-SpellExtra: Buginese Lue Kislev Khamees home Jumma XDG Khordad\n" +"X-POFile-SpellExtra: Zemberek KAboutData Wijnhout Sivan Saami Method Qua\n" +"X-POFile-SpellExtra: Molkentin PTY Koivisto onthespot Ord Shvat Jom\n" +"X-POFile-SpellExtra: KMultiPart Ahad CJK Aspell Tifinagh NoCARoot Tishrey\n" +"X-POFile-SpellExtra: Up KDXSView ModRunner subtexto aifamily Panj path\n" +"X-POFile-SpellExtra: NumLock keramik GHNS TestRegressionGui Yek Iyar Ahd\n" +"X-POFile-SpellExtra: khtmltests Torben QApplication overthespot caption\n" +"X-POFile-SpellExtra: khtml desktop Ispell QWS create Faure Object Limbu\n" +"X-POFile-SpellExtra: KLauncher Sauer Hijjah Myanmar NEC BCC Fev Kelly\n" +"X-POFile-SpellExtra: Jumee Stephan TestRegression Knoll frames HOME Jum\n" +"X-POFile-SpellExtra: DISPLAY KNewStuff Awal Rajab pt plastik InvalidHost\n" +"X-POFile-SpellExtra: kdemain STDOUT Jun Jul Kulow Yaum pa Chahar widgets\n" +"X-POFile-SpellExtra: man KUnitTest pm KDEPIM TAB Waldo CL CC Balinês\n" +"X-POFile-SpellExtra: Nagri Kangxi QLayout qtplugininstance regression\n" +"X-POFile-SpellExtra: multipart Jalali Phags Set servname nograb\n" +"X-POFile-SpellExtra: International Frame CGIs Stylesheet Library Sex Seg\n" +"X-POFile-SpellExtra: KDontChangeTheHostName SO toner Yijing Peter Out\n" +"X-POFile-SpellExtra: InvalidCA Le Khmeres Tevet Ordibehesht Anton am al\n" +"X-POFile-SpellExtra: Tir Tuebingen Esf Abr ini KLocale KiB WMNET Dingbats\n" +"X-POFile-SpellExtra: InvalidPurpose kdehelp id Glagolitic factory Esfand\n" +"X-POFile-SpellExtra: Nisan kjs ErrorReadingRoot MiB Copta Shanbe Xvfb\n" +"X-POFile-SpellExtra: client Mai Bastian document config TiB Jones AC\n" +"X-POFile-SpellExtra: KBuildSycoca Bahman offthespot Mueller Tang ye Thu\n" +"X-POFile-SpellExtra: Sabt NKo aisocktype mixed Carriage Thl aiflags\n" +"X-POFile-SpellExtra: Muharram Reinhart Kontact Cantonês Page icon\n" +"X-POFile-SpellExtra: makekdewidgets ManyColor Heshvan Kross Ith bind Antti\n" +"X-POFile-SpellExtra: DXS Tamuz Shahrivar sessionId sh KJSCmd Av KLibLoader\n" +"X-POFile-SpellExtra: Mehr GiB Arbi dograb AssinaturaFalhou prefix\n" +"X-POFile-SpellExtra: Hexagramas ize AutoAssinado NãoConfiável Qi Down\n" +"X-POFile-SpellExtra: directory Índicas ise Oxygen info shared share usr\n" +"X-POFile-IgnoreConsistency: Separate Folders\n" +"X-POFile-SpellExtra: XDGDATADIRS KTTS Control PrtScr Hyper Sys Win Screen\n" +"X-POFile-SpellExtra: Req Break AltGr ReadOnly SHM EOF Re abc ABC QPL Kate\n" +"X-POFile-SpellExtra: Serif Sans KFormula URIs raster opengl favicons Solid\n" +"X-POFile-SpellExtra: Harald Fernengel KTTSD baseline Resource writeall\n" +"X-POFile-SpellExtra: Trüg YiB PiB YB ZB EB PB EiB ZiB GB TB KIdleTest\n" +"X-POFile-SpellExtra: Freddi KIdleTime Cha Āshwin Budhavãra Suk Paush\n" +"X-POFile-SpellExtra: Shrāvana Somavãra Phālgun Raviãra Phā Māg\n" +"X-POFile-SpellExtra: Bhādrapad Chaitra Māgh Sukravãra Āshādha\n" +"X-POFile-SpellExtra: Agrahayana Bud Shr Guruvãra Mañ Gur Vaishākh Jya\n" +"X-POFile-SpellExtra: Kārtik Agr Jyaishtha Kār Āsh Bhā Rav milisegundo\n" +"X-POFile-SpellExtra: Āsw Mañgalvã Sanivãra Mayek Ol Saurashtra\n" +"X-POFile-SpellExtra: Sundanês Viet Lisu Kayah Chiki Lepcha Meetei Cham\n" +"X-POFile-SpellExtra: Rejang Tham Bamum Pshoment Pas Ptiou Neh Genbot Hamus\n" +"X-POFile-SpellExtra: Pag Paope Pesnau Pes Hed Magabit Ehu Tahsas Yak Mag\n" +"X-POFile-SpellExtra: Tob Pef Kou Pam Pao Tequemt Paremhotep Psh nabot\n" +"X-POFile-SpellExtra: Hathor Pso Kiahk Hat Meo Psa Sene Psabbaton Miy\n" +"X-POFile-SpellExtra: Pashons Mes LarguraxAltura Kia Qedame Ham Gen Hedar\n" +"X-POFile-SpellExtra: Parmoute Teq Mesore Nehase Kouji Yakatit Maksegno\n" +"X-POFile-SpellExtra: Paone Sen Meshir Pagumen Thoout Hamle Epe Mak\n" +"X-POFile-SpellExtra: Tkyriakē Ehud Tho Qed Pti Psoou Segno Tah Rob\n" +"X-POFile-SpellExtra: Miyazya Meskerem Tobe Peftoou Epep Tky pastabase Fã\n" +"X-POFile-SpellExtra: KVTML USD Colaborativos Hunspell Jovie AM PM mails\n" +"X-POFile-SpellExtra: mbuttonGroup Blog blog np cp nc UTC Mandaico Batak\n" +"X-POFile-SpellExtra: DQTDECLARATIVEDEBUG QML slot pedro mantê Pocinhas\n" +"X-POFile-SpellExtra: Reconstrói ii Del iii querê KPackage\n" +"X-POFile-IgnoreConsistency: Update\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "José Nuno Pires" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "zepires@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Consola de aplicações QML do KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "O nome único da aplicação (obrigatório)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Carregue no botão, depois introduza a combinação de teclas que deseja no " +"programa.\n" +"Exemplo para o Ctrl+A: mantenha carregada a tecla Ctrl e depois carregue em " +"A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Atalho Reservado" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"A tecla F12 está reservada no Windows e não pode ser usada como atalho " +"global.\n" +"Por favor, escolha outra qualquer." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflito com o Atalho-Padrão da Aplicação" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"A combinação de teclas '%1' já foi atribuída à acção global \"%2\", que é " +"usada por algumas aplicações.\n" +"Deseja mesmo usá-la também como um atalho global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Atribuir de Novo" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nenhum" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "A tecla que acabou de pressionar não é suportada pelo Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla Não Suportada" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage Inválido '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Não foi indicado nenhum ficheiro QML" diff --git a/po/pt_BR/kdeclarative5.po b/po/pt_BR/kdeclarative5.po new file mode 100644 index 0000000..8e0c27f --- /dev/null +++ b/po/pt_BR/kdeclarative5.po @@ -0,0 +1,128 @@ +# Translation of kdeclarative5.po to Brazilian Portuguese +# Copyright (C) 2002-2020 This file is copyright: +# This file is distributed under the same license as the PACKAGE package. +# +# Lisiane Sztoltz , 2002, 2003, 2004. +# Lisiane Sztoltz Teixeira , 2003, 2004, 2005. +# Henrique Pinto , 2003. +# Marcus Gama , 2006. +# Diniz Bortolotto , 2007, 2008. +# André Marcelo Alvarenga , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Luiz Fernando Ranghetti , 2008, 2009, 2010, 2012, 2019. +# Fernando Boaglio , 2009. +# Doutor Zero , 2007, 2009. +# Marcus Vinícius de Andrade Gama , 2010, 2012. +# Aracele Torres , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-09 23:30-0300\n" +"Last-Translator: André Marcelo Alvarenga \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 19.04.3\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "André Marcelo Alvarenga" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "alvarenga@kde.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Console de aplicativos QML do KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "O único nome do aplicativo (obrigatório)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Clique no botão e depois informe o atalho como faria no programa.\n" +"Exemplo para o Ctrl+A: Mantenha pressionada a tecla Ctrl e pressione a tecla " +"A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Atalho reservado" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"A tecla F12 está reservada no Windows e, por isso, não pode ser usada como " +"atalho global.\n" +"Escolha outra tecla." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflito com o atalho padrão do aplicativo" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"A combinação de teclas '%1' está atribuída para a ação padrão \"%2\", usada " +"por alguns aplicativos.\n" +"Deseja realmente usá-la como um atalho global?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reatribuir" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Entrada" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nenhum" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "A tecla que você pressionou não é suportada pelo Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tecla não suportada" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "KPackage inválido '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Nenhum arquivo QML indicado" diff --git a/po/ro/kdeclarative5.po b/po/ro/kdeclarative5.po new file mode 100644 index 0000000..d43585c --- /dev/null +++ b/po/ro/kdeclarative5.po @@ -0,0 +1,125 @@ +# Traducerea kdelibs4.po în Română +# LaurenÅ£iu Buzdugan , 2008, 2009. +# Sergiu Bivol , 2008, 2009, 2010. +# Sergiu Bivol , 2010, 2012, 2013, 2014. +# Cristian Oneț , 2010, 2011, 2012, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2014-03-26 19:20+0200\n" +"Last-Translator: Sergiu Bivol \n" +"Language-Team: Romanian \n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Claudiu Costin,Sergiu Bivol,Laurențiu Buzdugan,Cristian Oneț" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr ",sergiu@ase.md,lbuz@rolix.org,onet.cristian@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "Definește fontul aplicației" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Apăsați butonul apoi introduceți scurtătura la fel cum ați face în " +"aplicație.\n" +"De exemplu pentru un Ctrl+a: tineți tasta Ctrl apăsată și tastați a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Scurtătură rezervată" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tasta F12 este rezervată în Windows și nu poate fi utilizată ca accelerator " +"global.\n" +"Alegeți alta." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Conflict cu un accelerator standard de aplicație" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Combinația de taste „%1” a fost deja alocată pentru acțiunea globală „%2” pe " +"care o folosesc unele aplicații.\n" +"Sigur doriți să o utilizați și pe aceasta ca globală?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Reatribuie" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Introduceți" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Niciuna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Tasta pe care tocmai ați apăsat-o nu este susținută de Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tastă nesuportată" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Element nevalid." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ru/kdeclarative5.po b/po/ru/kdeclarative5.po new file mode 100644 index 0000000..cb09e4f --- /dev/null +++ b/po/ru/kdeclarative5.po @@ -0,0 +1,138 @@ +# KDE - kdelibs/kdelibs4.po Russian translation. +# Copyright (C) 2005, KDE Russian translation team. +# +# Denis Perchine , 2000. +# Gregory Mokhin , 2000, 2004, 2005. +# Albert R. Valiev , 2002, 2008. +# Leonid Kanter , 2002-2004, 2005, 2008. +# Andrey Cherepanov , 2005-2007, 2008, 2009, 2011. +# Nick Shaforostoff , 2004, 2006, 2007, 2008, 2009. +# Nick Shaforostoff , 2009. +# Alexander Potashev , 2009, 2010, 2011, 2014, 2015, 2019. +# Yury G. Kudryashov , 2011. +# Yuri Efremov , 2012. +# Inga Barinova , 2012. +# Julia Dronova , 2012. +# Alexander Lakhin , 2013. +# Alexander Yavorsky , 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-18 18:00+0300\n" +"Last-Translator: Alexander Yavorsky \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.12.1\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Григорий Мохин,Николай Шафоростов,Андрей Черепанов,Леонид Кантер,Альберт " +"Валиев" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"mok@kde.ru,shaforostoff@kde.ru,skull@kde.ru,leon@asplinux.ru," +"darkstar@altlinux.ru" + +# BUGME: can we translate KPackage somehow? --aspotashev +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Оболочка для запуска приложений на KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Уникальное имя приложения (обязательно)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Нажмите на кнопке и введите комбинацию клавиш.\n" +"Например, для комбинации клавиш Ctrl+A зажмите клавишу Ctrl и нажмите A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Зарезервированная комбинация клавиш" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"В Windows клавиша F12 зарезервирована, поэтому её нельзя использовать в " +"глобальных комбинациях клавиш.\n" +"Выберите другую комбинацию клавиш." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Конфликт со стандартной клавишей приложения" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбинация клавиш %1 уже связана со стандартным действием «%2», используемым " +"во многих программах.\n" +"Вы действительно хотите использовать эту комбинацию как глобальную?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Связать с новым" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Сейчас" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Не определена" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Нажатая клавиша не поддерживается в Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Клавиша не поддерживается" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Неверный пакет KPackage «%1»" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Отсутствует файл QML" diff --git a/po/se/kdeclarative5.po b/po/se/kdeclarative5.po new file mode 100644 index 0000000..638c7bc --- /dev/null +++ b/po/se/kdeclarative5.po @@ -0,0 +1,120 @@ +# Translation of kdeclarative5 to Northern Sami +# +# Børre Gaup , 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-05-30 23:19+0200\n" +"Last-Translator: Børre Gaup \n" +"Language-Team: Northern Sami \n" +"Language: se\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Coahkkal boalu, de deaddil njuolggobálgá nugo áiggut geavahit dan " +"prográmmas.\n" +"Ovdamearka dihte Ctrl+a: Doala Ctrl-boalu ja deaddil a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Várrejuvvon njuolggobálggis" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12-boalus lea erenoamáš mearkkaÅ¡upmi Windowsis, nu ahte dan ii sáhte " +"geavahit globálalaÅ¡ njuolggobálggisin.\n" +"Válljes eará njuolggobálgá." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikta standardprográmma njuolggobálgáin" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"«%1» boallokombinaÅ¡uvdna geavahuvvo juo standárdan «%2»-doibmii . Máŋga " +"prográmma geavahit dan juo.\n" +"Háliidatgo duođas geavahit dán globála njuolggobálggisin?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Bija ođđasit" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Mearrit njuolggobálgá" + +# unreviewed-context +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ii mihkkige" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ii doarjjo boalu maid easka deaddilit." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Doarjjokeahtes boallu" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/si/kdeclarative5.po b/po/si/kdeclarative5.po new file mode 100644 index 0000000..c66dd1f --- /dev/null +++ b/po/si/kdeclarative5.po @@ -0,0 +1,114 @@ +# This file is distributed under the same license as the PACKAGE package. +# +# Danishka Navin , 2008, 2009, 2010, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-07-25 07:45+0530\n" +"Last-Translator: Danishka Navin \n" +"Language-Team: Sinhala \n" +"Language: si\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +" \n" +" \n" +"X-Generator: Lokalize 1.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ඩනිෂ්ක නවින්" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "danishka@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "යෙදුම් අක්‍ෂර දක්වන්න කරන්න" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "වෙන් කළ කෙටි මාර්‍ගය" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "සම්මත වැඩසටහන් කෙටි මඟ සමඟ ගැටේ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' යතුරු සංයෝජනය සමහර වැඩසටහන් භාවිතා කරන \"%2\" සම්මත ක්‍රියාව සඳහාද භාවිතා කරයි.\n" +"ඔබට ඇත්ත වශයෙන්ම එය ලෝකව්‍යාප්ත කෙටි මඟක් වශයෙනුත් භාවිතා කිරීමට අවශ්‍යද?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "යළි පැවරීම" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ප්‍රධානය" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "කිසිවක් නැත" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, fuzzy, kde-format +#| msgid "The key you just pressed isn't supported by Qt." +msgid "The key you just pressed is not supported by Qt." +msgstr "ඔබ දැන් එබූ යතුර Qt මඟින් සහය දක්වන්නේ නැත." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "සහාය නොදන්නා යතුරු" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "InvalidCA" +msgid "Invalid KPackage '%1'" +msgstr "InvalidCA" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/sk/kdeclarative5.po b/po/sk/kdeclarative5.po new file mode 100644 index 0000000..f35f051 --- /dev/null +++ b/po/sk/kdeclarative5.po @@ -0,0 +1,127 @@ +# translation of kdelibs4.po to Slovak +# Stanislav Visnovsky , 2002. +# Stanislav Visnovsky , 2003, 2004, 2005. +# Richard Fric , 2006, 2007, 2010. +# Michal Gaspar , 2006. +# Jakub , 2009. +# Michal Sulek , 2009, 2010, 2011. +# Richard Frič , 2011. +# Roman Paholík , 2012, 2013, 2014, 2015. +# Matej Mrenica , 2019. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-10-10 20:01+0200\n" +"Last-Translator: Matej Mrenica \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.08.2\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Stanislav Višňovský,Richard Frič,Michal GaÅ¡par,Jakub Vatrt,Michal Å ulek" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"visnovsky@kde.org,Richard.Fric@kdemail.net,miguel@portugal.sk,vatrtj@gmail." +"com,misurel@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Shell KPackage QML aplikácie" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Jedinečný názov pre aplikáciu (povinné)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kliknite na tlačidlo a potom zadajte skratku, ktorú chcete použiÅ¥ v " +"programe.\n" +"Príklad pre Ctrl+A: držte klávesu Ctrl a stlačte A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervovaná skratka" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Klávesa F12 je vo Windows rezervovaná, takže nemôže byÅ¥ použitá pre globálnu " +"skratku.\n" +"Prosím vyberte inú." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt so Å¡tandardnou skratkou aplikácie" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Klávesová kombinácia '%1' je už používaná pre Å¡tandardnú akciu \"%2\", ktorú " +"používa viacero aplikácií.\n" +"Naozaj ju chcete použiÅ¥ ako globálnu klávesovú skratku?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Znovu priradiÅ¥" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Vstup" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Žiadna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Práve stlačená klávesa nie je podporovaná v Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodporovaná klávesa" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid KPackage" +msgid "Invalid KPackage '%1'" +msgstr "Neplatný KPackage" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Žiadny QML nebol poskytnutý" diff --git a/po/sl/kdeclarative5.po b/po/sl/kdeclarative5.po new file mode 100644 index 0000000..7f5a772 --- /dev/null +++ b/po/sl/kdeclarative5.po @@ -0,0 +1,130 @@ +# translation of kdelibs4.po to Slovenian +# Translation of kdelibs4.po to Slovenian +# KDELIBS translation to Slovenian language +# $Id: kdelibs4.po 685926 2007-07-10 04:25:11Z scripty $ +# $Source$ +# +# Copyright (C) 2002,2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# Roman Maurer , 2002. +# Gregor Rakar , 2002,2003. +# Gregor Rakar , 2003, 2004, 2005. +# Andrej Vernekar , 2005, 2007, 2008, 2009, 2010. +# Jure Repinc , 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. +# Andrej Vernekar , 2008, 2011, 2012. +# Andrej Mernik , 2012, 2013, 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2015-04-03 10:02+0200\n" +"Last-Translator: Andrej Mernik \n" +"Language-Team: Slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" +"%100==4 ? 3 : 0);\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Roman Maurer,Gregor Rakar,Andrej Vernekar,Jure Repinc,Andrej Mernik" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"roman.maurer@amis.net,gregor.rakar@kiss.si,andrej.vernekar@gmail.com," +"jlp@holodeck1.com,andrejm@ubuntu.si" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Programska lupina KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Edinstveno ime programa (obvezno)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kliknite gumb in nato vnesite bližnjico, kot bi jo v programu.\n" +"Primer za Ctrl+A: držite pritisnjeno tipko Ctrl in pritisnite tipko A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervirana bližnjica" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tipka F12 je rezervirana v Windows, zato ne more biti uporabljena za sploÅ¡no " +"bližnjico.\n" +"Izberite drugo." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Spor z običajnimi bližnjicami programov" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Zaporedje tipk »%1« se uporablja tudi pri standardnemu dejanju »%2«, ki \n" +"ga uporabljajo nekateri programi.\n" +"Ali ga res želite uporabiti tudi za sploÅ¡no bližnjico?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Prestavi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Vhod" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Brez" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ne podpira tipke, ki ste jo ravnokar pritisnili." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodprta tipka" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Neveljaven predmet." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/sq/kdeclarative5.po b/po/sq/kdeclarative5.po new file mode 100644 index 0000000..3d6e44f --- /dev/null +++ b/po/sq/kdeclarative5.po @@ -0,0 +1,112 @@ +# Agron Selimaj , 2012. +msgid "" +msgstr "" +"Project-Id-Version: kde4libs\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-01-19 00:20-0500\n" +"Last-Translator: Agron Selimaj \n" +"Language-Team: Albanian \n" +"Language: sq\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Launchpad-Export-Date: 2010-11-24 03:19+0000\n" +"X-Generator: Lokalize 1.2\n" + +#, fuzzy, kde-format +#| msgid "without name" +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "pa emër" + +#, fuzzy, kde-format +#| msgid "without name" +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "pa emër" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "përkufizon gërmat e programit" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Create Web Shortcut" +msgid "Reserved Shortcut" +msgstr "Krijo Shkurtore Web-i" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflike me Shkurtoren e Programit Standart" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ricakto" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Hyrja" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Asnjë" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, fuzzy, kde-format +#| msgid "The socket operation is not supported" +msgid "The key you just pressed is not supported by Qt." +msgstr "Veprimi i socket nuk suportohet" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "invalid flags" +msgid "Invalid KPackage '%1'" +msgstr "flamurë të pavlefshëm" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/sr/kdeclarative5.po b/po/sr/kdeclarative5.po new file mode 100644 index 0000000..ef8fea3 --- /dev/null +++ b/po/sr/kdeclarative5.po @@ -0,0 +1,118 @@ +# Translation of kdeclarative5.po into Serbian. +# Marko Rosic , 2003. +# Toplica Tanaskovic , 2003, 2004, 2005. +# Chusslove Illich , 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017. +# Dalibor Djuric , 2009, 2010, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2019-02-04 03:08+0100\n" +"PO-Revision-Date: 2017-09-28 17:57+0200\n" +"Last-Translator: Chusslove Illich \n" +"Language-Team: Serbian \n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" +"X-Wrapping: fine\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Часлав Илић" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "caslav.ilic@gmx.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "КуМЛ програмска шкољка за KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Јединствено име програма (обавезно)" + +#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108 +#, fuzzy, kde-format +#| msgctxt "No shortcut defined" +#| msgid "None" +msgid "None" +msgstr "ниједна" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Кликните на дугме, па унесите пречицу као што бисте у програму.\n" +"Пример за Ctrl+A: држите тастер Ctrl и притисните A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Резервисана пречица" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:277 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Тастер F12 је резервисан на Виндоузу, па се не може користити као глобална " +"пречица.\n" +"Изаберите неку другу." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Сукоб са стандардном програмском пречицом" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:334 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбинација тастера %1 већ је додељена стандардној радњи „%2“, коју користе " +"неки програми.\n" +"Желите ли заиста да је користите и као глобалну пречицу?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:339 +#, kde-format +msgid "Reassign" +msgstr "Поново додели" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:381 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "унесите..." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:388 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ниједна" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:409 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "КуТ не подржава тастер који сте управо притиснули." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:410 +#, kde-format +msgid "Unsupported Key" +msgstr "Неподржани тастер" diff --git a/po/sr@ijekavian/kdeclarative5.po b/po/sr@ijekavian/kdeclarative5.po new file mode 100644 index 0000000..7d810fd --- /dev/null +++ b/po/sr@ijekavian/kdeclarative5.po @@ -0,0 +1,117 @@ +# Translation of kdeclarative5.po into Serbian. +# Marko Rosic , 2003. +# Toplica Tanaskovic , 2003, 2004, 2005. +# Chusslove Illich , 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017. +# Dalibor Djuric , 2009, 2010, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2019-02-04 03:08+0100\n" +"PO-Revision-Date: 2017-09-28 17:57+0200\n" +"Last-Translator: Chusslove Illich \n" +"Language-Team: Serbian \n" +"Language: sr@ijekavian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Часлав Илић" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "caslav.ilic@gmx.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "КуМЛ програмска шкољка за KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Јединствено име програма (обавезно)" + +#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108 +#, fuzzy, kde-format +#| msgctxt "No shortcut defined" +#| msgid "None" +msgid "None" +msgstr "ниједна" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Кликните на дугме, па унесите пречицу као што бисте у програму.\n" +"Примјер за Ctrl+A: држите тастер Ctrl и притисните A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Резервисана пречица" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:277 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Тастер F12 је резервисан на Виндоузу, па се не може користити као глобална " +"пречица.\n" +"Изаберите неку другу." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Сукоб са стандардном програмском пречицом" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:334 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбинација тастера %1 већ је додијељена стандардној радњи „%2“, коју " +"користе неки програми.\n" +"Желите ли заиста да је користите и као глобалну пречицу?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:339 +#, kde-format +msgid "Reassign" +msgstr "Поново додијели" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:381 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "унесите..." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:388 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ниједна" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:409 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "КуТ не подржава тастер који сте управо притиснули." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:410 +#, kde-format +msgid "Unsupported Key" +msgstr "Неподржани тастер" diff --git a/po/sr@ijekavianlatin/kdeclarative5.po b/po/sr@ijekavianlatin/kdeclarative5.po new file mode 100644 index 0000000..6fecede --- /dev/null +++ b/po/sr@ijekavianlatin/kdeclarative5.po @@ -0,0 +1,117 @@ +# Translation of kdeclarative5.po into Serbian. +# Marko Rosic , 2003. +# Toplica Tanaskovic , 2003, 2004, 2005. +# Chusslove Illich , 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017. +# Dalibor Djuric , 2009, 2010, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2019-02-04 03:08+0100\n" +"PO-Revision-Date: 2017-09-28 17:57+0200\n" +"Last-Translator: Chusslove Illich \n" +"Language-Team: Serbian \n" +"Language: sr@ijekavianlatin\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Časlav Ilić" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "caslav.ilic@gmx.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "QML programska Å¡koljka za KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Jedinstveno ime programa (obavezno)" + +#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108 +#, fuzzy, kde-format +#| msgctxt "No shortcut defined" +#| msgid "None" +msgid "None" +msgstr "nijedna" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kliknite na dugme, pa unesite prečicu kao Å¡to biste u programu.\n" +"Primjer za Ctrl+A: držite taster Ctrl i pritisnite A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervisana prečica" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:277 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Taster F12 je rezervisan na Windowsu, pa se ne može koristiti kao globalna " +"prečica.\n" +"Izaberite neku drugu." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Sukob sa standardnom programskom prečicom" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:334 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacija tastera %1 već je dodijeljena standardnoj radnji „%2“, koju " +"koriste neki programi.\n" +"Želite li zaista da je koristite i kao globalnu prečicu?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:339 +#, kde-format +msgid "Reassign" +msgstr "Ponovo dodijeli" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:381 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "unesite..." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:388 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "nijedna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:409 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ne podržava taster koji ste upravo pritisnuli." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:410 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodržani taster" diff --git a/po/sr@latin/kdeclarative5.po b/po/sr@latin/kdeclarative5.po new file mode 100644 index 0000000..35b1c95 --- /dev/null +++ b/po/sr@latin/kdeclarative5.po @@ -0,0 +1,117 @@ +# Translation of kdeclarative5.po into Serbian. +# Marko Rosic , 2003. +# Toplica Tanaskovic , 2003, 2004, 2005. +# Chusslove Illich , 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017. +# Dalibor Djuric , 2009, 2010, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2019-02-04 03:08+0100\n" +"PO-Revision-Date: 2017-09-28 17:57+0200\n" +"Last-Translator: Chusslove Illich \n" +"Language-Team: Serbian \n" +"Language: sr@latin\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Časlav Ilić" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "caslav.ilic@gmx.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "QML programska Å¡koljka za KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Jedinstveno ime programa (obavezno)" + +#: qmlcontrols/kcmcontrols/qml/GridDelegate.qml:108 +#, fuzzy, kde-format +#| msgctxt "No shortcut defined" +#| msgid "None" +msgid "None" +msgstr "nijedna" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Kliknite na dugme, pa unesite prečicu kao Å¡to biste u programu.\n" +"Primer za Ctrl+A: držite taster Ctrl i pritisnite A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rezervisana prečica" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:277 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Taster F12 je rezervisan na Windowsu, pa se ne može koristiti kao globalna " +"prečica.\n" +"Izaberite neku drugu." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Sukob sa standardnom programskom prečicom" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:334 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Kombinacija tastera %1 već je dodeljena standardnoj radnji „%2“, koju " +"koriste neki programi.\n" +"Želite li zaista da je koristite i kao globalnu prečicu?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:339 +#, kde-format +msgid "Reassign" +msgstr "Ponovo dodeli" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:381 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "unesite..." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:388 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "nijedna" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:409 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt ne podržava taster koji ste upravo pritisnuli." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:410 +#, kde-format +msgid "Unsupported Key" +msgstr "Nepodržani taster" diff --git a/po/sv/kdeclarative5.po b/po/sv/kdeclarative5.po new file mode 100644 index 0000000..8f24ba3 --- /dev/null +++ b/po/sv/kdeclarative5.po @@ -0,0 +1,128 @@ +# translation of kdelibs4.po to Swedish +# Översättning kdelibs4.po till Svenska +# +# Copyright (C) 1997,2002,2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# Magnus Reftel , 1997. +# Anders Widell , 1998-2000. +# Per Lindström , 2000. +# Mattias Newzella , 2000, 2001, 2002,2003, 2004, 2005. +# Stefan Asserhäll , 2002. +# Stefan Asserhäll , 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Stefan Asserhall , 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +# Arve Eriksson <031299870@telia.com>, 2011. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 17:56+0100\n" +"Last-Translator: Stefan Asserhäll \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.04.3\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Magnus Reftel,Anders Widell,Per Lindström,Mattias Newzella,Stefan Asserhäll" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"d96reftl@dtek.chalmers.se,awl@hem.passagen.se,pelinstr@algonet.se," +"newzella@linux.nu,stefan.asserhall@telia.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML-programskal" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Programmets unika namn (krävs)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Klicka pÃ¥ knappen, och skriv därefter in genvägen som du skulle göra i " +"programmet.\n" +"Exempel för Ctrl+A: HÃ¥ll nere Ctrl-tangenten och tryck pÃ¥ A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Reserverad genväg" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Tangenten F12 är reserverad pÃ¥ Windows, och kan inte användas som global " +"snabbtangent.\n" +"Välj en annan tangent." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Konflikt med standardsnabbtangenter för program" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tangentkombinationen '%1' används ocksÃ¥ för standardÃ¥tgärden \"%2\" som " +"vissa program använder.\n" +"Vill du verkligen ocksÃ¥ använda den som global snabbtangent?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Ändra tilldelning" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Inmatning" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ingen" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Tangenten du just tryckte ner stöds inte av Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tangent som inte stöds" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Ogiltigt KPackage '%1'" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Ingen QML-fil tillhandahÃ¥llen" diff --git a/po/ta/kdeclarative5.po b/po/ta/kdeclarative5.po new file mode 100644 index 0000000..443a977 --- /dev/null +++ b/po/ta/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to தமிழ் +# Copyright (C) 2000,2002, 2004, 2007, 2008 Free Software Foundation, Inc. +# +# Sivakumar Shanmugasundaram , 2000. +# Thuraiappah Vaseeharan , 2000-2001. +# à®®. ஸ்ரீ ராமதாஸ் | Sri Ramadoss M , 2007-2012 +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-03-25 21:39+0530\n" +"Last-Translator: Sri Ramadoss M \n" +"Language-Team: Tamil \n" +"Language: ta\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "à®®. ஸ்ரீ ராமதாஸ்" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "amachu@yavarkkum.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "நிரலின் மின்னெழுத்தை வரையறையும்" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"பொத்தனைச் சொடுக்கி, நிரலில் நீங்கள் விரும்பும் சுருக்கு வழியை இடவும்.\n" +"Ctrl+a க்கான உதாரணம்: Ctrl விசையை அழுத்தியபடிய a தட்டவும்" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "ஒதுக்கப்பட்ட சுருக்குவழி" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 விண்டோஸ்க்காக ஒதுக்கப்பட்டுள்ளதுஇ ஆகையால் பொதுவான சுருக்கு வழியாக பயன்படுத்த " +"முடியாது.\n" +"எனவே வோறொன்றை தேர்வு செய்யவும்." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "வழக்கமான பயன்பாட்டு சுருக்கு வழியுடன் முரண்" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' விசைக் கூட்டு ஏற்கனவே சில பயன்பாடுகளில் பயன்படுத்தப் படும் \"%2\" செயலுக்காக " +"பணிக்கப்பட்டுள்ளது. \n" +"இருப்பினும் இதனைத் தாங்கள் பொது சுருக்குவழியாகவும் பயன்படுத்த விழைகிறீர்களா?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "மீளமர்த்துக" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "உள்ளீடு" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ஏதுமற்ற" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "நீங்கள் இப்போடு தட்டிய விசை Qt யால் ஆதரிக்கப்படவில்லை." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ஆதரிக்கப்படாத துப்பு" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "செல்லாத உருப்படி." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/te/kdeclarative5.po b/po/te/kdeclarative5.po new file mode 100644 index 0000000..0d6e3ab --- /dev/null +++ b/po/te/kdeclarative5.po @@ -0,0 +1,119 @@ +# translation of kdelibs4.po to Telugu +# +# +# Purushottam Boyanapalli , 2005. +# విజయ్ కిరణ్ కముజు , 2007. +# pavithran , 2007. +# Krishna Babu K , 2008, 2009. +# sreekalyanbapatla , 2013. +# GVS.Giri , 2013. +# Bhuvan Krishna ,2013. +# Naveen Kandimalla ,2013. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-11-04 23:55+0630\n" +"Last-Translator: Bhuvan Krishna \n" +"Language-Team: Telugu \n" +"Language: te\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "విజయ్ కిరణ్ కముజు,కృష్ణబాబు కె, భువన్ కృష్ణ, జి వి యస్ గిరి, శ్రీ కళ్యన్న్, ననిన్" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"infyquest@gmail.com,kkrothap@redhat.com,bhuvan@swecha.org,gvs.giri@swecha." +"net,sreekalyan3@gmail.com,naveen@swecha.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "అనువర్తనము అక్షరరూపమును నిర్వచిస్తుంది" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "నిలిపిఉంచి శీఘ్ర మార్గము" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "ప్రామాణిక కార్యక్రమ శీఘ్రమార్గంతొ ఘర్షణ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "మళ్లి నియమించు" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "ఇన్పుట్" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ఏదీ వద్దు" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "మీరు వాడిన మీట qt సహాయము తీసుకోలేదు" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "మద్దతు చేయని కీ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "వస్తువు నిస్సారం" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/tg/kdeclarative5.po b/po/tg/kdeclarative5.po new file mode 100644 index 0000000..cf8aa91 --- /dev/null +++ b/po/tg/kdeclarative5.po @@ -0,0 +1,121 @@ +# translation of kdelibs4.po to Tajik Language +# Copyright (C) 2004, 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2004, 2005, 2006, 2007 infoDev, a World Bank organization. +# 2004, 2005, 2006, 2007 Khujand Computer Technologies, Inc. +# 2004, 2005, 2006, 2007 Youth Opportunities, NGO, 2005. +# Roger Kovacs , 2003. +# Thomas Diehl , 2003. +# Victor Ibragimov , 2003, 2004, 2005, 2006, 2007, 2008, 2019. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2019-12-26 21:21+0500\n" +"Last-Translator: Victor Ibragimov \n" +"Language-Team: English \n" +"Language: tg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.04.3\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Victor Ibragimov" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "victor.ibragimov@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "Восити барномаи KPackage QML" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Номи мушаххаси барнома (ҳатмӣ)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Тугмаро зер кунед, пас миёнбуреро мисли дар барнома будан ворид намоед.\n" +"Барои мисол, барои Ctrl+A: тугмаи Ctrl-ро доред ва тугмаи A-ро пахш намоед." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Миёнбури маҳдудшуда" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Тугмаи F12 дар низоми Windows маҳдуд карда шудааст, то ки натавонад барои " +"миёнбурҳои умумӣ истифода бурда шавад.\n" +"Лутфан, тугмаи дигареро интихоб намоед." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Ихтилоф бо миёнбурҳои барномавии стандартӣ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Пайвасшавии тугмаи '%1' инчунин барои амали стандартии \"%2\" дар баъзеи " +"барномаҳо истифода мешавад.\n" +"Шумо мехоҳед, ки онро низ ҳамчун миёнбури умумӣ истифода баред?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Аз нав таъйин кардан" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Вуруд" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Ҳеҷ чиз" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Тугмае, ки шумо ҳоло зер кардед аз ҷониби Qt дастгирӣ намешавад." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Тугмаи нокорам" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid KPackage" +msgid "Invalid KPackage '%1'" +msgstr "KPackage беэътибор аст" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Ягон файли QML таъмин карда нашуд" diff --git a/po/th/kdeclarative5.po b/po/th/kdeclarative5.po new file mode 100644 index 0000000..cb71849 --- /dev/null +++ b/po/th/kdeclarative5.po @@ -0,0 +1,125 @@ +# translation of kdelibs4.po to Thai +# Copyright (C) 2003,2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Thanomsub Noppaburana , 2003,2004, 2005. +# Thanomsub Noppaburana , 2005, 2008, 2010. +# Sahachart Anukulkitch , 2006, 2007. +# Narachai Sakorn , 2008. +# Phuwanat Sakornsakolpat , 2010. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2010-12-31 22:47+0700\n" +"Last-Translator: Phuwanat Sakornsakolpat \n" +"Language-Team: Thai \n" +"Language: th\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ถนอมทรัพย์ นพบูรณ์, สหชาติ อนุกูลกิจ" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "donga.nb@gmail.com, drrider@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "กำหนดแบบอักษรของโปรแกรม" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"คลิกบนปุ่ม จากนั้นป้อนปุ่มพิมพ์ลัดที่คุณต้องการจะใช้ในโปรแกรม\n" +"ตัวอย่างเช่น Ctrl+a: กดปุ่มพิมพ์ Ctrl ค้างเอาไว้ ตามด้วยการกดปุมพิมพ์ a" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "ปุ่มพิมพ์ลัดที่ถูกสงวนไว้" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"ปุ่มพิมพ์ F12 นั้นถูกสงวนไว้บนระบบวินโดวส์ " +"ดังนั้นจึงไม่สามารถนำมาใช้งานเป็นปุ่มพิมพ์ลัดใช้งานส่วนรวมได้\n" +"โปรดเลือกปุ่มพิมพ์อื่น ๆ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "เกิดความขัดแย้งกับปุ่มพิมพ์ลัดมาตรฐานของโปรแกรม" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"ปุ่มพิมพ์ลัด '%1' นี้ ถูกจองไว้ใช้งานกับการกระทำมาตรฐาน \"%2\" ซึ่งมีบางโปรแกรมใช้อยู่\n" +"คุณต้องการจะใช้มันเป็นปุ่มพิมพ์ลัดใช้งานส่วนรวมของมันเช่นกันหรือไม่ ?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "กำหนดใหม่" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "กดปุ่มพิมพ์" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "ไม่มี" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "ปุ่มพิมพ์ที่คุณเพิ่งกด ยังไม่ถูกรองรับโดย Qt" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ปุ่มพิมพ์ที่ยังไม่รองรับ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "รายการใช้งานไม่ได้" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/tr/kdeclarative5.po b/po/tr/kdeclarative5.po new file mode 100644 index 0000000..9cf9678 --- /dev/null +++ b/po/tr/kdeclarative5.po @@ -0,0 +1,134 @@ +# translation of kdelibs4.po to Turkish +# translation of kdelibs4.po to +# Kdelibs Turkish translation file +# Copyright (C) 2000,2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# +# Ömer Fadıl USTA ,1999-2002. +# Görkem Çetin , 2002,2003, 2004. +# Tuncay YENİAY ,2002. +# Ayşe Genç , 2005. +# Görkem Çetin , 2005. +# Görkem Çetin , 2005. +# Bekir SONAT , 2005. +# Serdar Soytetir , 2007. +# Serdar Soytetir , 2007, 2008, 2009, 2011. +# H. İbrahim Güngör , 2010, 2011. +# Ozan Çağlayan , 2010, 2011. +# Serdar SOYTETİR , 2010, 2012. +# Volkan Gezer , 2013, 2014. +# Kaan Ozdincer , 2014. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2015-05-19 10:02+0000\n" +"Last-Translator: Necdet \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.4\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Serdar Soytetir, Görkem Çetin, H. İbrahim Güngör, Volkan Gezer" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"tulliana@gmail.com, gorkem@kde.org, ibrahim@pardus.org.tr, volkangezer@gmail." +"com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML uygulama kabuğu" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Uygulamanın benzersiz ismi (zorunlu)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Düğmeye tıklayın, ardından kısayol tuşlarına basın.\n" +"Ctrl+A örneği için: Ctrl tuşuna basılı tutun ve A tuşuna basın." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Ayrılmış Kısayol" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 kısayolu Windows üzerinde önceden atanmış olduğundan genel kısayol " +"olarak kullanılamaz.\n" +"Lütfen başka bir tuş seçin." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Standart Uygulama Kısayolu ile Çakışma" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' tuş kombinasyonu zaten başka bir uygulamanın \"%2\" eylemine " +"ayrılmıştı.\n" +"Bu kombinasyonu şu anki eylem için yeniden atamak ister misiniz?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Yeniden Ata" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Girdi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Hiçbiri" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Şimdi bastığınız tuş Qt tarafından desteklenmiyor." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Desteklenmeyen Tuş" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Geçersiz öge." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/tt/kdeclarative5.po b/po/tt/kdeclarative5.po new file mode 100644 index 0000000..a4fc08b --- /dev/null +++ b/po/tt/kdeclarative5.po @@ -0,0 +1,122 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Ainur Shakirov , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2011-11-26 15:12+0400\n" +"Last-Translator: Ainur Shakirov \n" +"Language-Team: Tatar <>\n" +"Language: tt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.2\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Ainur Shakirov" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "ainur.shakirov.tt@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "кушымтаның хәрефен билгели" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Нажмите на кнопке и введите комбинацию клавиш.\n" +"Например, для комбинации клавиш Ctrl+A зажмите клавишу Ctrl и нажмите A." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Зарезервированная комбинация клавиш" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"В Windows клавиша F12 зарезервирована, поэтому её нельзя использовать в " +"глобальных комбинациях клавиш.\n" +"Выберите другую комбинацию клавиш." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Стандартлы төймә функциясе белән конфликт" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбинация клавиш %1 уже связана со стандартным действием «%2», используемым " +"во многих программах.\n" +"Вы действительно хотите использовать эту комбинацию как глобальную?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Яңа белән бәйләү" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Кертү" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Юк" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Басылган төймә Qt коралы белән тотылмый." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Төймә тотылмый" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Тотылмаган элемент." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/ug/kdeclarative5.po b/po/ug/kdeclarative5.po new file mode 100644 index 0000000..6c1911b --- /dev/null +++ b/po/ug/kdeclarative5.po @@ -0,0 +1,123 @@ +# Uyghur translation for kdelibs4. +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Sahran , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2013-09-08 07:05+0900\n" +"Last-Translator: Gheyret Kenji \n" +"Language-Team: Uyghur Computer Science Association \n" +"Language: ug\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 1.5.5\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "ئابدۇقادىر ئابلىز, غەيرەت كەنجى" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "sahran.ug@gmail.com, gheyret@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "پروگرامما خەت نۇسخا بەلگىلەش" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"بۇ توپچىنى چېكىپ، ئاندىن بۇ پروگراممىغا تېزلەتمە كىرگۈزۈڭ.\n" +"مەسىلەن، Ctrl+a يەنى Ctrl كۇنۇپكىسىنى بېسىپ تۇرۇپ ئاندىن a كۇنۇپكا بېسىلىدۇ." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "بەلگىلىنىپ بولغان تېزلەتمە" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 بولسا Windows دا بەلگىلىنىپ بولغان، شۇڭا ئومۇمىيەت تېزلەتمىدە ئىشلەتكىلى " +"بولمايدۇ\n" +"باشقا كۇنۇپكا تاللاڭ." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "پروگراممىنىڭ ئۆلچەملىك تېزلەتمىسى بىلەن توقۇنۇشۇپ قالدى" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"بىرىكمە كۇنۇپكا '%1' بىر قانچە پروگراممىلاردا ئۆلچەملىك مەشغۇلات \"%2\" " +"ئۈچۈن بېكىتىلگەن\n" +"بۇنى راستلا ئومۇمىيەت تېزلەتمە سۈپىتىدە ئىشلىتەمسىز؟" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "قايتا تەقسىملە" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "كىرگۈز" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "يوق" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "باسقان كۇنۇپكىنى Qt دا ئىشلەتكىلى بولمايدۇ." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "ئىشلەتكىلى بولمايدىغان كۇنۇپكا" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "ئىناۋەتسىز تۈر." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/uk/kdeclarative5.po b/po/uk/kdeclarative5.po new file mode 100644 index 0000000..75973b5 --- /dev/null +++ b/po/uk/kdeclarative5.po @@ -0,0 +1,123 @@ +# Translation of kdeclarative5.po to Ukrainian +# Copyright (C) 2018-2020 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Eugene Onischenko , 2002, 2003, 2004, 2005, 2006. +# Andriy Rysin , 2002, 2003, 2006, 2007. +# Ivan Petrouchtchak , 2005, 2006, 2007, 2008. +# Yuri Chornoivan , 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdeclarative5\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-08 09:08+0200\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 20.03.70\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Юрій Чорноіван" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "yurchor@ukr.net" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "QML-оболонка програм KPackage" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "Унікальна назва програми (обов’язкова)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Натисніть кнопку, а потім введіть клавіатурне скорочення, яке ви бажаєте " +"використовувати у програмі.\n" +"Наприклад, для Ctrl+A: натисніть клавішу Ctrl, а потім клавішу «A»." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Зарезервоване скорочення" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Клавішу F12 у Windows зарезервовано. Її не можна використовувати для " +"створення загального клавіатурного скорочення.\n" +"Будь ласка, оберіть іншу клавішу." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Конфлікт зі скороченнями стандартних програм" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Комбінація клавіш «%1» вже прив'язана до стандартної дії «%2», яку " +"використовують багато інших програм.\n" +"Ви дійсно хочете використовувати її також як загальне скорочення?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Перепризначити" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Ввід" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Немає" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Клавіша, яку ви тільки-но використали, не підтримується Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Непідтримувана клавіша" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Некоректний KPackage «%1»" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "Не надано файла QML" diff --git a/po/uz/kdeclarative5.po b/po/uz/kdeclarative5.po new file mode 100644 index 0000000..0e5363a --- /dev/null +++ b/po/uz/kdeclarative5.po @@ -0,0 +1,112 @@ +# translation of kdelibs4.po to Uzbek +# Mashrab Kuvatov , 2003, 2004, 2005, 2006, 2008. +# translation of kdelibs4.po to +# Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2008-05-30 17:29+0200\n" +"Last-Translator: Mashrab Kuvatov \n" +"Language-Team: Uzbek \n" +"Language: uz\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Mashrab Quvatov" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kmashrab@uni-bremen.de" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "dastur uchun shriftni aniqlaydi" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Tugmalar birikmasi" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Dasturning andoza tugmalar birikmasi bilan muammo" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"\"%1\" tugma birikmasi allaqachon \"%2\" andoza amali bilan bogÊ»langan.\n" +"Uni joriy amal bilan bogÊ»lashni istaysizmi?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Kiritish fayli" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "YoÊ»q" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +msgid "Unsupported Key" +msgstr "Ishonchsiz" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Sertifikat haqiqiy emas!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/uz@cyrillic/kdeclarative5.po b/po/uz@cyrillic/kdeclarative5.po new file mode 100644 index 0000000..a50d842 --- /dev/null +++ b/po/uz@cyrillic/kdeclarative5.po @@ -0,0 +1,112 @@ +# translation of kdelibs4.po to Uzbek +# translation of kdelibs4.po to +# Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +# Mashrab Kuvatov , 2003, 2004, 2005, 2006, 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2009-10-17 00:34+0200\n" +"Last-Translator: Mashrab Kuvatov \n" +"Language-Team: Uzbek \n" +"Language: uz\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Машраб Қуватов" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kmashrab@uni-bremen.de" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "дастур учун шрифтни аниқлайди" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Тугмалар бирикмаси" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Дастурнинг андоза тугмалар бирикмаси билан муаммо" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"\"%1\" тугма бирикмаси аллақачон \"%2\" андоза амали билан боғланган.\n" +"Уни жорий амал билан боғлашни истайсизми?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Киритиш файли" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Йўқ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +msgid "Unsupported Key" +msgstr "Ишончсиз" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Сертификат ҳақиқий эмас!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/vi/kdeclarative5.po b/po/vi/kdeclarative5.po new file mode 100644 index 0000000..8bf86bd --- /dev/null +++ b/po/vi/kdeclarative5.po @@ -0,0 +1,124 @@ +# Vietnamese translation for kdelibs. +# Copyright © 2007 KDE i18n Project for Vietnamese. +# +# Clytie Siddall , 2006-2007. +# Hoàng Đức Hiếu , 2008, 2011. +# Lê Hoàng Phương , 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-09-23 18:43+0800\n" +"Last-Translator: Lê Hoàng Phương \n" +"Language-Team: American English \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 1.5\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Nhóm Việt hoá KDE" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kde-l10n-vi@kde.org" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "định nghÄ©a phông chữ cho ứng dụng đó" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, fuzzy, kde-format +#| msgid "" +#| "Click on the button, then enter the shortcut like you would in the " +#| "program.\n" +#| "Example for Ctrl+a: hold the Ctrl key and press a." +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"Nhấn vào nút, sau đó nhập phím tắt bạn muốn dùng.\n" +"Ví dụ cho Ctrl + a: nhấn phím Ctrl và nhấn a." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Phím tắt dá»± trữ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"Phím F12 được dá»± trữ cho cá»­a sổ, vì vậy không thể dùng làm phím tắt toàn hệ " +"thống.\n" +"Hãy chọn phím khác." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Xung đột với phím tắt ứng dụng chuẩn" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Tổ hợp phím '%1' cÅ©ng được dùng cho hành động chuẩn \"%2\" do nhiều ứng dụng " +"sá»­ dụng.\n" +"Bạn có muốn sá»­ dụng nó như một phím tắt toàn hệ thống không?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Gán lại" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Gõ" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Không" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Phím bạn vừa nhấn không được hỗ trợ bởi Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Phím không hỗ trợ" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid certificate" +msgid "Invalid KPackage '%1'" +msgstr "Chứng nhận không hợp lệ" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/wa/kdeclarative5.po b/po/wa/kdeclarative5.po new file mode 100644 index 0000000..a29ba21 --- /dev/null +++ b/po/wa/kdeclarative5.po @@ -0,0 +1,118 @@ +# translation of kdelibs4.po to Walloon +# Ratournaedje e walon des messaedjes di KDE. +# +# Lorint Hendschel , 2002. +# Pablo Saratxaga , 2002-2004, 2007. +# Jean Cayron , 2007, 2008, 2009, 2010, 2011. +# Jean Cayron , 2007. +# Jean Cayron , 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2012-07-04 17:33+0200\n" +"Last-Translator: Jean Cayron \n" +"Language-Team: Walloon \n" +"Language: wa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-Language: Walloon\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Lorint Hendschel,Pablo Saratxaga,Djan Cayron" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "laurent.hendschel@skynet.be,pablo@walon.org,jean.cayron@gmail.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "definixh li fonte do programe" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "Rascourti rizervé" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Gn a fortcherwaedje avou les rascourtis standÃ¥rds di l' aplicÃ¥cion" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"L' atelêye di tapes « %1 » sieve ossu po l' accion standÃ¥rd « %2 » ki " +"sacwants programes s' endè siervèt.\n" +"El voloz vormint eployî po on rascourti globÃ¥ eto?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "Raroyî" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "Intrêye" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "Nolu" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Li tape ki vos vnoz d' tchôkî n' est nén sopoirtêye pa Qt." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "Tape nén sopoirtêye" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +#| msgid "Invalid item." +msgid "Invalid KPackage '%1'" +msgstr "Mwais cayet." + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/xh/kdeclarative5.po b/po/xh/kdeclarative5.po new file mode 100644 index 0000000..25ab9df --- /dev/null +++ b/po/xh/kdeclarative5.po @@ -0,0 +1,118 @@ +# translation of kdelibs4.po to +# translation of kdelibs4.po to +# translation of kdelibs4.po to +# translation of kdelibs4.po to Xhosa +# K Desktop Environment - kdelibs +# Copyright (C) 2001 translate.org.za +# Antoinette Dekeni , 2001. +# Lwandle Mgidlana , 2002 +# Thelma Lungcuzo , 2002 +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2002-12-13 17:20SAST\n" +"Last-Translator: Lwandle Mgidlana \n" +"Language-Team: Xhosa \n" +"Language: xh\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.0beta2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#, fuzzy, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Igama elitsha lenginginya." + +#, fuzzy, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "Igama elitsha lenginginya." + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "ichaza isicelo sohlobo lwamagama." + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "Indlela emfutshane" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "Ungqubano Nesicelo Esisezantsi Sendlela emfutshane" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"Indibaniselwano '%1' yesitshixo sele inikezelwe kwi \"%2\"ntshukumo.\n" +"Nceda khetha indibaniselwano yesinye isitshixo." + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, fuzzy, kde-format +msgid "Reassign" +msgstr "Isirashiya" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "&Igalelo Elisuka" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "Akukho nanye" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +msgid "Unsupported Key" +msgstr "Engenasihloko" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "Isiqinisekiso esingasebenziyo!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/zh_CN/kdeclarative5.po b/po/zh_CN/kdeclarative5.po new file mode 100644 index 0000000..b404ff6 --- /dev/null +++ b/po/zh_CN/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to Chinese Simplified +# Copyright (C) 2007 Free Software Foundation, Inc. +# +# Lie Ex 2007-2011. +# Wang Jian , 1998. +# Sarah Smith , 2002. +# Xiong Jiang , 2002,2003,2004. +# Funda Wang , 2002,2003,2004. +# Liang Qi , 2007. +# Feng Chao , 2010, 2012, 2014, 2019, 2020. +# Ni Hui , 2010, 2011, 2012. +# Weng Xuetian , 2011, 2012, 2013, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kdeorg\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-03-25 19:51\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Chinese Simplified\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Crowdin-Project: kdeorg\n" +"X-Crowdin-Language: zh-CN\n" +"X-Crowdin-File: /kf5-trunk/messages/frameworks/kdeclarative5.pot\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "KDE 中国, Feng Chao" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "kde-china@kde.org, chaofeng111@qq.com" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML 应用程序外壳" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "应用程序唯一名称(必须)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"单击此按钮,然后输入您要为此程序设定的快捷方式。\n" +"比如 Ctrl+A 就是按住 Ctrl 键再按下 A。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "保留快捷方式" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 在 Windows 系统中是一个保留键,无法被用于全局快捷键。\n" +"请另选一个。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "与标准程序快捷键冲突" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"组合键“%1”已被其它一些程序使用的标准动作“%2”占用。\n" +"您真的想要将它也作为全局快捷键使用吗?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "重新指派" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "输入" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "无" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "Qt 尚不支持您刚才按下的键。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "不支持的键" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "非法 KPackage“%1”" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "未提供 QML 文件" diff --git a/po/zh_HK/kdeclarative5.po b/po/zh_HK/kdeclarative5.po new file mode 100644 index 0000000..b984874 --- /dev/null +++ b/po/zh_HK/kdeclarative5.po @@ -0,0 +1,140 @@ +# translation of kdelibs4.po to Chinese (Hong Kong) +# Chinese (traditional) translation for kdeutils +# Copyright (C) 2001, 02, 04, 05 Free Software Foundation, Inc. +# +# Eric Cheng , unknown. +# +# with reference from zh_CN translation (as of 2002-11-08): +# Chih-Wei Huang , 2001. +# Kenduest Lee , 2001. +# Jouston Huang (Huang, Jiun-Jeng) , 2002. +# Kenduest Lee , 2002. +# Wang Jian , 2002. +# Anthony Fok , 2002. +# Yuan-Chen Cheng , 2002. +# Wang Jian , 1998. +# Funda Wang , 2002. +# Sarah Smith , 2002. +# Xiong Jiang , 2002. +# Chia-Lin, Kao , 2004. +# Stanley Wong , 2005. +# Abel Cheung , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2006-01-04 13:32+0800\n" +"Last-Translator: Abel Cheung \n" +"Language-Team: Chinese (Hong Kong) \n" +"Language: zh_HK\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.3\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" +"Chih-Wei Huang,Kenduest Lee,Jouston Huang (Jiun-Jeng Huang),Kenduest Lee," +"Wang Jian,Anthony Fok,Yuan-Chen Cheng,Wang Jian,Funda Wang,Sarah Smith,Xiong " +"Jiang,Kao Chia-Lin,Stanley Wong" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" +"cwhuang@linux.org.tw,kenduest@i18n.linux.org.tw,jouston@housediy.com," +"kenduest@i18n.linux.org.tw,lark@linux.net.cn,anthony@thizlinux.com," +"ycheng@slat.org,lark@linux.ustc.edu.cn,fundawang@en2china.com,sarahs@redhat." +"com,jxiong@offtopic.org,acelan@linux.org.tw,stanley18fan0k@yahoo.com.hk" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "" + +#: kpackagelauncherqml/main.cpp:50 +#, fuzzy, kde-format +#| msgid "defines the application font" +msgid "The unique name of the application (mandatory)" +msgstr "定義應用程式字型。" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, fuzzy, kde-format +#| msgid "Shortcut" +msgid "Reserved Shortcut" +msgstr "快速鍵" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "與標準的應用程式快速鍵定義衝突" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, fuzzy, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"'%1' 按鍵組合已配置給標準 \"%2\" 動作。\n" +"你確定要重新設定此組合鍵給此動作?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "重新指定" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, fuzzy, kde-format +#| msgid "Input file" +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "輸入檔案" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, fuzzy, kde-format +#| msgid "None" +msgctxt "No shortcut defined" +msgid "None" +msgstr "無" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, fuzzy, kde-format +#| msgid "Untrusted" +msgid "Unsupported Key" +msgstr "不可信的" + +#: quickaddons/configmodule.cpp:176 +#, fuzzy, kde-format +msgid "Invalid KPackage '%1'" +msgstr "不合法的證書!" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "" diff --git a/po/zh_TW/kdeclarative5.po b/po/zh_TW/kdeclarative5.po new file mode 100644 index 0000000..e199aed --- /dev/null +++ b/po/zh_TW/kdeclarative5.po @@ -0,0 +1,124 @@ +# translation of kdelibs4.po to Chinese Traditional +# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Eric Cheng , unknown. +# This file referenced zh_CN translations at 2002. +# Chih-Wei Huang , 2001. +# Kenduest Lee , 2001, 2002. +# Jouston Huang (Huang, Jiun-Jeng) , 2002. +# Chia-Lin, Kao , 2004. +# Yuan-Chen Cheng , 2002. +# Goodhorse , 2008. +# Frank Weng (a.k.a. Franklin) , 2006-2009, 2010. +# Franklin Weng , 2010, 2011, 2012. +# Franklin Weng , 2010, 2011, 2012, 2013, 2014, 2015. +# pan93412 , 2019, 2020. +msgid "" +msgstr "" +"Project-Id-Version: kdelibs4\n" +"Report-Msgid-Bugs-To: https://bugs.kde.org\n" +"POT-Creation-Date: 2020-04-11 02:47+0200\n" +"PO-Revision-Date: 2020-01-09 18:07+0800\n" +"Last-Translator: pan93412 \n" +"Language-Team: Chinese \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 19.12.0\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#, kde-format +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Franklin Weng" + +#, kde-format +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "franklin@goodhorse.idv.tw" + +#: kpackagelauncherqml/main.cpp:43 +#, kde-format +msgid "KPackage QML application shell" +msgstr "KPackage QML 應用程式 shell" + +#: kpackagelauncherqml/main.cpp:50 +#, kde-format +msgid "The unique name of the application (mandatory)" +msgstr "應用程式的名稱(主要)" + +#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:53 +#, kde-format +msgid "" +"Click on the button, then enter the shortcut like you would in the program.\n" +"Example for Ctrl+A: hold the Ctrl key and press A." +msgstr "" +"點擊此按鍵,並輸入您要在程式裡做的動作。\n" +"例如 Ctrl+A:按住 Ctrl 鍵並按 A。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:288 +#, kde-format +msgid "Reserved Shortcut" +msgstr "保留的捷徑" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:289 +#, kde-format +msgid "" +"The F12 key is reserved on Windows, so cannot be used for a global " +"shortcut.\n" +"Please choose another one." +msgstr "" +"F12 鍵是 Windows 的保留鍵,無法做為全域捷徑。\n" +"請另外選一個鍵。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:345 +#, kde-format +msgid "Conflict with Standard Application Shortcut" +msgstr "與標準的應用程式快捷鍵定義衝突" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:346 +#, kde-format +msgid "" +"The '%1' key combination is also used for the standard action \"%2\" that " +"some applications use.\n" +"Do you really want to use it as a global shortcut as well?" +msgstr "" +"%1 組合鍵已經用於許多應用程式會用到的標準動作「%2」了。您確定要使用它做為全域" +"的快捷鍵嗎?" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:351 +#, kde-format +msgid "Reassign" +msgstr "重新指定" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:393 +#, kde-format +msgctxt "What the user inputs now will be taken as the new shortcut" +msgid "Input" +msgstr "輸入" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:400 +#, kde-format +msgctxt "No shortcut defined" +msgid "None" +msgstr "無" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:421 +#, kde-format +msgid "The key you just pressed is not supported by Qt." +msgstr "您剛才按的鍵並未被 Qt 所支援。" + +#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:422 +#, kde-format +msgid "Unsupported Key" +msgstr "不支援的按鍵。" + +#: quickaddons/configmodule.cpp:176 +#, kde-format +msgid "Invalid KPackage '%1'" +msgstr "「%1」KPackage 無效" + +#: quickaddons/configmodule.cpp:182 +#, kde-format +msgid "No QML file provided" +msgstr "未提供 QML 檔案" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..e18f769 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,41 @@ +if(KF5Config_FOUND AND KF5I18n_FOUND AND KF5IconThemes_FOUND AND KF5KIO_FOUND) + add_subdirectory(kdeclarative) +endif() + +add_subdirectory(quickaddons) +add_subdirectory(qmlcontrols) +add_subdirectory(kpackagelauncherqml) +add_subdirectory(calendarevents) + +if(BUILD_QCH) + ecm_add_qch( + KF5Declarative_QCH + NAME KDeclarative + BASE_NAME KF5Declarative + VERSION ${KF5_VERSION} + ORG_DOMAIN org.kde + SOURCES # using only public headers, to cover only public API + ${KQuickAddons_QCH_SOURCES} + ${KDeclarative_QCH_SOURCES} + MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" + LINK_QCHS + Qt5Qml_QCH + KF5Config_QCH + KF5Package_QCH + INCLUDE_DIRS + ${KQuickAddons_QCH_INCLUDE_DIRS} + ${KDeclarative_QCH_INCLUDE_DIRS} + BLANK_MACROS + KDECLARATIVE_EXPORT + KDECLARATIVE_DEPRECATED + KDECLARATIVE_DEPRECATED_EXPORT + "KDECLARATIVE_DEPRECATED_VERSION(x, y, t)" + QUICKADDONS_EXPORT + QUICKADDONS_DEPRECATED + QUICKADDONS_DEPRECATED_EXPORT + "QUICKADDONS_DEPRECATED_VERSION(x, y, t)" + TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} + QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} + COMPONENT Devel + ) +endif() diff --git a/src/Messages.sh b/src/Messages.sh new file mode 100755 index 0000000..86690ed --- /dev/null +++ b/src/Messages.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources. +# The results are stored in a pseudo .cpp file to be picked up by xgettext. +lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` +if [ -n "$lst" ] ; then + $EXTRACTRC $lst >> rc.cpp +fi + +# If your framework contains tips-of-the-day, call preparetips as well. +if [ -f "data/tips" ] ; then + ( cd data && $PREPARETIPS > ../tips.cpp ) +fi + +# Extract strings from all source files. +# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation +# system, use $EXTRACT_TR_STRINGS. +$XGETTEXT `find . -name \*.cpp -o -name \*.h -o -name \*.qml` -o $podir/kdeclarative5.pot diff --git a/src/calendarevents/CMakeLists.txt b/src/calendarevents/CMakeLists.txt new file mode 100644 index 0000000..a4ce72a --- /dev/null +++ b/src/calendarevents/CMakeLists.txt @@ -0,0 +1,33 @@ +set(calendar-integration_SRCS + calendareventsplugin.cpp + eventdata_p.cpp +) + +add_library(KF5CalendarEvents SHARED ${calendar-integration_SRCS}) +generate_export_header(KF5CalendarEvents BASE_NAME CalendarEvents) +add_library(KF5::CalendarEvents ALIAS KF5CalendarEvents) + +target_link_libraries(KF5CalendarEvents PUBLIC Qt5::Core) + +target_include_directories(KF5CalendarEvents INTERFACE "$") +set_target_properties(KF5CalendarEvents PROPERTIES VERSION ${KDECLARATIVE_VERSION_STRING} + SOVERSION ${KDECLARATIVE_SOVERSION} + EXPORT_NAME CalendarEvents +) + +install(TARGETS KF5CalendarEvents EXPORT KF5DeclarativeTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) + +ecm_generate_headers(CalendarEvents_CamelCase_HEADERS + HEADER_NAMES + CalendarEventsPlugin + + PREFIX CalendarEvents + REQUIRED_HEADERS calendareventsplugin.h +) +install(FILES ${CalendarEvents_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/CalendarEvents COMPONENT Devel) + +install (FILES + calendareventsplugin.h + ${CMAKE_CURRENT_BINARY_DIR}/calendarevents_export.h + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/calendarevents COMPONENT Devel +) diff --git a/src/calendarevents/CalendarEventsConfig.cmake.in b/src/calendarevents/CalendarEventsConfig.cmake.in new file mode 100644 index 0000000..351e0a6 --- /dev/null +++ b/src/calendarevents/CalendarEventsConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + +include("${CMAKE_CURRENT_LIST_DIR}/CalendarEventsTargets.cmake") diff --git a/src/calendarevents/calendareventsplugin.cpp b/src/calendarevents/calendareventsplugin.cpp new file mode 100644 index 0000000..4a9f153 --- /dev/null +++ b/src/calendarevents/calendareventsplugin.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2015 Martin Klapetek + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "calendareventsplugin.h" + +namespace CalendarEvents { + +CalendarEventsPlugin::CalendarEventsPlugin(QObject *parent) + : QObject(parent) +{ + +} + +CalendarEventsPlugin::~CalendarEventsPlugin() +{ + +} + +ShowEventInterface::~ShowEventInterface() = default; + +} diff --git a/src/calendarevents/calendareventsplugin.h b/src/calendarevents/calendareventsplugin.h new file mode 100644 index 0000000..081ea56 --- /dev/null +++ b/src/calendarevents/calendareventsplugin.h @@ -0,0 +1,258 @@ +/* + * Copyright 2015 Martin Klapetek + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef CALENDAREVENTSPLUGIN_H +#define CALENDAREVENTSPLUGIN_H + +#include +#include +#include +#include + +#include "calendarevents_export.h" + +namespace CalendarEvents { + +class CALENDAREVENTS_EXPORT EventData +{ +public: + enum EventType { + Holiday, // Any holiday + Event, // General event + Todo // A Todo item + }; + + EventData(); + EventData(const EventData &other); + ~EventData(); + + EventData &operator=(const EventData &other); + + /** + * The start date and time of this event + */ + QDateTime startDateTime() const; + + /** + * Set the start date-time of this event + * + * @param startDateTime the date-time of when the event is starting + */ + void setStartDateTime(const QDateTime &startDateTime); + + /** + * The end date and time of this event + */ + QDateTime endDateTime() const; + + /** + * Set the end date-time of this event + * + * @param endDateTime the date-time of when the event is ending + */ + void setEndDateTime(const QDateTime &endDateTime); + + /** + * If true, this event goes on the whole day (eg. a holiday) + */ + bool isAllDay() const; + + /** + * If set to true, it will be displayed in the Calendar agenda + * without any time besides it, marked as "going on all day" + * + * This is useful for single-day events only, for multiple-day + * events, leave to false (default) + * + * @param isAllDay set to true if the event takes all day, false otherwise + * (defaults to false) + */ + void setIsAllDay(bool isAllDay); + + /** + * If true, this event won't mark the day in the calendar grid + * The main purpose for this flag is to support + * namedays, where in some countries the calendars have + * different name in them every day. This is just a minor holiday + * and as such should not mark the calendar grid, otherwise + * the whole grid would be in a different color. + */ + bool isMinor() const; + + /** + * If set to true, it won't be marked in the calendar grid + * + * @param isMinor true if it's a minor event (like a nameday holiday), + * false otherwise (defaults to false) + */ + void setIsMinor(bool isMinor); + + /** + * Event title + */ + QString title() const; + + /** + * Sets the title of the event + * + * @param title The event title + */ + void setTitle(const QString &title); + + /** + * Event description, can provide more details about the event + */ + QString description() const; + + /** + * Sets the event description, which allows to add more details + * about this event + * + * @param description The description + */ + void setDescription(const QString &description); + + /** + * Type of the current event, eg. a holiday, an event or a todo item + */ + EventType type() const; + + /** + * Sets the event type, eg. a holiday, an event or a todo item + * + * @param type The event type, + */ + void setEventType(EventType type); + + /** + * The color that should be used to mark this event with + * It comes in the HTML hex format, eg. #AARRGGBB or #RRGGBB + */ + QString eventColor() const; + + /** + * This is to support various calendar colors the user might + * have configured elsewhere + * + * @param color The color for this event in the HTML hex format + * eg. #AARRGGBB or #RRGGBB (this is passed directly + * to QML) + */ + void setEventColor(const QString &color); + + /** + * Unique ID of the event + */ + QString uid() const; + + /** + * Sets the uid of the event + * + * This is a mandatory field only if you want to use + * the eventModified/eventRemoved signals, otherwise + * setting it is optional + * + * @param uid A unique id, recommended is to use the plugin name as prefix (to keep it unique) + */ + void setUid(const QString &uid); + +private: + class Private; + QSharedDataPointer d; +}; + +class CALENDAREVENTS_EXPORT CalendarEventsPlugin : public QObject +{ + Q_OBJECT + +public: + explicit CalendarEventsPlugin(QObject *parent = nullptr); + virtual ~CalendarEventsPlugin(); + + /** + * When this is called, the plugin should load all events data + * between those two date ranges. Once the data are ready, it should + * just emit the dataReady() signal. The range is usually one month + * + * @param startDate the start of the range + * @param endDate the end of the range + */ + virtual void loadEventsForDateRange(const QDate &startDate, const QDate &endDate) = 0; + +Q_SIGNALS: + /** + * Emitted when the plugin has loaded the events data + * + * @param data A hash containing a QDate key for the event + * in the value, CalendarEvents::EventData, which holds all + * the details for the given event + * It's a multihash as there can be multiple events + * in the same day + * For multi-day events, insert just one with the key + * being the startdate of the event + */ + void dataReady(const QMultiHash &data); + + /** + * Should be emitted when there is a modification of an event + * that was previously returned via the dataReady() signal + * + * @param event The modified event data + */ + void eventModified(const CalendarEvents::EventData &modifiedEvent); + + /** + * Should be emitted when the plugin removes some event + * from its collection + * + * @param uid The uid of the event that was removed + */ + void eventRemoved(const QString &uid); +}; + +/** + * Interface for displaying event details + * + * ShowEventInterface is an additional interface the CalendarEventsPlugin + * implementations can implement if they support displaying details about + * events (e.g. opening the event in KOrganizer). + * + * @since 5.61 + */ +class CALENDAREVENTS_EXPORT ShowEventInterface +{ +public: + virtual ~ShowEventInterface(); + + /** + * When this is called, the plugin should show a window displaying the + * full preview of the event. + * + * The plugin should return true if the event details can be displayed, false + * otherwise. + */ + virtual bool showEvent(const QString &uid) = 0; +}; + +} + +Q_DECLARE_INTERFACE(CalendarEvents::CalendarEventsPlugin, "org.kde.CalendarEventsPlugin") +Q_DECLARE_INTERFACE(CalendarEvents::ShowEventInterface, "org.kde.CalendarEventsPlugin.ShowEventInterface") + +#endif diff --git a/src/calendarevents/eventdata_p.cpp b/src/calendarevents/eventdata_p.cpp new file mode 100644 index 0000000..5e303ec --- /dev/null +++ b/src/calendarevents/eventdata_p.cpp @@ -0,0 +1,170 @@ +/* + * Copyright 2015 Martin Klapetek + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "calendareventsplugin.h" + +#include + +class CalendarEvents::EventData::Private : public QSharedData { +public: + Private() : isAllDay(false), isMinor(false) {} + Private(const Private &other) + : QSharedData(other) + { + startDateTime = other.startDateTime; + endDateTime = other.endDateTime; + title = other.title; + description = other.description; + uid = other.uid; + eventColor = other.eventColor; + type = other.type; + isAllDay = other.isAllDay; + isMinor = other.isMinor; + } + ~Private() {} + QDateTime startDateTime; // Start of the event + QDateTime endDateTime; // End of the event + QString title; // Title of the event + QString description; // Additional info of the event + QString uid; // An internal event id, useful mostly just for the eventModified/Removed signals + QString eventColor; // Optional color of the event in the HTML hex format, eg. #AARRGGBB or #RRGGBB + EventType type; // Type of the event + bool isAllDay; // True if the event takes all day, then it won't be displayed with any time + bool isMinor; // A minor holiday that will not create a colored entry in the calendar +}; + +//--------------------------------------------------- + +namespace CalendarEvents { + +EventData::EventData() + : d(new Private()) +{ +} + +EventData::EventData(const EventData &other) + : d(other.d) +{ +} + +EventData::~EventData() +{ +} + +EventData& EventData::operator=(const EventData &other) +{ + if (this == &other) { + return *this; + } + + d = other.d; + return *this; +} + +QDateTime EventData::startDateTime() const +{ + return d->startDateTime; +} + +void EventData::setStartDateTime(const QDateTime &startDateTime) +{ + d->startDateTime = startDateTime; +} + +QDateTime EventData::endDateTime() const +{ + return d->endDateTime; +} + +void EventData::setEndDateTime(const QDateTime &endDateTime) +{ + d->endDateTime = endDateTime; +} + +bool EventData::isAllDay() const +{ + return d->isAllDay; +} + +void EventData::setIsAllDay(bool isAllDay) +{ + d->isAllDay = isAllDay; +} + +bool EventData::isMinor() const +{ + return d->isMinor; +} + +void EventData::setIsMinor(bool isMinor) +{ + d->isMinor = isMinor; +} + +QString EventData::title() const +{ + return d->title; +} + +void EventData::setTitle(const QString &title) +{ + d->title = title; +} + +QString EventData::description() const +{ + return d->description; +} + +void EventData::setDescription(const QString &description) +{ + d->description = description; +} + +QString EventData::uid() const +{ + return d->uid; +} + +void EventData::setUid(const QString &uid) +{ + d->uid = uid; +} + +EventData::EventType EventData::type() const +{ + return d->type; +} + +void EventData::setEventType(EventData::EventType type) +{ + d->type = type; +} + +QString EventData::eventColor() const +{ + return d->eventColor; +} + +void EventData::setEventColor(const QString &color) +{ + d->eventColor = color; +} + +} diff --git a/src/kdeclarative/CMakeLists.txt b/src/kdeclarative/CMakeLists.txt new file mode 100644 index 0000000..b28fd85 --- /dev/null +++ b/src/kdeclarative/CMakeLists.txt @@ -0,0 +1,77 @@ + +set(kdeclarative_SRCS + configpropertymap.cpp + qmlobject.cpp + qmlobjectsharedengine.cpp + kdeclarative.cpp + private/kiconprovider.cpp + private/kioaccessmanagerfactory.cpp +) + +add_library(KF5Declarative ${kdeclarative_SRCS}) +add_library(KF5::Declarative ALIAS KF5Declarative) +ecm_generate_export_header(KF5Declarative + EXPORT_FILE_NAME ${KDeclarative_BINARY_DIR}/kdeclarative/kdeclarative_export.h + BASE_NAME KDeclarative + GROUP_BASE_NAME KF + VERSION ${KF5_VERSION} + DEPRECATED_BASE_VERSION 0 + DEPRECATION_VERSIONS 5.0 5.45 + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +) + +# Apps must include or +target_include_directories(KF5Declarative INTERFACE "$") + +target_link_libraries(KF5Declarative + PUBLIC + KF5::ConfigCore # KCoreConfigSkeleton, in ConfigPropertyMap + Qt5::Qml + KF5::Package + PRIVATE + Qt5::Quick #QQuickImageProvider + KF5::I18n #i18n bindings + KF5::KIOWidgets #KIO::AccessManager + KF5::IconThemes #KIconProvider +) +set(KDeclarative_BUILD_INCLUDE_DIRS ${KDeclarative_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(KF5Declarative PUBLIC "$") + +set_target_properties(KF5Declarative + PROPERTIES VERSION ${KDECLARATIVE_VERSION_STRING} + SOVERSION ${KDECLARATIVE_SOVERSION} + EXPORT_NAME Declarative +) + +# Install files +ecm_generate_headers(KDeclarative_CamelCase_HEADERS + HEADER_NAMES + KDeclarative + QmlObject + QmlObjectSharedEngine + ConfigPropertyMap + + PREFIX KDeclarative + REQUIRED_HEADERS KDeclarative_HEADERS +) +install(FILES ${KDeclarative_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/KDeclarative COMPONENT Devel) + +install(TARGETS KF5Declarative + EXPORT KF5DeclarativeTargets + ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} +) + +install(FILES + ${KDeclarative_BINARY_DIR}/kdeclarative/kdeclarative_export.h + ${KDeclarative_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/kdeclarative + COMPONENT Devel +) + +# make available to ecm_add_qch in parent folder +set(KDeclarative_QCH_SOURCES ${KDeclarative_HEADERS} PARENT_SCOPE) +set(KDeclarative_QCH_INCLUDE_DIRS ${KDeclarative_BUILD_INCLUDE_DIRS} PARENT_SCOPE) + +include(ECMGeneratePriFile) +ecm_generate_pri_file(BASE_NAME KDeclarative LIB_NAME KF5Declarative DEPS "qml" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative) +install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) diff --git a/src/kdeclarative/configpropertymap.cpp b/src/kdeclarative/configpropertymap.cpp new file mode 100644 index 0000000..bd877e3 --- /dev/null +++ b/src/kdeclarative/configpropertymap.cpp @@ -0,0 +1,158 @@ +/* + * Copyright 2013 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "configpropertymap.h" + +#include +#include +#include + +#include + +namespace KDeclarative { + +class ConfigPropertyMapPrivate { +public: + ConfigPropertyMapPrivate(ConfigPropertyMap *map) + : q(map) + { + } + + enum LoadConfigOption { + DontEmitValueChanged, + EmitValueChanged + }; + + void loadConfig(LoadConfigOption option); + void writeConfig(); + void writeConfigValue(const QString &key, const QVariant &value); + + ConfigPropertyMap *q; + QPointer config; + bool updatingConfigValue = false; + bool autosave = true; +}; + +ConfigPropertyMap::ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent) + : QQmlPropertyMap(this, parent), + d(new ConfigPropertyMapPrivate(this)) +{ + d->config = config; + + // Reload the config only if the change signal has *not* been emitted by ourselves updating the config + connect(config, &KCoreConfigSkeleton::configChanged, this, [this] () { + if (!d->updatingConfigValue) { + d->loadConfig(ConfigPropertyMapPrivate::EmitValueChanged); + } + }); + connect(this, &ConfigPropertyMap::valueChanged, this, + [this](const QString &key, const QVariant &value){d->writeConfigValue(key, value);}); + + d->loadConfig(ConfigPropertyMapPrivate::DontEmitValueChanged); +} + +ConfigPropertyMap::~ConfigPropertyMap() +{ + if (d->autosave) { + d->writeConfig(); + } + delete d; +} + +bool KDeclarative::ConfigPropertyMap::isAutosave() const +{ + return d->autosave; +} + +void ConfigPropertyMap::setAutosave(bool autosave) +{ + d->autosave = autosave; +} + +QVariant ConfigPropertyMap::updateValue(const QString &key, const QVariant &input) +{ + Q_UNUSED(key); + if (input.userType() == qMetaTypeId()) { + return input.value().toVariant(); + } + return input; +} + +bool ConfigPropertyMap::isImmutable(const QString &key) const +{ + KConfigSkeletonItem *item = d->config.data()->findItem(key); + if (item) { + return item->isImmutable(); + } + + return false; +} + +void ConfigPropertyMapPrivate::loadConfig(ConfigPropertyMapPrivate::LoadConfigOption option) +{ + if (!config) { + return; + } + + const auto &items = config.data()->items(); + for (KConfigSkeletonItem *item : items) { + q->insert(item->key(), item->property()); + if (option == EmitValueChanged) { + emit q->valueChanged(item->key(), item->property()); + } + } +} + +void ConfigPropertyMapPrivate::writeConfig() +{ + if (!config) { + return; + } + + const auto lstItems = config.data()->items(); + for (KConfigSkeletonItem *item : lstItems) { + item->setProperty(q->value(item->key())); + } + + if (autosave) { + updatingConfigValue = true; + config.data()->save(); + updatingConfigValue = false; + } +} + +void ConfigPropertyMapPrivate::writeConfigValue(const QString &key, const QVariant &value) +{ + KConfigSkeletonItem *item = config.data()->findItem(key); + if (item) { + updatingConfigValue = true; + item->setProperty(value); + if (autosave) { + config.data()->save(); + //why read? read will update KConfigSkeletonItem::mLoadedValue, + //allowing a write operation to be performed next time + config.data()->read(); + } + updatingConfigValue = false; + } +} + +} + +#include "moc_configpropertymap.cpp" diff --git a/src/kdeclarative/configpropertymap.h b/src/kdeclarative/configpropertymap.h new file mode 100644 index 0000000..811c12c --- /dev/null +++ b/src/kdeclarative/configpropertymap.h @@ -0,0 +1,78 @@ +/* + * Copyright 2013 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef CONFIGPROPERTYMAP_P +#define CONFIGPROPERTYMAP_P + +#include + +class KCoreConfigSkeleton; + +#include + +namespace KDeclarative { + +class ConfigPropertyMapPrivate; + +/** + * @class KDeclarative::ConfigPropertyMap configpropertymap.h KDeclarative/ConfigPropertyMap + * + * TODO + */ +class KDECLARATIVE_EXPORT ConfigPropertyMap : public QQmlPropertyMap +{ + Q_OBJECT + +public: + ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr); + ~ConfigPropertyMap() override; + + /** + * Indicates if the map calls save() on the config object on each write or not + * + * @return true if the map automatically saves (the default), false otherwise + * @since 5.65 + */ + bool isAutosave() const; + + /** + * Allows to set the map into autosave mode or not + * + * @param autosave the new value for autosaving + * @since 5.65 + */ + void setAutosave(bool autosave); + + /** + * @brief Whether the value at the given key is immutable + * + * @return true if the value is immutable, false if it isn't or it doesn't exist + */ + Q_INVOKABLE bool isImmutable(const QString &key) const; + +protected: + QVariant updateValue(const QString &key, const QVariant &input) override; +private: + ConfigPropertyMapPrivate *const d; + +}; + +} + +#endif diff --git a/src/kdeclarative/kdeclarative.cpp b/src/kdeclarative/kdeclarative.cpp new file mode 100644 index 0000000..da2f67d --- /dev/null +++ b/src/kdeclarative/kdeclarative.cpp @@ -0,0 +1,188 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "kdeclarative.h" +#include "private/kdeclarative_p.h" +#include "private/kiconprovider_p.h" +#include "private/kioaccessmanagerfactory_p.h" +#include "qmlobject.h" + +#include +#include +#include +#include + +#include +#include + +namespace KDeclarative { + +QStringList KDeclarativePrivate::s_runtimePlatform; + +KDeclarativePrivate::KDeclarativePrivate() + : contextObj(nullptr) +{ +} + +KDeclarative::KDeclarative() + : d(new KDeclarativePrivate) +{ +} + +KDeclarative::~KDeclarative() +{ + delete d; +} + +void KDeclarative::setDeclarativeEngine(QQmlEngine *engine) +{ + if (d->declarativeEngine.data() == engine) { + return; + } + d->declarativeEngine = engine; +} + +QQmlEngine *KDeclarative::declarativeEngine() const +{ + return d->declarativeEngine.data(); +} + +#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 0) +void KDeclarative::initialize() +{ +} +#endif + +#if KDECLARATIVE_BUILD_DEPRECATED_SINCE(5, 45) +void KDeclarative::setupBindings() +{ + setupContext(); + setupEngine(d->declarativeEngine.data()); +} +#endif + +void KDeclarative::setupContext() +{ + /*Create a context object for the root qml context. + in this way we can register global functions, in this case the i18n() family*/ + if (!d->contextObj) { + d->contextObj = new KLocalizedContext(d->declarativeEngine.data()); + } + + //If the engine is in a qmlObject take the qmlObject rootContext instead of the engine one. + if (d->qmlObj) { + d->qmlObj->rootContext()->setContextObject(d->contextObj); + } else { + d->declarativeEngine.data()->rootContext()->setContextObject(d->contextObj); + } + + if (!d->translationDomain.isNull()) { + d->contextObj->setTranslationDomain(d->translationDomain); + } +} + +void KDeclarative::setupEngine(QQmlEngine *engine) +{ + //get rid of stock network access manager factory + QQmlNetworkAccessManagerFactory *factory = engine->networkAccessManagerFactory(); + engine->setNetworkAccessManagerFactory(nullptr); + delete factory; + engine->setNetworkAccessManagerFactory(new KIOAccessManagerFactory()); + + /* Tell the engine to search for platform-specific imports first + (so it will "win" in import name resolution). + addImportPath adds the path at the beginning, so to honour user's + paths we need to traverse the list in reverse order */ + const QStringList pluginPathList = engine->importPathList(); + + const QString target = componentsTarget(); + if (target != defaultComponentsTarget()) { + const QStringList paths = pluginPathList; + QStringListIterator it(paths); + it.toBack(); + while (it.hasPrevious()) { + QString path = it.previous(); + path = path.left(path.lastIndexOf(QLatin1Char('/'))); + engine->addImportPath(path + QStringLiteral("/platformqml/") + target); + } + } + + // setup ImageProvider for KDE icons + engine->addImageProvider(QStringLiteral("icon"), new KIconProvider); +} + +void KDeclarative::setTranslationDomain(const QString &translationDomain) +{ + d->translationDomain = translationDomain; + if (d->contextObj) { + d->contextObj->setTranslationDomain(d->translationDomain); + } +} + +QString KDeclarative::translationDomain() const +{ + return d->translationDomain; +} + +void KDeclarative::setupQmlJsDebugger() +{ + if (QCoreApplication::arguments().contains(QLatin1String("-qmljsdebugger"))) { + QQmlDebuggingEnabler enabler; + } +} + +QString KDeclarative::defaultComponentsTarget() +{ + return QLatin1String("desktop"); +} + +QString KDeclarative::componentsTarget() +{ + const QStringList platform = runtimePlatform(); + if (platform.isEmpty()) { + return defaultComponentsTarget(); + } + + return platform.last(); +} + +QStringList KDeclarative::runtimePlatform() +{ + if (KDeclarativePrivate::s_runtimePlatform.isEmpty()) { + const QString env = QString::fromLocal8Bit(getenv("PLASMA_PLATFORM")); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + KDeclarativePrivate::s_runtimePlatform = QStringList(env.split(QLatin1Char(':'), QString::SkipEmptyParts)); +#else + KDeclarativePrivate::s_runtimePlatform = QStringList(env.split(QLatin1Char(':'), Qt::SkipEmptyParts)); +#endif + if (KDeclarativePrivate::s_runtimePlatform.isEmpty()) { + KConfigGroup cg(KSharedConfig::openConfig(), "General"); + KDeclarativePrivate::s_runtimePlatform = cg.readEntry(QStringLiteral("runtimePlatform"), KDeclarativePrivate::s_runtimePlatform); + } + } + + return KDeclarativePrivate::s_runtimePlatform; +} + +void KDeclarative::setRuntimePlatform(const QStringList &platform) +{ + KDeclarativePrivate::s_runtimePlatform = platform; +} + +} diff --git a/src/kdeclarative/kdeclarative.h b/src/kdeclarative/kdeclarative.h new file mode 100644 index 0000000..23c476c --- /dev/null +++ b/src/kdeclarative/kdeclarative.h @@ -0,0 +1,155 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KDECLARATIVE_H +#define KDECLARATIVE_H + +#include + +#include + +#include + +class QQmlEngine; + +namespace KDeclarative { + +class KDeclarativePrivate; + +/** + * @class KDeclarative::KDeclarative kdeclarative.h + * + * TODO + */ +class KDECLARATIVE_EXPORT KDeclarative +{ +public: + explicit KDeclarative(); + ~KDeclarative(); + + KDeclarative(const KDeclarative &) = delete; + KDeclarative &operator=(const KDeclarative &) = delete; + +#if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 0) + /** + * @deprecated since 5.0. The method is a no-op now, any call can be simply removed. + */ + KDECLARATIVE_DEPRECATED_VERSION(5, 0, "Is a no-op") + void initialize(); +#endif + +#if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 45) + /** + * Call this after setDeclarativeEngine to set the i18n global functions, the runtime platform, etc + * + * @deprecated since 5.45 use setupContext() and setupEngine() + */ + KDECLARATIVE_DEPRECATED_VERSION(5, 45, "See API docs") + void setupBindings(); +#endif + + /** + * Call this after setDeclarativeEngine to set the i18n global functions. + * + * @since 5.45 + * @sa setupEngine + */ + void setupContext(); + + void setDeclarativeEngine(QQmlEngine *engine); + QQmlEngine *declarativeEngine() const; + + /** + * Call this method before calling setupContext to install a translation domain for all + * i18n global functions. If a translation domain is set all i18n calls delegate to the + * matching i18nd calls with the provided translation domain. + * + * The translationDomain affects all i18n calls including those from imports. Because of + * that modules intended to be used as imports should prefer the i18nd variants and set + * the translation domain explicitly in each call. + * + * This method is only required if your declarative usage is inside a library. If it's + * in an application there is no need to set the translation domain as the application's + * domain can be used. + * + * @param translationDomain The translation domain to be used for i18n calls. + * @since 5.0 + */ + void setTranslationDomain(const QString &translationDomain); + + /** + * @return the translation domain for the i18n calls done in this QML engine + * @since 5.0 + */ + QString translationDomain() const; + + /** + * This method must be called very early at startup time to ensure the + * QQuickDebugger is enabled. Ideally it should be called in main(), + * after command-line options are defined. + */ + static void setupQmlJsDebugger(); + + /** + * @return the runtime platform, e.g. "desktop" or "tablet, touch". The first entry/ies in + * the list relate to the platform formfactor and the last is the input method + * specialization. If the string is empty, there is no specified runtime platform + * and a traditional desktop environment may be assumed + * @since 4.10 + */ + static QStringList runtimePlatform(); + + /** + * Sets the runtime platform from now on, globally to the process. + * Already loaded QML components won't be affected + */ + static void setRuntimePlatform(const QStringList &platform); + + /** + * @return the QML components target, based on the runtime platform. e.g. touch or desktop + * @since 4.10 + */ + static QString componentsTarget(); + + /** + * @return the default components target; can be used to compare against the returned value + * from @see componentsTarget() + * @since 4.10 + */ + static QString defaultComponentsTarget(); + + /** + * Setup the QML engine used by this KDeclarative object. + * + * This needs to be done only once per QQmlEngine instance. + * + * @since 5.45 + * @param engine The engine to setup + * @sa setupContext + */ + static void setupEngine(QQmlEngine *engine); + +private: + KDeclarativePrivate *const d; + friend class QmlObject; +}; + +} + +#endif diff --git a/src/kdeclarative/private/kdeclarative_p.h b/src/kdeclarative/private/kdeclarative_p.h new file mode 100644 index 0000000..47d36ff --- /dev/null +++ b/src/kdeclarative/private/kdeclarative_p.h @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KDECLARATIVE_P_H +#define KDECLARATIVE_P_H + +#include "kdeclarative.h" +#include "qmlobject.h" + +#include +#include + +namespace KDeclarative { + +class KDeclarativePrivate +{ +public: + KDeclarativePrivate(); + + QPointer declarativeEngine; + QString translationDomain; + static QStringList s_runtimePlatform; + QPointer contextObj; + QPointer qmlObj; +}; + +} + +#endif diff --git a/src/kdeclarative/private/kiconprovider.cpp b/src/kdeclarative/private/kiconprovider.cpp new file mode 100644 index 0000000..78030d9 --- /dev/null +++ b/src/kdeclarative/private/kiconprovider.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + Copyright 2011 Artur Duque de Souza + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . + ***************************************************************************/ + +#include "kiconprovider_p.h" + +#include +#include +#include +#include +#include + +namespace KDeclarative { + +KIconProvider::KIconProvider() + : QQuickImageProvider(QQuickImageProvider::Pixmap) +{ +} + +QPixmap KIconProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) +{ + // We need to handle QIcon::state + const QStringList source = id.split(QLatin1Char('/')); + + QPixmap pixmap; + if (requestedSize.isValid()) { + pixmap = QIcon::fromTheme(source.at(0)).pixmap(requestedSize); + } else if (size->isValid()) { + pixmap = QIcon::fromTheme(source.at(0)).pixmap(*size); + } else { + pixmap = QIcon::fromTheme(source.at(0)).pixmap(KIconLoader::global()->currentSize(KIconLoader::Desktop)); + } + + if (source.size() == 2) { + KIconEffect *effect = KIconLoader::global()->iconEffect(); + const QString state(source.at(1)); + int finalState = KIconLoader::DefaultState; + + if (state == QLatin1String("active")) { + finalState = KIconLoader::ActiveState; + } else if (state == QLatin1String("disabled")) { + finalState = KIconLoader::DisabledState; + } else if (state == QLatin1String("last")) { + finalState = KIconLoader::LastState; + } + + // apply the effect for state + pixmap = effect->apply(pixmap, KIconLoader::Desktop, finalState); + } + + if (!pixmap.isNull() && size) { + *size = pixmap.size(); + } + + return pixmap; +} + +} + diff --git a/src/kdeclarative/private/kiconprovider_p.h b/src/kdeclarative/private/kiconprovider_p.h new file mode 100644 index 0000000..f049ae3 --- /dev/null +++ b/src/kdeclarative/private/kiconprovider_p.h @@ -0,0 +1,35 @@ +/*************************************************************************** + Copyright 2011 Artur Duque de Souza + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . + ***************************************************************************/ + +#ifndef ICON_PROVIDER_H +#define ICON_PROVIDER_H + +#include + +namespace KDeclarative { + +class KIconProvider : public QQuickImageProvider +{ + +public: + KIconProvider(); + QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override; +}; + +} + +#endif diff --git a/src/kdeclarative/private/kioaccessmanagerfactory.cpp b/src/kdeclarative/private/kioaccessmanagerfactory.cpp new file mode 100644 index 0000000..e36df3c --- /dev/null +++ b/src/kdeclarative/private/kioaccessmanagerfactory.cpp @@ -0,0 +1,39 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "kioaccessmanagerfactory_p.h" +#include + +namespace KDeclarative { + +KIOAccessManagerFactory::KIOAccessManagerFactory() + : QQmlNetworkAccessManagerFactory() +{ +} + +KIOAccessManagerFactory::~KIOAccessManagerFactory() +{ +} + +QNetworkAccessManager *KIOAccessManagerFactory::create(QObject *parent) +{ + return new KIO::AccessManager(parent); +} + +} diff --git a/src/kdeclarative/private/kioaccessmanagerfactory_p.h b/src/kdeclarative/private/kioaccessmanagerfactory_p.h new file mode 100644 index 0000000..96fd54d --- /dev/null +++ b/src/kdeclarative/private/kioaccessmanagerfactory_p.h @@ -0,0 +1,37 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KIOACCESSMANAGERFACTORY_H +#define KIOACCESSMANAGERFACTORY_H + +#include + +namespace KDeclarative { + +class KIOAccessManagerFactory : public QQmlNetworkAccessManagerFactory +{ +public: + KIOAccessManagerFactory(); + ~KIOAccessManagerFactory(); + QNetworkAccessManager *create(QObject *parent) override; +}; + +} + +#endif diff --git a/src/kdeclarative/qmlobject.cpp b/src/kdeclarative/qmlobject.cpp new file mode 100644 index 0000000..acfed52 --- /dev/null +++ b/src/kdeclarative/qmlobject.cpp @@ -0,0 +1,375 @@ +/* + * Copyright 2013 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qmlobject.h" +#include "private/kdeclarative_p.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +//#include "packageaccessmanagerfactory.h" +//#include "private/declarative/dataenginebindings_p.h" + +namespace KDeclarative { + +class QmlObjectIncubator : public QQmlIncubator +{ +public: + QVariantHash m_initialProperties; +protected: + void setInitialState(QObject *object) override + { + QHashIterator i(m_initialProperties); + while (i.hasNext()) { + i.next(); + object->setProperty(i.key().toLatin1().data(), i.value()); + } + } +}; + +class QmlObjectPrivate +{ +public: + QmlObjectPrivate(QmlObject *parent) + : q(parent), + engine(nullptr), + component(nullptr), + delay(false) + { + executionEndTimer = new QTimer(q); + executionEndTimer->setInterval(0); + executionEndTimer->setSingleShot(true); + QObject::connect(executionEndTimer, SIGNAL(timeout()), q, SLOT(scheduleExecutionEnd())); + } + + ~QmlObjectPrivate() + { + delete incubator.object(); + } + + void errorPrint(QQmlComponent *component); + void execute(const QUrl &source); + void scheduleExecutionEnd(); + void minimumWidthChanged(); + void minimumHeightChanged(); + void maximumWidthChanged(); + void maximumHeightChanged(); + void preferredWidthChanged(); + void preferredHeightChanged(); + void checkInitializationCompleted(); + + QmlObject *q; + + QUrl source; + QQmlEngine *engine; + QmlObjectIncubator incubator; + QQmlComponent *component; + QTimer *executionEndTimer; + KDeclarative kdeclarative; + KPackage::Package package; + QQmlContext *rootContext; + bool delay : 1; +}; + +void QmlObjectPrivate::errorPrint(QQmlComponent *component) +{ + QString errorStr = QStringLiteral("Error loading QML file.\n"); + if (component->isError()) { + const QList errors = component->errors(); + for (const QQmlError &error : errors) { + errorStr += (error.line() > 0 ? QString(QString::number(error.line()) + QLatin1String(": ")) : QLatin1String("")) + + error.description() + QLatin1Char('\n'); + } + } + qWarning() << component->url().toString() << '\n' << errorStr; +} + +void QmlObjectPrivate::execute(const QUrl &source) +{ + if (source.isEmpty()) { + qWarning() << "File name empty!"; + return; + } + + delete component; + component = new QQmlComponent(engine, q); + QObject::connect(component, &QQmlComponent::statusChanged, + q, &QmlObject::statusChanged, Qt::QueuedConnection); + delete incubator.object(); + + component->loadUrl(source); + + if (delay) { + executionEndTimer->start(0); + } else { + scheduleExecutionEnd(); + } +} + +void QmlObjectPrivate::scheduleExecutionEnd() +{ + if (component->isReady() || component->isError()) { + q->completeInitialization(); + } else { + QObject::connect(component, SIGNAL(statusChanged(QQmlComponent::Status)), q, SLOT(completeInitialization())); + } +} + +QmlObject::QmlObject(QObject *parent) + // cannot do : QmlObject(new QQmlEngine(this), d->engine->rootContext(), parent) + : QObject(parent) + , d(new QmlObjectPrivate(this)) + +{ + d->engine = new QQmlEngine(this); + d->rootContext = d->engine->rootContext(); + d->kdeclarative.setDeclarativeEngine(d->engine); + d->kdeclarative.d->qmlObj = this; + + d->kdeclarative.setupContext(); + KDeclarative::setupEngine(d->engine); +} + +QmlObject::QmlObject(QQmlEngine *engine, QObject *parent) + : QmlObject(engine, engine->rootContext(), parent) +{ + +} + +QmlObject::QmlObject(QQmlEngine *engine, QQmlContext *rootContext, QObject *parent) + : QmlObject(engine, rootContext, nullptr /*call setupEngine*/, parent) +{ + +} + +QmlObject::QmlObject(QQmlEngine *engine, QQmlContext *rootContext, QmlObject *obj, QObject *parent) + : QObject(parent) + , d(new QmlObjectPrivate(this)) +{ + if (engine) { + d->engine = engine; + } else { + d->engine = new QQmlEngine(this); + } + + if (rootContext) { + d->rootContext = rootContext; + } else { + d->rootContext = d->engine->rootContext(); + } + d->kdeclarative.setDeclarativeEngine(d->engine); + d->kdeclarative.d->qmlObj = this; + + d->kdeclarative.setupContext(); + + if (!obj) { + KDeclarative::setupEngine(d->engine); + } +} + +QmlObject::~QmlObject() +{ +// QDeclarativeNetworkAccessManagerFactory *factory = d->engine->networkAccessManagerFactory(); +// d->engine->setNetworkAccessManagerFactory(0); +// delete factory; + delete d; +} + +void QmlObject::setTranslationDomain(const QString &translationDomain) +{ + d->kdeclarative.setTranslationDomain(translationDomain); +} + +QString QmlObject::translationDomain() const +{ + return d->kdeclarative.translationDomain(); +} + +void QmlObject::setSource(const QUrl &source) +{ + d->source = source; + d->execute(source); +} + +QUrl QmlObject::source() const +{ + return d->source; +} + +void QmlObject::loadPackage(const QString &packageName) +{ + d->package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("KPackage/GenericQML")); + d->package.setPath(packageName); + setSource(QUrl::fromLocalFile(d->package.filePath("mainscript"))); +} + +void QmlObject::setPackage(const KPackage::Package &package) +{ + d->package = package; + setSource(QUrl::fromLocalFile(package.filePath("mainscript"))); +} + +KPackage::Package QmlObject::package() const +{ + return d->package; +} + +void QmlObject::setInitializationDelayed(const bool delay) +{ + d->delay = delay; +} + +bool QmlObject::isInitializationDelayed() const +{ + return d->delay; +} + +QQmlEngine *QmlObject::engine() +{ + return d->engine; +} + +QObject *QmlObject::rootObject() const +{ + if (d->incubator.status() == QQmlIncubator::Loading) { + qWarning() << "Trying to use rootObject before initialization is completed, whilst using setInitializationDelayed. Forcing completion"; + d->incubator.forceCompletion(); + } + return d->incubator.object(); +} + +QQmlComponent *QmlObject::mainComponent() const +{ + return d->component; +} + +QQmlContext *QmlObject::rootContext() const +{ + return d->rootContext; +} + +QQmlComponent::Status QmlObject::status() const +{ + if (!d->engine) { + return QQmlComponent::Error; + } + + if (!d->component) { + return QQmlComponent::Null; + } + + return QQmlComponent::Status(d->component->status()); +} + +void QmlObjectPrivate::checkInitializationCompleted() +{ + if (!incubator.isReady() && incubator.status() != QQmlIncubator::Error) { + QTimer::singleShot(0, q, SLOT(checkInitializationCompleted())); + return; + } + + if (!incubator.object()) { + errorPrint(component); + } + + emit q->finished(); +} + +void QmlObject::completeInitialization(const QVariantHash &initialProperties) +{ + d->executionEndTimer->stop(); + if (d->incubator.object()) { + return; + } + + if (!d->component) { + qWarning() << "No component for" << source(); + return; + } + + + if (d->component->status() != QQmlComponent::Ready || d->component->isError()) { + d->errorPrint(d->component); + return; + } + + d->incubator.m_initialProperties = initialProperties; + d->component->create(d->incubator, d->rootContext); + + if (d->delay) { + d->checkInitializationCompleted(); + } else { + d->incubator.forceCompletion(); + + if (!d->incubator.object()) { + d->errorPrint(d->component); + } + emit finished(); + } +} + +QObject *QmlObject::createObjectFromSource(const QUrl &source, QQmlContext *context, const QVariantHash &initialProperties) +{ + QQmlComponent *component = new QQmlComponent(d->engine, this); + component->loadUrl(source); + + return createObjectFromComponent(component, context, initialProperties); +} + +QObject *QmlObject::createObjectFromComponent(QQmlComponent *component, QQmlContext *context, const QVariantHash &initialProperties) +{ + QmlObjectIncubator incubator; + incubator.m_initialProperties = initialProperties; + component->create(incubator, context ? context : d->rootContext); + incubator.forceCompletion(); + + QObject *object = incubator.object(); + + if (!component->isError() && object) { + //memory management + component->setParent(object); + //reparent to root object if wasn't specified otherwise by initialProperties + if (!initialProperties.contains(QLatin1String("parent"))) { + if (qobject_cast(rootObject())) { + object->setProperty("parent", QVariant::fromValue(rootObject())); + } else { + object->setParent(rootObject()); + } + } + + return object; + + } else { + d->errorPrint(component); + delete object; + return nullptr; + } +} + +} + +#include "moc_qmlobject.cpp" diff --git a/src/kdeclarative/qmlobject.h b/src/kdeclarative/qmlobject.h new file mode 100644 index 0000000..d80ffb3 --- /dev/null +++ b/src/kdeclarative/qmlobject.h @@ -0,0 +1,260 @@ +/* + * Copyright 2013 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef QMLOBJECT_H +#define QMLOBJECT_H + +#include + +#include + +#include +#include + +class QQmlEngine; +class QQmlComponent; +class QQmlContext; + +namespace KDeclarative { + +class QmlObjectPrivate; + +/** + * @class KDeclarative::QmlObject qmlobject.h KDeclarative/QmlObject + * + * @author Marco Martin + * + * @short An object that instantiates an entire QML context, with its own declarative engine + * + * KDeclarative::QmlObject provides a class to conveniently use QML based + * declarative user interfaces inside Plasma widgets. + * A QmlObject corresponds to one QML file (which can include others). + * It will have its own QQmlEngine with a single root object, + * described in the QML file. + */ +class KDECLARATIVE_EXPORT QmlObject : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QUrl source READ source WRITE setSource) + Q_PROPERTY(QString translationDomain READ translationDomain WRITE setTranslationDomain) + Q_PROPERTY(bool initializationDelayed READ isInitializationDelayed WRITE setInitializationDelayed) + Q_PROPERTY(QObject *rootObject READ rootObject) + Q_PROPERTY(QQmlComponent::Status status READ status NOTIFY statusChanged) + +public: + + /** + * Constructs a new QmlObject + * + * @param parent the parent of this object + */ + explicit QmlObject(QObject *parent = nullptr); + + /** + * Constructs a new QmlObject + * + * @param engine a QQmlEngine we want to use + * @param parent the parent of this object + */ + explicit QmlObject(QQmlEngine *engine, QObject *parent = nullptr); + + /** + * Constructs a new QmlObject + * + * @param engine the QQmlEngine to use + * @param rootContext the root context to use for object creation + * @param parent the parent of this object + */ + explicit QmlObject(QQmlEngine *engine, QQmlContext *rootContext, QObject *parent = nullptr); + ~QmlObject(); + + /** + * Call this method before calling setupBindings to install a translation domain for all + * i18n global functions. If a translation domain is set all i18n calls delegate to the + * matching i18nd calls with the provided translation domain. + * + * The translationDomain affects all i18n calls including those from imports. Because of + * that modules intended to be used as imports should prefer the i18nd variants and set + * the translation domain explicitly in each call. + * + * This method is only required if your declarative usage is inside a library. If it's + * in an application there is no need to set the translation domain as the application's + * domain can be used. + * + * @param translationDomain The translation domain to be used for i18n calls. + * @since 5.0 + */ + void setTranslationDomain(const QString &translationDomain); + + /** + * @return the translation domain for the i18n calls done in this QML engine + * @since 5.0 + */ + QString translationDomain() const; + + /** + * Sets the path of the QML file to parse and execute + * + * @param path the absolute path of a QML file + */ + void setSource(const QUrl &source); + + /** + * @return the absolute path of the current QML file + */ + QUrl source() const; + + /** + * Load the package called packageName, then loads the + * mainscript file for that package + * + * @param packageName the plugin name of the package + */ + void loadPackage(const QString &packageName); + + /** + * Sets a package, then loads the + * mainscript file for that package + * + * @param package the package we want to use to provide QML + * files to this QML object + */ + void setPackage(const KPackage::Package &package); + + /** + * @return the optional package, if any + */ + KPackage::Package package() const; + + /** + * Sets whether the execution of the QML file has to be delayed later in the event loop. It has to be called before setQmlPath(). + * In this case it will be possible to assign new objects in the main engine context + * before the main component gets initialized. + * In that case it will be possible to access it immediately from the QML code. + * The initialization will either be completed automatically asynchronously + * or explicitly by calling completeInitialization() + * + * @param delay if true the initialization of the QML file will be delayed + * at the end of the event loop + */ + void setInitializationDelayed(const bool delay); + + /** + * @return true if the initialization of the QML file will be delayed + * at the end of the event loop + */ + bool isInitializationDelayed() const; + + /** + * @return the declarative engine that runs the qml file assigned to this widget. + */ + QQmlEngine *engine(); + + /** + * @return the root object of the declarative object tree + */ + QObject *rootObject() const; + + /** + * @return the main QQmlComponent of the engine + */ + QQmlComponent *mainComponent() const; + + /** + * The components's creation context. + * @since 5.11 + */ + QQmlContext *rootContext() const; + + /** + * The component's current status. + * @since 5.11 + */ + QQmlComponent::Status status() const; + + /** + * Creates and returns an object based on the provided url to a Qml file + * with the same QQmlEngine and the same root context as the main object, + * that will be the parent of the newly created object + * @param source url where the QML file is located + * @param context The QQmlContext in which we will create the object, + * if 0 it will use the engine's root context + * @param initialProperties optional properties that will be set on + * the object when created (and before Component.onCompleted + * gets emitted + */ + QObject *createObjectFromSource(const QUrl &source, QQmlContext *context = nullptr, const QVariantHash &initialProperties = QVariantHash()); + + /** + * Creates and returns an object based on the provided QQmlComponent + * with the same QQmlEngine and the same root context as the admin object, + * that will be the parent of the newly created object + * @param component the component we want to instantiate + * @param context The QQmlContext in which we will create the object, + * if 0 it will use the engine's root context + * @param initialProperties optional properties that will be set on + * the object when created (and before Component.onCompleted + * gets emitted + */ + QObject *createObjectFromComponent(QQmlComponent *component, QQmlContext *context = nullptr, const QVariantHash &initialProperties = QVariantHash()); + +public Q_SLOTS: + /** + * Finishes the process of initialization. + * If isInitializationDelayed() is false, calling this will have no effect. + * @param initialProperties optional properties that will be set on + * the object when created (and before Component.onCompleted + * gets emitted + */ + void completeInitialization(const QVariantHash &initialProperties = QVariantHash()); + +Q_SIGNALS: + /** + * Emitted when the parsing and execution of the QML file is terminated + */ + void finished(); + + void statusChanged(QQmlComponent::Status); + +protected: + /** + * Constructs a new QmlObject + * + * @param engine a QQmlEngine we want to use + * @param rootContext the root context we want to use for objects creation + * @param obj setupEngine is called when this is set to nullptr. This way the creator can + * influence if the engine should be initialized or not in case it is shared between + * multiple objects (such as QmlObjectSharedEngine) + * @param parent the parent of this object + * @since 5.45 + */ + explicit QmlObject(QQmlEngine *engine, QQmlContext *rootContext, QmlObject *obj, QObject *parent = nullptr); + +private: + friend class QmlObjectPrivate; + QmlObjectPrivate *const d; + + Q_PRIVATE_SLOT(d, void scheduleExecutionEnd()) + Q_PRIVATE_SLOT(d, void checkInitializationCompleted()) +}; + +} + +#endif // multiple inclusion guard diff --git a/src/kdeclarative/qmlobjectsharedengine.cpp b/src/kdeclarative/qmlobjectsharedengine.cpp new file mode 100644 index 0000000..73add8a --- /dev/null +++ b/src/kdeclarative/qmlobjectsharedengine.cpp @@ -0,0 +1,81 @@ +/* + * Copyright 2015 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qmlobjectsharedengine.h" + +#include +#include + +#include +#include + +namespace KDeclarative { + +class QmlObjectSharedEnginePrivate +{ +public: + QmlObjectSharedEnginePrivate() + { + //ensure the engine is present, then ref it + engine(); + engineRef = s_engine; + } + + ~QmlObjectSharedEnginePrivate() + { + //when the only remaining are out two refs, reset the pointers, causing deletion + //when the refcount is 2, we are sure that the only refs are s_engine and our copy + //of engineRef + if (engineRef.use_count() == 2) { + s_engine.reset(); + } + } + + static QQmlEngine *engine() + { + if (!s_engine) { + s_engine = std::make_shared(); + KDeclarative::setupEngine(s_engine.get()); + } + return s_engine.get(); + } + + //used to delete it + std::shared_ptr engineRef; + + static std::shared_ptr s_engine; +}; + +std::shared_ptr QmlObjectSharedEnginePrivate::s_engine = std::shared_ptr(); + +QmlObjectSharedEngine::QmlObjectSharedEngine(QObject *parent) + : QmlObject(QmlObjectSharedEnginePrivate::engine(), new QQmlContext(QmlObjectSharedEnginePrivate::engine()), this /*don't call setupEngine*/, parent), + d(new QmlObjectSharedEnginePrivate()) +{ + rootContext()->setParent(this); +} + +QmlObjectSharedEngine::~QmlObjectSharedEngine() +{ +} + + +} + +#include "moc_qmlobjectsharedengine.cpp" diff --git a/src/kdeclarative/qmlobjectsharedengine.h b/src/kdeclarative/qmlobjectsharedengine.h new file mode 100644 index 0000000..8ec3884 --- /dev/null +++ b/src/kdeclarative/qmlobjectsharedengine.h @@ -0,0 +1,63 @@ +/* + * Copyright 2015 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef QMLOBJECTSHAREDENGINE_H +#define QMLOBJECTSHAREDENGINE_H + +#include +#include +#include + +namespace KDeclarative { + +class QmlObjectSharedEnginePrivate; + +/** + * @class KDeclarative::QmlObjectSharedEngine qmlobjectsharedengine.h KDeclarative/QmlObjectSharedEngine + * + * @author Marco Martin + * + * @short An object that instantiates an entire QML context, with its own declarative engine + * + * KDeclarative::QmlObjectSharedEngine is a version of QmlObject that ensures only one + * QQmlEngine instance exists for the whole application. Objects created by different + * instances of QmlObjectSharedEngine will be insulated by having different creation + * contexts, accessible by QmlObject::rootContext() + */ +class KDECLARATIVE_EXPORT QmlObjectSharedEngine : public QmlObject +{ + Q_OBJECT + +public: + /** + * Constructs a new QmlObjectSharedEngine + * + * @param parent the parent of this object + */ + explicit QmlObjectSharedEngine(QObject *parent = nullptr); + ~QmlObjectSharedEngine(); + +private: + friend class QmlObjectSharedEnginePrivate; + const std::unique_ptr d; +}; + +} + +#endif // multiple inclusion guard diff --git a/src/kpackagelauncherqml/CMakeLists.txt b/src/kpackagelauncherqml/CMakeLists.txt new file mode 100644 index 0000000..7744b77 --- /dev/null +++ b/src/kpackagelauncherqml/CMakeLists.txt @@ -0,0 +1,21 @@ + + +set(kpackagelauncherqml_SRCS + main.cpp +) + +add_executable(kpackagelauncherqml ${kpackagelauncherqml_SRCS}) + +#find_package(ActiveApp REQUIRED) + +target_link_libraries(kpackagelauncherqml + Qt5::Gui + Qt5::Quick + Qt5::Widgets #needs a qapplication for the Desktop QtControlsStyle + KF5::Declarative + KF5::I18n + KF5::Package + KF5::QuickAddons +) + +install(TARGETS kpackagelauncherqml ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/src/kpackagelauncherqml/main.cpp b/src/kpackagelauncherqml/main.cpp new file mode 100644 index 0000000..f48b801 --- /dev/null +++ b/src/kpackagelauncherqml/main.cpp @@ -0,0 +1,136 @@ +/* + * Copyright 2015 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + QCommandLineParser parser; + QApplication app(argc, argv); + + const QString description = i18n("KPackage QML application shell"); + + app.setApplicationVersion(QStringLiteral("0.1")); + parser.addVersionOption(); + parser.addHelpOption(); + parser.setApplicationDescription(description); + + QCommandLineOption appPluginOption(QCommandLineOption(QStringList() << QStringLiteral("a") << QStringLiteral("app"), i18n("The unique name of the application (mandatory)"), QStringLiteral("app"))); + + parser.addOption(appPluginOption); + + parser.process(app); + + QString packagePath; + if (parser.isSet(appPluginOption)) { + packagePath = parser.value(appPluginOption); + } else { + parser.showHelp(1); + } + + //usually we have an ApplicationWindow here, so we do not need to create a window by ourselves + KDeclarative::QmlObject obj; + obj.setTranslationDomain(packagePath); + obj.setInitializationDelayed(true); + obj.loadPackage(packagePath); + if (!obj.package().isValid()) { + qWarning() << "The specified Application package is not valid."; + return 1; + } + obj.engine()->rootContext()->setContextProperty(QStringLiteral("commandlineArguments"), parser.positionalArguments()); + QVariantMap paths; + paths[QStringLiteral("desktop")] = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + paths[QStringLiteral("documents")] = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + paths[QStringLiteral("music")] = QStandardPaths::writableLocation(QStandardPaths::MusicLocation); + paths[QStringLiteral("movies")] = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation); + paths[QStringLiteral("pictures")] = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); + paths[QStringLiteral("home")] = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + obj.engine()->rootContext()->setContextProperty(QStringLiteral("userPaths"), paths); + obj.completeInitialization(); + + if (!obj.package().metadata().isValid()) { + return -1; + } + + KPluginMetaData data = obj.package().metadata(); + // About data + KAboutData aboutData(data.pluginId(), data.name(), data.version(), data.description(), KAboutLicense::byKeyword(data.license()).key()); + + const auto authors = data.authors(); + for (auto& author : authors) { + aboutData.addAuthor(author.name(), author.task(), author.emailAddress(), author.webAddress(), author.ocsUsername()); + } + // We assume that desktop file in applications dir is named similar as + // the pluginId, this is required to get icons working on wayland for example + aboutData.setDesktopFileName(data.pluginId()); + + KAboutData::setApplicationData(aboutData); + + //The root is not a window? + //have to use a normal QQuickWindow since the root item is already created + QQuickItem *item = qobject_cast(obj.rootObject()); + QWindow *window = qobject_cast(obj.rootObject()); + if (item) { + QQuickWindow view; + item->setParentItem(view.contentItem()); + if (item->implicitWidth() > 0 && item->implicitHeight() > 0) { + view.resize(item->implicitWidth(), item->implicitHeight()); + } else { + view.resize(item->width(), item->height()); + } + + //set anchors + QQmlExpression expr(obj.engine()->rootContext(), obj.rootObject(), QStringLiteral("parent")); + QQmlProperty prop(obj.rootObject(), QStringLiteral("anchors.fill")); + prop.write(expr.evaluate()); + view.setTitle(obj.package().metadata().name()); + view.setIcon(QIcon::fromTheme(obj.package().metadata().iconName())); + + // Forward Qt.quit() in QML code to QApplication::quit() + QObject::connect(obj.engine(), &QQmlEngine::quit, &app, &QCoreApplication::quit); + + view.show(); + return app.exec(); + } else if (window) { + window->setTitle(obj.package().metadata().name()); + window->setIcon(QIcon::fromTheme(obj.package().metadata().iconName())); + } else { + qWarning() << "The root Qml Item should be either a kind of window or a QQuickItem"; + return 1; + } + + return app.exec(); +} + diff --git a/src/qmlcontrols/CMakeLists.txt b/src/qmlcontrols/CMakeLists.txt new file mode 100644 index 0000000..190110e --- /dev/null +++ b/src/qmlcontrols/CMakeLists.txt @@ -0,0 +1,25 @@ + +add_subdirectory(draganddrop) +add_subdirectory(kquickcontrolsaddons) +add_subdirectory(kcmcontrols) + +if(KF5I18n_FOUND AND KF5Config_FOUND AND KF5WidgetsAddons_FOUND AND KF5WindowSystem_FOUND AND KF5GlobalAccel_FOUND AND KF5KIO_FOUND AND KF5GuiAddons_FOUND) + add_subdirectory(kquickcontrols) +endif() + +if(KF5CoreAddons_FOUND) + add_subdirectory(kcoreaddons) +endif() + + +if(KF5KIO_FOUND) + add_subdirectory(kioplugin) +endif() + +if (KF5WindowSystem_FOUND) + add_subdirectory(kwindowsystemplugin) +endif() + +if (KF5Config_FOUND) + add_subdirectory(kconfig) +endif() diff --git a/src/qmlcontrols/draganddrop/CMakeLists.txt b/src/qmlcontrols/draganddrop/CMakeLists.txt new file mode 100644 index 0000000..e8127e4 --- /dev/null +++ b/src/qmlcontrols/draganddrop/CMakeLists.txt @@ -0,0 +1,22 @@ +project(draganddrop) + +set(declarativedragdrop_SRCS + draganddropplugin.cpp + DeclarativeDragArea.cpp + DeclarativeDragDropEvent.cpp + DeclarativeDropArea.cpp + DeclarativeMimeData.cpp + MimeDataWrapper.cpp +) + +add_library(draganddropplugin SHARED ${declarativedragdrop_SRCS}) +target_link_libraries(draganddropplugin + Qt5::Core + Qt5::Quick + Qt5::Qml + Qt5::Gui +) + +install(TARGETS draganddropplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/draganddrop) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/draganddrop) diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp b/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp new file mode 100644 index 0000000..d954530 --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp @@ -0,0 +1,386 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDragArea.h" +#include "DeclarativeMimeData.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/*! + A DragArea is used to make an item draggable. +*/ + +DeclarativeDragArea::DeclarativeDragArea(QQuickItem *parent) + : QQuickItem(parent), + m_delegate(nullptr), + m_source(parent), + m_target(nullptr), + m_enabled(true), + m_draggingJustStarted(false), + m_dragActive(false), + m_supportedActions(Qt::MoveAction), + m_defaultAction(Qt::MoveAction), + m_data(new DeclarativeMimeData()), // m_data is owned by us, and we shouldn't pass it to Qt directly as it will automatically delete it after the drag and drop. + m_pressAndHoldTimerId(0) +{ + m_startDragDistance = QGuiApplication::styleHints()->startDragDistance(); + setAcceptedMouseButtons(Qt::LeftButton); +// setFiltersChildEvents(true); + setFlag(ItemAcceptsDrops, m_enabled); + setFiltersChildMouseEvents(true); +} + +DeclarativeDragArea::~DeclarativeDragArea() +{ + if (m_data) { + delete m_data; + } +} + +/*! + The delegate is the item that will be displayed next to the mouse cursor during the drag and drop operation. + It usually consists of a large, semi-transparent icon representing the data being dragged. +*/ +QQuickItem* DeclarativeDragArea::delegate() const +{ + return m_delegate; +} + +void DeclarativeDragArea::setDelegate(QQuickItem *delegate) +{ + if (m_delegate != delegate) { + //qDebug() << " ______________________________________________ " << delegate; + m_delegate = delegate; + emit delegateChanged(); + } +} +void DeclarativeDragArea::resetDelegate() +{ + setDelegate(nullptr); +} + +/*! + The QML element that is the source of this drag and drop operation. This can be defined to any item, and will + be available to the DropArea as event.data.source +*/ +QQuickItem* DeclarativeDragArea::source() const +{ + return m_source; +} + +void DeclarativeDragArea::setSource(QQuickItem* source) +{ + if (m_source != source) { + m_source = source; + emit sourceChanged(); + } +} + +void DeclarativeDragArea::resetSource() +{ + setSource(nullptr); +} + +bool DeclarativeDragArea::dragActive() const +{ + return m_dragActive; +} + +// target +QQuickItem* DeclarativeDragArea::target() const +{ + //TODO: implement me + return nullptr; +} + +// data +DeclarativeMimeData* DeclarativeDragArea::mimeData() const +{ + return m_data; +} + +// startDragDistance +int DeclarativeDragArea::startDragDistance() const +{ + return m_startDragDistance; +} + +void DeclarativeDragArea::setStartDragDistance(int distance) +{ + if (distance == m_startDragDistance) { + return; + } + + m_startDragDistance = distance; + emit startDragDistanceChanged(); +} + +// delegateImage +QVariant DeclarativeDragArea::delegateImage() const +{ + return m_delegateImage; +} + +void DeclarativeDragArea::setDelegateImage(const QVariant &image) +{ + if (image.canConvert() && image.value() == m_delegateImage) { + return; + } + + if (image.canConvert()) { + m_delegateImage = image.value(); + } else if (image.canConvert()) { + m_delegateImage = QIcon::fromTheme(image.toString()).pixmap(QSize(48, 48)).toImage(); + } else { + m_delegateImage = image.value().pixmap(QSize(48, 48)).toImage(); + } + + emit delegateImageChanged(); +} + +// enabled +bool DeclarativeDragArea::isEnabled() const +{ + return m_enabled; +} +void DeclarativeDragArea::setEnabled(bool enabled) +{ + if (enabled != m_enabled) { + m_enabled = enabled; + emit enabledChanged(); + } +} + +// supported actions +Qt::DropActions DeclarativeDragArea::supportedActions() const +{ + return m_supportedActions; +} +void DeclarativeDragArea::setSupportedActions(Qt::DropActions actions) +{ + if (actions != m_supportedActions) { + m_supportedActions = actions; + emit supportedActionsChanged(); + } +} + +// default action +Qt::DropAction DeclarativeDragArea::defaultAction() const +{ + return m_defaultAction; +} +void DeclarativeDragArea::setDefaultAction(Qt::DropAction action) +{ + if (action != m_defaultAction) { + m_defaultAction = action; + emit defaultActionChanged(); + } +} + +void DeclarativeDragArea::mousePressEvent(QMouseEvent* event) +{ + m_pressAndHoldTimerId = startTimer(QGuiApplication::styleHints()->mousePressAndHoldInterval()); + m_buttonDownPos = event->screenPos(); + m_draggingJustStarted = true; + setKeepMouseGrab(true); +} + +void DeclarativeDragArea::mouseReleaseEvent(QMouseEvent* event) +{ + Q_UNUSED(event); + killTimer(m_pressAndHoldTimerId); + m_pressAndHoldTimerId = 0; + m_draggingJustStarted = false; + setKeepMouseGrab(false); + ungrabMouse(); +} + +void DeclarativeDragArea::timerEvent(QTimerEvent *event) +{ + if (event->timerId() == m_pressAndHoldTimerId && m_draggingJustStarted && m_enabled) { + // Grab delegate before starting drag + if (m_delegate) { + // Another grab is already in progress + if (m_grabResult) { + return; + } + m_grabResult = m_delegate->grabToImage(); + if (m_grabResult) { + connect(m_grabResult.data(), &QQuickItemGrabResult::ready, this, [this]() { + startDrag(m_grabResult->image()); + m_grabResult.reset(); + }); + return; + } + } + + // No delegate or grab failed, start drag immediately + startDrag(m_delegateImage); + } +} + +void DeclarativeDragArea::mouseMoveEvent(QMouseEvent *event) +{ + if ( !m_enabled + || QLineF(event->screenPos(), m_buttonDownPos).length() + < m_startDragDistance) { + return; + } + + //don't start drags on move for touch events, they'll be handled only by press and hold + //reset timer if moved more than m_startDragDistance + if (event->source() == Qt::MouseEventSynthesizedByQt) { + killTimer(m_pressAndHoldTimerId); + m_pressAndHoldTimerId = 0; + return; + } + + if (m_draggingJustStarted) { + // Grab delegate before starting drag + if (m_delegate) { + // Another grab is already in progress + if (m_grabResult) { + return; + } + m_grabResult = m_delegate->grabToImage(); + if (m_grabResult) { + connect(m_grabResult.data(), &QQuickItemGrabResult::ready, this, [this]() { + startDrag(m_grabResult->image()); + m_grabResult.reset(); + }); + return; + } + } + + // No delegate or grab failed, start drag immediately + startDrag(m_delegateImage); + } +} + +bool DeclarativeDragArea::childMouseEventFilter(QQuickItem *item, QEvent *event) +{ + if (!isEnabled()) { + return false; + } + + switch (event->type()) { + case QEvent::MouseButtonPress: { + QMouseEvent *me = static_cast(event); + //qDebug() << "press in dragarea"; + mousePressEvent(me); + break; + } + case QEvent::MouseMove: { + QMouseEvent *me = static_cast(event); + //qDebug() << "move in dragarea"; + mouseMoveEvent(me); + break; + } + case QEvent::MouseButtonRelease: { + QMouseEvent *me = static_cast(event); + //qDebug() << "release in dragarea"; + mouseReleaseEvent(me); + break; + } + default: + break; + } + + return QQuickItem::childMouseEventFilter(item, event); +} + +void DeclarativeDragArea::startDrag(const QImage &image) +{ + grabMouse(); + m_draggingJustStarted = false; + + QDrag *drag = new QDrag(parent()); + DeclarativeMimeData *dataCopy = new DeclarativeMimeData(m_data); //Qt will take ownership of this copy and delete it. + drag->setMimeData(dataCopy); + + const qreal devicePixelRatio = window() ? window()->devicePixelRatio() : 1; + const int imageSize = 48 * devicePixelRatio; + + if (!image.isNull()) { + drag->setPixmap(QPixmap::fromImage(image)); + } else if (mimeData()->hasImage()) { + const QImage im = qvariant_cast(mimeData()->imageData()); + drag->setPixmap(QPixmap::fromImage(im)); + } else if (mimeData()->hasColor()) { + QPixmap px(imageSize, imageSize); + px.fill(mimeData()->color()); + drag->setPixmap(px); + } else { + // Icons otherwise + QStringList icons; + if (mimeData()->hasText()) { + icons << QStringLiteral("text-plain"); + } + if (mimeData()->hasHtml()) { + icons << QStringLiteral("text-html"); + } + if (mimeData()->hasUrls()) { + for (int i = 0; i < std::min(4, mimeData()->urls().size()); ++i) { + icons << QStringLiteral("text-html"); + } + } + if (!icons.isEmpty()) { + QPixmap pm(imageSize * icons.count(), imageSize); + pm.fill(Qt::transparent); + QPainter p(&pm); + int i = 0; + for (const QString &ic : qAsConst(icons)) { + p.drawPixmap(QPoint(i * imageSize, 0), QIcon::fromTheme(ic).pixmap(imageSize)); + i++; + } + p.end(); + drag->setPixmap(pm); + } + } + + //drag->setHotSpot(QPoint(drag->pixmap().width()/2, drag->pixmap().height()/2)); // TODO: Make a property for that + //setCursor(Qt::OpenHandCursor); //TODO? Make a property for the cursor + + m_dragActive = true; + emit dragActiveChanged(); + emit dragStarted(); + + Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); + setKeepMouseGrab(false); + + m_dragActive = false; + emit dragActiveChanged(); + emit drop(action); + + ungrabMouse(); +} diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragArea.h b/src/qmlcontrols/draganddrop/DeclarativeDragArea.h new file mode 100644 index 0000000..8c14723 --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDragArea.h @@ -0,0 +1,171 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDRAGAREA_H +#define DECLARATIVEDRAGAREA_H + +#include +#include +#include + +class QQmlComponent; +class DeclarativeMimeData; +class QQuickItemGrabResult; + +class DeclarativeDragArea : public QQuickItem +{ + Q_OBJECT + + /** + * The delegate is the item that will be displayed next to the mouse cursor during the drag and drop operation. + * It usually consists of a large, semi-transparent icon representing the data being dragged. + */ + Q_PROPERTY(QQuickItem* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged RESET resetDelegate) + + /** + * The QML element that is the source of the resulting drag and drop operation. This can be defined to any item, and will + * be available to the DropArea as event.data.source + */ + Q_PROPERTY(QQuickItem* source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource) + + //TODO: to be implemented + Q_PROPERTY(QQuickItem* target READ source NOTIFY targetChanged) + + /** + * the mime data of the drag operation + * @see DeclarativeMimeData + */ + Q_PROPERTY(DeclarativeMimeData* mimeData READ mimeData CONSTANT) + + /** + * If false no drag operation will be generate + */ + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) //TODO: Should call setAcceptDrops() + + /** + * Supported operations, a combination of + * Qt.CopyAction + * Qt.MoveAction + * Qt.LinkAction + * Qt.ActionMask + * Qt.IgnoreAction + * Qt.TargetMoveAction + */ + Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged) + + /** + * The default action will be performed during a drag when no modificators are pressed. + */ + Q_PROPERTY(Qt::DropAction defaultAction READ defaultAction WRITE setDefaultAction NOTIFY defaultActionChanged) + + /** + * distance in pixel after which a drag event will get started + */ + Q_PROPERTY(int startDragDistance READ startDragDistance WRITE setStartDragDistance NOTIFY startDragDistanceChanged) + + /** + * an image to be used as delegate. if present overrides the delegate property. in can be either a QImage or a QIcon + */ + Q_PROPERTY(QVariant delegateImage READ delegateImage WRITE setDelegateImage NOTIFY delegateImageChanged) + + /** + * Whether a drag currently originates from this drag area. + * + * @since 5.19 + */ + Q_PROPERTY(bool dragActive READ dragActive NOTIFY dragActiveChanged) + +public: + DeclarativeDragArea(QQuickItem *parent=nullptr); + ~DeclarativeDragArea() override; + + QQuickItem *delegate() const; + void setDelegate(QQuickItem* delegate); + void resetDelegate(); + + QVariant delegateImage() const; + void setDelegateImage(const QVariant &image); + QQuickItem* target() const; + QQuickItem* source() const; + void setSource(QQuickItem* source); + void resetSource(); + + bool dragActive() const; + + bool isEnabled() const; + void setEnabled(bool enabled); + + int startDragDistance() const; + void setStartDragDistance(int distance); + + //supported actions + Qt::DropActions supportedActions() const; + void setSupportedActions(Qt::DropActions actions); + + //default action + Qt::DropAction defaultAction() const; + void setDefaultAction(Qt::DropAction action); + + DeclarativeMimeData* mimeData() const; + +Q_SIGNALS: + void dragStarted(); + void delegateChanged(); + void dragActiveChanged(); + void sourceChanged(); + void targetChanged(); + void dataChanged(); + void enabledChanged(); + void drop(int action); + void supportedActionsChanged(); + void defaultActionChanged(); + void startDragDistanceChanged(); + void delegateImageChanged(); + +protected: + void mouseMoveEvent(QMouseEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *) override; + void timerEvent(QTimerEvent *event) override; + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + +private: + void startDrag(const QImage &image); + + QQuickItem* m_delegate; + QQuickItem* m_source; + QQuickItem* m_target; + QSharedPointer m_grabResult; + bool m_enabled; + bool m_draggingJustStarted; + bool m_dragActive; + Qt::DropActions m_supportedActions; + Qt::DropAction m_defaultAction; + DeclarativeMimeData* const m_data; + QImage m_delegateImage; + int m_startDragDistance; + QPointF m_buttonDownPos; + int m_pressAndHoldTimerId; +}; + +#endif // DECLARATIVEDRAGAREA_H diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp new file mode 100644 index 0000000..1c56414 --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp @@ -0,0 +1,71 @@ +/* + Copyright (C) 2010 by BetterInbox + Copyright 2013 by Sebastian Kügler + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDragDropEvent.h" +#include "DeclarativeMimeData.h" + +DeclarativeDragDropEvent::DeclarativeDragDropEvent(QDropEvent* e, DeclarativeDropArea* parent) : + QObject(parent), + m_x(e->pos().x()), + m_y(e->pos().y()), + m_buttons(e->mouseButtons()), + m_modifiers(e->keyboardModifiers()), + m_data(nullptr), + m_event(e) +{ +} + +DeclarativeDragDropEvent::DeclarativeDragDropEvent(QDragLeaveEvent* e, DeclarativeDropArea* parent) : + QObject(parent), + m_x(0), + m_y(0), + m_buttons(Qt::NoButton), + m_modifiers(Qt::NoModifier), + m_data(nullptr), + m_event(nullptr) +{ + Q_UNUSED(e); +} + +void DeclarativeDragDropEvent::accept(int action) +{ + m_event->setDropAction( static_cast(action) ); +// qDebug() << "-----> Accepting event: " << this << m_data.urls() << m_data.text() << m_data.html() << ( m_data.hasColor() ? m_data.color().name() : " no color"); + m_event->accept(); +} + +void DeclarativeDragDropEvent::ignore() +{ + m_event->ignore(); +} + +DeclarativeMimeData* DeclarativeDragDropEvent::mimeData() +{ + if (!m_data && m_event) { +// TODO This should be using MimeDataWrapper eventually, although this is an API break, +// so will need to be done carefully. + m_data.reset(new DeclarativeMimeData(m_event->mimeData())); + } + return m_data.data(); +} diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h new file mode 100644 index 0000000..b35568a --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h @@ -0,0 +1,121 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDRAGDROPEVENT_H +#define DECLARATIVEDRAGDROPEVENT_H + +#include +#include "DeclarativeDropArea.h" +#include "DeclarativeMimeData.h" + +class DeclarativeDragDropEvent : public QObject +{ + Q_OBJECT + + /** + * The mouse X position of the event relative to the DropArea that is receiving the event. + */ + Q_PROPERTY(int x READ x) + + /** + * The mouse Y position of the event relative to the DropArea that is receiving the event. + */ + Q_PROPERTY(int y READ y) + + /** + * The pressed mouse buttons. + * A combination of: + * Qt.NoButton The button state does not refer to any button (see QMouseEvent::button()). + * Qt.LeftButton The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.) + * Qt.RightButton The right button. + * Qt.MidButton The middle button. + * Qt.MiddleButton MidButton The middle button. + * Qt.XButton1 The first X button. + * Qt.XButton2 The second X button. + */ + Q_PROPERTY(int buttons READ buttons) + + /** + * Pressed keyboard modifiers, a combination of: + * Qt.NoModifier No modifier key is pressed. + * Qt.ShiftModifier A Shift key on the keyboard is pressed. + * Qt.ControlModifier A Ctrl key on the keyboard is pressed. + * Qt.AltModifier An Alt key on the keyboard is pressed. + * Qt.MetaModifier A Meta key on the keyboard is pressed. + * Qt.KeypadModifier A keypad button is pressed. + * Qt.GroupSwitchModifier X11 only. A Mode_switch key on the keyboard is pressed. + */ + Q_PROPERTY(int modifiers READ modifiers) + + /** + * The mime data of this operation + * @see DeclarativeMimeData + */ + Q_PROPERTY(DeclarativeMimeData* mimeData READ mimeData) + + /** + * The possible different kind of action that can be done in the drop, is a combination of: + * Qt.CopyAction 0x1 Copy the data to the target. + * Qt.MoveAction 0x2 Move the data from the source to the target. + * Qt.LinkAction 0x4 Create a link from the source to the target. + * Qt.ActionMask 0xff + * Qt.IgnoreAction 0x0 Ignore the action (do nothing with the data). + * Qt.TargetMoveAction 0x8002 On Windows, this value is used when the ownership of the D&D data should be taken over by the target application, i.e., the source application should not delete the data. + * On X11 this value is used to do a move. + * TargetMoveAction is not used on the Mac. + */ + Q_PROPERTY(Qt::DropActions possibleActions READ possibleActions) + + /** + * Default action + * @see possibleActions + */ + Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction) + +public: + + DeclarativeDragDropEvent(QDropEvent* e, DeclarativeDropArea* parent = nullptr); + DeclarativeDragDropEvent(QDragLeaveEvent* e, DeclarativeDropArea* parent = nullptr); + + int x() const { return m_x; } + int y() const { return m_y; } + int buttons() const { return m_buttons; } + int modifiers() const { return m_modifiers; } + DeclarativeMimeData* mimeData(); + Qt::DropAction proposedAction() const { return m_event->proposedAction(); } + Qt::DropActions possibleActions() const { return m_event->possibleActions(); } + +public Q_SLOTS: + void accept(int action); + void ignore(); + +private: + int m_x; + int m_y; + Qt::MouseButtons m_buttons; + Qt::KeyboardModifiers m_modifiers; + QScopedPointer m_data; + QDropEvent* m_event; +}; + +#endif // DECLARATIVEDRAGDROPEVENT_H diff --git a/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp b/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp new file mode 100644 index 0000000..9acf18c --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp @@ -0,0 +1,165 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeDropArea.h" +#include "DeclarativeDragDropEvent.h" + + +DeclarativeDropArea::DeclarativeDropArea(QQuickItem *parent) + : QQuickItem(parent), + m_enabled(true), + m_preventStealing(false), + m_temporaryInhibition(false), + m_containsDrag(false) +{ + setFlag(ItemAcceptsDrops, m_enabled); +} + +void DeclarativeDropArea::temporaryInhibitParent(bool inhibit) +{ + QQuickItem *candidate = parentItem(); + + while (candidate) { + if (DeclarativeDropArea *da = qobject_cast(candidate)) { + da->m_temporaryInhibition = inhibit; + if (inhibit) { + emit da->dragLeaveEvent(nullptr); + } + } + candidate = candidate->parentItem(); + } +} + +void DeclarativeDropArea::dragEnterEvent(QDragEnterEvent *event) +{ + if (!m_enabled || m_temporaryInhibition) { + return; + } + + DeclarativeDragDropEvent dde(event, this); + event->accept(); + + emit dragEnter(&dde); + + if (!event->isAccepted()) { + return; + } + + if (m_preventStealing) { + temporaryInhibitParent(true); + } + + m_oldDragMovePos = event->pos(); + setContainsDrag(true); +} + +void DeclarativeDropArea::dragLeaveEvent(QDragLeaveEvent *event) +{ + //do it anyways, in the unlikely case m_preventStealing + //was changed while drag + temporaryInhibitParent(false); + + m_oldDragMovePos = QPoint(-1,-1); + DeclarativeDragDropEvent dde(event, this); + emit dragLeave(&dde); + setContainsDrag(false); +} + +void DeclarativeDropArea::dragMoveEvent(QDragMoveEvent *event) +{ + if (!m_enabled || m_temporaryInhibition) { + event->ignore(); + return; + } + event->accept(); + //if the position we export didn't change, don't generate the move event + if (event->pos() == m_oldDragMovePos) { + return; + } + + m_oldDragMovePos = event->pos(); + DeclarativeDragDropEvent dde(event, this); + emit dragMove(&dde); +} + +void DeclarativeDropArea::dropEvent(QDropEvent *event) +{ + //do it anyways, in the unlikely case m_preventStealing + //was changed while drag, do it after a loop, + //so the parent dropevent doesn't get delivered + metaObject()->invokeMethod(this, "temporaryInhibitParent", Qt::QueuedConnection, Q_ARG(bool, false)); + + m_oldDragMovePos = QPoint(-1,-1); + + if (!m_enabled || m_temporaryInhibition) { + return; + } + + DeclarativeDragDropEvent dde(event, this); + emit drop(&dde); + setContainsDrag(false); +} + +bool DeclarativeDropArea::isEnabled() const +{ + return m_enabled; +} + +void DeclarativeDropArea::setEnabled(bool enabled) +{ + if (enabled == m_enabled) { + return; + } + + m_enabled = enabled; + setFlag(ItemAcceptsDrops, m_enabled); + emit enabledChanged(); +} + +bool DeclarativeDropArea::preventStealing() const +{ + return m_preventStealing; +} + +void DeclarativeDropArea::setPreventStealing(bool prevent) +{ + if (prevent == m_preventStealing) { + return; + } + + m_preventStealing = prevent; + emit preventStealingChanged(); +} + +void DeclarativeDropArea::setContainsDrag(bool dragging) +{ + if (m_containsDrag != dragging) { + m_containsDrag = dragging; + Q_EMIT containsDragChanged(m_containsDrag); + } +} + +bool DeclarativeDropArea::containsDrag() const +{ + return m_containsDrag; +} diff --git a/src/qmlcontrols/draganddrop/DeclarativeDropArea.h b/src/qmlcontrols/draganddrop/DeclarativeDropArea.h new file mode 100644 index 0000000..e285413 --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeDropArea.h @@ -0,0 +1,112 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEDROPAREA_H +#define DECLARATIVEDROPAREA_H + +#include + +class DeclarativeDragDropEvent; + +class DeclarativeDropArea : public QQuickItem +{ + Q_OBJECT + + /** + * If false the area will receive no drop events + */ + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + + /** + * + */ + Q_PROPERTY(bool preventStealing READ preventStealing WRITE setPreventStealing NOTIFY preventStealingChanged) + + Q_PROPERTY(bool containsDrag READ containsDrag NOTIFY containsDragChanged ) + +public: + DeclarativeDropArea(QQuickItem *parent=nullptr); + bool isEnabled() const; + void setEnabled(bool enabled); + + bool preventStealing() const; + void setPreventStealing(bool prevent); + bool containsDrag() const; + +Q_SIGNALS: + /** + * Emitted when the mouse cursor dragging something enters in the drag area + * @param event description of the dragged content + * @see DeclarativeDragDropEvent + */ + void dragEnter(DeclarativeDragDropEvent* event); + + /** + * Emitted when the mouse cursor dragging something leaves the drag area + * @param event description of the dragged content + * @see DeclarativeDragDropEvent + */ + void dragLeave(DeclarativeDragDropEvent* event); + + /** + * Emitted when the mouse cursor dragging something moves over the drag area + * @param event description of the dragged content + * @see DeclarativeDragDropEvent + */ + void dragMove(DeclarativeDragDropEvent *event); + + /** + * Emitted when the user drops something in the area + * @param event description of the dragged content + * @see DeclarativeDragDropEvent + */ + void drop(DeclarativeDragDropEvent* event); + + //Notifiers + void enabledChanged(); + + void preventStealingChanged(); + + void containsDragChanged(bool contained); + +protected: + void dragEnterEvent(QDragEnterEvent *event) override; + void dragLeaveEvent(QDragLeaveEvent *event) override; + void dragMoveEvent(QDragMoveEvent *event) override; + void dropEvent(QDropEvent *event) override; + +private Q_SLOTS: + void temporaryInhibitParent(bool inhibit); + +private: + void setContainsDrag(bool dragging); + + bool m_enabled : 1; + bool m_preventStealing : 1; + bool m_temporaryInhibition : 1; + bool m_containsDrag : 1; + QPoint m_oldDragMovePos; +}; + +#endif + diff --git a/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp b/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp new file mode 100644 index 0000000..69507ab --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeMimeData.cpp @@ -0,0 +1,168 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "DeclarativeMimeData.h" + +/*! + \qmlclass MimeData DeclarativeMimeData + + This is a wrapper class around QMimeData, with a few extensions to provide better support for in-qml drag & drops. +*/ + +DeclarativeMimeData::DeclarativeMimeData() + : QMimeData(), + m_source(nullptr) +{} + +/*! + \internal + \class DeclarativeMimeData + + Creates a new DeclarativeMimeData by cloning the QMimeData passed as parameter. + This is useful for two reasons : + - In DragArea, we want to clone our "working copy" of the DeclarativeMimeData instance, as Qt will automatically + delete it after the drag and drop operation. + - In the drop events, the QMimeData is const, and we have troubles passing const to QML. So we clone it to + remove the "constness" + + This method will try to cast the QMimeData to DeclarativeMimeData, and will clone our extensions to QMimeData as well +*/ +DeclarativeMimeData::DeclarativeMimeData(const QMimeData* copy) + : QMimeData(), + m_source(nullptr) +{ + // Copy the standard MIME data + const auto formats = copy->formats(); + for (const QString &format : formats) { + QMimeData::setData(format, copy->data(format)); + } + + // If the object we are copying actually is a DeclarativeMimeData, copy our extended properties as well + const DeclarativeMimeData* declarativeMimeData = qobject_cast(copy); + if (declarativeMimeData) { + this->setSource(declarativeMimeData->source()); + } +} + +/*! + \qmlproperty url MimeData::url + + Returns the first URL from the urls property of QMimeData + TODO: We should use QDeclarativeListProperty to return the whole list instead of only the first element. +*/ +QUrl DeclarativeMimeData::url() const +{ + if ( this->hasUrls() && !this->urls().isEmpty()) { + return QMimeData::urls().first(); + } + return QUrl(); +} +void DeclarativeMimeData::setUrl(const QUrl &url) +{ + if (this->url() == url) + return; + + QList urlList; + urlList.append(url); + QMimeData::setUrls(urlList); + emit urlChanged(); +} + +QJsonArray DeclarativeMimeData::urls() const +{ + QJsonArray varUrls; + const auto lstUrls = QMimeData::urls(); + for (const QUrl &url : lstUrls) { + varUrls.append(url.toString()); + } + return varUrls; +} + +void DeclarativeMimeData::setUrls(const QJsonArray &urls) +{ + QList urlList; + urlList.reserve(urls.size()); + for (const QVariant &varUrl : urls) { + urlList << varUrl.toUrl(); + } + QMimeData::setUrls(urlList); + emit urlsChanged(); +} + +// color +QColor DeclarativeMimeData::color() const +{ + if (this->hasColor()) { + return qvariant_cast(this->colorData()); + } + return QColor(); +} + +bool DeclarativeMimeData::hasColor() const +{ + //qDebug() << " hasColor " << (QMimeData::hasColor() ? color().name() : "false"); + return QMimeData::hasColor(); +} + +void DeclarativeMimeData::setColor(const QColor &color) +{ + if (this->color() != color) { + this->setColorData(color); + emit colorChanged(); + } +} + +void DeclarativeMimeData::setData(const QString &mimeType, const QVariant &data) +{ + if (data.type() == QVariant::ByteArray) { + QMimeData::setData(mimeType, data.toByteArray()); + } else if (data.canConvert(QVariant::String)) { + QMimeData::setData(mimeType, data.toString().toLatin1()); + } +} + +/*! + \qmlproperty item MimeData::source + + Setting source to any existing qml item will enable the receiver of the drag and drop operation to know in which item + the operation originated. + + In the case of inter-application drag and drop operations, the source will not be available, and will be 0. + Be sure to test it in your QML code, before using it, or it will generate errors in the console. +*/ +QQuickItem* DeclarativeMimeData::source() const +{ + return m_source; +} +void DeclarativeMimeData::setSource(QQuickItem* source) +{ + if (m_source != source) { + m_source = source; + emit sourceChanged(); + } +} + +QByteArray DeclarativeMimeData::getDataAsByteArray(const QString& format) +{ + return data(format); +} diff --git a/src/qmlcontrols/draganddrop/DeclarativeMimeData.h b/src/qmlcontrols/draganddrop/DeclarativeMimeData.h new file mode 100644 index 0000000..5df6650 --- /dev/null +++ b/src/qmlcontrols/draganddrop/DeclarativeMimeData.h @@ -0,0 +1,116 @@ +/* + Copyright (C) 2010 by BetterInbox + Original author: Gregory Schlomoff + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DECLARATIVEMIMEDATA_H +#define DECLARATIVEMIMEDATA_H + +#include +#include +#include +#include +#include + +class DeclarativeMimeData : public QMimeData +{ + Q_OBJECT + + /** + * A plain text (MIME type text/plain) representation of the data. + */ + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + + /** + * A string if the data stored in the object is HTML (MIME type text/html); otherwise returns an empty string. + */ + Q_PROPERTY(QString html READ html WRITE setHtml NOTIFY htmlChanged) + + /** + * Url contained in the mimedata + */ + Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) + + /** + * A list of URLs contained within the MIME data object. + * URLs correspond to the MIME type text/uri-list. + */ + Q_PROPERTY(QJsonArray urls READ urls WRITE setUrls NOTIFY urlsChanged) + + /** + * A color if the data stored in the object represents a color (MIME type application/x-color); otherwise QColor(). + */ + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + + /** + * The graphical item on the scene that started the drag event. It may be null. + */ + Q_PROPERTY(QQuickItem* source READ source WRITE setSource NOTIFY sourceChanged) + + /** @see QMimeData::hasUrls */ + Q_PROPERTY(bool hasUrls READ hasUrls NOTIFY urlsChanged) + //TODO: Image property + + /** + * @sa QMimeData::formats + */ + Q_PROPERTY(QStringList formats READ formats) +public: + DeclarativeMimeData(); + DeclarativeMimeData(const QMimeData* copy); + + QUrl url() const; + void setUrl(const QUrl &url); + + QJsonArray urls() const; + void setUrls(const QJsonArray &urls); + + QColor color() const; + void setColor(const QColor &color); + Q_INVOKABLE bool hasColor() const; + + Q_INVOKABLE void setData(const QString &mimeType, const QVariant &data); + + QQuickItem* source() const; + void setSource(QQuickItem* source); + + Q_INVOKABLE QByteArray getDataAsByteArray(const QString& format); + + /* + QString text() const; //TODO: Reimplement this to issue the onChanged signals + void setText(const QString &text); + QString html() const; + void setHtml(const QString &html); + */ + +Q_SIGNALS: + void textChanged(); //FIXME not being used + void htmlChanged(); //FIXME not being used + void urlChanged(); + void urlsChanged(); + void colorChanged(); + void sourceChanged(); + +private: + QQuickItem* m_source; +}; + +#endif // DECLARATIVEMIMEDATA_H diff --git a/src/qmlcontrols/draganddrop/Mainpage.dox b/src/qmlcontrols/draganddrop/Mainpage.dox new file mode 100644 index 0000000..b92f1bf --- /dev/null +++ b/src/qmlcontrols/draganddrop/Mainpage.dox @@ -0,0 +1,15 @@ +/** @mainpage Drag and Drop + +

import org.kde.draganddrop

+ +Use those elements if you want to add drag and drop support to your application + +- DeclarativeDragArea +- DeclarativeDropArea +- DeclarativeDragDropEvent +- DeclarativeMimeData + +*/ + +// DOXYGEN_SET_PROJECT_NAME = DragAndDrop +// vim:ts=4:sw=4:expandtab:filetype=doxygen diff --git a/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp b/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp new file mode 100644 index 0000000..51953ae --- /dev/null +++ b/src/qmlcontrols/draganddrop/MimeDataWrapper.cpp @@ -0,0 +1,93 @@ +/* + Copyright (C) 2015 by Aleix Pol Gonzalez + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "MimeDataWrapper.h" +#include +#include + +MimeDataWrapper::MimeDataWrapper(const QMimeData* data, QObject* parent) + : QObject(parent) + , m_data(data) +{} + +QString MimeDataWrapper::text() const +{ + return m_data->text(); +} + +QString MimeDataWrapper::html() const +{ + return m_data->html(); +} + +QUrl MimeDataWrapper::url() const +{ + if ( m_data->hasUrls() && !m_data->urls().isEmpty()) { + return m_data->urls().first(); + } + return QUrl(); +} + +bool MimeDataWrapper::hasUrls() const +{ + return m_data->hasUrls(); +} + +QJsonArray MimeDataWrapper::urls() const +{ + QJsonArray varUrls; + const auto urls = m_data->urls(); + for (const QUrl &url : urls) { + varUrls.append(url.toString()); + } + return varUrls; +} + +QVariant MimeDataWrapper::color() const +{ + if (m_data->hasColor()) + return m_data->colorData(); + else + return QVariant(); +} + +QStringList MimeDataWrapper::formats() const +{ + return m_data->formats(); +} + + +QByteArray MimeDataWrapper::getDataAsByteArray(const QString& format) +{ + return m_data->data(format); +} + +QVariant MimeDataWrapper::source() const +{ +// In case it comes from a DeclarativeMimeData + return m_data->property("source"); +} + +QMimeData* MimeDataWrapper::mimeData() const +{ + return const_cast(m_data); +} diff --git a/src/qmlcontrols/draganddrop/MimeDataWrapper.h b/src/qmlcontrols/draganddrop/MimeDataWrapper.h new file mode 100644 index 0000000..94cb31d --- /dev/null +++ b/src/qmlcontrols/draganddrop/MimeDataWrapper.h @@ -0,0 +1,108 @@ +/* + Copyright (C) 2015 by Aleix Pol Gonzalez + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef MIMEDATAWRAPPER_H +#define MIMEDATAWRAPPER_H + +#include +#include +#include + +class QMimeData; +class QObject; +/** + * Exposes a const QMimeData instance + * + * In contrast to DeclarativeMimeData, doesn't create a copy of the QMimeData instance + */ +class MimeDataWrapper : public QObject +{ + Q_OBJECT + + /** + * A plain text (MIME type text/plain) representation of the data. + */ + Q_PROPERTY(QString text READ text CONSTANT) + + /** + * A string if the data stored in the object is HTML (MIME type text/html); otherwise returns an empty string. + */ + Q_PROPERTY(QString html READ html CONSTANT) + + /** + * Url contained in the mimedata + */ + Q_PROPERTY(QUrl url READ url CONSTANT) + + /** + * A list of URLs contained within the MIME data object. + * URLs correspond to the MIME type text/uri-list. + */ + Q_PROPERTY(QJsonArray urls READ urls CONSTANT) + + /** + * A color if the data stored in the object represents a color (MIME type application/x-color); otherwise QVariant(). + */ + Q_PROPERTY(QVariant color READ color CONSTANT) + + /** + * The graphical item on the scene that started the drag event. It may be null. + */ + Q_PROPERTY(QVariant source READ source CONSTANT) + + /** + * Mimetypes provided by the mime data instance + * + * @sa QMimeData::formats + */ + Q_PROPERTY(QStringList formats READ formats CONSTANT) + + /** + * @sa QMimeData::hasUrls + */ + Q_PROPERTY(bool hasUrls READ hasUrls CONSTANT) + + /** + * @returns the wrapped object + */ + Q_PROPERTY(QMimeData* mimeData READ mimeData CONSTANT) + +public: + MimeDataWrapper(const QMimeData* data, QObject* parent); + + QString text() const; + QString html() const; + QUrl url() const; + QJsonArray urls() const; + bool hasUrls() const; + QVariant color() const; + QStringList formats() const; + QVariant source() const; + QMimeData* mimeData() const; + + Q_INVOKABLE QByteArray getDataAsByteArray(const QString& format); + +private: + const QMimeData* m_data; +}; + +#endif diff --git a/src/qmlcontrols/draganddrop/draganddropplugin.cpp b/src/qmlcontrols/draganddrop/draganddropplugin.cpp new file mode 100644 index 0000000..13869b2 --- /dev/null +++ b/src/qmlcontrols/draganddrop/draganddropplugin.cpp @@ -0,0 +1,46 @@ +/* + Copyright 2011 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "draganddropplugin.h" + + +#include "DeclarativeDragArea.h" +#include "DeclarativeDragDropEvent.h" +#include "DeclarativeDropArea.h" +#include "DeclarativeMimeData.h" +#include "MimeDataWrapper.h" + +void DragAndDropPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.draganddrop")); + + qmlRegisterType(uri, 2, 0, "DropArea"); + qmlRegisterType(uri, 2, 0, "DragArea"); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + qmlRegisterType(); +#else + qmlRegisterAnonymousType(uri, 1); +#endif + qmlRegisterUncreatableType(uri, 2, 0, "MimeData", QStringLiteral("MimeData cannot be created from QML.")); + qmlRegisterUncreatableType(uri, 2, 0, "DragDropEvent", QStringLiteral("DragDropEvent cannot be created from QML.")); + qmlRegisterUncreatableType(uri, 2, 0, "MimeDataWrapper", QStringLiteral("DragDropEvent cannot be created from QML.")); +} diff --git a/src/qmlcontrols/draganddrop/draganddropplugin.h b/src/qmlcontrols/draganddrop/draganddropplugin.h new file mode 100644 index 0000000..204bc8f --- /dev/null +++ b/src/qmlcontrols/draganddrop/draganddropplugin.h @@ -0,0 +1,37 @@ +/* + Copyright 2011 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef DRAGANDDROPPLUGIN_H +#define DRAGANDDROPPLUGIN_H + +#include + +class DragAndDropPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/draganddrop/qmldir b/src/qmlcontrols/draganddrop/qmldir new file mode 100644 index 0000000..ec45a14 --- /dev/null +++ b/src/qmlcontrols/draganddrop/qmldir @@ -0,0 +1,3 @@ +module org.kde.draganddrop +plugin draganddropplugin + diff --git a/src/qmlcontrols/kcmcontrols/CMakeLists.txt b/src/qmlcontrols/kcmcontrols/CMakeLists.txt new file mode 100644 index 0000000..94a4873 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/CMakeLists.txt @@ -0,0 +1,19 @@ +project(kcmcontrols) + +set(kcmcontrols_SRCS + kcmcontrolsplugin.cpp +) + +add_library(kcmcontrolsplugin SHARED ${kcmcontrols_SRCS}) +target_link_libraries(kcmcontrolsplugin + Qt5::Core + Qt5::Quick + Qt5::Qml + Qt5::Gui + KF5::CoreAddons + KF5::QuickAddons +) + +install(TARGETS kcmcontrolsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kcm) + +install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kcm) diff --git a/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.cpp b/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.cpp new file mode 100644 index 0000000..03ee47e --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.cpp @@ -0,0 +1,35 @@ +/* + Copyright 2017 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "kcmcontrolsplugin.h" + + +#include + + +void KCMControlsPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(uri == QByteArray("org.kde.kcm")); + + qmlRegisterUncreatableType("org.kde.kcm", 1, 0, "ConfigModule", + QLatin1String("Do not create objects of type ConfigModule")); +} diff --git a/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.h b/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.h new file mode 100644 index 0000000..d276af0 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/kcmcontrolsplugin.h @@ -0,0 +1,37 @@ +/* + Copyright 2011 by Marco Martin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef KCMCONTROLSPLUGIN_H +#define KCMCONTROLSPLUGIN_H + +#include + +class KCMControlsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml b/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml new file mode 100644 index 0000000..b7f656d --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml @@ -0,0 +1,211 @@ +/* + Copyright (c) 2015 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.8 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as Controls +import QtQuick.Templates 2.2 as T2 +import QtGraphicalEffects 1.0 + +import org.kde.kirigami 2.12 as Kirigami + +/** + * Base delegate for KControlmodules based on Grid views of thumbnails + * Use the onClicked signal handler for managing the main action when + * the user clicks on the thumbnail + * @inherits QtQuick.Templates.ItemDelegate + */ +T2.ItemDelegate { + id: delegate + + /** + * toolTip: string + * string for a tooltip for the whole delegate + */ + property string toolTip + + /** + * subtitle: string + * optional string for the text to show below the main label + */ + property string subtitle + + /** + * thumbnail: Item + * the item actually implementing the thumbnail: the visualization is up to the implementation + */ + property alias thumbnail: thumbnailArea.data + + /** + * thumbnailAvailable: bool + * Set it to true when a thumbnail is actually available: when false, + * only an icon will be shown instead of the actual thumbnail + * ("edit-none" if pluginName is "None", otherwise it uses "view-preview"). + */ + property bool thumbnailAvailable: false + + /** + * actions: list + * A list of extra actions for the thumbnails. They will be shown as + * icons on the bottom-right corner of the thumbnail on mouse over + */ + property list actions + + width: GridView.view.cellWidth + height: GridView.view.cellHeight + hoverEnabled: true + + Kirigami.ShadowedRectangle { + id: thumbnail + anchors { + centerIn: parent + verticalCenterOffset: Math.ceil(-labelLayout.height/2) + } + width: Kirigami.Settings.isMobile ? delegate.width - Kirigami.Units.gridUnit : Math.min(delegate.GridView.view.implicitCellWidth, delegate.width - Kirigami.Units.gridUnit) + height: Kirigami.Settings.isMobile ? Math.round((delegate.width - Kirigami.Units.gridUnit) / 1.6) + : Math.min(delegate.GridView.view.implicitCellHeight - Kirigami.Units.gridUnit * 3, + delegate.height - Kirigami.Units.gridUnit) + radius: Kirigami.Units.smallSpacing + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.View + + shadow.xOffset: 0 + shadow.yOffset: 2 + shadow.size: 10 + shadow.color: Qt.rgba(0, 0, 0, 0.3) + + color: { + if (delegate.GridView.isCurrentItem) { + return Kirigami.Theme.highlightColor; + } else if (parent.hovered) { + return Kirigami.Theme.highlightColor; + } else { + return Kirigami.Theme.backgroundColor; + } + } + Behavior on color { + ColorAnimation { + duration: Kirigami.Units.longDuration + easing.type: Easing.OutQuad + } + } + + Rectangle { + id: thumbnailArea + radius: Kirigami.Units.smallSpacing/2 + anchors { + fill: parent + margins: Kirigami.Units.smallSpacing + } + + color: Kirigami.Theme.backgroundColor + Kirigami.Icon { + visible: !delegate.thumbnailAvailable + anchors.centerIn: parent + width: Kirigami.Units.iconSizes.large + height: width + source: typeof pluginName === "string" && pluginName === "None" ? "edit-none" : "view-preview" + } + } + + Rectangle { + anchors.fill: thumbnailArea + visible: actionsRow.children.length > 0 + opacity: Kirigami.Settings.isMobile || delegate.hovered || (actionsScope.focus) ? 1 : 0 + radius: delegate.thumbnailAvailable ? 0 : thumbnailArea.radius + color: Kirigami.Settings.isMobile ? "transparent" : Qt.rgba(1, 1, 1, 0.2) + + Behavior on opacity { + PropertyAnimation { + duration: Kirigami.Units.longDuration + easing.type: Easing.OutQuad + } + } + + FocusScope { + id: actionsScope + + anchors { + right: parent.right + rightMargin: Kirigami.Units.smallSpacing + bottom: parent.bottom + bottomMargin: Kirigami.Units.smallSpacing + } + width: actionsRow.width + height: actionsRow.height + + RowLayout { + id: actionsRow + + Repeater { + model: delegate.actions + delegate: Controls.Button { + icon.name: modelData.iconName + activeFocusOnTab: focus || delegate.focus + onClicked: modelData.trigger() + enabled: modelData.enabled + visible: modelData.visible + //NOTE: there aren't any global settings where to take "official" tooltip timeouts + Controls.ToolTip.delay: 1000 + Controls.ToolTip.timeout: 5000 + Controls.ToolTip.visible: (Kirigami.Settings.isMobile ? pressed : hovered) && modelData.tooltip.length > 0 + Controls.ToolTip.text: modelData.tooltip + } + } + } + } + } + } + + ColumnLayout { + id: labelLayout + spacing: 0 + anchors { + left: thumbnail.left + right: thumbnail.right + top: thumbnail.bottom + topMargin: caption.visible ? Kirigami.Units.smallSpacing : Kirigami.Units.largeSpacing + } + + // FIXME: These labels are center-aligned with a maximum width instead + // of the more conventional combination of "Layout.fillWidth: true" + // and "horizontalAlignment: Text.AlignHCenter" because that combination + // triggers https://bugreports.qt.io/browse/QTBUG-49646 + Controls.Label { + Layout.alignment: Qt.AlignHCenter + Layout.maximumWidth: labelLayout.width + text: delegate.text + elide: Text.ElideRight + } + Controls.Label { + id: caption + Layout.alignment: Qt.AlignHCenter + Layout.maximumWidth: labelLayout.width + visible: delegate.subtitle.length > 0 + opacity: 0.6 + text: delegate.subtitle + font.pointSize: theme.smallestFont.pointSize + elide: Text.ElideRight + } + } + + Controls.ToolTip.delay: 1000 + Controls.ToolTip.timeout: 5000 + Controls.ToolTip.visible: hovered && delegate.toolTip.length > 0 + Controls.ToolTip.text: toolTip +} diff --git a/src/qmlcontrols/kcmcontrols/qml/GridView.qml b/src/qmlcontrols/kcmcontrols/qml/GridView.qml new file mode 100644 index 0000000..f3950bc --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/GridView.qml @@ -0,0 +1,59 @@ +/* + Copyright (c) 2017 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.3 as Kirigami +import "private" + +/** + * A ScrollView containing a GridView, with the default behavior about + * sizing and background as recommended by the user interface guidelines + * For most KControl modules, it's recommended to use instead the GridViewKCM + * component as the root element of your module. + * @see GridViewKCM + */ +QtControls.ScrollView { + id: scroll + + /** + * view: GridView + * Exposes the internal GridView: in order to set a model or a delegate to it, + * use the following code: + * @code + * import org.kde.kcm 1.1 as KCM + * KCM.GridView { + * view.model: kcm.model + * view.delegate: KCM.GridDelegate {...} + * } + * @endcode + */ + property alias view: view + + activeFocusOnTab: false + Kirigami.Theme.colorSet: Kirigami.Theme.View + Kirigami.Theme.inherit: false + + Component.onCompleted: scroll.background.visible = true; + + GridViewInternal { + id: view + } + QtControls.ScrollBar.horizontal.visible: false +} diff --git a/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml b/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml new file mode 100644 index 0000000..c535ff9 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/GridViewKCM.qml @@ -0,0 +1,116 @@ +/* + Copyright (c) 2017 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.2 as Kirigami +import org.kde.kcm 1.1 as KCM + +/** + * This component is intended to be used as the root item for KCMs that are based upon + * a grid view of thumbnails, such as the theme or wallpaper selectors. + * It contains a GridView as its main item. + * It is possible to specify a header and footer component. + * @code + * import org.kde.kcm 1.1 as KCM + * KCM.GridViewKCM { + * header: Item {...} + * view.model: kcm.model + * view.delegate: KCM.GridDelegate {...} + * footer: Item {...} + * } + * @endcode + * @inherits org.kde.kirigami.Page + */ +Kirigami.Page { + id: root + + /** + * view: GridView + * Exposes the internal GridView: in order to set a model or a delegate to it, + * use the following code: + * @code + * import org.kde.kcm 1.1 as KCM + * KCM.GridViewKCM { + * ... + * view.model: kcm.model + * view.delegate: KCM.GridDelegate {...} + * ... + * } + * @endcode + */ + property alias view: scroll.view + + title: kcm.name + implicitWidth: { + var width = 0; + + // Show three columns at once, every colum occupies implicitCellWidth + Units.gridUnit + width += 3 * (view.implicitCellWidth + Kirigami.Units.gridUnit); + + var scrollBar = scroll.QtControls.ScrollBar.vertical; + width += scrollBar.width + scrollBar.leftPadding + scrollBar.rightPadding; + + width += scroll.leftPadding + scroll.rightPadding + width += root.leftPadding + root.rightPadding; + + return width; + } + implicitHeight: view.implicitCellHeight * 3 + (header ? header.height : 0) + (footer ? footer.height : 0) + Kirigami.Units.gridUnit + + flickable: scroll.view + + //NOTE: this should be smallspacing buit we need a pixel size in order to align with systemsettings widgets + leftPadding: Kirigami.Settings.isMobile ? 0 : headerParent.leftPadding + topPadding: headerParent.contentItem ? 0 : leftPadding + rightPadding: leftPadding + bottomPadding: footerParent.contentItem ? 0 : leftPadding + + header: QtControls.Control { + id: headerParent + height: contentItem ? implicitHeight : 0 + } + + footer: QtControls.Control { + id: footerParent + height: contentItem ? implicitHeight : 0 + } + Component.onCompleted: { + if (footer && footer != footerParent) { + var f = footer + + footerParent.contentItem = f + footer = footerParent + f.parent = footerParent + } + + if (header && header != headerParent) { + var f = header + + headerParent.contentItem = f + header = headerParent + f.parent = headerParent + } + } + + KCM.GridView { + id: scroll + anchors.fill: parent + } +} diff --git a/src/qmlcontrols/kcmcontrols/qml/ScrollView.qml b/src/qmlcontrols/kcmcontrols/qml/ScrollView.qml new file mode 100644 index 0000000..4482e06 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/ScrollView.qml @@ -0,0 +1,60 @@ +/* + Copyright (c) 2018 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.3 as Kirigami + +/** + * A ScrollView containing a GridView, with the default behavior about + * sizing and background as recommended by the user interface guidelines + * For most KControl modules, it's recommended to use instead the GridViewKCM + * component as the root element of your module. + * @code + * import org.kde.kcm 1.2 as KCM + * KCM.ScrollView { + * view: ListView { + * ... + * } + * } + * @endcode + * @see GridViewKCM + */ +QtControls.ScrollView { + id: scroll + + /** + * view: GridView + * Exposes the internal flickable + */ + property Flickable view + contentItem: view + onViewChanged: { + view.parent = scroll; + } + + activeFocusOnTab: false + Kirigami.Theme.colorSet: Kirigami.Theme.View + Kirigami.Theme.inherit: false + + Component.onCompleted: scroll.background.visible = true; + + + QtControls.ScrollBar.horizontal.visible: false +} diff --git a/src/qmlcontrols/kcmcontrols/qml/ScrollViewKCM.qml b/src/qmlcontrols/kcmcontrols/qml/ScrollViewKCM.qml new file mode 100644 index 0000000..be66c0d --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/ScrollViewKCM.qml @@ -0,0 +1,102 @@ +/* + Copyright (c) 2017 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.2 as Kirigami +import org.kde.kcm 1.1 as KCM +import "." as Priv + +/** + * This component is intended to be used as the root item for KCMs that are based upon a list view or another vertical flickable. + * It contains a ScrollView as its main item. + * It is possible to specify a header and footer component. + * @code + * import org.kde.kcm 1.2 as KCM + * KCM.ScrollViewKCM { + * header: Item {...} + * view: ListView { + * ... + * } + * footer: Item {...} + * } + * @endcode + * @inherits org.kde.kirigami.Page + */ +Kirigami.Page { + id: root + + /** + * view: GridView + * Exposes the internal flickable + */ + property alias view: scroll.view + + title: kcm.name + implicitWidth: Kirigami.Units.gridUnit * 20 + implicitHeight: view && view.contentHeight > 0 ? Math.min(view.contentHeight, Kirigami.Units.gridUnit * 20) : Kirigami.Units.gridUnit * 20 + //flickable: scroll.view + + //NOTE: this should be smallspacing buit we need a pixel size in order to align with systemsettings widgets + leftPadding: Kirigami.Settings.isMobile ? 0 : 4 + topPadding: headerParent.contentItem ? 0 : (Kirigami.Settings.isMobile ? 0 : 4) + rightPadding: (Kirigami.Settings.isMobile ? 0 : 4) + bottomPadding: footerParent.contentItem ? 0 : (Kirigami.Settings.isMobile ? 0 : 4) + + header: QtControls.Control { + id: headerParent + visible: root.contentItem && root.contentItem.visible + height: visible ? implicitHeight : 0 + leftPadding: 4 + topPadding: 4 + rightPadding: 4 + bottomPadding: 4 + } + + footer: QtControls.Control { + id: footerParent + visible: root.contentItem && root.contentItem.visible + height: visible ? implicitHeight : 0 + leftPadding: 4 + topPadding: 4 + rightPadding: 4 + bottomPadding: 4 + } + Component.onCompleted: { + if (footer && footer != footerParent) { + var f = footer + + footerParent.contentItem = f + footer = footerParent + f.parent = footerParent + } + + if (header && header != headerParent) { + var h = header + + headerParent.contentItem = h + header = headerParent + h.parent = headerParent + } + } + Priv.ScrollView { + id: scroll + anchors.fill: parent + } +} diff --git a/src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml b/src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml new file mode 100644 index 0000000..02c49d6 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml @@ -0,0 +1,118 @@ +/* + Copyright (c) 2017 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.2 as Kirigami +import org.kde.kcm 1.1 as KCM + +/** + * This component is intended to be used as root item for + * KCMs with arbitrary content. Often a Kirigami.FormLayout + * is used as main element. + * It is possible to specify a header and footer component. + * @code + * import org.kde.kcm 1.1 as KCM + * import org.kde.kirigami 2.3 as Kirigami + * KCM.SimpleKCM { + * Kirigami.FormLayout { + * TextField { + * Kirigami.FormData.label: "Label:" + * } + * TextField { + * Kirigami.FormData.label: "Label:" + * } + * } + * footer: Item {...} + * } + * @endcode + * @inherits org.kde.kirigami.ScrollablePage + */ +Kirigami.ScrollablePage { + id: root + + title: kcm.name + + leftPadding: Kirigami.Settings.isMobile ? 0 : 4 + topPadding: headerParent.contentItem ? 0 : (Kirigami.Settings.isMobile ? 0 : 4) + rightPadding: (Kirigami.Settings.isMobile ? 0 : 4) + bottomPadding: footerParent.contentItem ? 0 : (Kirigami.Settings.isMobile ? 0 : 4) + + header: QtControls.Control { + id: headerParent + visible: contentItem ? contentItem.visible : false + height: visible ? implicitHeight : 0 + leftPadding: 4 + topPadding: 4 + rightPadding: 4 + bottomPadding: 4 + } + + footer: QtControls.Control { + id: footerParent + visible: contentItem ? contentItem.visible : false + height: visible ? implicitHeight : 0 + leftPadding: 4 + topPadding: 4 + rightPadding: 4 + bottomPadding: 4 + } + + Component.onCompleted: { + if (footer && footer != footerParent) { + var f = footer + + footerParent.contentItem = f + footer = footerParent + footer.visible = true + f.parent = footerParent + } + + if (header && header != headerParent) { + var h = header + + headerParent.contentItem = h + header = headerParent + header.visible = true + h.parent = headerParent + } + } + + children: [ + Kirigami.Separator { + z: 999 + anchors { + left: parent.left + right: parent.right + top: parent.top + topMargin: root.header.visible ? root.header.height : 0 + } + visible: !root.flickable.atYBeginning && !Kirigami.Settings.isMobile + }, + Kirigami.Separator { + z: 999 + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + bottomMargin: root.footer.visible ? root.footer.height : 0 + } + visible: !root.flickable.atYEnd && !Kirigami.Settings.isMobile + } + ] +} diff --git a/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml b/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml new file mode 100644 index 0000000..b55dea3 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/private/GridViewInternal.qml @@ -0,0 +1,66 @@ +/* + Copyright (c) 2019 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import QtQuick 2.7 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.2 as QtControls +import org.kde.kirigami 2.3 as Kirigami + + +GridView { + id: view + property int implicitCellWidth: Kirigami.Units.gridUnit * 10 + property int implicitCellHeight: Math.round(implicitCellWidth / 1.6) + Kirigami.Units.gridUnit*3 + + onCurrentIndexChanged: positionViewAtIndex(currentIndex, GridView.Contain); + + QtObject { + id: internal + readonly property int availableWidth: scroll.width - internal.scrollBarSpace - 4 + readonly property int scrollBarSpace: scroll.QtControls.ScrollBar.vertical.width + } + anchors { + fill: parent + margins: 2 + leftMargin: scroll.QtControls.ScrollBar.vertical.visible ? 2 : internal.scrollBarSpace/2 + 2 + } + clip: true + activeFocusOnTab: true + + cellWidth: Math.floor(internal.availableWidth / Math.max(Math.floor(internal.availableWidth / (implicitCellWidth + Kirigami.Units.gridUnit)), 2)) + cellHeight: Kirigami.Settings.isMobile ? cellWidth/1.6 + Kirigami.Units.gridUnit : implicitCellHeight + + keyNavigationEnabled: true + keyNavigationWraps: true + highlightMoveDuration: 0 + + remove: Transition { + ParallelAnimation { + NumberAnimation { property: "scale"; to: 0.5; duration: Kirigami.Units.longDuration } + NumberAnimation { property: "opacity"; to: 0.0; duration: Kirigami.Units.longDuration } + } + } + + removeDisplaced: Transition { + SequentialAnimation { + // wait for the "remove" animation to finish + PauseAnimation { duration: Kirigami.Units.longDuration } + NumberAnimation { properties: "x,y"; duration: Kirigami.Units.longDuration } + } + } +} diff --git a/src/qmlcontrols/kcmcontrols/qml/qmldir b/src/qmlcontrols/kcmcontrols/qml/qmldir new file mode 100644 index 0000000..a553909 --- /dev/null +++ b/src/qmlcontrols/kcmcontrols/qml/qmldir @@ -0,0 +1,9 @@ +module org.kde.kcm +plugin kcmcontrolsplugin + +GridDelegate 1.1 GridDelegate.qml +GridViewKCM 1.1 GridViewKCM.qml +GridView 1.1 GridView.qml +ScrollView 1.2 ScrollView.qml +ScrollViewKCM 1.2 ScrollViewKCM.qml +SimpleKCM 1.1 SimpleKCM.qml diff --git a/src/qmlcontrols/kconfig/CMakeLists.txt b/src/qmlcontrols/kconfig/CMakeLists.txt new file mode 100644 index 0000000..59a68b2 --- /dev/null +++ b/src/qmlcontrols/kconfig/CMakeLists.txt @@ -0,0 +1,18 @@ +project(kconfigplugin) + +set(kconfigplugin_SRCS + kconfigplugin.cpp + kauthorizedproxy.cpp + ) + +add_library(kconfigplugin SHARED ${kconfigplugin_SRCS}) +target_link_libraries(kconfigplugin + Qt5::Core + Qt5::Qml + KF5::ConfigCore +) + +install(TARGETS kconfigplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kconfig) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kconfig) + diff --git a/src/qmlcontrols/kconfig/kauthorizedproxy.cpp b/src/qmlcontrols/kconfig/kauthorizedproxy.cpp new file mode 100644 index 0000000..3e9ec04 --- /dev/null +++ b/src/qmlcontrols/kconfig/kauthorizedproxy.cpp @@ -0,0 +1,41 @@ +/* + * Copyright 2016 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "kauthorizedproxy.h" + +#include + +KAuthorizedProxy::KAuthorizedProxy(QObject *parent) : QObject(parent) +{ + +} + +KAuthorizedProxy::~KAuthorizedProxy() +{ + +} + +bool KAuthorizedProxy::authorize(const QString &action) const +{ + return KAuthorized::authorize(action); +} + +bool KAuthorizedProxy::authorizeAction(const QString &action) const +{ + return KAuthorized::authorizeAction(action); +} diff --git a/src/qmlcontrols/kconfig/kauthorizedproxy.h b/src/qmlcontrols/kconfig/kauthorizedproxy.h new file mode 100644 index 0000000..416c9af --- /dev/null +++ b/src/qmlcontrols/kconfig/kauthorizedproxy.h @@ -0,0 +1,42 @@ +/* + * * Copyright 2016 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once + +#include + +class KAuthorizedProxy : public QObject +{ + Q_OBJECT + +public: + explicit KAuthorizedProxy(QObject *parent = nullptr); + ~KAuthorizedProxy() override; + + /** + * Returns whether the user is permitted to perform a certain action. + */ + Q_INVOKABLE bool authorize(const QString &action) const; + + /** + * Returns whether the user is permitted to perform a certain action. + * This behaves like authorize(), except that "action/" is prepended to action + */ + Q_INVOKABLE bool authorizeAction(const QString &action) const; + +}; diff --git a/src/qmlcontrols/kconfig/kconfigplugin.cpp b/src/qmlcontrols/kconfig/kconfigplugin.cpp new file mode 100644 index 0000000..31903e5 --- /dev/null +++ b/src/qmlcontrols/kconfig/kconfigplugin.cpp @@ -0,0 +1,35 @@ +/* + * Copyright 2016 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "kconfigplugin.h" + +#include + +#include "kauthorizedproxy.h" + +QObject *kauthorizedProxy_singleton_provider(QQmlEngine *, QJSEngine *) +{ + return new KAuthorizedProxy; +} + +void KConfigPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.kconfig")); + + qmlRegisterSingletonType(uri, 1, 0, "KAuthorized", kauthorizedProxy_singleton_provider); +} diff --git a/src/qmlcontrols/kconfig/kconfigplugin.h b/src/qmlcontrols/kconfig/kconfigplugin.h new file mode 100644 index 0000000..8bf1913 --- /dev/null +++ b/src/qmlcontrols/kconfig/kconfigplugin.h @@ -0,0 +1,31 @@ +/* + * Copyright 2016 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once + +#include + +class KConfigPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; + +}; diff --git a/src/qmlcontrols/kconfig/qmldir b/src/qmlcontrols/kconfig/qmldir new file mode 100644 index 0000000..6192fec --- /dev/null +++ b/src/qmlcontrols/kconfig/qmldir @@ -0,0 +1,2 @@ +module org.kde.kconfig +plugin kconfigplugin diff --git a/src/qmlcontrols/kcoreaddons/CMakeLists.txt b/src/qmlcontrols/kcoreaddons/CMakeLists.txt new file mode 100644 index 0000000..3f77f2d --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/CMakeLists.txt @@ -0,0 +1,20 @@ +project(kcoreaddons) + +set(kcoreaddonsplugin_SRCS + kcoreaddonsplugin.cpp + formats.cpp + kuserproxy.cpp + ) + +add_library(kcoreaddonsplugin SHARED ${kcoreaddonsplugin_SRCS}) +target_link_libraries(kcoreaddonsplugin + Qt5::Core + Qt5::Quick + Qt5::Qml + KF5::CoreAddons +) + +install(TARGETS kcoreaddonsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kcoreaddons) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kcoreaddons) + diff --git a/src/qmlcontrols/kcoreaddons/formats.cpp b/src/qmlcontrols/kcoreaddons/formats.cpp new file mode 100644 index 0000000..7881ac0 --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/formats.cpp @@ -0,0 +1,62 @@ +/* + * Copyright 2014 Bhushan Shah + * + * 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 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 "formats.h" + +Formats::Formats(QObject* parent) + : QObject(parent) + , m_format() +{ +} + +QString Formats::formatByteSize(double size, int precision) const +{ + return m_format.formatByteSize(size, precision); +} + +QString Formats::formatDuration(quint64 msecs, KFormat::DurationFormatOptions options) const +{ + return m_format.formatDuration(msecs, options); +} + +QString Formats::formatDuration(quint64 msecs, int options) const +{ + return m_format.formatDuration(msecs, static_cast(options)); +} + +QString Formats::formatDecimalDuration(quint64 msecs, int decimalPlaces) const +{ + return m_format.formatDecimalDuration(msecs, decimalPlaces); +} + +QString Formats::formatSpelloutDuration(quint64 msecs) const +{ + return m_format.formatSpelloutDuration(msecs); +} + +QString Formats::formatRelativeDate(const QDate &date, QLocale::FormatType format) const +{ + return m_format.formatRelativeDate(date, format); +} + +QString Formats::formatRelativeDateTime(const QDateTime &dateTime, QLocale::FormatType format) const +{ + return m_format.formatRelativeDateTime(dateTime, format); +} diff --git a/src/qmlcontrols/kcoreaddons/formats.h b/src/qmlcontrols/kcoreaddons/formats.h new file mode 100644 index 0000000..64b1b56 --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/formats.h @@ -0,0 +1,116 @@ +/* + * Copyright 2014 Bhushan Shah + * + * 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 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 FORMATS_H +#define FORMATS_H + +#include + +class Formats : public QObject +{ + Q_OBJECT + + public: + + explicit Formats (QObject* parent = nullptr); + + /** + * Converts size from bytes to the appropriate string representation + */ + Q_INVOKABLE QString formatByteSize(double size, int precision = 1) const; + + /** + * Given a number of milliseconds, converts that to a string containing + * the localized equivalent, e.g. 1:23:45 + */ + Q_INVOKABLE QString formatDuration(quint64 msecs, KFormat::DurationFormatOptions options = KFormat::DefaultDuration) const; + + Q_DECLARE_FLAGS(DurationFormatOptions, KFormat::DurationFormatOption) + + /** + * This overload exists so it can be called from QML, which does + * not support calling Q_INVOKABLEs with Q_ENUMS from different classes + * + * This is mentioned in the docs and also in https://bugreports.qt.io/browse/QTBUG-20639 + * Until that bug is fixed, we'll need this + */ + Q_INVOKABLE QString formatDuration(quint64 msecs, int options) const; + + /** + * Given a number of milliseconds, converts that to a string containing + * the localized equivalent to the requested decimal places. + * + * e.g. given formatDuration(60000), returns "1.0 minutes" + */ + Q_INVOKABLE QString formatDecimalDuration(quint64 msecs, int decimalPlaces = 2) const; + + /** + * Given a number of milliseconds, converts that to a spell-out string containing + * the localized equivalent. + * + * e.g. given formatSpelloutDuration(60001) returns "1 minute" + * given formatSpelloutDuration(62005) returns "1 minute and 2 seconds" + * given formatSpelloutDuration(90060000) returns "1 day and 1 hour" + * + * Units not interesting to the user, for example seconds or minutes when the first + * unit is day, are not returned because they are irrelevant. The same applies for + * seconds when the first unit is hour. + * + */ + Q_INVOKABLE QString formatSpelloutDuration(quint64 msecs) const; + + /** + * Returns a string formatted to a relative date style. + * + * If the date falls within one week before or after the current date + * then a relative date string will be returned, such as: + * * Yesterday + * * Today + * * Tomorrow + * * Last Tuesday + * * Next Wednesday + * + * If the date falls outside this period then the format is used + */ + Q_INVOKABLE QString formatRelativeDate(const QDate &date, QLocale::FormatType format) const; + + /** + * Returns a string formatted to a relative datetime style. + * + * If the dateTime falls within one week before or after the current date + * then a relative date string will be returned, such as: + * * Yesterday, 3:00pm + * * Today, 3:00pm + * * Tomorrow, 3:00pm + * * Last Tuesday, 3:00pm + * * Next Wednesday, 3:00pm + * + * If the datetime falls outside this period then the format is used + */ + Q_INVOKABLE QString formatRelativeDateTime(const QDateTime &dateTime, QLocale::FormatType format) const; + + private: + + KFormat m_format; +}; + +Q_DECLARE_METATYPE(QLocale::FormatType) + +#endif diff --git a/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp new file mode 100644 index 0000000..e95e2a9 --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp @@ -0,0 +1,49 @@ +/* + * Copyright 2014 Bhushan Shah + * Copyright 2014 David Edmundson + * + * 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 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 "kcoreaddonsplugin.h" + +#include + +#include "formats.h" +#include "kuserproxy.h" + +#include + +static QObject *formats_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine) +{ + Q_UNUSED(engine) + Q_UNUSED(scriptEngine) + + return new Formats(); +} + +void KCoreAddonsPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.kcoreaddons")); + + qmlRegisterSingletonType(uri, 1, 0, "Format", formats_singletontype_provider); + qRegisterMetaType(); + + qmlRegisterUncreatableType(uri, 1, 0, "FormatTypes", QString()); + + qmlRegisterType(uri, 1, 0, "KUser"); +} diff --git a/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.h b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.h new file mode 100644 index 0000000..adf484c --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.h @@ -0,0 +1,35 @@ +/* + * Copyright 2014 Bhushan Shah + * + * 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 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 KCOREADDONSPLUGIN_H +#define KCOREADDONSPLUGIN_H + +#include + +class KCoreAddonsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/kcoreaddons/kuserproxy.cpp b/src/qmlcontrols/kcoreaddons/kuserproxy.cpp new file mode 100644 index 0000000..feed0d2 --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/kuserproxy.cpp @@ -0,0 +1,140 @@ +/* +Copyright 2013 Marco Martin +Copyright 2014 Sebastian Kügler + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) version 3, or any +later version accepted by the membership of KDE e.V. (or its +successor approved by the membership of KDE e.V.), which shall +act as a proxy defined in Section 6 of version 3 of the license. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library. If not, see . +*/ + +#include "kuserproxy.h" +#include +#include +#include +#include +#include + +#include + + +const QString etcPasswd = QStringLiteral("/etc/passwd"); +const QString accountsServiceIconPath = QStringLiteral("/var/lib/AccountsService/icons"); + +KUserProxy::KUserProxy (QObject *parent) + : QObject(parent), + m_temporaryEmptyFaceIconPath(false) +{ + QString pathToFaceIcon(m_user.faceIconPath()); + if (pathToFaceIcon.isEmpty()) { + //KUser returns null if the current faceIconPath is empty + //so we should explicitly watch ~/.face.icon rather than faceIconPath() + //as we want to watch for this file being created + pathToFaceIcon = QDir::homePath() + QStringLiteral("/.face.icon"); + } + + m_dirWatch.addFile(pathToFaceIcon); + m_dirWatch.addFile(accountsServiceIconPath + QLatin1Char('/') + m_user.loginName()); + if (QFile::exists(etcPasswd)) { + m_dirWatch.addFile(etcPasswd); + } + + connect(&m_dirWatch, &KDirWatch::dirty, this, &KUserProxy::update); + connect(&m_dirWatch, &KDirWatch::created, this, &KUserProxy::update); + connect(&m_dirWatch, &KDirWatch::deleted, this, &KUserProxy::update); +} + +KUserProxy::~KUserProxy() +{ +} + +void KUserProxy::update(const QString &path) +{ + if (path == m_user.faceIconPath() || path == QDir::homePath() + QLatin1String("/.face.icon") + || path == accountsServiceIconPath + QLatin1Char('/') + m_user.loginName()) { + // we need to force updates, even when the path doesn't change, + // but the underlying image does. Change path temporarily, to + // make the Image reload. + // Needs cache: false in the Image item to actually reload + m_temporaryEmptyFaceIconPath = true; + emit faceIconUrlChanged(); + m_temporaryEmptyFaceIconPath = false; + emit faceIconUrlChanged(); + } else if (path == etcPasswd) { + m_user = KUser(); + emit nameChanged(); + } +} + +QString KUserProxy::fullName() const +{ + QString fullName = m_user.property(KUser::FullName).toString(); + if (!fullName.isEmpty()) { + return fullName; + } + return loginName(); +} + +QString KUserProxy::loginName() const +{ + return m_user.loginName(); +} + +QUrl KUserProxy::faceIconUrl() const +{ + if (m_temporaryEmptyFaceIconPath) { + return QUrl(); + } + const QString u = m_user.faceIconPath(); + const QFile f(u); + if (f.exists(u)) { + // We need to return a file URL, not a simple path + return QUrl::fromLocalFile(u); + } + return QUrl(); +} + +QString KUserProxy::os() +{ + if (m_os.isEmpty()) { + QFile osfile(QStringLiteral("/etc/os-release")); + if (osfile.exists()) { + if (!osfile.open(QIODevice::ReadOnly | QIODevice::Text)) { + return QString(); + } + + QTextStream in(&osfile); + while(!in.atEnd()) { + QString line = in.readLine(); + if (line.startsWith(QLatin1String("PRETTY_NAME"))) { + QStringList fields = line.split(QLatin1String("PRETTY_NAME=\"")); + if (fields.count() == 2) { + osfile.close(); + QString pretty = fields.at(1); + pretty.chop(1); + m_os = pretty; + return pretty; + } + } + } + } + } + return m_os; +} + +QString KUserProxy::host() const +{ + return QHostInfo::localHostName(); +} + diff --git a/src/qmlcontrols/kcoreaddons/kuserproxy.h b/src/qmlcontrols/kcoreaddons/kuserproxy.h new file mode 100644 index 0000000..57b7030 --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/kuserproxy.h @@ -0,0 +1,130 @@ +/* +Copyright 2013 Marco Martin +Copyright 2014 Sebastian Kügler + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) version 3, or any +later version accepted by the membership of KDE e.V. (or its +successor approved by the membership of KDE e.V.), which shall +act as a proxy defined in Section 6 of version 3 of the license. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library. If not, see . +*/ + +#ifndef KUSERPROXY_H +#define KUSERPROXY_H + +#include + +#include +#include + +/** + * KUserProxy (exposed as KUser to the QML runtime) is an object allowing + * read-only access to the user's name, os and version and the configured + * user image. This object can be used to personalize user interfaces. + * + * Example usage: + * @code + import org.kde.kcoreaddons 1.0 as KCoreAddons + [...] + + Item { + [...] + KCoreAddons.KUser { + id: kuser + } + + Image { + id: faceIcon + source: kuser.faceIconUrl + [...] + } + + Text { + text: kuser.fullName + [...] + } + } + @endcode + + * @short KUser provides read-only access to the user's personal information + * @see KUser + */ +class KUserProxy : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QString fullName READ fullName NOTIFY nameChanged) + Q_PROPERTY(QString loginName READ loginName NOTIFY nameChanged) + Q_PROPERTY(QUrl faceIconUrl READ faceIconUrl NOTIFY faceIconUrlChanged) + Q_PROPERTY(QString os READ os CONSTANT) + Q_PROPERTY(QString host READ host CONSTANT) + +public: + KUserProxy(QObject *parent = nullptr); + ~KUserProxy(); + + + /** + * @return the full name of the user + * @see nameChanged + */ + QString fullName() const; + + /** + * @return the user's login name + * @see nameChanged + * + */ + QString loginName() const; + + /** + * @return the url of the user's configured image (including file:/) + * @see faceIconUrlChanged + */ + QUrl faceIconUrl() const; + + /** + * @return pretty name indicating operating system and version + * @see nameChanged + */ + QString os(); + + /** + * @return the system's hostname + * @see nameChanged + */ + QString host() const; + +Q_SIGNALS: + /** + * signal that the user's name or login name changed + * @see fullName + * @see loginName + */ + void nameChanged(); + /** + * signal that the user image changed + * @see faceIconUrl + */ + void faceIconUrlChanged(); + +private: + void update(const QString &path); + KDirWatch m_dirWatch; + KUser m_user; + QString m_os; + bool m_temporaryEmptyFaceIconPath; +}; + +#endif //KUSERPROXY_H + diff --git a/src/qmlcontrols/kcoreaddons/qmldir b/src/qmlcontrols/kcoreaddons/qmldir new file mode 100644 index 0000000..626f8ce --- /dev/null +++ b/src/qmlcontrols/kcoreaddons/qmldir @@ -0,0 +1,3 @@ +module org.kde.kcoreaddons +plugin kcoreaddonsplugin + diff --git a/src/qmlcontrols/kioplugin/CMakeLists.txt b/src/qmlcontrols/kioplugin/CMakeLists.txt new file mode 100644 index 0000000..7b258e0 --- /dev/null +++ b/src/qmlcontrols/kioplugin/CMakeLists.txt @@ -0,0 +1,18 @@ +project(kioplugin) + +set(kioplugin_SRCS + kioplugin.cpp + krunproxy.cpp + ) + +add_library(kio SHARED ${kioplugin_SRCS}) +target_link_libraries(kio + Qt5::Core + Qt5::Qml + KF5::KIOWidgets +) + +install(TARGETS kio DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kio) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kio) + diff --git a/src/qmlcontrols/kioplugin/kioplugin.cpp b/src/qmlcontrols/kioplugin/kioplugin.cpp new file mode 100644 index 0000000..3cac84d --- /dev/null +++ b/src/qmlcontrols/kioplugin/kioplugin.cpp @@ -0,0 +1,30 @@ +/* + * Copyright 2014 Antonis Tsiapaliokas + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "kioplugin.h" + +#include + +#include "krunproxy.h" + +void KioPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.kio")); + + qmlRegisterType(uri, 1, 0, "KRun"); +} diff --git a/src/qmlcontrols/kioplugin/kioplugin.h b/src/qmlcontrols/kioplugin/kioplugin.h new file mode 100644 index 0000000..c960563 --- /dev/null +++ b/src/qmlcontrols/kioplugin/kioplugin.h @@ -0,0 +1,33 @@ +/* + * Copyright 2014 Antonis Tsiapaliokas + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef KIOPLUGIN_H +#define KIOPLUGIN_H + +#include + +class KioPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/kioplugin/krunproxy.cpp b/src/qmlcontrols/kioplugin/krunproxy.cpp new file mode 100644 index 0000000..87fc8ee --- /dev/null +++ b/src/qmlcontrols/kioplugin/krunproxy.cpp @@ -0,0 +1,60 @@ +/* + * Copyright 2014 Antonis Tsiapaliokas + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "krunproxy.h" + +#include + +#include +#include + +KRunProxy::KRunProxy(QObject* parent) + : QObject(parent) +{ +} + +bool KRunProxy::openUrl(const QString &file) +{ + QUrl fileUrl(file); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForFile(fileUrl.isLocalFile() ? fileUrl.toLocalFile() : fileUrl.path()); + const QString fileMimeType = mime.name(); + + if (fileMimeType == QLatin1String("application/x-executable") || !mime.isValid()) { + //for security reasons we should not be able to execute applications. + //We should use its desktop file to access it. + return false; + } + + if (fileMimeType == QLatin1String("application/x-desktop") && fileUrl.isLocalFile()) { + // If our mimetype is a desktop file, then we don't want to open + // the desktop file itself but the application in which it is associated + // with. + return openService(fileUrl.toLocalFile()); + } else { + return KRun::runUrl(fileUrl, fileMimeType, nullptr, KRun::RunFlags{}); + } +} + +bool KRunProxy::openService(const QString &serviceName) +{ + KService::Ptr service = KService::serviceByDesktopName(serviceName); + if(service) + return KRun::runApplication(*service, QList(), nullptr) != 0; + return false; +} diff --git a/src/qmlcontrols/kioplugin/krunproxy.h b/src/qmlcontrols/kioplugin/krunproxy.h new file mode 100644 index 0000000..4a32d87 --- /dev/null +++ b/src/qmlcontrols/kioplugin/krunproxy.h @@ -0,0 +1,45 @@ +/* + * Copyright 2014 Antonis Tsiapaliokas + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef KRUNPROXY_H +#define KRUNPROXY_H + +#include + +class KRunProxy : public QObject +{ + Q_OBJECT + + public: + + explicit KRunProxy (QObject* parent = nullptr); + + /** + * opens the url from the existing file + */ + Q_INVOKABLE bool openUrl(const QString &fileUrl); + + /** + * Runs the service (application) + * @param serviceName the name of the desktop file without extension + * @return true on success + */ + Q_INVOKABLE bool openService(const QString &serviceName); +}; + +#endif diff --git a/src/qmlcontrols/kioplugin/qmldir b/src/qmlcontrols/kioplugin/qmldir new file mode 100644 index 0000000..fa58b77 --- /dev/null +++ b/src/qmlcontrols/kioplugin/qmldir @@ -0,0 +1,3 @@ +module org.kde.kio +plugin kio + diff --git a/src/qmlcontrols/kquickcontrols/CMakeLists.txt b/src/qmlcontrols/kquickcontrols/CMakeLists.txt new file mode 100644 index 0000000..f2bee5e --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/CMakeLists.txt @@ -0,0 +1,8 @@ +project(kquickcontrols) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kquickcontrols) +install(FILES KeySequenceItem.qml DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kquickcontrols) +install(FILES ColorButton.qml DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kquickcontrols) + +add_subdirectory(private) + diff --git a/src/qmlcontrols/kquickcontrols/ColorButton.qml b/src/qmlcontrols/kquickcontrols/ColorButton.qml new file mode 100644 index 0000000..28ee09e --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/ColorButton.qml @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2015 David Edmundson + * + * 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 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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 + */ + +import QtQuick 2.2 +import QtQuick.Controls 1.2 as QtControls +import QtQuick.Dialogs 1.0 as QtDialogs + +/** + * @short A pushbutton to display or allow user selection of a color. + * + * This widget can be used to display or allow user selection of a color. + * + * Example usage: + * @code + * import org.kde.kquickcontrols 2.0 + * + * ColorButton { + * [...] + * onColorChanged: console.log(color) + * } + * @endcode + * + * @inherits QtQuick.Controls.Button + */ +QtControls.Button { + id: colorPicker + + /** + * The user selected color + */ + property alias color: colorDialog.color + + /** + * Title to show in the dialog + */ + property alias dialogTitle: colorDialog.title + + /** + * The color which the user has currently selected whilst the dialog is open + * For the color that is set when the dialog is accepted, use the color property. + */ + property alias currentColor: colorDialog.currentColor + + /** + * Allow the user to configure an alpha value + */ + property alias showAlphaChannel: colorDialog.showAlphaChannel + + /** + * This signal is emitted when the color dialog has been accepted + * + * @since 5.61 + */ + signal accepted(color color) + + readonly property real _buttonMarigns: 4 // same as QStyles. Remove if we can get this provided by the QQC theme + + implicitWidth: 40 + _buttonMarigns*2 //to perfectly clone kcolorbutton from kwidgetaddons + + + //create a checkerboard background for alpha to be adjusted + Canvas { + anchors.fill: colorBlock + visible: colorDialog.color.a < 1 + + onPaint: { + var ctx = getContext('2d'); + + ctx.fillStyle = "white"; + ctx.fillRect(0,0, ctx.width, ctx.height) + + ctx.fillStyle = "black"; + //in blocks of 16x16 draw two black squares of 8x8 in top left and bottom right + for (var j=0;j + * Copyright (C) 2014 David Edmundson + * Copyright (C) 1998 Mark Donohoe + * Copyright (C) 2001 Ellis Whitehead + * Copyright (C) 2007 Andreas Hartmetz + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "keysequencehelper.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +uint qHash(const QKeySequence &seq) +{ + return qHash(seq.toString()); +} + +class KeySequenceHelperPrivate +{ +public: + KeySequenceHelperPrivate(KeySequenceHelper *q); + + void init(); + + static QKeySequence appendToSequence(const QKeySequence &seq, int keyQt); + static bool isOkWhenModifierless(int keyQt); + + void updateShortcutDisplay(); + void startRecording(); + + /** + * Conflicts the key sequence @a seq with a current standard + * shortcut? + */ + bool conflictWithStandardShortcuts(const QKeySequence &seq); + + /** + * Conflicts the key sequence @a seq with a current global + * shortcut? + */ + bool conflictWithGlobalShortcuts(const QKeySequence &seq); + + /** + * Get permission to steal the shortcut @seq from the standard shortcut @a std. + */ + bool stealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq); + + bool checkAgainstStandardShortcuts() const + { + return checkAgainstShortcutTypes & KeySequenceHelper::StandardShortcuts; + } + + bool checkAgainstGlobalShortcuts() const + { + return checkAgainstShortcutTypes & KeySequenceHelper::GlobalShortcuts; + } + + void controlModifierlessTimout() + { + if (nKey != 0 && !modifierKeys) { + // No modifier key pressed currently. Start the timout + modifierlessTimeout.start(600); + } else { + // A modifier is pressed. Stop the timeout + modifierlessTimeout.stop(); + } + + } + + void cancelRecording() + { + keySequence = oldKeySequence; + q->doneRecording(); + } + + +//members + KeySequenceHelper *const q; + QToolButton *clearButton; + + QPointer grabbedWindow; + QKeySequence keySequence; + QKeySequence oldKeySequence; + QTimer modifierlessTimeout; + bool allowModifierless; + uint nKey; + uint modifierKeys; + bool isRecording; + bool multiKeyShortcutsAllowed; + QString componentName; + QString shortcutDisplay; + + //! Check the key sequence against KStandardShortcut::find() + KeySequenceHelper::ShortcutTypes checkAgainstShortcutTypes; + + /** + * The list of action to check against for conflict shortcut + */ + QList checkList; // deprecated + + /** + * The list of action collections to check against for conflict shortcut + */ +// QList checkActionCollections; + + /** + * The action to steal the shortcut from. + */ + QList stealActions; + + bool stealShortcuts(const QList &actions, const QKeySequence &seq); + void wontStealShortcut(QAction *item, const QKeySequence &seq); + +}; + +KeySequenceHelperPrivate::KeySequenceHelperPrivate(KeySequenceHelper *q) +: q(q) +, allowModifierless(false) +, nKey(0) +, modifierKeys(0) +, isRecording(false) +, multiKeyShortcutsAllowed(true) +, componentName() +, checkAgainstShortcutTypes(KeySequenceHelper::StandardShortcuts | KeySequenceHelper::GlobalShortcuts) +, stealActions() +{ + +} + +KeySequenceHelper::KeySequenceHelper(QQuickItem* parent): + QQuickItem(parent), + d(new KeySequenceHelperPrivate(this)) +{ + Q_UNUSED(parent); + connect(&d->modifierlessTimeout, SIGNAL(timeout()), this, SLOT(doneRecording())); + d->updateShortcutDisplay(); +} + + +KeySequenceHelper::~KeySequenceHelper() +{ + if (d->grabbedWindow) { + d->grabbedWindow->setKeyboardGrabEnabled(false); + } + delete d; +} + +bool KeySequenceHelper::multiKeyShortcutsAllowed() const +{ + return d->multiKeyShortcutsAllowed; +} + +void KeySequenceHelper::setMultiKeyShortcutsAllowed(bool allowed) +{ + d->multiKeyShortcutsAllowed = allowed; +} + +void KeySequenceHelper::setModifierlessAllowed(bool allow) +{ + d->allowModifierless = allow; +} + +bool KeySequenceHelper::isModifierlessAllowed() +{ + return d->allowModifierless; +} + +bool KeySequenceHelper::isKeySequenceAvailable(const QKeySequence& keySequence) const +{ + if (keySequence.isEmpty()) { + return true; + } + return !(d->conflictWithGlobalShortcuts(keySequence) + || d->conflictWithStandardShortcuts(keySequence)); +} + +// +// void KeySequenceHelper::setCheckActionCollections(const QList &actionCollections) +// { +// d->checkActionCollections = actionCollections; +// } +// + +//slot +void KeySequenceHelper::captureKeySequence() +{ + d->startRecording(); +} + +QKeySequence KeySequenceHelper::keySequence() const +{ + return d->keySequence; +} + +void KeySequenceHelper::setKeySequence(const QKeySequence& sequence) +{ + if (!d->isRecording) { + d->oldKeySequence = d->keySequence; + } + d->keySequence = sequence; + d->updateShortcutDisplay(); + emit keySequenceChanged(d->keySequence); +} + + +void KeySequenceHelper::clearKeySequence() +{ + setKeySequence(QKeySequence()); +} + +void KeySequenceHelperPrivate::startRecording() +{ + nKey = 0; + modifierKeys = 0; + oldKeySequence = keySequence; + keySequence = QKeySequence(); + isRecording = true; + grabbedWindow = QQuickRenderControl::renderWindowFor(q->window()); + if (!grabbedWindow) { + grabbedWindow = q->window(); + } + if (grabbedWindow) { + grabbedWindow->setKeyboardGrabEnabled(true); + } + updateShortcutDisplay(); +} +// +void KeySequenceHelper::doneRecording() +{ + d->modifierlessTimeout.stop(); + d->isRecording = false; + d->stealActions.clear(); + if (d->grabbedWindow) { + d->grabbedWindow->setKeyboardGrabEnabled(false); + } + if (d->keySequence == d->oldKeySequence) { +// The sequence hasn't changed + d->updateShortcutDisplay(); + return; + } + + if (! isKeySequenceAvailable(d->keySequence)) { +// The sequence had conflicts and the user said no to stealing it + d->keySequence = d->oldKeySequence; + } else { + emit keySequenceChanged(d->keySequence); + } + + Q_EMIT captureFinished(); + + d->updateShortcutDisplay(); +} + + +bool KeySequenceHelperPrivate::conflictWithGlobalShortcuts(const QKeySequence &keySequence) +{ +#ifdef Q_OS_WIN + //on windows F12 is reserved by the debugger at all times, so we can't use it for a global shortcut + if (KeySequenceHelper::GlobalShortcuts && keySequence.toString().contains(QLatin1String("F12"))) { + QString title = i18n("Reserved Shortcut"); + QString message = i18n("The F12 key is reserved on Windows, so cannot be used for a global shortcut.\n" + "Please choose another one."); + + KMessageBox::sorry(0, message, title); + return false; + } +#endif + + if (!(checkAgainstShortcutTypes & KeySequenceHelper::GlobalShortcuts)) { + return false; + } + + // Global shortcuts are on key+modifier shortcuts. They can clash with + // each of the keys of a multi key shortcut. + QList others; + for (int i = 0; i < keySequence.count(); ++i) { + QKeySequence tmp(keySequence[i]); + + if (!KGlobalAccel::isGlobalShortcutAvailable(tmp, componentName)) { + others << KGlobalAccel::getGlobalShortcutsByKey(tmp); + } + } + + if (!others.isEmpty() + && !KGlobalAccel::promptStealShortcutSystemwide(nullptr, others, keySequence)) { + return true; + } + + // The user approved stealing the shortcut. We have to steal + // it immediately because KAction::setGlobalShortcut() refuses + // to set a global shortcut that is already used. There is no + // error it just silently fails. So be nice because this is + // most likely the first action that is done in the slot + // listening to keySequenceChanged(). + for (int i = 0; i < keySequence.count(); ++i) { + KGlobalAccel::stealShortcutSystemwide(keySequence[i]); + } + return false; +} + +bool KeySequenceHelperPrivate::conflictWithStandardShortcuts(const QKeySequence &keySequence) +{ + if (!checkAgainstStandardShortcuts()) { + return false; + } + + KStandardShortcut::StandardShortcut ssc = KStandardShortcut::find(keySequence); + if (ssc != KStandardShortcut::AccelNone && !stealStandardShortcut(ssc, keySequence)) { + qDebug() << "!!!!!!!!!!!!!!"; + return true; + } + return false; +} + +bool KeySequenceHelperPrivate::stealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq) +{ + QString title = i18n("Conflict with Standard Application Shortcut"); + QString message = i18n("The '%1' key combination is also used for the standard action " + "\"%2\" that some applications use.\n" + "Do you really want to use it as a global shortcut as well?", + seq.toString(QKeySequence::NativeText), KStandardShortcut::label(std)); + + if (KMessageBox::warningContinueCancel(nullptr, message, title, KGuiItem(i18n("Reassign"))) != KMessageBox::Continue) { + return false; + } + return true; +} + +void KeySequenceHelperPrivate::updateShortcutDisplay() +{ + //empty string if no non-modifier was pressed + QString s = keySequence.toString(QKeySequence::NativeText); + s.replace(QLatin1Char('&'), QStringLiteral("&&")); + + if (isRecording) { + if (modifierKeys) { + if (!s.isEmpty()) { + s.append(QLatin1Char(',')); + } + if (modifierKeys & Qt::MetaModifier) { + s += QKeySequence(Qt::MetaModifier).toString(QKeySequence::NativeText); + } +#if defined(Q_OS_MAC) + if (modifierKeys & Qt::AltModifier) { + s += QKeySequence(Qt::AltModifier).toString(QKeySequence::NativeText); + } + if (modifierKeys & Qt::ControlModifier) { + s += QKeySequence(Qt::ControlModifier).toString(QKeySequence::NativeText); + } +#else + if (modifierKeys & Qt::ControlModifier) { + s += QKeySequence(Qt::ControlModifier).toString(QKeySequence::NativeText); + } + if (modifierKeys & Qt::AltModifier) { + s += QKeySequence(Qt::AltModifier).toString(QKeySequence::NativeText); + } +#endif + if (modifierKeys & Qt::ShiftModifier) { + s += QKeySequence(Qt::ShiftModifier).toString(QKeySequence::NativeText); + } + if (modifierKeys & Qt::KeypadModifier) { + s += QKeySequence(Qt::KeypadModifier).toString(QKeySequence::NativeText); + } + } else if (nKey == 0) { + s = i18nc("What the user inputs now will be taken as the new shortcut", "Input"); + } + //make it clear that input is still going on + s.append(QStringLiteral(" ...")); + } + + if (s.isEmpty()) { + s = i18nc("No shortcut defined", "None"); + } + + s.prepend(QLatin1Char(' ')); + s.append(QLatin1Char(' ')); + shortcutDisplay = s; + q->shortcutDisplayChanged(s); +} + +QString KeySequenceHelper::shortcutDisplay() const +{ + return d->shortcutDisplay; +} + +void KeySequenceHelper::keyPressed(int key, int modifiers) +{ + if (key == -1) { + // Qt sometimes returns garbage keycodes, I observed -1, if it doesn't know a key. + // We cannot do anything useful with those (several keys have -1, indistinguishable) + // and QKeySequence.toString() will also yield a garbage string. + KMessageBox::sorry(nullptr, + i18n("The key you just pressed is not supported by Qt."), + i18n("Unsupported Key")); + return d->cancelRecording(); + } + + // Qt doesn't properly recognize Super_L/Super_R as MetaModifier + if (key == Qt::Key_Super_L || key == Qt::Key_Super_R) { + modifiers |= Qt::MetaModifier; + } + + //don't have the return or space key appear as first key of the sequence when they + //were pressed to start editing - catch and them and imitate their effect + if (!d->isRecording && ((key == Qt::Key_Return || key == Qt::Key_Space))) { + d->startRecording(); + d->modifierKeys = modifiers; + d->updateShortcutDisplay(); + return; + } + + d->modifierKeys = modifiers; + + switch (key) { + case Qt::Key_AltGr: //or else we get unicode salad + return; + case Qt::Key_Shift: + case Qt::Key_Control: + case Qt::Key_Alt: + case Qt::Key_Meta: + case Qt::Key_Super_L: + case Qt::Key_Super_R: + case Qt::Key_Menu: //unused (yes, but why?) + d->controlModifierlessTimout(); + d->updateShortcutDisplay(); + break; + default: + + if (d->nKey == 0 && !(d->modifierKeys & ~Qt::SHIFT)) { + // It's the first key and no modifier pressed. Check if this is + // allowed + if (!(KeySequenceHelperPrivate::isOkWhenModifierless(key) + || d->allowModifierless)) { + // No it's not + return; + } + } + + // We now have a valid key press. + if (key) { + if ((key == Qt::Key_Backtab) && (d->modifierKeys & Qt::SHIFT)) { + key = Qt::Key_Tab | d->modifierKeys; + } else { + key |= (d->modifierKeys); + } + + if (d->nKey == 0) { + d->keySequence = QKeySequence(key); + } else { + d->keySequence = + KeySequenceHelperPrivate::appendToSequence(d->keySequence, key); + } + + d->nKey++; + if ((!d->multiKeyShortcutsAllowed) || (d->nKey >= 4)) { + doneRecording(); + return; + } + d->controlModifierlessTimout(); + d->updateShortcutDisplay(); + } + } +} +// +void KeySequenceHelper::keyReleased(int key, int modifiers) +{ + if (key == -1) { + // ignore garbage, see keyPressEvent() + return; + } + + // Qt doesn't properly recognize Super_L/Super_R as MetaModifier + if (key == Qt::Key_Super_L || key == Qt::Key_Super_R) { + modifiers &= ~Qt::MetaModifier; + } + + //if a modifier that belongs to the shortcut was released... + if ((modifiers & d->modifierKeys) < d->modifierKeys) { + d->modifierKeys = modifiers; + d->controlModifierlessTimout(); + d->updateShortcutDisplay(); + } +} +// +//static +QKeySequence KeySequenceHelperPrivate::appendToSequence(const QKeySequence &seq, int keyQt) +{ + if (seq.matches(keyQt) != QKeySequence::NoMatch) { + return seq; + } + + switch (seq.count()) { + case 0: + return QKeySequence(keyQt); + case 1: + return QKeySequence(seq[0], keyQt); + case 2: + return QKeySequence(seq[0], seq[1], keyQt); + case 3: + return QKeySequence(seq[0], seq[1], seq[2], keyQt); + default: + return seq; + } +} +// +//static +bool KeySequenceHelperPrivate::isOkWhenModifierless(int keyQt) +{ + //this whole function is a hack, but especially the first line of code + if (QKeySequence(keyQt).toString().length() == 1) { + return false; + } + + switch (keyQt) { + case Qt::Key_Return: + case Qt::Key_Space: + case Qt::Key_Tab: + case Qt::Key_Backtab: //does this ever happen? + case Qt::Key_Backspace: + case Qt::Key_Delete: + return false; + default: + return true; + } +} diff --git a/src/qmlcontrols/kquickcontrols/private/keysequencehelper.h b/src/qmlcontrols/kquickcontrols/private/keysequencehelper.h new file mode 100644 index 0000000..f7f8bc2 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/keysequencehelper.h @@ -0,0 +1,147 @@ +/* + * + * Copyright (C) 2014 David Edmundson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef KEYSEQUENCEHELPER_H +#define KEYSEQUENCEHELPER_H + +#include +#include + +/** + * This class is a clone of Key from XMLGUI + * It performs only the logic of building shortcuts + * It is a private class to be used by KeySequenceItem + * + */ + +class KeySequenceHelperPrivate; + +class KeySequenceHelper : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY( + QKeySequence keySequence + READ keySequence + WRITE setKeySequence + NOTIFY keySequenceChanged) + + Q_PROPERTY( + bool multiKeyShortcutsAllowed + READ multiKeyShortcutsAllowed + WRITE setMultiKeyShortcutsAllowed) + + Q_PROPERTY( + QString shortcutDisplay + READ shortcutDisplay + NOTIFY shortcutDisplayChanged) + + Q_PROPERTY( + bool modifierlessAllowed + READ isModifierlessAllowed + WRITE setModifierlessAllowed) + +public: + + enum ShortcutType { + None = 0x00, //!< No checking for conflicts + StandardShortcuts = 0x01, //!< Check against standard shortcuts. @see KStandardShortcut + GlobalShortcuts = 0x02 //!< Check against global shortcuts. @see KGlobalAccel + }; + Q_DECLARE_FLAGS(ShortcutTypes, ShortcutType) + Q_FLAG(ShortcutTypes) + + /** + * Constructor. + */ + explicit KeySequenceHelper(QQuickItem* parent = nullptr); + + /** + * Destructs the widget. + */ + virtual ~KeySequenceHelper(); + + /** + * Allow multikey shortcuts? + */ + void setMultiKeyShortcutsAllowed(bool); + bool multiKeyShortcutsAllowed() const; + + /** + * This only applies to user input, not to setShortcut(). + * Set whether to accept "plain" keys without modifiers (like Ctrl, Alt, Meta). + * Plain keys by our definition include letter and symbol keys and + * text editing keys (Return, Space, Tab, Backspace, Delete). + * "Special" keys like F1, Cursor keys, Insert, PageDown will always work. + */ + void setModifierlessAllowed(bool allow); + + /** + * @see setModifierlessAllowed() + */ + bool isModifierlessAllowed(); + + + bool isRecording() const; + void setShortcut(bool recording); + + /** + * Set the default key sequence from a string + */ + void setKeySequence(const QKeySequence &sequence); + + /** + * Return the currently selected key sequence as a string + */ + QKeySequence keySequence() const; + QString shortcutDisplay() const; + + bool isKeySequenceAvailable(const QKeySequence &keySequence) const; + + +Q_SIGNALS: + void keySequenceChanged(const QKeySequence &seq); + void shortcutDisplayChanged(const QString &string); + void captureFinished(); + +public Q_SLOTS: + void captureKeySequence(); + void keyPressed(int key, int modifiers); + void keyReleased(int key, int modifiers); + + /** + * Clear the key sequence. + */ + void clearKeySequence(); + +private Q_SLOTS: + void doneRecording(); + +private: + friend class KeySequenceHelperPrivate; + KeySequenceHelperPrivate *const d; + + Q_DISABLE_COPY(KeySequenceHelper) +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(KeySequenceHelper::ShortcutTypes) + + +#endif // KEYSEQUENCEHELPER_H diff --git a/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.cpp b/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.cpp new file mode 100644 index 0000000..81205a2 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.cpp @@ -0,0 +1,33 @@ +/* + * Copyright 2014 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "kquickcontrolsprivateplugin.h" + +#include + +#include "keysequencehelper.h" +#include "translationcontext.h" + +void KQuickControlsPrivatePlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.private.kquickcontrols")); + qmlRegisterType(uri, 2, 0, "KeySequenceHelper"); + qmlRegisterType(uri, 2, 0, "TranslationContext"); +} + diff --git a/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.h b/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.h new file mode 100644 index 0000000..9430600 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/kquickcontrolsprivateplugin.h @@ -0,0 +1,34 @@ +/* + * Copyright 2014 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KQUICKCONTROLSPRIVATEPLUGIN_H +#define KQUICKCONTROLSPRIVATEPLUGIN_H + +#include + +class KQuickControlsPrivatePlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrols/private/qmldir b/src/qmlcontrols/kquickcontrols/private/qmldir new file mode 100644 index 0000000..c210322 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/qmldir @@ -0,0 +1,2 @@ +module org.kde.private.kquickcontrols +plugin kquickcontrolsprivateplugin diff --git a/src/qmlcontrols/kquickcontrols/private/translationcontext.cpp b/src/qmlcontrols/kquickcontrols/private/translationcontext.cpp new file mode 100644 index 0000000..faa68c4 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/translationcontext.cpp @@ -0,0 +1,235 @@ +/* + * Copyright (C) 2014 Kevin Ottens + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +// Undefine this because we don't want our i18n*() method names to be turned into i18nd*() +#undef TRANSLATION_DOMAIN + +#include "translationcontext.h" + +#include + +#include + +TranslationContext::TranslationContext(QObject* parent) + : QObject(parent) +{ +} + +TranslationContext::~TranslationContext() +{ +} + +QString TranslationContext::domain() const +{ + return m_domain; +} + +void TranslationContext::setDomain(const QString &domain) +{ + if (m_domain == domain) { + return; + } + + m_domain = domain; + emit domainChanged(domain); +} + +QString TranslationContext::i18n(const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const +{ + if (message.isNull()) { + qWarning() << "i18n() needs at least one parameter"; + return QString(); + } + + KLocalizedString trMessage = ki18nd(m_domain.toUtf8().constData(), message.toUtf8().constData()); + + if (!param1.isNull()) { + trMessage = trMessage.subs(param1); + } + if (!param2.isNull()) { + trMessage = trMessage.subs(param2); + } + if (!param3.isNull()) { + trMessage = trMessage.subs(param3); + } + if (!param4.isNull()) { + trMessage = trMessage.subs(param4); + } + if (!param5.isNull()) { + trMessage = trMessage.subs(param5); + } + if (!param6.isNull()) { + trMessage = trMessage.subs(param6); + } + if (!param7.isNull()) { + trMessage = trMessage.subs(param7); + } + if (!param8.isNull()) { + trMessage = trMessage.subs(param8); + } + if (!param9.isNull()) { + trMessage = trMessage.subs(param9); + } + if (!param10.isNull()) { + trMessage = trMessage.subs(param10); + } + + return trMessage.toString(); +} + +QString TranslationContext::i18nc(const QString &context, const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const +{ + if (context.isNull() || message.isNull()) { + qWarning() << "i18nc() needs at least two arguments"; + return QString(); + } + + KLocalizedString trMessage = ki18ndc(m_domain.toUtf8().constData(), context.toUtf8().constData(), message.toUtf8().constData()); + + if (!param1.isNull()) { + trMessage = trMessage.subs(param1); + } + if (!param2.isNull()) { + trMessage = trMessage.subs(param2); + } + if (!param3.isNull()) { + trMessage = trMessage.subs(param3); + } + if (!param4.isNull()) { + trMessage = trMessage.subs(param4); + } + if (!param5.isNull()) { + trMessage = trMessage.subs(param5); + } + if (!param6.isNull()) { + trMessage = trMessage.subs(param6); + } + if (!param7.isNull()) { + trMessage = trMessage.subs(param7); + } + if (!param8.isNull()) { + trMessage = trMessage.subs(param8); + } + if (!param9.isNull()) { + trMessage = trMessage.subs(param9); + } + if (!param10.isNull()) { + trMessage = trMessage.subs(param10); + } + + return trMessage.toString(); +} + +QString TranslationContext::i18np(const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const +{ + if (singular.isNull() || plural.isNull()) { + qWarning() << "i18np() needs at least two arguments"; + return QString(); + } + + KLocalizedString trMessage = ki18ndp(m_domain.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); + + if (!param1.isNull()) { + bool ok; + int num = param1.toInt(&ok); + if (ok) { + trMessage = trMessage.subs(num); + } else { + trMessage = trMessage.subs(param1); + } + } + if (!param2.isNull()) { + trMessage = trMessage.subs(param2); + } + if (!param3.isNull()) { + trMessage = trMessage.subs(param3); + } + if (!param4.isNull()) { + trMessage = trMessage.subs(param4); + } + if (!param5.isNull()) { + trMessage = trMessage.subs(param5); + } + if (!param6.isNull()) { + trMessage = trMessage.subs(param6); + } + if (!param7.isNull()) { + trMessage = trMessage.subs(param7); + } + if (!param8.isNull()) { + trMessage = trMessage.subs(param8); + } + if (!param9.isNull()) { + trMessage = trMessage.subs(param9); + } + if (!param10.isNull()) { + trMessage = trMessage.subs(param10); + } + + return trMessage.toString(); +} + +QString TranslationContext::i18ncp(const QString &context, const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const +{ + if (context.isNull() || singular.isNull() || plural.isNull()) { + qWarning() << "i18ncp() needs at least three arguments"; + return QString(); + } + + KLocalizedString trMessage = ki18ndcp(m_domain.toUtf8().constData(), context.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); + + if (!param1.isNull()) { + bool ok; + int num = param1.toInt(&ok); + if (ok) { + trMessage = trMessage.subs(num); + } else { + trMessage = trMessage.subs(param1); + } + } + if (!param2.isNull()) { + trMessage = trMessage.subs(param2); + } + if (!param3.isNull()) { + trMessage = trMessage.subs(param3); + } + if (!param4.isNull()) { + trMessage = trMessage.subs(param4); + } + if (!param5.isNull()) { + trMessage = trMessage.subs(param5); + } + if (!param6.isNull()) { + trMessage = trMessage.subs(param6); + } + if (!param7.isNull()) { + trMessage = trMessage.subs(param7); + } + if (!param8.isNull()) { + trMessage = trMessage.subs(param8); + } + if (!param9.isNull()) { + trMessage = trMessage.subs(param9); + } + if (!param10.isNull()) { + trMessage = trMessage.subs(param10); + } + + return trMessage.toString(); +} diff --git a/src/qmlcontrols/kquickcontrols/private/translationcontext.h b/src/qmlcontrols/kquickcontrols/private/translationcontext.h new file mode 100644 index 0000000..a75bd84 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/private/translationcontext.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2014 Kevin Ottens + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef TRANSLATIONCONTEXT_H +#define TRANSLATIONCONTEXT_H + +#include + +class TranslationContext : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged) + +public: + explicit TranslationContext(QObject* parent = nullptr); + virtual ~TranslationContext(); + + QString domain() const; + +public Q_SLOTS: + void setDomain(const QString &domain); + +Q_SIGNALS: + void domainChanged(const QString &domain); + +public: + Q_INVOKABLE QString i18n(const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; + + Q_INVOKABLE QString i18nc(const QString &context, const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; + + Q_INVOKABLE QString i18np(const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; + + Q_INVOKABLE QString i18ncp(const QString &context, const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; + +private: + Q_DISABLE_COPY(TranslationContext) + + QString m_domain; +}; + +#endif // TRANSLATIONCONTEXT_H diff --git a/src/qmlcontrols/kquickcontrols/qmldir b/src/qmlcontrols/kquickcontrols/qmldir new file mode 100644 index 0000000..a732b58 --- /dev/null +++ b/src/qmlcontrols/kquickcontrols/qmldir @@ -0,0 +1,4 @@ +module org.kde.kquickcontrols + +KeySequenceItem 2.0 KeySequenceItem.qml +ColorButton 2.0 ColorButton.qml diff --git a/src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt b/src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt new file mode 100644 index 0000000..41e692a --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt @@ -0,0 +1,40 @@ +project(kquickcontrolsaddons) + +configure_file(config-kquickcontrolsaddons.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kquickcontrolsaddons.h) + +set(kquickcontrolsaddons_SRCS + kquickcontrolsaddonsplugin.cpp + qpixmapitem.cpp + qimageitem.cpp + qiconitem.cpp + fallbacktaphandler.cpp + mouseeventlistener.cpp + columnproxymodel.cpp + clipboard.cpp + eventgenerator.cpp + mimedatabase.cpp + kcmshell.cpp + icondialog.cpp +) + +if (HAVE_EPOXY) + set(kquickcontrolsaddons_SRCS ${kquickcontrolsaddons_SRCS} plotter.cpp) + set(KQUICKCONTROLSADDONS_EXTRA_LIBS ${epoxy_LIBRARY}) + include_directories(${epoxy_INCLUDE_DIR}) +endif() + +add_library(kquickcontrolsaddonsplugin SHARED ${kquickcontrolsaddons_SRCS}) + +target_link_libraries(kquickcontrolsaddonsplugin + Qt5::Core + Qt5::Quick + Qt5::Qml + Qt5::Gui + KF5::IconThemes + KF5::QuickAddons + KF5::ConfigCore + ${KQUICKCONTROLSADDONS_EXTRA_LIBS}) + +install(TARGETS kquickcontrolsaddonsplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kquickcontrolsaddons) + +install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kquickcontrolsaddons) diff --git a/src/qmlcontrols/kquickcontrolsaddons/Mainpage.dox b/src/qmlcontrols/kquickcontrolsaddons/Mainpage.dox new file mode 100644 index 0000000..ab18724 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/Mainpage.dox @@ -0,0 +1,14 @@ +/** @mainpage Qt Extra Components + +

import org.kde.qtextracomponents

+ +- QPixmapItem +- QImageItem +- QIconItem +- MouseEventListener +- ColumnProxyModel + +*/ + +// DOXYGEN_SET_PROJECT_NAME = QtExtraComponents +// vim:ts=4:sw=4:expandtab:filetype=doxygen diff --git a/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp b/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp new file mode 100644 index 0000000..0772296 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/clipboard.cpp @@ -0,0 +1,129 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "clipboard.h" +#include +#include +#include +#include + +Clipboard::Clipboard(QObject* parent) + : QObject(parent) + , m_clipboard(QGuiApplication::clipboard()) + , m_mode(QClipboard::Clipboard) +{ + connect(m_clipboard, SIGNAL(changed(QClipboard::Mode)), SLOT(clipboardChanged(QClipboard::Mode))); +} + +void Clipboard::setMode(QClipboard::Mode mode) +{ + m_mode = mode; + emit modeChanged(m_mode); +} + +void Clipboard::clipboardChanged(QClipboard::Mode m) +{ + if (m == m_mode) { + emit contentChanged(); + } +} + +void Clipboard::clear() +{ + m_clipboard->clear(m_mode); +} + +QClipboard::Mode Clipboard::mode() const +{ + return m_mode; +} + +QVariant Clipboard::contentFormat(const QString &format) const +{ + const QMimeData* data = m_clipboard->mimeData(m_mode); + QVariant ret; + if(format == QLatin1String("text/uri-list")) { + QVariantList retList; + const auto urls = data->urls(); + for (const QUrl& url : urls) + retList += url; + ret = retList; + } else if(format.startsWith(QLatin1String("text/"))) { + ret = data->text(); + } else if(format.startsWith(QLatin1String("image/"))) { + ret = data->imageData(); + } else + ret = data->data(format.isEmpty() ? data->formats().first(): format); + + return ret; +} + +QVariant Clipboard::content() const +{ + return contentFormat(m_clipboard->mimeData(m_mode)->formats().first()); +} + +void Clipboard::setContent(const QVariant &content) +{ + QMimeData* mimeData = new QMimeData; + switch(content.type()) + { + case QVariant::String: + mimeData->setText(content.toString()); + break; + case QVariant::Color: + mimeData->setColorData(content.toString()); + break; + case QVariant::Pixmap: + case QVariant::Image: + mimeData->setImageData(content); + break; + default: + if (content.type() == QVariant::List) { + const QVariantList list = content.toList(); + QList urls; + bool wasUrlList = true; + for (const QVariant& url : list) { + if (url.type() != QVariant::Url) { + wasUrlList = false; + break; + } + urls += url.toUrl(); + } + if(wasUrlList) { + mimeData->setUrls(urls); + break; + } + } + + if (content.canConvert(QVariant::String)) { + mimeData->setText(content.toString()); + } else { + mimeData->setData(QStringLiteral("application/octet-stream"), content.toByteArray()); + qWarning() << "Couldn't figure out the content type, storing as application/octet-stream"; + } + break; + } + m_clipboard->setMimeData(mimeData, m_mode); +} + +QStringList Clipboard::formats() const +{ + return m_clipboard->mimeData(m_mode)->formats(); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/clipboard.h b/src/qmlcontrols/kquickcontrolsaddons/clipboard.h new file mode 100644 index 0000000..0057a96 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/clipboard.h @@ -0,0 +1,72 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef CLIPBOARD_H +#define CLIPBOARD_H + +#include +#include + +class ClipboardPrivate; + +class Clipboard : public QObject +{ + Q_OBJECT + /** + * Controls the state this object will be monitoring and extracting its contents from. + */ + Q_PROPERTY(QClipboard::Mode mode READ mode WRITE setMode NOTIFY modeChanged) + + /** + * Provides the contents currently in the clipboard and lets modify them. + */ + Q_PROPERTY(QVariant content READ content WRITE setContent NOTIFY contentChanged) + + /** + * Figure out the nature of the contents in the clipboard. + */ + Q_PROPERTY(QStringList formats READ formats NOTIFY contentChanged) + + public: + explicit Clipboard(QObject* parent = nullptr); + + QClipboard::Mode mode() const; + void setMode(QClipboard::Mode mode); + + Q_SCRIPTABLE QVariant contentFormat(const QString &format) const; + QVariant content() const; + void setContent(const QVariant &content); + + QStringList formats() const; + + Q_SCRIPTABLE void clear(); + + Q_SIGNALS: + void modeChanged(QClipboard::Mode mode); + void contentChanged(); + + private Q_SLOTS: + void clipboardChanged(QClipboard::Mode m); + + private: + QClipboard* m_clipboard; + QClipboard::Mode m_mode; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.cpp b/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.cpp new file mode 100644 index 0000000..3d3bef8 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.cpp @@ -0,0 +1,246 @@ +/* + * Copyright 2012 by Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "columnproxymodel.h" + +ColumnProxyModel::ColumnProxyModel(QObject* parent) + : QAbstractListModel(parent) + , m_column(0) + , m_sourceModel(nullptr) +{} + +void ColumnProxyModel::setSourceModel(QAbstractItemModel* sourceModel) +{ + if(sourceModel==m_sourceModel) { + return; + } + + beginResetModel(); + if(m_sourceModel) { + disconnect(m_sourceModel, SIGNAL(destroyed(QObject*)), + this, SLOT(sourceDestroyed(QObject*))); + + disconnect(m_sourceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(considerDataChanged(QModelIndex,QModelIndex))); + disconnect(m_sourceModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(considerRowsAboutToBeInserted(QModelIndex,int,int))); + disconnect(m_sourceModel, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(considerRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + disconnect(m_sourceModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(considerRowsAboutToBeRemoved(QModelIndex,int,int))); + disconnect(m_sourceModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(considerRowsInserted(QModelIndex,int,int))); + disconnect(m_sourceModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(considerRowsMoved(QModelIndex,int,int,QModelIndex,int))); + disconnect(m_sourceModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(considerRowsRemoved(QModelIndex,int,int))); + + disconnect(m_sourceModel, SIGNAL(modelAboutToBeReset()), + this, SIGNAL(modelAboutToBeReset())); + disconnect(m_sourceModel, SIGNAL(modelReset()), + this, SIGNAL(modelReset())); + disconnect(m_sourceModel, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), + this, SIGNAL(headerDataChanged(Qt::Orientation,int,int))); + disconnect(m_sourceModel, SIGNAL(layoutAboutToBeChanged()), + this, SIGNAL(layoutAboutToBeChanged())); + disconnect(m_sourceModel, SIGNAL(layoutChanged()), + this, SIGNAL(layoutChanged())); + } + m_sourceModel = sourceModel; + if(m_sourceModel) { + connect(m_sourceModel, SIGNAL(destroyed(QObject*)), + this, SLOT(sourceDestroyed(QObject*))); + + connect(m_sourceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(considerDataChanged(QModelIndex,QModelIndex))); + connect(m_sourceModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + this, SLOT(considerRowsAboutToBeInserted(QModelIndex,int,int))); + connect(m_sourceModel, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(considerRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); + connect(m_sourceModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(considerRowsAboutToBeRemoved(QModelIndex,int,int))); + connect(m_sourceModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(considerRowsInserted(QModelIndex,int,int))); + connect(m_sourceModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(considerRowsMoved(QModelIndex,int,int,QModelIndex,int))); + connect(m_sourceModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(considerRowsRemoved(QModelIndex,int,int))); + + connect(m_sourceModel, SIGNAL(modelAboutToBeReset()), + this, SIGNAL(modelAboutToBeReset())); + connect(m_sourceModel, SIGNAL(modelReset()), + this, SIGNAL(modelReset())); + connect(m_sourceModel, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), + this, SIGNAL(headerDataChanged(Qt::Orientation,int,int))); + connect(m_sourceModel, SIGNAL(layoutAboutToBeChanged()), + this, SIGNAL(layoutAboutToBeChanged())); + connect(m_sourceModel, SIGNAL(layoutChanged()), + this, SIGNAL(layoutChanged())); + } + endResetModel(); +} + +void ColumnProxyModel::setColumn(int col) +{ + beginResetModel(); + m_column = col; + endResetModel(); +} + +int ColumnProxyModel::column() const +{ + return m_column; +} + +QModelIndex ColumnProxyModel::rootIndex() const +{ + return m_index; +} + +void ColumnProxyModel::setRootIndex(const QModelIndex& index) +{ + if (index == m_index) { + return; + } + + if(index.isValid()) { + setSourceModel(const_cast(index.model())); + } + beginResetModel(); + m_index = index; + endResetModel(); + + emit rootIndexChanged(); +} + +QModelIndex ColumnProxyModel::indexFromModel(QAbstractItemModel* model, int row, int column, const QModelIndex& parent) +{ + return model ? model->index(row, column, parent) : QModelIndex(); +} + +QVariant ColumnProxyModel::data(const QModelIndex& index, int role) const +{ + return m_sourceModel ? m_sourceModel->data(sourceIndex(index), role) : QVariant(); +} + +QVariant ColumnProxyModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + return m_sourceModel ? m_sourceModel->headerData(section, orientation, role) : QVariant(); +} + +QModelIndex ColumnProxyModel::sourceIndex(const QModelIndex& proxyIndex) const +{ + return m_sourceModel ? m_sourceModel->index(proxyIndex.row(), m_column, m_index) : QModelIndex(); +} + +int ColumnProxyModel::rowCount(const QModelIndex& parent) const +{ + return (!m_sourceModel || parent.isValid()) ? 0 : m_sourceModel->rowCount(m_index); +} + +QModelIndex ColumnProxyModel::proxyIndex(const QModelIndex& sourceIndex) const +{ + if(sourceIndex.parent()==m_index) + return index(sourceIndex.row(), sourceIndex.column(), QModelIndex()); + + return QModelIndex(); +} + +void ColumnProxyModel::sourceDestroyed(QObject* source) +{ + Q_ASSERT(source==m_sourceModel); + + beginResetModel(); + m_sourceModel = nullptr; + endResetModel(); +} + +QModelIndex ColumnProxyModel::indexAt(int row, const QModelIndex& parent) const +{ + return m_sourceModel ? m_sourceModel->index(row, m_column, parent) : QModelIndex(); +} + +///////////////// + +void ColumnProxyModel::considerDataChanged(const QModelIndex& idxA, const QModelIndex& idxB) +{ + if(idxA.parent()==m_index && idxB.parent()==m_index) { + emit dataChanged(proxyIndex(idxA), proxyIndex(idxB)); + } +} + +void ColumnProxyModel::considerRowsAboutToBeInserted(const QModelIndex& parent, int rA, int rB) +{ + if(parent==m_index) { + beginInsertRows(QModelIndex(), rA, rB); + } +} + +void ColumnProxyModel::considerRowsAboutToBeMoved(const QModelIndex &sourceParent, int rA, int rB, const QModelIndex& destParent, int rD) +{ + if(sourceParent==m_index && destParent==m_index) { + beginMoveRows(QModelIndex(), rA, rB, QModelIndex(), rD); + } else if(sourceParent==m_index) { + beginRemoveRows(sourceParent, rA, rB); + } else if(destParent==m_index) { + beginInsertRows(destParent, rD, rD+(rB-rA)); + } +} + +void ColumnProxyModel::considerRowsAboutToBeRemoved(const QModelIndex& parent, int rA, int rB) +{ + if(parent==m_index) { + beginRemoveRows(QModelIndex(), rA, rB); + } +} + +void ColumnProxyModel::considerRowsInserted(const QModelIndex& parent, int , int ) +{ + if(parent==m_index) { + endInsertRows(); + } +} + +void ColumnProxyModel::considerRowsMoved(const QModelIndex& sourceParent, int , int , const QModelIndex& destParent, int ) +{ + if(sourceParent==m_index && destParent==m_index) { + endMoveRows(); + } else if(sourceParent==m_index) { + endRemoveRows(); + } else if(destParent==m_index) { + endInsertRows(); + } +} + +void ColumnProxyModel::considerRowsRemoved(const QModelIndex& parent, int , int ) +{ + if(parent==m_index) { + endInsertRows(); + } +} + +QHash ColumnProxyModel::roleNames() const +{ + return m_sourceModel ? m_sourceModel->roleNames() : QHash(); +} + +bool ColumnProxyModel::setData(const QModelIndex &index, const QVariant &value, int role) +{ + return m_sourceModel && m_sourceModel->setData(sourceIndex(index), value, role); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.h b/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.h new file mode 100644 index 0000000..ab7e3be --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.h @@ -0,0 +1,75 @@ +/* + * Copyright 2012 by Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef COLUMNPROXYMODEL_H +#define COLUMNPROXYMODEL_H + +#include + +class ColumnProxyModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged) +// Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel) //rootIndex sets the model + Q_PROPERTY(int column READ column WRITE setColumn) + public: + explicit ColumnProxyModel(QObject* parent = nullptr); + + void setRootIndex(const QModelIndex& idx); + QModelIndex rootIndex() const; + + void setSourceModel(QAbstractItemModel* sourceModel); + QAbstractItemModel* sourceModel() const { return m_sourceModel; } + + int column() const; + void setColumn(int col); + + Q_SCRIPTABLE static QModelIndex indexFromModel(QAbstractItemModel* model, int row, int column=0, const QModelIndex& parent=QModelIndex()); + Q_SCRIPTABLE QModelIndex indexAt(int row, const QModelIndex& parent = QModelIndex()) const; + + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + QHash roleNames() const override; + + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + + Q_SIGNALS: + void rootIndexChanged(); + + private: + QModelIndex proxyIndex(const QModelIndex& sourceIndex) const; + QModelIndex sourceIndex(const QModelIndex& proxyIndex) const; + + int m_column; + QModelIndex m_index; + QAbstractItemModel* m_sourceModel; + + private Q_SLOTS: + void considerRowsAboutToBeInserted(const QModelIndex&,int,int); + void considerRowsAboutToBeMoved(const QModelIndex& sourceParent, int rA, int rB, const QModelIndex& destParent, int rD); + void considerRowsAboutToBeRemoved(const QModelIndex&,int,int); + void considerRowsRemoved(const QModelIndex&,int,int); + void considerRowsMoved(const QModelIndex&,int,int,const QModelIndex&,int); + void considerRowsInserted(const QModelIndex&,int,int); + void considerDataChanged(const QModelIndex& idxA, const QModelIndex& idxB); + void sourceDestroyed(QObject* source); +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/config-kquickcontrolsaddons.h.cmake b/src/qmlcontrols/kquickcontrolsaddons/config-kquickcontrolsaddons.h.cmake new file mode 100644 index 0000000..e5dbe9d --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/config-kquickcontrolsaddons.h.cmake @@ -0,0 +1,2 @@ +// epoxy library available? +#cmakedefine01 HAVE_EPOXY diff --git a/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp b/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp new file mode 100644 index 0000000..8741112 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.cpp @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2015 by Eike Hein + * Copyright (C) 2015 Marco Martin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "eventgenerator.h" + +#include +#include +#include + +EventGenerator::EventGenerator(QObject *parent) : QObject(parent) +{ +} + +EventGenerator::~EventGenerator() +{ +} + +void EventGenerator::sendMouseEvent(QQuickItem *item, EventGenerator::MouseEvent type, int x, int y, int button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) +{ + if (!item) { + return; + } + + QEvent::Type eventType; + switch (type) { + case MouseButtonPress: + eventType = QEvent::MouseButtonPress; + break; + case MouseButtonRelease: + eventType = QEvent::MouseButtonRelease; + break; + case MouseMove: + eventType = QEvent::MouseMove; + break; + default: + return; + } + QMouseEvent ev(eventType, QPointF(x, y), static_cast(button), buttons, modifiers); + + QGuiApplication::sendEvent(item, &ev); +} + +void EventGenerator::sendMouseEventRecursive(QQuickItem *parentItem, EventGenerator::MouseEvent type, int x, int y, int button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) +{ + if (!parentItem) { + return; + } + + const QList items = allChildItemsRecursive(parentItem); + + for (QQuickItem *item : items) { + sendMouseEvent(item, type, x, y, button, buttons, modifiers); + } +} + +void EventGenerator::sendWheelEvent(QQuickItem *item, int x, int y, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) +{ + if (!item || !item->window()) { + return; + } + + QPointF pos(x, y); + QPointF globalPos(item->window()->mapToGlobal(item->mapToScene(pos).toPoint())); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QWheelEvent ev(pos, globalPos, pixelDelta, angleDelta, /* qt4Delta */ 0, /* qt4Orientation */ Qt::Horizontal, buttons, modifiers); +#else + QWheelEvent ev(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, Qt::ScrollUpdate, false /*not inverted*/); +#endif + QGuiApplication::sendEvent(item, &ev); +} + +void EventGenerator::sendWheelEventRecursive(QQuickItem *parentItem, int x, int y, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) +{ + if (!parentItem) { + return; + } + + const QList items = allChildItemsRecursive(parentItem); + + for (QQuickItem *item : items) { + sendWheelEvent(item, x, y, pixelDelta, angleDelta, buttons, modifiers); + } +} + +void EventGenerator::sendGrabEvent(QQuickItem *item, EventGenerator::GrabEvent type) +{ + if (!item) { + return; + } + + switch (type) { + case GrabMouse: + item->grabMouse(); + break; + case UngrabMouse: { + QEvent ev(QEvent::UngrabMouse); + QGuiApplication::sendEvent(item, &ev); + return; + } + default: + return; + } +} + +void EventGenerator::sendGrabEventRecursive(QQuickItem *parentItem, EventGenerator::GrabEvent type) +{ + if (!parentItem) { + return; + } + + const QList items = allChildItemsRecursive(parentItem); + + for (QQuickItem *item : items) { + sendGrabEvent(item, type); + } +} + +QList EventGenerator::allChildItemsRecursive(QQuickItem *parentItem) +{ + QList itemList; + + const auto childsItems = parentItem->childItems(); + itemList.append(childsItems); + + + for (QQuickItem *childItem : childsItems) { + itemList.append(allChildItemsRecursive(childItem)); + } + + return itemList; +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.h b/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.h new file mode 100644 index 0000000..d456a76 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/eventgenerator.h @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2015 by Eike Hein + * Copyright (C) 2015 Marco Martin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef EventGenerator_H +#define EventGenerator_H + +#include + +class QQuickItem; + +class EventGenerator : public QObject +{ + Q_OBJECT + + public: + enum MouseEvent { + MouseButtonPress, + MouseButtonRelease, + MouseMove + }; + Q_ENUM(MouseEvent) + + enum GrabEvent { + GrabMouse, + UngrabMouse + }; + Q_ENUM(GrabEvent) + + EventGenerator(QObject *parent = nullptr); + ~EventGenerator(); + + /** + * Send a mouse event of @type to the given @item + */ + Q_INVOKABLE void sendMouseEvent(QQuickItem *item, EventGenerator::MouseEvent type, int x, int y, int button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + + /** + * Send a mouse event of @type to the given @item, all its children and descendants + */ + Q_INVOKABLE void sendMouseEventRecursive(QQuickItem *item, EventGenerator::MouseEvent type, int x, int y, int button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + + /** + * Send a wheel event to the given @item + * + * @since 5.16 + */ + Q_INVOKABLE void sendWheelEvent(QQuickItem *item, int x, int y, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + + /** + * Send a wheel event to the given @item, all its children and descendants + * + * @since 5.16 + */ + Q_INVOKABLE void sendWheelEventRecursive(QQuickItem *item, int x, int y, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + + /** + * Send a mouse grab event of @type (grab or ungrab) to the given @item + */ + Q_INVOKABLE void sendGrabEvent(QQuickItem *item, EventGenerator::GrabEvent type); + + /** + * Send a mouse grab event of @type (grab or ungrab) to the given @item, all its children and descendants + */ + Q_INVOKABLE void sendGrabEventRecursive(QQuickItem *item, EventGenerator::GrabEvent type); + + private: + static QList allChildItemsRecursive(QQuickItem *parentItem); +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.cpp b/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.cpp new file mode 100644 index 0000000..cee56f3 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.cpp @@ -0,0 +1,125 @@ +/*************************************************************************** + * Copyright (C) 2019 by Marco Martin * + * Copyright (C) 2014-2015 by Eike Hein * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "fallbacktaphandler.h" + +#include +#include + +FallbackTapHandlerMouseEvent::FallbackTapHandlerMouseEvent(Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, qreal x, qreal y) + : QObject(nullptr), + m_button(button), + m_buttons(buttons), + m_modifiers(modifiers), + m_x(x), + m_y(y) +{} + + + +FallbackTapHandler::FallbackTapHandler(QQuickItem *parent) + : QQuickItem(parent) +{ + setFiltersChildMouseEvents(true); + setAcceptedMouseButtons(Qt::LeftButton); +} + +FallbackTapHandler::~FallbackTapHandler() +{ +} + +void FallbackTapHandler::setAcceptedButtons(Qt::MouseButtons buttons) +{ + setAcceptedMouseButtons(buttons); + emit acceptedButtonsChanged(); +} + +bool FallbackTapHandler::childMouseEventFilter(QQuickItem *item, QEvent *event) +{ + if (event->type() == QEvent::MouseButtonPress && item->inherits("QQuickFlickable")) { + QMouseEvent *me = static_cast(event); + if (!(me->button() & acceptedMouseButtons()) && !(me->buttons() & acceptedMouseButtons())) { + return QQuickItem::childMouseEventFilter(item, event); + } + m_mouseDownItem = item; + m_mouseDownPos = me->windowPos(); + + QPointF mappedPoint = mapFromItem(item, me->pos()); + FallbackTapHandlerMouseEvent eventProxy(me->button(), me->buttons(), me->modifiers(), mappedPoint.x(), mappedPoint.y()); + emit pressed(&eventProxy); + + } else if (event->type() == QEvent::MouseButtonRelease && item->inherits("QQuickFlickable")) { + QMouseEvent *me = static_cast(event); + + if ((!(me->button() & acceptedMouseButtons()) && !(me->buttons() & acceptedMouseButtons())) || + m_mouseDownItem != item) { + return QQuickItem::childMouseEventFilter(item, event); + } + + QPointF mappedPoint = mapFromItem(item, me->pos()); + FallbackTapHandlerMouseEvent eventProxy(me->button(), me->buttons(), me->modifiers(), mappedPoint.x(), mappedPoint.y()); + emit released(&eventProxy); + + if (QPointF(m_mouseDownPos - me->windowPos()).manhattanLength() < QGuiApplication::styleHints()->startDragDistance()) { + emit tapped(&eventProxy); + } + + m_mouseDownItem.clear(); + m_mouseDownPos = QPointF(); + } + + return QQuickItem::childMouseEventFilter(item, event); +} + +void FallbackTapHandler::mousePressEvent(QMouseEvent *event) +{ + if ((!(event->button() & acceptedMouseButtons()) && !(event->buttons() & acceptedMouseButtons()))) { + event->ignore(); + return; + } + + event->accept(); + m_mouseDownItem = this; + m_mouseDownPos = event->windowPos(); + + FallbackTapHandlerMouseEvent eventProxy(event->button(), event->buttons(), event->modifiers(), event->x(), event->y()); + emit pressed(&eventProxy); +} + +void FallbackTapHandler::mouseReleaseEvent(QMouseEvent *event) +{ + if ((!(event->button() & acceptedMouseButtons()) && !(event->buttons() & acceptedMouseButtons()))) { + event->ignore(); + return; + } + + FallbackTapHandlerMouseEvent eventProxy(event->button(), event->buttons(), event->modifiers(), event->x(), event->y()); + + if (QPointF(m_mouseDownPos - event->windowPos()).manhattanLength() < QGuiApplication::styleHints()->startDragDistance()) { + emit tapped(&eventProxy); + } + + m_mouseDownItem.clear(); + m_mouseDownPos = QPointF(); + + emit released(&eventProxy); +} + +#include "moc_fallbacktaphandler.cpp" diff --git a/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.h b/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.h new file mode 100644 index 0000000..b908b4b --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.h @@ -0,0 +1,72 @@ +/************************************************************************** + * Copyright (C) 2019 by Marco Martin * + * Copyright (C) 2014-2015 by Eike Hein * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#pragma once + +#include +#include + +class FallbackTapHandlerMouseEvent : public QObject { + Q_OBJECT + Q_PROPERTY(Qt::MouseButton button MEMBER m_button) + Q_PROPERTY(Qt::MouseButtons buttons MEMBER m_buttons) + Q_PROPERTY(Qt::KeyboardModifiers modifiers MEMBER m_modifiers) + Q_PROPERTY(qreal x MEMBER m_x) + Q_PROPERTY(qreal y MEMBER m_y) + +public: + FallbackTapHandlerMouseEvent(Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, qreal x, qreal y); + ~FallbackTapHandlerMouseEvent() = default; + +private: + Qt::MouseButton m_button = Qt::NoButton; + Qt::MouseButtons m_buttons = Qt::NoButton; + Qt::KeyboardModifiers m_modifiers = Qt::NoModifier; + qreal m_x = 0; + qreal m_y = 0; +}; + +class FallbackTapHandler : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedMouseButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged) + +public: + explicit FallbackTapHandler(QQuickItem *parent = nullptr); + ~FallbackTapHandler() override; + + void setAcceptedButtons(Qt::MouseButtons buttons); + +Q_SIGNALS: + void pressed(FallbackTapHandlerMouseEvent *event); + void tapped(FallbackTapHandlerMouseEvent *event); + void released(FallbackTapHandlerMouseEvent *event); + void acceptedButtonsChanged(); + +protected: + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + +private: + QPointer m_mouseDownItem; + QPointF m_mouseDownPos; +}; + diff --git a/src/qmlcontrols/kquickcontrolsaddons/icondialog.cpp b/src/qmlcontrols/kquickcontrolsaddons/icondialog.cpp new file mode 100644 index 0000000..663d9e4 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/icondialog.cpp @@ -0,0 +1,185 @@ +/*************************************************************************** + * Copyright 2015 Kai Uwe Broulik * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "icondialog.h" + +#include +#include + +#include +#include +#include + +IconDialog::IconDialog(QObject *parent) + : QObject(parent) + , m_dialog(nullptr) + , m_iconSize(0) + , m_user(false) + , m_modality(Qt::WindowModal) + , m_visible(false) +{ + if (qobject_cast(QCoreApplication::instance())) { + m_dialog.reset(new KIconDialog()); + connect(m_dialog.data(), &KIconDialog::newIconName, this, [this](const QString &newIconName) { + if (m_iconName != newIconName) { + m_iconName = newIconName; + emit iconNameChanged(newIconName); + } + }); + + m_dialog->installEventFilter(this); + } +} + +IconDialog::~IconDialog() +{ + if (m_dialog) { + m_dialog->close(); + } +} + +QString IconDialog::iconName() const +{ + return m_iconName; +} + +int IconDialog::iconSize() const +{ + return m_iconSize; +} + +void IconDialog::setIconSize(int iconSize) +{ + if (m_dialog->iconSize() != iconSize) { + m_iconSize = iconSize; + emit iconSizeChanged(iconSize); + } +} + +QString IconDialog::title() const +{ + return m_dialog->windowTitle(); +} + +void IconDialog::setTitle(const QString &title) +{ + if (m_dialog->windowTitle() != title) { + m_dialog->setWindowTitle(title); + emit titleChanged(title); + } +} + +bool IconDialog::user() const +{ + return m_user; +} + +void IconDialog::setUser(bool user) +{ + if (m_user != user) { + m_user = user; + emit userChanged(user); + } +} + +QString IconDialog::customLocation() const +{ + return m_customLocation; +} + +void IconDialog::setCustomLocation(const QString &customLocation) +{ + if (m_customLocation != customLocation) { + m_dialog->setCustomLocation(customLocation); + + m_customLocation = customLocation; + emit customLocationChanged(customLocation); + } +} + +Qt::WindowModality IconDialog::modality() const +{ + return m_modality; +} + +void IconDialog::setModality(Qt::WindowModality modality) +{ + if (m_modality != modality) { + m_modality = modality; + emit modalityChanged(modality); + } +} + +bool IconDialog::visible() const +{ + return m_dialog->isVisible(); +} + +void IconDialog::setVisible(bool visible) +{ + if (visible) { + open(); + } else { + close(); + } +} + +void IconDialog::open() +{ + if (m_dialog->isVisible()) { + return; + } + + QQuickItem *parentItem = qobject_cast(parent()); + QQuickWindow *parentWindow = (parentItem ? parentItem->window() : qobject_cast(parent())); + + if (m_modality == Qt::NonModal) { + m_dialog->setModal(false); + } else if (m_modality == Qt::WindowModal) { + m_dialog->winId(); // needed to get the windowHandle prior to showing + m_dialog->windowHandle()->setTransientParent(parentWindow); + m_dialog->setModal(false); // WindowModal does not unset the overall modality + } else if (m_modality == Qt::ApplicationModal) { + m_dialog->setModal(true); + } + + m_dialog->setWindowModality(m_modality); + + m_dialog->setup(KIconLoader::Desktop, KIconLoader::Application, false, m_iconSize, m_user); + + m_dialog->show(); +} + +void IconDialog::close() +{ + if (!m_dialog->isVisible()) { + return; + } + + m_dialog->hide(); +} + +bool IconDialog::eventFilter(QObject *watched, QEvent *event) +{ + if (watched == m_dialog.data() && (event->type() == QEvent::Show || event->type() == QEvent::Hide)) { + emit visibleChanged(); + } + + return false; +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/icondialog.h b/src/qmlcontrols/kquickcontrolsaddons/icondialog.h new file mode 100644 index 0000000..8248b56 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/icondialog.h @@ -0,0 +1,112 @@ +/*************************************************************************** + * Copyright 2015 Kai Uwe Broulik * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef ICONDIALOG_H +#define ICONDIALOG_H + +#include +#include + +class KIconDialog; + +class IconDialog : public QObject +{ + Q_OBJECT + + /** + * The name or path of the icon the user has selected + */ + Q_PROPERTY(QString iconName READ iconName NOTIFY iconNameChanged) + /** + * The desired size of icons + */ + Q_PROPERTY(int iconSize READ iconSize WRITE setIconSize NOTIFY iconSizeChanged) + /** + * The title to use for the dialog + */ + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) + /** + * Begin with the "user icons" instead of "system icons" + */ + Q_PROPERTY(bool user READ user WRITE setUser NOTIFY userChanged) + /** + * Use a custom location, only local directory paths are allowed + */ + Q_PROPERTY(QString customLocation READ customLocation WRITE setCustomLocation NOTIFY customLocationChanged) + /** + * Window modality, default is Qt.NonModal + */ + Q_PROPERTY(Qt::WindowModality modality READ modality WRITE setModality NOTIFY modalityChanged) + /** + * Whether the dialog is currently visible, setting this property to true + * is the same as calling show() + */ + Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged) + +public: + explicit IconDialog(QObject *parent = nullptr); + ~IconDialog() override; + + QString iconName() const; + + int iconSize() const; + void setIconSize(int iconSize); + + QString title() const; + void setTitle(const QString &title); + + bool user() const; + void setUser(bool user); + + QString customLocation() const; + void setCustomLocation(const QString &customLocation); + + Qt::WindowModality modality() const; + void setModality(Qt::WindowModality modality); + + bool visible() const; + void setVisible(bool visible); + + Q_INVOKABLE void open(); + Q_INVOKABLE void close(); + +Q_SIGNALS: + void iconNameChanged(const QString &iconName); + void iconSizeChanged(int iconSize); + void titleChanged(const QString &title); + void userChanged(bool user); + void customLocationChanged(const QString &customLocation); + void modalityChanged(Qt::WindowModality modality); + void visibleChanged(); + +private: + bool eventFilter(QObject *watched, QEvent *event) override; + + QScopedPointer m_dialog; + + QString m_iconName; + int m_iconSize; + bool m_user; + QString m_customLocation; + Qt::WindowModality m_modality; + bool m_visible; + +}; + +#endif // ICONDIALOG_H diff --git a/src/qmlcontrols/kquickcontrolsaddons/kcmshell.cpp b/src/qmlcontrols/kquickcontrolsaddons/kcmshell.cpp new file mode 100644 index 0000000..08d0916 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/kcmshell.cpp @@ -0,0 +1,44 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kcmshell.h" + +#include + +#include + +KCMShell::KCMShell(QObject *parent) : QObject(parent) +{ + +} + +KCMShell::~KCMShell() +{ + +} + +void KCMShell::open(const QStringList &names) const +{ + QProcess::startDetached(QStringLiteral("kcmshell5"), names); +} + +QStringList KCMShell::authorize(const QStringList &menuIds) const +{ + return KAuthorized::authorizeControlModules(menuIds); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/kcmshell.h b/src/qmlcontrols/kquickcontrolsaddons/kcmshell.h new file mode 100644 index 0000000..be15864 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/kcmshell.h @@ -0,0 +1,57 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KCMSHELL_H +#define KCMSHELL_H + +#include + +class KCMShell : public QObject +{ + Q_OBJECT + +public: + explicit KCMShell(QObject *parent = nullptr); + virtual ~KCMShell(); + +public Q_SLOTS: + void open(const QStringList &names) const; + + /** + * Check which of the given control modules the user is + * allowed to access + * + * This can be used for example to hide context menu options + * that would do nothing if the user wasn't authorized. + * + * @code + * visible: KCMShell.authorize(["org.kde.fooconfig.desktop"]).length > 0 + * @endcode + * + * @param menuIds A list of control module menu IDs + * @return The entries in @p menuIds that the user is + * authorized to access, may be empty + * @sa KAuthorized::authorizeControlModules + * @since 5.23 + */ + QStringList authorize(const QStringList &menuIds) const; + +}; + +#endif // KCMSHELL_H diff --git a/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.cpp b/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.cpp new file mode 100644 index 0000000..46c7724 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.cpp @@ -0,0 +1,80 @@ +/* + * Copyright 2009 by Alan Alpert + * Copyright 2010 by Ménard Alexis + * Copyright 2010 by Marco Martin + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "kquickcontrolsaddonsplugin.h" +#include "config-kquickcontrolsaddons.h" + + +#include "qpixmapitem.h" +#include "qimageitem.h" +#include "qiconitem.h" +#include "mouseeventlistener.h" +#include "columnproxymodel.h" +#include "clipboard.h" +#include "fallbacktaphandler.h" +#include "mimedatabase.h" +#include "kcmshell.h" +#include "icondialog.h" +#include "eventgenerator.h" + +#if HAVE_EPOXY +#include "plotter.h" +#endif + +static QObject *kcmshell_singleton_provider(QQmlEngine *engine, QJSEngine *scriptEngine) +{ + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); + + return new KCMShell(); +} + +void KQuickControlsAddonsPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.kquickcontrolsaddons")); + + qmlRegisterType(uri, 2, 0, "QPixmapItem"); + qmlRegisterType(uri, 2, 0, "QImageItem"); + qmlRegisterType(uri, 2, 0, "QIconItem"); + qmlRegisterType(uri, 2, 0, "MouseEventListener"); + qmlRegisterType(uri, 2, 0, "ColumnProxyModel"); + qmlRegisterType(uri, 2, 0, "Clipboard"); + qmlRegisterType(uri, 2, 0, "MimeDatabase"); + qmlRegisterSingletonType(uri, 2, 0, "KCMShell", kcmshell_singleton_provider); + qmlRegisterType(uri, 2, 0, "IconDialog"); + qmlRegisterType(uri, 2, 0, "EventGenerator"); + qmlRegisterUncreatableType(uri, 2, 1, "FallbackTapHandlerMouseEvent", QStringLiteral("Cannot create items of type FallbackTapHandlerMouseEvent")); + qmlRegisterType(uri, 2, 1, "FallbackTapHandler"); + +#if HAVE_EPOXY + qmlRegisterType(uri, 2, 0, "PlotData"); + qmlRegisterType(uri, 2, 0, "Plotter"); +#endif +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + qmlRegisterType(); +#else + qmlRegisterAnonymousType(uri, 1); +#endif + qRegisterMetaType("QModelIndex"); +} + + + diff --git a/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.h b/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.h new file mode 100644 index 0000000..c1127b4 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.h @@ -0,0 +1,37 @@ +/* + * Copyright 2009 by Alan Alpert + * Copyright 2010 by Ménard Alexis + * Copyright 2011 by Marco Martin + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KQUICKCONTROLSADDONSPLUGIN_H +#define KQUICKCONTROLSADDONSPLUGIN_H + +#include + + +class KQuickControlsAddonsPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp b/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp new file mode 100644 index 0000000..537855c --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp @@ -0,0 +1,55 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "mimedatabase.h" +#include +#include + +static QJsonObject mimetypeToJsonObject(const QMimeType& type) +{ + if (!type.isValid()) { + qWarning() << "trying to export an invalid type"; + return QJsonObject(); + } + QJsonObject ret; + ret[QStringLiteral("name")] = type.name(); + ret[QStringLiteral("iconName")] = type.iconName(); + ret[QStringLiteral("comment")] = type.comment(); + return ret; +} + +MimeDatabase::MimeDatabase(QObject* parent) + : QObject(parent) +{ +} + +QJsonObject MimeDatabase::mimeTypeForUrl(const QUrl& url) const +{ + return mimetypeToJsonObject(m_db.mimeTypeForUrl(url)); +} + +QJsonObject MimeDatabase::mimeTypeForName(const QString& name) const +{ + QMimeType type = m_db.mimeTypeForName(name); + if (!type.isValid()) { + qWarning() << "wrong mime name" << name; + return QJsonObject(); + } + return mimetypeToJsonObject(type); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.h b/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.h new file mode 100644 index 0000000..0bbedb2 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.h @@ -0,0 +1,39 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef MIMEDATABASE_H +#define MIMEDATABASE_H + +#include +#include + +class MimeDatabase : public QObject +{ + Q_OBJECT + public: + MimeDatabase(QObject* parent = nullptr); + + Q_SCRIPTABLE QJsonObject mimeTypeForUrl(const QUrl & url) const; + Q_SCRIPTABLE QJsonObject mimeTypeForName(const QString & name) const; + + private: + QMimeDatabase m_db; +}; + +#endif // MIMEDATABASE_H diff --git a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp new file mode 100644 index 0000000..37c702d --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp @@ -0,0 +1,423 @@ +/* + Copyright 2011 Marco Martin + Copyright 2013 Sebastian Kügler + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "mouseeventlistener.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +MouseEventListener::MouseEventListener(QQuickItem *parent) + : QQuickItem(parent), + m_pressed(false), + m_pressAndHoldEvent(nullptr), + m_lastEvent(nullptr), + m_containsMouse(false), + m_acceptedButtons(Qt::LeftButton) +{ + m_pressAndHoldTimer = new QTimer(this); + m_pressAndHoldTimer->setSingleShot(true); + connect(m_pressAndHoldTimer, SIGNAL(timeout()), + this, SLOT(handlePressAndHold())); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + qmlRegisterType(); + qmlRegisterType(); +#else + qmlRegisterAnonymousType("org.kde.kquickcontrolsaddons", 1); + qmlRegisterAnonymousType("org.kde.kquickcontrolsaddons", 1); +#endif + + setFiltersChildMouseEvents(true); + setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton|Qt::MidButton|Qt::XButton1|Qt::XButton2); +} + +MouseEventListener::~MouseEventListener() +{ +} + +Qt::MouseButtons MouseEventListener::acceptedButtons() const +{ + return m_acceptedButtons; +} + +Qt::CursorShape MouseEventListener::cursorShape() const +{ + return cursor().shape(); +} + +void MouseEventListener::setCursorShape(Qt::CursorShape shape) +{ + if (cursor().shape() == shape) { + return; + } + + setCursor(shape); + + emit cursorShapeChanged(); +} + +void MouseEventListener::setAcceptedButtons(Qt::MouseButtons buttons) +{ + if (buttons == m_acceptedButtons) { + return; + } + + m_acceptedButtons = buttons; + emit acceptedButtonsChanged(); +} + +void MouseEventListener::setHoverEnabled(bool enable) +{ + if (enable == acceptHoverEvents()) { + return; + } + + setAcceptHoverEvents(enable); + emit hoverEnabledChanged(enable); +} + +bool MouseEventListener::hoverEnabled() const +{ + return acceptHoverEvents(); +} + +bool MouseEventListener::isPressed() const +{ + return m_pressed; +} + +void MouseEventListener::hoverEnterEvent(QHoverEvent *event) +{ + Q_UNUSED(event); + + m_containsMouse = true; + emit containsMouseChanged(true); +} + +void MouseEventListener::hoverLeaveEvent(QHoverEvent *event) +{ + Q_UNUSED(event); + + m_containsMouse = false; + emit containsMouseChanged(false); +} + +void MouseEventListener::hoverMoveEvent(QHoverEvent * event) +{ + if (m_lastEvent == event) { + return; + } + + QQuickWindow *w = window(); + QPoint screenPos; + if (w) { + screenPos = w->mapToGlobal(event->pos()); + } + + KDeclarativeMouseEvent dme(event->pos().x(), event->pos().y(), screenPos.x(), screenPos.y(), Qt::NoButton, Qt::NoButton, event->modifiers(), nullptr); + emit positionChanged(&dme); +} + +bool MouseEventListener::containsMouse() const +{ + return m_containsMouse; +} + +void MouseEventListener::mousePressEvent(QMouseEvent *me) +{ + if (m_lastEvent == me || !(me->buttons() & m_acceptedButtons)) { + me->setAccepted(false); + return; + } + + //FIXME: when a popup window is visible: a click anywhere hides it: but the old qquickitem will continue to think it's under the mouse + //doesn't seem to be any good way to properly reset this. + //this msolution will still caused a missed click after the popup is gone, but gets the situation unblocked. + QPoint viewPosition; + if (window()) { + viewPosition = window()->position(); + } + + if (!QRectF(mapToScene(QPoint(0, 0)) + viewPosition, QSizeF(width(), height())).contains(me->screenPos())) { + me->ignore(); + return; + } + m_buttonDownPos = me->screenPos(); + + KDeclarativeMouseEvent dme(me->pos().x(), me->pos().y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + if (!m_pressAndHoldEvent) { + m_pressAndHoldEvent = new KDeclarativeMouseEvent(me->pos().x(), me->pos().y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + } + + m_pressed = true; + emit pressed(&dme); + emit pressedChanged(); + + if (dme.isAccepted()) { + me->setAccepted(true); + return; + } + + m_pressAndHoldTimer->start(QGuiApplication::styleHints()->mousePressAndHoldInterval()); +} + +void MouseEventListener::mouseMoveEvent(QMouseEvent *me) +{ + if (m_lastEvent == me || !(me->buttons() & m_acceptedButtons)) { + me->setAccepted(false); + return; + } + + if (QPointF(me->screenPos() - m_buttonDownPos).manhattanLength() > QGuiApplication::styleHints()->startDragDistance() && m_pressAndHoldTimer->isActive()) { + m_pressAndHoldTimer->stop(); + } + + KDeclarativeMouseEvent dme(me->pos().x(), me->pos().y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + emit positionChanged(&dme); + + if (dme.isAccepted()) { + me->setAccepted(true); + } +} + +void MouseEventListener::mouseReleaseEvent(QMouseEvent *me) +{ + if (m_lastEvent == me) { + me->setAccepted(false); + return; + } + + KDeclarativeMouseEvent dme(me->pos().x(), me->pos().y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + m_pressed = false; + emit released(&dme); + emit pressedChanged(); + + if (boundingRect().contains(me->pos()) && m_pressAndHoldTimer->isActive()) { + emit clicked(&dme); + m_pressAndHoldTimer->stop(); + } + + if (dme.isAccepted()) { + me->setAccepted(true); + } +} + +void MouseEventListener::wheelEvent(QWheelEvent *we) +{ + if (m_lastEvent == we) { + return; + } + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + KDeclarativeWheelEvent dwe(we->pos(), we->globalPos(), we->angleDelta(), we->buttons(), we->modifiers(), we->orientation()); +#else + KDeclarativeWheelEvent dwe(we->position().toPoint(), we->globalPosition().toPoint(), we->angleDelta(), we->buttons(), we->modifiers(), Qt::Vertical /* HACK, deprecated, remove */); +#endif + emit wheelMoved(&dwe); +} + +void MouseEventListener::handlePressAndHold() +{ + if (m_pressed) { + emit pressAndHold(m_pressAndHoldEvent); + + delete m_pressAndHoldEvent; + m_pressAndHoldEvent = nullptr; + } +} + +bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event) +{ + if (!isEnabled()) { + return false; + } + + //don't filter other mouseeventlisteners + if (qobject_cast(item)) { + return false; + } + + switch (event->type()) { + case QEvent::MouseButtonPress: { + m_lastEvent = event; + QMouseEvent *me = static_cast(event); + + if (!(me->buttons() & m_acceptedButtons)) { + break; + } + + //the parent will receive events in its own coordinates + const QPointF myPos = mapFromScene(me->windowPos()); + + KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + delete m_pressAndHoldEvent; + m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + + //qDebug() << "pressed in sceneEventFilter"; + m_buttonDownPos = me->screenPos(); + m_pressed = true; + emit pressed(&dme); + emit pressedChanged(); + + if (dme.isAccepted()) { + return true; + } + + m_pressAndHoldTimer->start(QGuiApplication::styleHints()->mousePressAndHoldInterval()); + + break; + } + case QEvent::HoverMove: { + if (!acceptHoverEvents()) { + break; + } + m_lastEvent = event; + QHoverEvent *he = static_cast(event); + const QPointF myPos = item->mapToItem(this, he->pos()); + + QQuickWindow *w = window(); + QPoint screenPos; + if (w) { + screenPos = w->mapToGlobal(myPos.toPoint()); + } + + KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), screenPos.x(), screenPos.y(), Qt::NoButton, Qt::NoButton, he->modifiers(), nullptr); + //qDebug() << "positionChanged..." << dme.x() << dme.y(); + emit positionChanged(&dme); + + if (dme.isAccepted()) { + return true; + } + break; + } + case QEvent::MouseMove: { + m_lastEvent = event; + QMouseEvent *me = static_cast(event); + if (!(me->buttons() & m_acceptedButtons)) { + break; + } + + const QPointF myPos = mapFromScene(me->windowPos()); + KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + //qDebug() << "positionChanged..." << dme.x() << dme.y(); + + //stop the pressandhold if mouse moved enough + if (QPointF(me->screenPos() - m_buttonDownPos).manhattanLength() > QGuiApplication::styleHints()->startDragDistance() && m_pressAndHoldTimer->isActive()) { + m_pressAndHoldTimer->stop(); + + //if the mouse moves and we are waiting to emit a press and hold event, update the co-ordinates + //as there is no update function, delete the old event and create a new one + } else if (m_pressAndHoldEvent) { + delete m_pressAndHoldEvent; + m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + } + emit positionChanged(&dme); + + if (dme.isAccepted()) { + return true; + } + break; + } + case QEvent::MouseButtonRelease: { + m_lastEvent = event; + QMouseEvent *me = static_cast(event); + + const QPointF myPos = mapFromScene(me->windowPos()); + KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos())); + m_pressed = false; + + emit released(&dme); + emit pressedChanged(); + + if (QPointF(me->screenPos() - m_buttonDownPos).manhattanLength() <= QGuiApplication::styleHints()->startDragDistance() && m_pressAndHoldTimer->isActive()) { + emit clicked(&dme); + m_pressAndHoldTimer->stop(); + } + + if (dme.isAccepted()) { + return true; + } + break; + } + case QEvent::UngrabMouse: { + m_lastEvent = event; + handleUngrab(); + break; + } + case QEvent::Wheel: { + m_lastEvent = event; + QWheelEvent *we = static_cast(event); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + KDeclarativeWheelEvent dwe(we->pos(), we->globalPos(), we->angleDelta(), we->buttons(), we->modifiers(), we->orientation()); +#else + KDeclarativeWheelEvent dwe(we->position().toPoint(), we->globalPosition().toPoint(), we->angleDelta(), we->buttons(), we->modifiers(), Qt::Vertical /* HACK, deprecated, remove */); +#endif + emit wheelMoved(&dwe); + break; + } + default: + break; + } + + return QQuickItem::childMouseEventFilter(item, event); +// return false; +} + +QScreen* MouseEventListener::screenForGlobalPos(const QPoint& globalPos) +{ + const auto screens = QGuiApplication::screens(); + for (QScreen *screen : screens) { + if (screen->geometry().contains(globalPos)) { + return screen; + } + } + return nullptr; +} + +void MouseEventListener::mouseUngrabEvent() +{ + handleUngrab(); + + QQuickItem::mouseUngrabEvent(); +} + +void MouseEventListener::touchUngrabEvent() +{ + handleUngrab(); + + QQuickItem::touchUngrabEvent(); +} + +void MouseEventListener::handleUngrab() +{ + if (m_pressed) { + m_pressAndHoldTimer->stop(); + + m_pressed = false; + emit pressedChanged(); + + emit canceled(); + } +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h new file mode 100644 index 0000000..4d58f2e --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h @@ -0,0 +1,239 @@ +/* + Copyright 2011 Marco Martin + Copyright 2013 Sebastian Kügler + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef MOUSEEVENTLISTENER_H +#define MOUSEEVENTLISTENER_H + +#include + +/** + * This item spies on mouse events from all child objects including child MouseAreas regardless + * of whether the child MouseArea propagates events. It does not accept the event. + * + * In addition unlike MouseArea events include the mouse position in global co-ordinates and provides + * the screen the mouse is in. + */ + + +class KDeclarativeMouseEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(int x READ x) + Q_PROPERTY(int y READ y) + Q_PROPERTY(int screenX READ screenX) + Q_PROPERTY(int screenY READ screenY) + Q_PROPERTY(int button READ button) + Q_PROPERTY(Qt::MouseButtons buttons READ buttons) + Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers) + Q_PROPERTY(QScreen* screen READ screen CONSTANT) + Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted NOTIFY acceptedChanged) + +public: + KDeclarativeMouseEvent(int x, int y, int screenX, int screenY, + Qt::MouseButton button, + Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers, + QScreen* screen) + : m_x(x), + m_y(y), + m_screenX(screenX), + m_screenY(screenY), + m_button(button), + m_buttons(buttons), + m_modifiers(modifiers), + m_screen(screen) + {} + + int x() const { return m_x; } + int y() const { return m_y; } + int screenX() const { return m_screenX; } + int screenY() const { return m_screenY; } + int button() const { return m_button; } + Qt::MouseButtons buttons() const { return m_buttons; } + Qt::KeyboardModifiers modifiers() const { return m_modifiers; } + QScreen* screen() const { return m_screen; } + + bool isAccepted() const { return m_accepted; } + void setAccepted(bool accepted) { + if (m_accepted != accepted) { + m_accepted = accepted; + emit acceptedChanged(); + } + } + + // only for internal usage + void setX(int x) { m_x = x; } + void setY(int y) { m_y = y; } + +Q_SIGNALS: + void acceptedChanged(); + +private: + int m_x; + int m_y; + int m_screenX; + int m_screenY; + Qt::MouseButton m_button; + Qt::MouseButtons m_buttons; + Qt::KeyboardModifiers m_modifiers; + QScreen *m_screen; + bool m_accepted = false; +}; + +class KDeclarativeWheelEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(int x READ x CONSTANT) + Q_PROPERTY(int y READ y CONSTANT) + Q_PROPERTY(int screenX READ screenX CONSTANT) + Q_PROPERTY(int screenY READ screenY CONSTANT) + Q_PROPERTY(int deltaX READ deltaX CONSTANT) + Q_PROPERTY(int deltaY READ deltaY CONSTANT) + Q_PROPERTY(int delta READ deltaY CONSTANT) // deprecated in favor of deltaY. TODO KF6: remove + Q_PROPERTY(Qt::MouseButtons buttons READ buttons CONSTANT) + Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers CONSTANT) + Q_PROPERTY(Qt::Orientation orientation READ orientation CONSTANT) // deprecated. TODO KF6: remove + +public: + KDeclarativeWheelEvent(QPointF pos, QPoint screenPos, QPoint angleDelta, + Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers, + Qt::Orientation orientation) + : m_x(pos.x()), + m_y(pos.y()), + m_screenX(screenPos.x()), + m_screenY(screenPos.y()), + m_angleDelta(angleDelta), + m_buttons(buttons), + m_modifiers(modifiers), + m_orientation(orientation) + {} + + int x() const { return m_x; } + int y() const { return m_y; } + int screenX() const { return m_screenX; } + int screenY() const { return m_screenY; } + int deltaX() const { return m_angleDelta.x(); } + int deltaY() const { return m_angleDelta.y(); } + Qt::MouseButtons buttons() const { return m_buttons; } + Qt::KeyboardModifiers modifiers() const { return m_modifiers; } + Qt::Orientation orientation() { return m_orientation; } // TODO KF6: remove + + // only for internal usage + void setX(int x) { m_x = x; } + void setY(int y) { m_y = y; } + +private: + int m_x; + int m_y; + int m_screenX; + int m_screenY; + QPoint m_angleDelta; + Qt::MouseButtons m_buttons; + Qt::KeyboardModifiers m_modifiers; + Qt::Orientation m_orientation; +}; + +class MouseEventListener : public QQuickItem +{ + Q_OBJECT + /** + * This property holds whether hover events are handled. + * By default hover events are disabled + */ + Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged) + + /** + * True if this MouseEventListener or any of its children contains the mouse cursor: this property will change only when the mouse button is pressed if hoverEnabled is false + */ + Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged) + + Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged) + + /** + * This property holds the cursor shape for this mouse area. + * Note that on platforms that do not display a mouse cursor this may have no effect. + */ + Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape RESET unsetCursor NOTIFY cursorShapeChanged) + + /** + * True if the mouse is pressed in the item or any of its children + */ + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged) + +public: + MouseEventListener(QQuickItem *parent=nullptr); + ~MouseEventListener() override; + + bool containsMouse() const; + void setHoverEnabled(bool enable); + bool hoverEnabled() const; + bool isPressed() const; + + Qt::MouseButtons acceptedButtons() const; + void setAcceptedButtons(Qt::MouseButtons buttons); + + Qt::CursorShape cursorShape() const; + void setCursorShape(Qt::CursorShape shape); + +protected: + void hoverEnterEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent * event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void wheelEvent(QWheelEvent *event) override; + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + void mouseUngrabEvent() override; + void touchUngrabEvent() override; + +Q_SIGNALS: + void pressed(KDeclarativeMouseEvent *mouse); + void positionChanged(KDeclarativeMouseEvent *mouse); + void released(KDeclarativeMouseEvent *mouse); + void clicked(KDeclarativeMouseEvent *mouse); + void pressAndHold(KDeclarativeMouseEvent *mouse); + void wheelMoved(KDeclarativeWheelEvent *wheel); + void containsMouseChanged(bool containsMouseChanged); + void hoverEnabledChanged(bool hoverEnabled); + void acceptedButtonsChanged(); + void cursorShapeChanged(); + void pressedChanged(); + void canceled(); + +private Q_SLOTS: + void handlePressAndHold(); + void handleUngrab(); + +private: + static QScreen* screenForGlobalPos(const QPoint &globalPos); + + bool m_pressed; + KDeclarativeMouseEvent* m_pressAndHoldEvent; + QPointF m_buttonDownPos; + //Important: used only for comparison. If you will ever need to access this pointer, make it a QWeakPointer + QEvent *m_lastEvent; + QTimer *m_pressAndHoldTimer; + bool m_containsMouse; + Qt::MouseButtons m_acceptedButtons; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/plotter.cpp b/src/qmlcontrols/kquickcontrolsaddons/plotter.cpp new file mode 100644 index 0000000..65835fb --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/plotter.cpp @@ -0,0 +1,939 @@ +/* + * This file is part of the KDE project + * + * Copyright © 2014 Fredrik Höglund + * Copyright © 2014 Marco Martin + * Copyright © 2015 David Edmundson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#include "plotter.h" + + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include + +#include + +//completely arbitrary +static int s_defaultSampleSize = 40; + +PlotData::PlotData(QObject *parent) + : QObject(parent), + m_min(std::numeric_limits::max()), + m_max(std::numeric_limits::min()), + m_sampleSize(s_defaultSampleSize) +{ + m_values.reserve(s_defaultSampleSize); + for (int i = 0; i < s_defaultSampleSize; ++i) { + m_values << 0.0; + } +} + +void PlotData::setColor(const QColor &color) +{ + if (m_color == color) { + return; + } + + m_color = color; + + emit colorChanged(); +} + +QColor PlotData::color() const +{ + return m_color; +} + +qreal PlotData::max() const +{ + return m_max; +} + +qreal PlotData::min() const +{ + return m_min; +} + +void PlotData::setSampleSize(int size) +{ + if (m_sampleSize == size) { + return; + } + + m_values.reserve(size); + if (m_values.size() > size) { + const int numberToRemove = (m_values.size() - size); + for (int i = 0; i < numberToRemove; ++i) { + m_values.removeFirst(); + } + } else if (m_values.size() < size) { + const int numberToAdd = (size - m_values.size()); + for (int i = 0; i < numberToAdd; ++i) { + m_values.prepend(0.0); + } + } + + m_sampleSize = size; +} + +QString PlotData::label() const +{ + return m_label; +} + +void PlotData::setLabel(const QString &label) +{ + if (m_label == label) { + return; + } + + m_label = label; + emit labelChanged(); +} + +void PlotData::addSample(qreal value) +{ + + //assume at this point we'll have to pop a single time to stay in size + if (m_values.size() >= m_sampleSize) { + m_values.removeFirst(); + } + + m_values.push_back(value); + + m_max = std::numeric_limits::min(); + m_min = std::numeric_limits::max(); + for (auto v : qAsConst(m_values)) { + if (v > m_max) { + m_max = v; + } else if (v < m_min) { + m_min = v; + } + } + + emit valuesChanged(); +} + +QList PlotData::values() const +{ + return m_values; +} + +const char *vs_source = + "attribute vec4 vertex;\n" + "varying float gradient;\n" + + "uniform mat4 matrix;\n" + "uniform float yMin;\n" + "uniform float yMax;\n" + + "void main(void) {\n" + " gradient = (vertex.y - yMin) / (yMax - yMin);" + " gl_Position = matrix * vertex;\n" + "}"; + +const char *fs_source = + "uniform vec4 color1;\n" + "uniform vec4 color2;\n" + + "varying float gradient;\n" + + "void main(void) {\n" + " gl_FragColor = mix(color1, color2, gradient);\n" + "}"; + + + + +// -------------------------------------------------- + + + +class PlotTexture : public QSGTexture +{ +public: + PlotTexture(QOpenGLContext *ctx); + ~PlotTexture() override; + + void bind() override final; + bool hasAlphaChannel() const override final { return true; } + bool hasMipmaps() const override final { return false; } + int textureId() const override final { return m_texture; } + QSize textureSize() const override final { return m_size; } + + void recreate(const QSize &size); + GLuint fbo() const { return m_fbo; } + +private: + GLuint m_texture = 0; + GLuint m_fbo = 0; + GLenum m_internalFormat; + bool m_haveTexStorage; + QSize m_size; +}; + +PlotTexture::PlotTexture(QOpenGLContext *ctx) : QSGTexture() +{ + QPair version = ctx->format().version(); + + if (ctx->isOpenGLES()) { + m_haveTexStorage = version >= qMakePair(3, 0) || ctx->hasExtension("GL_EXT_texture_storage"); + m_internalFormat = m_haveTexStorage ? GL_RGBA8 : GL_RGBA; + } else { + m_haveTexStorage = version >= qMakePair(4, 2) || ctx->hasExtension("GL_ARB_texture_storage"); + m_internalFormat = GL_RGBA8; + } + + glGenFramebuffers(1, &m_fbo); +} + +PlotTexture::~PlotTexture() +{ + if (m_texture) { + glDeleteTextures(1, &m_texture); + } + + glDeleteFramebuffers(1, &m_fbo); +} + +void PlotTexture::bind() +{ + glBindTexture(GL_TEXTURE_2D, m_texture); +} + +void PlotTexture::recreate(const QSize &size) +{ + if (m_texture) { + glDeleteTextures(1, &m_texture); + } + + glGenTextures(1, &m_texture); + glBindTexture(GL_TEXTURE_2D, m_texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); + + if (m_haveTexStorage) { + glTexStorage2D(GL_TEXTURE_2D, 1, m_internalFormat, size.width(), size.height()); + } else { + glTexImage2D(GL_TEXTURE_2D, 0, m_internalFormat, size.width(), size.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr); + } + + glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0); + + m_size = size; +} + +class PlotSGNode: public QSGSimpleTextureNode +{ +public: + PlotSGNode(); + void bind() { + m_program->bind(); + } + void setMatrix(const QMatrix4x4 &matrix) { + m_program->setUniformValue(u_matrix, matrix); + } + void setColor1(const QColor &color) { + m_program->setUniformValue(u_color1, color); + } + void setColor2(const QColor &color) { + m_program->setUniformValue(u_color2, color); + } + void setYMin(float min) { + m_program->setUniformValue(u_yMin, min); + } + void setYMax(float max) { + m_program->setUniformValue(u_yMax, max); + } + ~PlotSGNode() = default; +private: + QScopedPointer m_program; + int u_matrix; + int u_color1; + int u_color2; + int u_yMin; + int u_yMax; + +}; + +PlotSGNode::PlotSGNode(): + m_program(new QOpenGLShaderProgram) +{ + setOwnsTexture(true); + m_program->addCacheableShaderFromSourceCode(QOpenGLShader::Vertex, vs_source); + m_program->addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, fs_source); + m_program->bindAttributeLocation("vertex", 0); + m_program->link(); + + u_yMin = m_program->uniformLocation("yMin"); + u_yMax = m_program->uniformLocation("yMax"); + u_color1 = m_program->uniformLocation("color1"); + u_color2 = m_program->uniformLocation("color2"); + u_matrix = m_program->uniformLocation("matrix"); +} + + + +// ---------------------- + +Plotter::Plotter(QQuickItem *parent) + : QQuickItem(parent), + m_min(0), + m_max(0), + m_rangeMax(0), + m_rangeMin(0), + m_sampleSize(s_defaultSampleSize), + m_horizontalLineCount(5), + m_stacked(true), + m_autoRange(true) +{ + setFlag(ItemHasContents); + connect(this, &Plotter::windowChanged, this, [this]() { + if (m_window) { + disconnect(m_window.data(), &QQuickWindow::beforeRendering, this, &Plotter::render); + } + m_window.clear(); + //when the window changes, the node gets deleted + m_node = nullptr; + }); +} + +Plotter::~Plotter() +{ +} + +qreal Plotter::max() const +{ + return m_max; +} + +qreal Plotter::min() const +{ + return m_min; +} + +int Plotter::sampleSize() const +{ + return m_sampleSize; +} + +void Plotter::setSampleSize(int size) +{ + if (m_sampleSize == size) { + return; + } + + m_sampleSize = size; + + m_mutex.lock(); + for (auto data : qAsConst(m_plotData)) { + data->setSampleSize(size); + } + m_mutex.unlock(); + + update(); + emit sampleSizeChanged(); +} + +bool Plotter::isStacked() const +{ + return m_stacked; +} + +void Plotter::setStacked(bool stacked) +{ + if (m_stacked == stacked) { + return; + } + + m_stacked = stacked; + + emit stackedChanged(); + update(); +} + +bool Plotter::isAutoRange() const +{ + return m_autoRange; +} + +void Plotter::setAutoRange(bool autoRange) +{ + if (m_autoRange == autoRange) { + return; + } + + m_autoRange = autoRange; + + emit autoRangeChanged(); + normalizeData(); + update(); +} + +qreal Plotter::rangeMax() const +{ + if (m_autoRange) { + return m_max; + } else { + return m_rangeMax; + } +} + +void Plotter::setRangeMax(qreal max) +{ + if (m_rangeMax == max) { + return; + } + + m_rangeMax = max; + + emit rangeMaxChanged(); + normalizeData(); + update(); +} + +qreal Plotter::rangeMin() const +{ + if (m_autoRange) { + return m_min; + } else { + return m_rangeMin; + } +} + +void Plotter::setRangeMin(qreal min) +{ + if (m_rangeMin == min) { + return; + } + + m_rangeMin = min; + + emit rangeMinChanged(); + normalizeData(); + update(); +} + +void Plotter::setGridColor(const QColor &color) +{ + if (m_gridColor == color) { + return; + } + + m_gridColor = color; + + emit gridColorChanged(); +} + +QColor Plotter::gridColor() const +{ + return m_gridColor; +} + +int Plotter::horizontalGridLineCount() +{ + return m_horizontalLineCount; +} + +void Plotter::setHorizontalGridLineCount(int count) +{ + if (m_horizontalLineCount == count) { + return; + } + + m_horizontalLineCount = count; + emit horizontalGridLineCountChanged(); +} + + +void Plotter::addSample(qreal value) +{ + if (m_plotData.count() != 1) { + qWarning() << "Must add a new value per data set, pass an array of values instead"; + return; + } + + addSample(QList() << value); +} + +void Plotter::addSample(const QList &value) +{ + if (value.count() != m_plotData.count()) { + qWarning() << "Must add a new value per data set"; + return; + } + + int i = 0; + m_mutex.lock(); + for (auto data : qAsConst(m_plotData)) { + data->addSample(value.value(i)); + ++i; + } + m_mutex.unlock(); + + normalizeData(); + + update(); +} + +void Plotter::dataSet_append(QQmlListProperty *list, PlotData *item) +{ + //encase all m_plotData access in a mutex, since rendering is usually done in another thread + Plotter *p = static_cast(list->object); + p->m_mutex.lock(); + p->m_plotData.append(item); + p->m_mutex.unlock(); +} + +int Plotter::dataSet_count(QQmlListProperty *list) +{ + Plotter *p = static_cast(list->object); + return p->m_plotData.count(); +} + +PlotData *Plotter::dataSet_at(QQmlListProperty *list, int index) +{ + Plotter *p = static_cast(list->object); + p->m_mutex.lock(); + PlotData *d = p->m_plotData.at(index); + p->m_mutex.unlock(); + return d; +} + +void Plotter::dataSet_clear(QQmlListProperty *list) +{ + Plotter *p = static_cast(list->object); + + p->m_mutex.lock(); + p->m_plotData.clear(); + p->m_mutex.unlock(); +} + + +QQmlListProperty Plotter::dataSets() +{ + return QQmlListProperty(this, nullptr, Plotter::dataSet_append, Plotter::dataSet_count, Plotter::dataSet_at, Plotter::dataSet_clear); +} + + + +// Catmull-Rom interpolation +QPainterPath Plotter::interpolate(const QVector &p, qreal x0, qreal x1) const +{ + QPainterPath path; + + const QMatrix4x4 matrix( 0, 1, 0, 0, + -1/6., 1, 1/6., 0, + 0, 1/6., 1, -1/6., + 0, 0, 1, 0); + + const qreal xDelta = (x1 - x0) / (p.count() - 3); + qreal x = x0 - xDelta; + + path.moveTo(x0, p[0]); + + for (int i = 1; i < p.count() - 2; i++) { + const QMatrix4x4 points(x, p[i-1], 0, 0, + x + xDelta * 1, p[i+0], 0, 0, + x + xDelta * 2, p[i+1], 0, 0, + x + xDelta * 3, p[i+2], 0, 0); + + const QMatrix4x4 res = matrix * points; + + path.cubicTo(res(1, 0), res(1, 1), + res(2, 0), res(2, 1), + res(3, 0), res(3, 1)); + + x += xDelta; + } + + return path; +} + +void Plotter::render() +{ + if (!window() || !m_node || !m_node->texture()) { + return; + } + + GLuint rb; + + if (m_haveMSAA && m_haveFramebufferBlit) { + // Allocate a temporary MSAA renderbuffer + glGenRenderbuffers(1, &rb); + glBindRenderbuffer(GL_RENDERBUFFER, rb); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, m_samples, m_internalFormat, width(), height()); + + // Attach it to the framebuffer object + glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rb); + } else { + // If we don't have MSAA support we render directly into the texture + glBindFramebuffer(GL_FRAMEBUFFER, static_cast(m_node->texture())->fbo()); + } + + glViewport(0, 0, width(), height()); + + // Clear the color buffer + glClearColor(0.0, 0.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + // Add horizontal lines + qreal lineSpacing = height() / m_horizontalLineCount; + + QVector vertices; + + //don't draw the bottom line that will come later + for (int i = 0; i < m_horizontalLineCount; i++) { + int lineY = ceil(i * lineSpacing)+1; //floor +1 makes the entry at point 0 on pixel 1 + vertices << QVector2D(0, lineY) << QVector2D(width(), lineY); + } + //bottom line + vertices << QVector2D(0, height()-1) << QVector2D(width(), height()-1); + + + // Tessellate + float min = height(); + float max = height(); + + QHash > verticesCounts; + + //encase all m_plotData access in a mutex, since rendering is usually done in another thread + m_mutex.lock(); + int roundedHeight = qRound(height()); + int roundedWidth = qRound(width()); + + for (auto data : qAsConst(m_plotData)) { + // Interpolate the data set + const QPainterPath path = interpolate(data->m_normalizedValues, 0, roundedWidth); + + // Flatten the path + const QList polygons = path.toSubpathPolygons(); + + for (const QPolygonF &p : polygons) { + verticesCounts[data].first = 0; + vertices << QVector2D(p.first().x(), roundedHeight); + + for (int i = 0; i < p.count()-1; i++) { + min = qMin(min, roundedHeight - p[i].y()); + vertices << QVector2D(p[i].x(), roundedHeight - p[i].y()); + vertices << QVector2D((p[i].x() + p[i+1].x()) / 2.0, roundedHeight); + verticesCounts[data].first += 2; + } + + min = qMin(min, roundedHeight - p.last().y()); + vertices << QVector2D(p.last().x(), roundedHeight - p.last().y()); + vertices << QVector2D(p.last().x(), roundedHeight); + verticesCounts[data].first += 3; + } + + for (const QPolygonF &p : polygons) { + verticesCounts[data].second = 0; + + for (int i = 0; i < p.count()-1; i++) { + min = qMin(min, roundedHeight - p[i].y()); + vertices << QVector2D(p[i].x(), roundedHeight - p[i].y()); + verticesCounts[data].second += 1; + } + + vertices << QVector2D(p.last().x(), roundedHeight - p.last().y()); + verticesCounts[data].second += 1; + min = qMin(min, roundedHeight - p.last().y()); + } + } + m_mutex.unlock(); + + // Upload vertices + GLuint vbo; + glGenBuffers(1, &vbo); + + glBindBuffer(GL_ARRAY_BUFFER, vbo); + glBufferData(GL_ARRAY_BUFFER, vertices.count() * sizeof(QVector2D), vertices.constData(), GL_STATIC_DRAW); + + // Set up the array + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(QVector2D), nullptr); + glEnableVertexAttribArray(0); + + // Bind the shader program + m_node->bind(); + m_node->setMatrix(m_matrix); + + // Draw the lines + QColor color1 = m_gridColor; + QColor color2 = m_gridColor; + color1.setAlphaF(0.10); + color2.setAlphaF(0.40); + m_node->setYMin((float) 0.0); + m_node->setYMax((float) height()); + m_node->setColor1(color1); + m_node->setColor2(color2); + + glDrawArrays(GL_LINES, 0, (m_horizontalLineCount+1) * 2 ); + + // Enable alpha blending + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + QPair oldCount; + m_mutex.lock(); + for (auto data : qAsConst(m_plotData)) { + color2 = data->color(); + color2.setAlphaF(0.60); + // Draw the graph + m_node->setYMin(min); + m_node->setYMax(max); + m_node->setColor1(data->color()); + m_node->setColor2(color2); + + //+2 is for the bottom line + glDrawArrays(GL_TRIANGLE_STRIP, m_horizontalLineCount*2 + 2 + oldCount.first + oldCount.second, verticesCounts[data].first); + + oldCount.first += verticesCounts[data].first; + + m_node->setColor1(data->color()); + m_node->setColor2(data->color()); + glDrawArrays(GL_LINE_STRIP, m_horizontalLineCount*2 + 2 + oldCount.first + oldCount.second, verticesCounts[data].second); + + oldCount.second += verticesCounts[data].second; + } + m_mutex.unlock(); + + glDisable(GL_BLEND); + + m_node->setColor1(m_gridColor); + m_node->setColor2(m_gridColor); + glDrawArrays(GL_LINES, vertices.count()-2, 2); + + if (m_haveMSAA && m_haveFramebufferBlit) { + // Resolve the MSAA buffer + glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, static_cast(m_node->texture())->fbo()); + glBlitFramebuffer(0, 0, width(), height(), 0, 0, width(), height(), GL_COLOR_BUFFER_BIT, GL_NEAREST); + + // Delete the render buffer + glDeleteRenderbuffers(1, &rb); + } + + // Delete the VBO + glDeleteBuffers(1, &vbo); +} + +QSGNode *Plotter::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) +{ + Q_UNUSED(updatePaintNodeData) + if (!window()->openglContext()) { + delete oldNode; + return nullptr; + } + + PlotSGNode *n = static_cast(oldNode); + + if (width() == 0 && height() == 0) { + delete oldNode; + return nullptr; + } + + if (!n) { + n = new PlotSGNode(); + n->setTexture(new PlotTexture(window()->openglContext())); + n->setFiltering(QSGTexture::Linear); + + m_node = n; + if (m_window) { + disconnect(m_window.data(), &QQuickWindow::beforeRendering, this, &Plotter::render); + } + connect(window(), &QQuickWindow::beforeRendering, this, &Plotter::render, Qt::DirectConnection); + m_window = window(); + } + + if (!m_initialized) { + glGenFramebuffers(1, &m_fbo); + + QOpenGLContext *ctx = window()->openglContext(); + QPair version = ctx->format().version(); + + if (ctx->isOpenGLES()) { + m_haveMSAA = version >= qMakePair(3, 0) || ctx->hasExtension("GL_NV_framebuffer_multisample"); + m_haveFramebufferBlit = version >= qMakePair(3, 0) || ctx->hasExtension("GL_NV_framebuffer_blit"); + m_haveInternalFormatQuery = version >= qMakePair(3, 0); + m_internalFormat = version >= qMakePair(3, 0) ? GL_RGBA8 : GL_RGBA; + } else { + m_haveMSAA = version >= qMakePair(3, 2) || ctx->hasExtension("GL_ARB_framebuffer_object") || + ctx->hasExtension("GL_EXT_framebuffer_multisample"); + m_haveFramebufferBlit = version >= qMakePair(3, 0) || ctx->hasExtension("GL_ARB_framebuffer_object") || + ctx->hasExtension("GL_EXT_framebuffer_blit"); + m_haveInternalFormatQuery = version >= qMakePair(4, 2) || ctx->hasExtension("GL_ARB_internalformat_query"); + m_internalFormat = GL_RGBA8; + } + + // Query the maximum sample count for the internal format + if (m_haveInternalFormatQuery) { + int count = 0; + glGetInternalformativ(GL_RENDERBUFFER, m_internalFormat, GL_NUM_SAMPLE_COUNTS, 1, &count); + + if (count > 0) { + QVector samples(count); + glGetInternalformativ(GL_RENDERBUFFER, m_internalFormat, GL_SAMPLES, count, samples.data()); + + // The samples are returned in descending order. Choose the highest value. + m_samples = samples.at(0); + } else { + m_samples = 0; + } + } else if (m_haveMSAA) { + glGetIntegerv(GL_MAX_SAMPLES, &m_samples); + } else { + m_samples = 0; + } + + m_initialized = true; + } + + //we need a size always equal or smaller, size.toSize() won't do + const QSize targetTextureSize(qRound(boundingRect().size().width()), qRound(boundingRect().size().height())); + if (n->texture()->textureSize() != targetTextureSize) { + static_cast(n->texture())->recreate(targetTextureSize); + m_matrix = QMatrix4x4(); + m_matrix.ortho(0, targetTextureSize.width(), 0, targetTextureSize.height(), -1, 1); + } + + n->setRect(QRect(QPoint(0,0), targetTextureSize)); + return n; +} + +void Plotter::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) +{ + QQuickItem::geometryChanged(newGeometry, oldGeometry); + normalizeData(); +} + +void Plotter::normalizeData() +{ + if (m_plotData.isEmpty()) { + return; + } + //normalize data + m_max = std::numeric_limits::min(); + m_min = std::numeric_limits::max(); + qreal adjustedMax = m_max; + qreal adjustedMin = m_min; + m_mutex.lock(); + if (m_stacked) { + PlotData *previousData = nullptr; + auto i = m_plotData.constEnd(); + do { + --i; + PlotData *data = *i; + data->m_normalizedValues.clear(); + data->m_normalizedValues.resize(data->values().count()); + if (previousData) { + for (int i = 0; i < data->values().count(); ++i) { + data->m_normalizedValues[i] = data->values().value(i) + previousData->m_normalizedValues.value(i); + + if (data->m_normalizedValues[i] > adjustedMax) { + adjustedMax = data->m_normalizedValues[i]; + } + if (data->m_normalizedValues[i] < adjustedMin) { + adjustedMin = data->m_normalizedValues[i]; + } + } + } else { + data->m_normalizedValues = data->values().toVector(); + if (data->max() > adjustedMax) { + adjustedMax = data->max(); + } + if (data->min() < adjustedMin) { + adjustedMin = data->min(); + } + } + previousData = data; + + //global max and global min + if (data->max() > m_max) { + m_max = data->max(); + } + if (data->min() < m_min) { + m_min = data->min(); + } + } while (i != m_plotData.constBegin()); + + } else { + for (auto data : qAsConst(m_plotData)) { + data->m_normalizedValues.clear(); + data->m_normalizedValues = data->values().toVector(); + //global max and global min + if (data->max() > m_max) { + adjustedMax = m_max = data->max(); + } + if (data->min() < m_min) { + adjustedMin = m_min = data->min(); + } + } + } + m_mutex.unlock(); + + if (adjustedMin > 0.0 && adjustedMax > 0.0) + adjustedMin = 0.0; + + if (adjustedMin < 0.0 && adjustedMax < 0.0) + adjustedMax = 0.0; + + if (m_autoRange || m_rangeMax > m_rangeMin) { + if (!m_autoRange) { + adjustedMax = m_rangeMax; + adjustedMin = m_rangeMin; + } + + qreal adjust; + //this should never happen, remove? + if (qFuzzyCompare(adjustedMax - adjustedMin, std::numeric_limits::min())) { + adjust = 1; + } else { + adjust = (height() / (adjustedMax - adjustedMin)); + } + + //normalizebased on global max and min + m_mutex.lock(); + for (auto data : qAsConst(m_plotData)) { + for (int i = 0; i < data->values().count(); ++i) { + data->m_normalizedValues[i] = (data->m_normalizedValues.value(i) - adjustedMin) * adjust; + } + } + m_mutex.unlock(); + } +} + diff --git a/src/qmlcontrols/kquickcontrolsaddons/plotter.h b/src/qmlcontrols/kquickcontrolsaddons/plotter.h new file mode 100644 index 0000000..c1e660b --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/plotter.h @@ -0,0 +1,265 @@ +/* + * This file is part of the KDE project + * + * Copyright © 2014 Fredrik Höglund + * Copyright © 2014 Marco Martin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef PLASMA_PLOTTER_H +#define PLASMA_PLOTTER_H + + +#include + +// qopengl.h declares GLdouble as a typedef of float when Qt is built +// with GLES support. This conflicts with the epoxy/gl_generated.h +// declaration, so we have to prevent the Qt header from being #included. +#define QOPENGL_H + +#ifndef QOPENGLF_APIENTRY +#define QOPENGLF_APIENTRY GLAPIENTRY +#endif + +#ifndef QOPENGLF_APIENTRYP +#define QOPENGLF_APIENTRYP GLAPIENTRYP +#endif + +#include +#include +#include +#include +#include + +class PlotSGNode; + +/** + * a Plotter can draw a graph of values arriving from an arbitrary number of data sources + * to show their evolution in time. + * an example can be a plot of the network transfer speed or CPU temperature over time. + * Multiple plots can be fitted in the same graph, either stacked or intersected. + */ +class PlotData : public QObject +{ + Q_OBJECT + /** + * text Label of the data set: note this is purely a model, it will need a Label somewhere to be actually painted + */ + Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged) + + /** + * Color to plot this data set + */ + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + + /** + * All the values currently in this data set + */ + Q_PROPERTY(QList values READ values NOTIFY valuesChanged) + + /** + * Maximum value of this data set + */ + Q_PROPERTY(qreal max READ max NOTIFY maxChanged) + + /** + * Minimum value of this data set + */ + Q_PROPERTY(qreal min READ min NOTIFY minChanged) + +public: + PlotData(QObject *parent = nullptr); + + void setColor(const QColor &color); + QColor color() const; + + void addSample(qreal value); + + QList values() const; + + QVector m_normalizedValues; + + qreal max() const; + qreal min() const; + + void setSampleSize(int size); + + QString label() const; + void setLabel(const QString &label); + +Q_SIGNALS: + void colorChanged(); + void valuesChanged(); + void maxChanged(); + void minChanged(); + void labelChanged(); + +private: + QString m_label; + QColor m_color; + QList m_values; + + qreal m_min; + qreal m_max; + int m_sampleSize; +}; + +class Plotter : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty dataSets READ dataSets) + + /** + * maximum value among all graphs + */ + Q_PROPERTY(qreal max READ max NOTIFY maxChanged) + + /** + * minimum value among all graphs + */ + Q_PROPERTY(qreal min READ min NOTIFY minChanged) + + /** + * draw at most n samples, if new samples are pushed old values are started to be thrown away + */ + Q_PROPERTY(int sampleSize READ sampleSize WRITE setSampleSize NOTIFY sampleSizeChanged) + + /** + * if true stack the graphs one on top of each other instead of just painting one on top of each other + */ + Q_PROPERTY(bool stacked READ isStacked WRITE setStacked NOTIFY stackedChanged) + + /** + * If true, the graph is automatically scaled to always fit in the Plotter area + */ + Q_PROPERTY(bool autoRange READ isAutoRange WRITE setAutoRange NOTIFY autoRangeChanged) + + /** + * Always represents the values scaled between this and rangeMin + * If autoRange is true, this property just holds the minimum value + */ + Q_PROPERTY(qreal rangeMax READ rangeMax WRITE setRangeMax NOTIFY rangeMaxChanged) + + /** + * Always represents the values scaled between this and rangeMax + * If autoRange is true, this property just holds the maximum value + */ + Q_PROPERTY(qreal rangeMin READ rangeMin WRITE setRangeMin NOTIFY rangeMinChanged) + + /** + * Color of the grid lines + */ + Q_PROPERTY(QColor gridColor READ gridColor WRITE setGridColor NOTIFY gridColorChanged) + + + /** + * The number of horizontal lines drawn across the view between 0 and rangeMax at the top of the plotter at rangeMax + * This does not include the bottom line + * Setting this to 0 will disable grid lines + * + * The default value is 5 + */ + Q_PROPERTY(int horizontalGridLineCount READ horizontalGridLineCount WRITE setHorizontalGridLineCount NOTIFY horizontalGridLineCountChanged) + + //Q_CLASSINFO("DefaultProperty", "dataSets") + +public: + Plotter(QQuickItem *parent = nullptr); + ~Plotter(); + + qreal max() const; + qreal min() const; + + int sampleSize() const; + void setSampleSize(int size); + + bool isStacked() const; + void setStacked(bool stacked); + + bool isAutoRange() const; + void setAutoRange(bool autorange); + + qreal rangeMax() const; + void setRangeMax(qreal max); + + qreal rangeMin() const; + void setRangeMin(qreal min); + + void setHorizontalGridLineCount(int count); + int horizontalGridLineCount(); + + void setGridColor(const QColor &color); + QColor gridColor() const; + + QQmlListProperty dataSets(); + static void dataSet_append(QQmlListProperty *list, PlotData *item); + static int dataSet_count(QQmlListProperty *list); + static PlotData *dataSet_at(QQmlListProperty *list, int pos); + static void dataSet_clear(QQmlListProperty *list); + + Q_INVOKABLE void addSample(qreal value); + Q_INVOKABLE void addSample(const QList &value); + +protected: + void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; + +private: + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override final; + QPainterPath interpolate(const QVector &p, qreal x0, qreal x1) const; + void normalizeData(); + +Q_SIGNALS: + void maxChanged(); + void minChanged(); + void sampleSizeChanged(); + void stackedChanged(); + void autoRangeChanged(); + void rangeMaxChanged(); + void rangeMinChanged(); + void gridColorChanged(); + void horizontalGridLineCountChanged(); + +private Q_SLOTS: + void render(); + +private: + QList m_plotData; + + GLuint m_fbo = 0; + PlotSGNode *m_node = nullptr; + qreal m_min; + qreal m_max; + qreal m_rangeMax; + qreal m_rangeMin; + int m_sampleSize; + int m_horizontalLineCount; + bool m_stacked; + bool m_autoRange; + QColor m_gridColor; + + QMatrix4x4 m_matrix; + bool m_initialized = false; + bool m_haveMSAA; + bool m_haveFramebufferBlit; + bool m_haveInternalFormatQuery; + GLenum m_internalFormat; + int m_samples; + QPointer m_window; + QMutex m_mutex; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/qiconitem.cpp b/src/qmlcontrols/kquickcontrolsaddons/qiconitem.cpp new file mode 100644 index 0000000..429642d --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qiconitem.cpp @@ -0,0 +1,172 @@ +/* + * Copyright 2011 Marco Martin + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qiconitem.h" + +#include +#include +#include +#include + +Q_GLOBAL_STATIC(ImageTexturesCache, s_iconImageCache) + +QIconItem::QIconItem(QQuickItem *parent) + : QQuickItem(parent), + m_smooth(false), + m_state(DefaultState), + m_changed(false) +{ + setFlag(ItemHasContents, true); +} + + +QIconItem::~QIconItem() +{ +} + +void QIconItem::setIcon(const QVariant &icon) +{ + if(icon.canConvert()) { + m_icon = icon.value(); + } else if(icon.canConvert()) { + m_icon = QIcon::fromTheme(icon.toString()); + } else { + m_icon = QIcon(); + } + m_changed = true; + update(); + emit iconChanged(); +} + +QIcon QIconItem::icon() const +{ + return m_icon; +} + +QIconItem::State QIconItem::state() const +{ + return m_state; +} + +void QIconItem::setState(QIconItem::State state) +{ + if (m_state == state) { + return; + } + + m_state = state; + m_changed = true; + emit stateChanged(state); + update(); +} + +bool QIconItem::enabled() const +{ + return (m_state == DefaultState); +} + +void QIconItem::setEnabled(bool enabled) +{ + if (enabled) { + setState(DefaultState); + } else { + setState(DisabledState); + } +} + +int QIconItem::implicitWidth() const +{ + return 32; +} + +int QIconItem::implicitHeight() const +{ + return 32; +} + +void QIconItem::setSmooth(const bool smooth) +{ + if (smooth == m_smooth) { + return; + } + m_smooth = smooth; + m_changed = true; + update(); + emit smoothChanged(); +} + +bool QIconItem::smooth() const +{ + return m_smooth; +} + +QSGNode* QIconItem::updatePaintNode(QSGNode* node, QQuickItem::UpdatePaintNodeData* /*data*/) +{ + if (m_icon.isNull()) { + delete node; + return nullptr; + } + + if (m_changed || node == nullptr) { + m_changed = false; + + ManagedTextureNode* mNode = dynamic_cast(node); + if(!mNode) { + delete node; + mNode = new ManagedTextureNode; + } + + QIcon::Mode mode; + switch(m_state) { + case DefaultState: + mode = QIcon::Normal; + break; + case ActiveState: + mode = QIcon::Active; + break; + case DisabledState: + mode = QIcon::Disabled; + break; + case SelectedState: + mode = QIcon::Selected; + break; + } + + QImage img; + const QSize size(width(), height()); + if (!size.isEmpty()) { + img = m_icon.pixmap(size, mode, QIcon::On).toImage(); + } + mNode->setTexture(s_iconImageCache->loadTexture(window(), img)); + mNode->setRect(QRect(QPoint(0,0), size)); + node = mNode; + } + + return node; +} + +void QIconItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) +{ + if (newGeometry.size() != oldGeometry.size()) { + m_changed = true; + update(); + } + QQuickItem::geometryChanged(newGeometry, oldGeometry); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/qiconitem.h b/src/qmlcontrols/kquickcontrolsaddons/qiconitem.h new file mode 100644 index 0000000..0809b05 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qiconitem.h @@ -0,0 +1,83 @@ +/* + * Copyright 2011 Marco Martin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef QICONITEM_H +#define QICONITEM_H + +#include +#include +#include + +class QIconItem : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QVariant icon READ icon WRITE setIcon NOTIFY iconChanged) + Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) + Q_PROPERTY(int implicitWidth READ implicitWidth CONSTANT) + Q_PROPERTY(int implicitHeight READ implicitHeight CONSTANT) + Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY stateChanged) + +public: + + enum State { + DefaultState, ///The default state. + ActiveState, ///Icon is active. + DisabledState, ///Icon is disabled. + SelectedState ///Icon is selected + }; + Q_ENUM(State) + + explicit QIconItem(QQuickItem *parent=nullptr); + ~QIconItem() override; + + void setIcon(const QVariant &icon); + QIcon icon() const; + + QIconItem::State state() const; + void setState(State state); + + int implicitWidth() const; + int implicitHeight() const; + + void setSmooth(const bool smooth); + bool smooth() const; + + void setEnabled(bool enabled = true); + bool enabled() const; + + QSGNode* updatePaintNode(QSGNode* node, UpdatePaintNodeData* data) override; + +Q_SIGNALS: + void iconChanged(); + void smoothChanged(); + void stateChanged(State state); + +protected: + void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; + +private: + QIcon m_icon; + bool m_smooth; + State m_state; + bool m_changed; +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp new file mode 100644 index 0000000..88f35d2 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp @@ -0,0 +1,208 @@ +/* + * Copyright 2011 Marco Martin + * Copyright 2015 Luca Beltrame + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qimageitem.h" + +#include + + +QImageItem::QImageItem(QQuickItem *parent) + : QQuickPaintedItem(parent), + m_smooth(false), + m_fillMode(QImageItem::Stretch) +{ + setFlag(ItemHasContents, true); +} + + +QImageItem::~QImageItem() +{ +} + +void QImageItem::setImage(const QImage &image) +{ + bool oldImageNull = m_image.isNull(); + m_image = image; + updatePaintedRect(); + update(); + emit nativeWidthChanged(); + emit nativeHeightChanged(); + emit imageChanged(); + if (oldImageNull != m_image.isNull()) { + emit nullChanged(); + } +} + +QImage QImageItem::image() const +{ + return m_image; +} + +void QImageItem::resetImage() +{ + setImage(QImage()); +} + +void QImageItem::setSmooth(const bool smooth) +{ + if (smooth == m_smooth) { + return; + } + m_smooth = smooth; + update(); +} + +bool QImageItem::smooth() const +{ + return m_smooth; +} + +int QImageItem::nativeWidth() const +{ + return m_image.size().width() / m_image.devicePixelRatio(); +} + +int QImageItem::nativeHeight() const +{ + return m_image.size().height() / m_image.devicePixelRatio(); +} + +QImageItem::FillMode QImageItem::fillMode() const +{ + return m_fillMode; +} + +void QImageItem::setFillMode(QImageItem::FillMode mode) +{ + if (mode == m_fillMode) { + return; + } + + m_fillMode = mode; + updatePaintedRect(); + update(); + emit fillModeChanged(); +} + +void QImageItem::paint(QPainter *painter) +{ + if (m_image.isNull()) { + return; + } + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, m_smooth); + painter->setRenderHint(QPainter::SmoothPixmapTransform, m_smooth); + + if (m_fillMode == TileVertically) { + painter->scale(width()/(qreal)m_image.width(), 1); + } + + if (m_fillMode == TileHorizontally) { + painter->scale(1, height()/(qreal)m_image.height()); + } + + if (m_fillMode >= Tile) { + painter->drawTiledPixmap(m_paintedRect, QPixmap::fromImage(m_image)); + } else { + painter->drawImage(m_paintedRect, m_image, m_image.rect()); + } + + painter->restore(); +} + +bool QImageItem::isNull() const +{ + return m_image.isNull(); +} + +int QImageItem::paintedWidth() const +{ + if (m_image.isNull()) { + return 0; + } + + return m_paintedRect.width(); +} + +int QImageItem::paintedHeight() const +{ + if (m_image.isNull()) { + return 0; + } + + return m_paintedRect.height(); +} + +void QImageItem::updatePaintedRect() +{ + + if (m_image.isNull()) { + return; + } + + QRectF sourceRect = m_paintedRect; + + QRectF destRect; + + switch (m_fillMode) { + case PreserveAspectFit: { + QSizeF scaled = m_image.size(); + + scaled.scale(boundingRect().size(), Qt::KeepAspectRatio); + destRect = QRectF(QPoint(0, 0), scaled); + destRect.moveCenter(boundingRect().center().toPoint()); + break; + } + case PreserveAspectCrop: { + QSizeF scaled = m_image.size(); + + scaled.scale(boundingRect().size(), Qt::KeepAspectRatioByExpanding); + destRect = QRectF(QPoint(0, 0), scaled); + destRect.moveCenter(boundingRect().center().toPoint()); + break; + } + case TileVertically: { + destRect = boundingRect().toRect(); + destRect.setWidth(destRect.width() / (width()/(qreal)m_image.width())); + break; + } + case TileHorizontally: { + destRect = boundingRect().toRect(); + destRect.setHeight(destRect.height() / (height()/(qreal)m_image.height())); + break; + } + case Stretch: + case Tile: + default: + destRect = boundingRect().toRect(); + } + + if (destRect != sourceRect) { + m_paintedRect = destRect.toRect(); + emit paintedHeightChanged(); + emit paintedWidthChanged(); + } +} + +void QImageItem::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) +{ + QQuickPaintedItem::geometryChanged(newGeometry, oldGeometry); + updatePaintedRect(); +} diff --git a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h new file mode 100644 index 0000000..15a9e47 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h @@ -0,0 +1,97 @@ +/* + * Copyright 2011 Marco Martin + * Copyright 2015 Luca Beltrame + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef QIMAGEITEM_H +#define QIMAGEITEM_H + +#include +#include + +class QImageItem : public QQuickPaintedItem +{ + Q_OBJECT + + Q_PROPERTY(QImage image READ image WRITE setImage NOTIFY imageChanged RESET resetImage) + Q_PROPERTY(bool smooth READ smooth WRITE setSmooth) + Q_PROPERTY(int nativeWidth READ nativeWidth NOTIFY nativeWidthChanged) + Q_PROPERTY(int nativeHeight READ nativeHeight NOTIFY nativeHeightChanged) + Q_PROPERTY(int paintedWidth READ paintedWidth NOTIFY paintedWidthChanged) + Q_PROPERTY(int paintedHeight READ paintedHeight NOTIFY paintedHeightChanged) + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) + Q_PROPERTY(bool null READ isNull NOTIFY nullChanged) + +public: + enum FillMode { + Stretch, // the image is scaled to fit + PreserveAspectFit, // the image is scaled uniformly to fit without cropping + PreserveAspectCrop, // the image is scaled uniformly to fill, cropping if necessary + Tile, // the image is duplicated horizontally and vertically + TileVertically, // the image is stretched horizontally and tiled vertically + TileHorizontally //the image is stretched vertically and tiled horizontally + }; + Q_ENUM(FillMode) + + explicit QImageItem(QQuickItem *parent=nullptr); + ~QImageItem() override; + + void setImage(const QImage &image); + QImage image() const; + void resetImage(); + + void setSmooth(const bool smooth); + bool smooth() const; + + int nativeWidth() const; + int nativeHeight() const; + + int paintedWidth() const; + int paintedHeight() const; + + FillMode fillMode() const; + void setFillMode(FillMode mode); + + void paint(QPainter *painter) override; + + bool isNull() const; + +Q_SIGNALS: + void nativeWidthChanged(); + void nativeHeightChanged(); + void fillModeChanged(); + void imageChanged(); + void nullChanged(); + void paintedWidthChanged(); + void paintedHeightChanged(); + +protected: + void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry) override; + +private: + QImage m_image; + bool m_smooth; + FillMode m_fillMode; + QRect m_paintedRect; + +private Q_SLOTS: + void updatePaintedRect(); + +}; + +#endif diff --git a/src/qmlcontrols/kquickcontrolsaddons/qmldir b/src/qmlcontrols/kquickcontrolsaddons/qmldir new file mode 100644 index 0000000..1113c16 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qmldir @@ -0,0 +1,2 @@ +module org.kde.kquickcontrolsaddons +plugin kquickcontrolsaddonsplugin diff --git a/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp b/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp new file mode 100644 index 0000000..9998e84 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp @@ -0,0 +1,213 @@ +/* + * Copyright 2011 Marco Martin + * Copyright 2015 Luca Beltrame + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qpixmapitem.h" + +#include + + +QPixmapItem::QPixmapItem(QQuickItem *parent) + : QQuickPaintedItem(parent), + m_smooth(false), + m_fillMode(QPixmapItem::Stretch) +{ + setFlag(ItemHasContents, true); + +} + + +QPixmapItem::~QPixmapItem() +{ +} + +void QPixmapItem::setPixmap(const QPixmap &pixmap) +{ + bool oldPixmapNull = m_pixmap.isNull(); + m_pixmap = pixmap; + updatePaintedRect(); + update(); + emit nativeWidthChanged(); + emit nativeHeightChanged(); + emit pixmapChanged(); + if (oldPixmapNull != m_pixmap.isNull()) { + emit nullChanged(); + } +} + +QPixmap QPixmapItem::pixmap() const +{ + return m_pixmap; +} + +void QPixmapItem::resetPixmap() +{ + setPixmap(QPixmap()); +} + +void QPixmapItem::setSmooth(const bool smooth) +{ + if (smooth == m_smooth) { + return; + } + m_smooth = smooth; + update(); +} + +bool QPixmapItem::smooth() const +{ + return m_smooth; +} + +int QPixmapItem::nativeWidth() const +{ + return m_pixmap.size().width() / m_pixmap.devicePixelRatio(); +} + +int QPixmapItem::nativeHeight() const +{ + return m_pixmap.size().height() / m_pixmap.devicePixelRatio(); +} + +QPixmapItem::FillMode QPixmapItem::fillMode() const +{ + return m_fillMode; +} + +void QPixmapItem::setFillMode(QPixmapItem::FillMode mode) +{ + if (mode == m_fillMode) { + return; + } + + m_fillMode = mode; + updatePaintedRect(); + update(); + emit fillModeChanged(); + +} + +void QPixmapItem::paint(QPainter *painter) +{ + if (m_pixmap.isNull()) { + return; + } + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, m_smooth); + painter->setRenderHint(QPainter::SmoothPixmapTransform, m_smooth); + + if (m_fillMode == TileVertically) { + painter->scale(width()/(qreal)m_pixmap.width(), 1); + } + + if (m_fillMode == TileHorizontally) { + painter->scale(1, height()/(qreal)m_pixmap.height()); + } + + if (m_fillMode >= Tile) { + painter->drawTiledPixmap(m_paintedRect, m_pixmap); + } else { + painter->drawPixmap(m_paintedRect, m_pixmap, m_pixmap.rect()); + } + + painter->restore(); +} + +bool QPixmapItem::isNull() const +{ + return m_pixmap.isNull(); +} + + +int QPixmapItem::paintedWidth() const +{ + if (m_pixmap.isNull()) { + return 0; + } + + return m_paintedRect.width(); +} + +int QPixmapItem::paintedHeight() const +{ + if (m_pixmap.isNull()) { + return 0; + } + + return m_paintedRect.height(); +} + +void QPixmapItem::updatePaintedRect() +{ + + if (m_pixmap.isNull()) { + return; + } + + QRectF sourceRect = m_paintedRect; + + QRectF destRect; + + switch (m_fillMode) { + case PreserveAspectFit: { + QSizeF scaled = m_pixmap.size(); + + scaled.scale(boundingRect().size(), Qt::KeepAspectRatio); + destRect = QRectF(QPoint(0, 0), scaled); + destRect.moveCenter(boundingRect().center().toPoint()); + + break; + } + case PreserveAspectCrop: { + QSizeF scaled = m_pixmap.size(); + + scaled.scale(boundingRect().size(), Qt::KeepAspectRatioByExpanding); + destRect = QRectF(QPoint(0, 0), scaled); + destRect.moveCenter(boundingRect().center().toPoint()); + break; + } + case TileVertically: { + destRect = boundingRect().toRect(); + destRect.setWidth(destRect.width() / (width()/(qreal)m_pixmap.width())); + break; + } + case TileHorizontally: { + destRect = boundingRect().toRect(); + destRect.setHeight(destRect.height() / (height()/(qreal)m_pixmap.height())); + break; + } + case Stretch: + case Tile: + default: + destRect = boundingRect().toRect(); + } + + if (destRect != sourceRect) { + m_paintedRect = destRect.toRect(); + emit paintedHeightChanged(); + emit paintedWidthChanged(); + } +} + +void QPixmapItem::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) +{ + QQuickPaintedItem::geometryChanged(newGeometry, oldGeometry); + updatePaintedRect(); +} + diff --git a/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h b/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h new file mode 100644 index 0000000..4dbf709 --- /dev/null +++ b/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h @@ -0,0 +1,97 @@ +/* + * Copyright 2011 Marco Martin + * Copyright 2015 Luca Beltrame + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef QPIXMAPITEM_H +#define QPIXMAPITEM_H + +#include +#include + +class QPixmapItem : public QQuickPaintedItem +{ + Q_OBJECT + + Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged RESET resetPixmap) + Q_PROPERTY(bool smooth READ smooth WRITE setSmooth) + Q_PROPERTY(int nativeWidth READ nativeWidth NOTIFY nativeWidthChanged) + Q_PROPERTY(int nativeHeight READ nativeHeight NOTIFY nativeHeightChanged) + Q_PROPERTY(int paintedWidth READ paintedWidth NOTIFY paintedWidthChanged) + Q_PROPERTY(int paintedHeight READ paintedHeight NOTIFY paintedHeightChanged) + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) + Q_PROPERTY(bool null READ isNull NOTIFY nullChanged) + +public: + enum FillMode { + Stretch, // the image is scaled to fit + PreserveAspectFit, // the image is scaled uniformly to fit without cropping + PreserveAspectCrop, // the image is scaled uniformly to fill, cropping if necessary + Tile, // the image is duplicated horizontally and vertically + TileVertically, // the image is stretched horizontally and tiled vertically + TileHorizontally //the image is stretched vertically and tiled horizontally + }; + Q_ENUM(FillMode) + + explicit QPixmapItem(QQuickItem *parent=nullptr); + ~QPixmapItem() override; + + void setPixmap(const QPixmap &pixmap); + QPixmap pixmap() const; + void resetPixmap(); + + void setSmooth(const bool smooth); + bool smooth() const; + + int nativeWidth() const; + int nativeHeight() const; + + int paintedWidth() const; + int paintedHeight() const; + + FillMode fillMode() const; + void setFillMode(FillMode mode); + + void paint(QPainter *painter) override; + + bool isNull() const; + +Q_SIGNALS: + void nativeWidthChanged(); + void nativeHeightChanged(); + void fillModeChanged(); + void pixmapChanged(); + void nullChanged(); + void paintedWidthChanged(); + void paintedHeightChanged(); + +protected: + void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry) override; + +private: + QPixmap m_pixmap; + bool m_smooth; + FillMode m_fillMode; + QRect m_paintedRect; + +private Q_SLOTS: + void updatePaintedRect(); + +}; + +#endif diff --git a/src/qmlcontrols/kwindowsystemplugin/CMakeLists.txt b/src/qmlcontrols/kwindowsystemplugin/CMakeLists.txt new file mode 100644 index 0000000..ce0ea74 --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/CMakeLists.txt @@ -0,0 +1,17 @@ +project(kwindowsystemplugin) + +set(kwindowsystemplugin_SRCS + kwindowsystemplugin.cpp + kwindowsystemproxy.cpp + ) + +add_library(kwindowsystem SHARED ${kwindowsystemplugin_SRCS}) +target_link_libraries(kwindowsystem + Qt5::Core + Qt5::Qml + KF5::WindowSystem +) + +install(TARGETS kwindowsystem DESTINATION ${QML_INSTALL_DIR}/org/kde/kwindowsystem) + +install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kwindowsystem) diff --git a/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.cpp b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.cpp new file mode 100644 index 0000000..d2f41be --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.cpp @@ -0,0 +1,30 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "kwindowsystemplugin.h" + +#include + +#include "kwindowsystemproxy.h" + +void KWindowSystemPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.kwindowsystem")); + + qmlRegisterType(uri, 1, 0, "KWindowSystem"); +} diff --git a/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.h b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.h new file mode 100644 index 0000000..aebf5ae --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemplugin.h @@ -0,0 +1,33 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef KWINDOWSYSTEMPLUGIN_H +#define KWINDOWSYSTEMPLUGIN_H + +#include + +class KWindowSystemPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) override; +}; + +#endif // KWINDOWSYSTEMPLUGIN_H diff --git a/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp new file mode 100644 index 0000000..c485de3 --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp @@ -0,0 +1,151 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "kwindowsystemproxy.h" + +#include +#include + +#include + +KWindowSystemProxy::KWindowSystemProxy(QObject *parent) + : QObject(parent) + , m_initialized(false) +{ + +} + +KWindowSystemProxy::~KWindowSystemProxy() +{ + +} + +void KWindowSystemProxy::connectNotify(const QMetaMethod &signal) +{ + if (m_initialized) { + return; + } + + if (signal == QMetaMethod::fromSignal(&KWindowSystemProxy::currentDesktopChanged) || + signal == QMetaMethod::fromSignal(&KWindowSystemProxy::desktopNamesChanged) || + signal == QMetaMethod::fromSignal(&KWindowSystemProxy::numberOfDesktopsChanged) || + signal == QMetaMethod::fromSignal(&KWindowSystemProxy::showingDesktopChanged) || + signal == QMetaMethod::fromSignal(&KWindowSystemProxy::compositingActiveChanged)) { + + connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, [this](int currentDesktop) { + Q_EMIT currentDesktopChanged(currentDesktop); + Q_EMIT currentDesktopNameChanged(); + }); + + connect(KWindowSystem::self(), &KWindowSystem::desktopNamesChanged, this, [this]() { + Q_EMIT desktopNamesChanged(); + Q_EMIT currentDesktopNameChanged(); + }); + + connect(KWindowSystem::self(), &KWindowSystem::numberOfDesktopsChanged, + this, &KWindowSystemProxy::numberOfDesktopsChanged); + connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, + this, &KWindowSystemProxy::showingDesktopChanged); + connect(KWindowSystem::self(), &KWindowSystem::compositingChanged, + this, &KWindowSystemProxy::compositingActiveChanged); + + m_initialized = true; + } +} + +int KWindowSystemProxy::currentDesktop() const +{ + return KWindowSystem::currentDesktop(); +} + +void KWindowSystemProxy::setCurrentDesktop(int desktop) +{ + KWindowSystem::setCurrentDesktop(desktop); +} + +QString KWindowSystemProxy::currentDesktopName() const +{ + return KWindowSystem::desktopName(KWindowSystem::currentDesktop()); +} + +int KWindowSystemProxy::numberOfDesktops() const +{ + return KWindowSystem::numberOfDesktops(); +} + +bool KWindowSystemProxy::showingDesktop() const +{ + return KWindowSystem::showingDesktop(); +} + +void KWindowSystemProxy::setShowingDesktop(bool showingDesktop) +{ + KWindowSystem::setShowingDesktop(showingDesktop); +} + +bool KWindowSystemProxy::compositingActive() const +{ + return KWindowSystem::compositingActive(); +} + +bool KWindowSystemProxy::hasWindow(QWindow *window) const +{ + if (!window) { + return false; + } + + return KWindowSystem::hasWId(window->winId()); +} + +void KWindowSystemProxy::forceActivateWindow(QWindow *window, long time) +{ + if (window) { + KWindowSystem::forceActiveWindow(window->winId(), time); + } +} + +void KWindowSystemProxy::setOnAllDesktops(QWindow *window, bool onAllDesktops) +{ + if (window) { + KWindowSystem::setOnAllDesktops(window->winId(), onAllDesktops); + } +} + +void KWindowSystemProxy::setOnDesktop(QWindow *window, int desktop) +{ + if (window) { + KWindowSystem::setOnDesktop(window->winId(), desktop); + } +} + +void KWindowSystemProxy::setOnActivities(QWindow *window, const QStringList &activities) +{ + if (window) { + KWindowSystem::setOnActivities(window->winId(), activities); + } +} + +QString KWindowSystemProxy::desktopName(int desktop) const +{ + return KWindowSystem::desktopName(desktop); +} + +void KWindowSystemProxy::setDesktopName(int desktop, const QString &name) +{ + KWindowSystem::setDesktopName(desktop, name); +} diff --git a/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h new file mode 100644 index 0000000..3863e4e --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h @@ -0,0 +1,169 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef KWINDOWSYSTEMPROXY_H +#define KWINDOWSYSTEMPROXY_H + +#include +#include + +class QMetaMethod; +class QWindow; + +/** + * This item exposes various properties of KWindowSystem for use inside a QML environment. + * + * Example usage: + * @code + * import org.kde.kwindowsystem 1.0 + * + * KWindowSystem { + * id: kwindowsystem + * } + * + * Rectangle { + * width: 50 + * height: 50 + * color: "blue" + * opacity: kwindowsystem.compositingActive ? 0.5 : 1 + * } + * + * Label { + * text: i18n("You are currently on Desktop '%1'", kwindowsystem.currentDesktopName) + * } + * @endcode + * + * @note The features provided by this item are specific to the windowing system and might not + * be supported on any platform other than X11 + */ +class KWindowSystemProxy : public QObject +{ + Q_OBJECT + + /** + * @brief The number of the current desktop + */ + Q_PROPERTY(int currentDesktop READ currentDesktop WRITE setCurrentDesktop NOTIFY currentDesktopChanged) + /** + * @brief The name of the current desktop + */ + Q_PROPERTY(QString currentDesktopName READ currentDesktopName NOTIFY currentDesktopNameChanged) + /** + * @brief The number of desktops + */ + Q_PROPERTY(int numberOfDesktops READ numberOfDesktops NOTIFY numberOfDesktopsChanged) + /** + * @brief Whether "show desktop" is currently active + */ + Q_PROPERTY(bool showingDesktop READ showingDesktop WRITE setShowingDesktop NOTIFY showingDesktopChanged) + /** + * @brief Whether desktop compositing is active + * + * @note This property is updated delayed + */ + Q_PROPERTY(bool compositingActive READ compositingActive NOTIFY compositingActiveChanged) + +public: + explicit KWindowSystemProxy(QObject *parent = nullptr); + ~KWindowSystemProxy() override; + + int currentDesktop() const; + void setCurrentDesktop(int desktop); + + QString currentDesktopName() const; + int numberOfDesktops() const; + + bool showingDesktop() const; + void setShowingDesktop(bool showingDesktop); + + bool compositingActive() const; + + /** + * Test to see if @p window still managed at present. + * @param window the window to test + */ + Q_INVOKABLE bool hasWindow(QWindow *window) const; + + /** + * Sets window @p window to be the active window. + * + * @note This should be called only in special cases, applications + * shouldn't force themselves or other windows to be the active + * window. Generally, this call should used only by pagers + * and similar tools. + * + * @param window the window to make active + * @param time X server timestamp of the user activity that caused this request + */ + Q_INVOKABLE void forceActivateWindow(QWindow *window, long time = 0); + + /** + * Sets window @p window to be present on all virtual desktops if @p + * onAllDesktops true. Otherwise the window lives only on one single desktop. + * + * @param window the window + * @param onAllDesktops true to show the window on all desktops, false otherwise + */ + Q_INVOKABLE void setOnAllDesktops(QWindow *window, bool onAllDesktops); + /** + * Moves window @p window to desktop @p desktop. + * + * @param window the window + * @param desktop the number of the new desktop + */ + Q_INVOKABLE void setOnDesktop(QWindow *window, int desktop); + /** + * Moves window @p window to activities @p activities. + * + * @param window the window + * @param activities the list of activity UUIDs + */ + Q_INVOKABLE void setOnActivities(QWindow *window, const QStringList &activities); + + /** + * Returns the name of the specified desktop. + * @see currentDesktopName + * @param desktop the number of the desktop + * @return the name of the desktop + **/ + Q_INVOKABLE QString desktopName(int desktop) const; + /** + * Sets the name of the specified desktop. + * @param desktop the number of the desktop + * @param name the new name for the desktop + **/ + Q_INVOKABLE void setDesktopName(int desktop, const QString &name); + +Q_SIGNALS: + void currentDesktopChanged(int desktop); + void currentDesktopNameChanged(); + + void desktopNamesChanged(); + void numberOfDesktopsChanged(int numberOfDesktops); + void showingDesktopChanged(bool showingDesktop); + void compositingActiveChanged(bool compositingActive); + +protected: + void connectNotify(const QMetaMethod &signal) override; + +private: + bool m_initialized; + +}; + +#endif // KWINDOWSYSTEMPROXY_H diff --git a/src/qmlcontrols/kwindowsystemplugin/qmldir b/src/qmlcontrols/kwindowsystemplugin/qmldir new file mode 100644 index 0000000..83ce62b --- /dev/null +++ b/src/qmlcontrols/kwindowsystemplugin/qmldir @@ -0,0 +1,3 @@ +module org.kde.kwindowsystem +plugin kwindowsystem + diff --git a/src/quickaddons/CMakeLists.txt b/src/quickaddons/CMakeLists.txt new file mode 100644 index 0000000..9e9619a --- /dev/null +++ b/src/quickaddons/CMakeLists.txt @@ -0,0 +1,84 @@ +set(KF5QuickAddons_LIB_SRCS + imagetexturescache.cpp + managedtexturenode.cpp + quickviewsharedengine.cpp + configmodule.cpp + managedconfigmodule.cpp + qtquicksettings.cpp) +kconfig_add_kcfg_files(KF5QuickAddons_LIB_SRCS renderersettings.kcfgc) + +add_library(KF5QuickAddons ${KF5QuickAddons_LIB_SRCS}) + +generate_export_header(KF5QuickAddons EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/quickaddons_export.h BASE_NAME QuickAddons) +add_library(KF5::QuickAddons ALIAS KF5QuickAddons) + +# Apps must include or +target_include_directories(KF5QuickAddons INTERFACE "$") + +target_link_libraries(KF5QuickAddons + PUBLIC + Qt5::Quick + PRIVATE + KF5::I18n + KF5::Declarative + KF5::ConfigGui +) + +set_target_properties(KF5QuickAddons + PROPERTIES VERSION ${KDECLARATIVE_VERSION_STRING} + SOVERSION ${KDECLARATIVE_SOVERSION} + EXPORT_NAME QuickAddons +) + +# Install files +#those are deprecated, offered just for compatibility +ecm_generate_headers(QuickAddons_CamelCase_HEADERS + HEADER_NAMES + ImageTexturesCache + ManagedTextureNode + PREFIX QuickAddons + REQUIRED_HEADERS QuickAddons_HEADERS +) +install(FILES ${QuickAddons_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/QuickAddons COMPONENT Devel) + +# Install files +ecm_generate_headers(KQuickAddons_CamelCase_HEADERS + HEADER_NAMES + ImageTexturesCache + ManagedTextureNode + QtQuickSettings + ConfigModule + ManagedConfigModule + QuickViewSharedEngine + + PREFIX KQuickAddons + REQUIRED_HEADERS KQuickAddons_HEADERS +) +install(FILES ${KQuickAddons_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/KQuickAddons COMPONENT Devel) + +install(TARGETS KF5QuickAddons + EXPORT KF5DeclarativeTargets + ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} +) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/quickaddons_export.h + ${QuickAddons_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/quickaddons + COMPONENT Devel +) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/quickaddons_export.h + ${KQuickAddons_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/kquickaddons + COMPONENT Devel +) + +# make available to ecm_add_qch in parent folder +set(KQuickAddons_QCH_SOURCES ${KQuickAddons_HEADERS} PARENT_SCOPE) +set(KQuickAddons_QCH_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) + +include(ECMGeneratePriFile) +ecm_generate_pri_file(BASE_NAME QuickAddons LIB_NAME KF5QuickAddons DEPS "qml" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/QuickAddons) +install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) diff --git a/src/quickaddons/configmodule.cpp b/src/quickaddons/configmodule.cpp new file mode 100644 index 0000000..e7d52d8 --- /dev/null +++ b/src/quickaddons/configmodule.cpp @@ -0,0 +1,493 @@ +/* + This file is part of the KDE libraries + + Copyright (c) 1999 Matthias Hoelzer-Kluepfel + Copyright (c) 2001 Michael Goffioul + Copyright (C) 2004 Frans Englich + Copyright (C) 2009 Dario Freddi + Copyright (C) 2015 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#include "configmodule.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +namespace KQuickAddons { + +class ConfigModulePrivate +{ +public: + ConfigModulePrivate(ConfigModule *module): + _q(module), + _qmlObject(nullptr), + _buttons(ConfigModule::Help | ConfigModule::Default | ConfigModule::Apply), + _about(nullptr), + _useRootOnlyMessage(false), + _needsAuthorization(false), + _needsSave(false), + _representsDefaults(false) + { + } + + void authStatusChanged(int status); + + ConfigModule *_q; + KDeclarative::QmlObject *_qmlObject; + ConfigModule::Buttons _buttons; + const KAboutData *_about; + QString _rootOnlyMessage; + QString _quickHelp; + QString _errorString; + QList subPages; + int _columnWidth = -1; + int currentIndex = 0; + bool _useRootOnlyMessage : 1; + + bool _needsAuthorization : 1; + bool _needsSave :1; + bool _representsDefaults :1; + QString _authActionName; + + static QHash s_rootObjects; +}; + +QHash ConfigModulePrivate::s_rootObjects = QHash(); + + +ConfigModule::ConfigModule(const KAboutData *aboutData, QObject *parent, const QVariantList &) + : QObject(parent), d(new ConfigModulePrivate(this)) +{ + setAboutData(aboutData); +} + +ConfigModule::ConfigModule(const KPluginMetaData &metaData, QObject *parent, const QVariantList &) + : QObject(parent), d(new ConfigModulePrivate(this)) +{ + KAboutData *aboutData = new KAboutData(metaData.pluginId(), metaData.name(), metaData.version(), metaData.description(), KAboutLicense::byKeyword(metaData.license()).key()); + + const auto authors = metaData.authors(); + for (auto& author : authors) { + aboutData->addAuthor(author.name(), author.task(), author.emailAddress(), author.webAddress(), author.ocsUsername()); + } + setAboutData(aboutData); +} + +ConfigModule::ConfigModule(QObject *parent, const QVariantList &) + : QObject(parent), d(new ConfigModulePrivate(this)) +{ +} + +ConfigModule::~ConfigModule() +{ + //in case mainUi was never called + if (d->_qmlObject) { + ConfigModulePrivate::s_rootObjects.remove(d->_qmlObject->rootContext()); + } + + delete d->_qmlObject; + delete d->_about; + delete d; +} + + + +ConfigModule *ConfigModule::qmlAttachedProperties(QObject *object) +{ + //at the moment of the attached object creation, the root item is the only one that hasn't a parent + //only way to avoid creation of this attached for everybody but the root item + const QQmlEngine *engine = QtQml::qmlEngine(object); + QQmlContext *cont = QQmlEngine::contextForObject(object); + + //Search the qml context that is the "root" for the sharedqmlobject, which + //is an ancestor of QQmlEngine::contextForObject(object) and the direct child + //of the engine's root context: we can do this assumption on the internals as + //we are distributed on the same repo. + while (cont->parentContext() && cont->parentContext() != engine->rootContext()) { + cont = cont->parentContext(); + } + + if (!object->parent() && ConfigModulePrivate::s_rootObjects.contains(cont)) { + return ConfigModulePrivate::s_rootObjects.value(cont); + } else { + return nullptr; + } +} + +QQuickItem *ConfigModule::mainUi() +{ + if (d->_qmlObject) { + return qobject_cast(d->_qmlObject->rootObject()); + } + + d->_errorString.clear(); + + // if we have a qml context, hook up to it and use its engine + // this ensure that in e.g. Plasma config dialogs that use a different engine + // so they can have different QtQuick Controls styles, we don't end up using + // the shared engine that is used by the rest of plasma + + QQmlContext *ctx = QQmlEngine::contextForObject(this); + + if (ctx && ctx->engine()) { + d->_qmlObject = new KDeclarative::QmlObject(ctx->engine(), ctx, this); + } else { + d->_qmlObject = new KDeclarative::QmlObjectSharedEngine(this); + } + + ConfigModulePrivate::s_rootObjects[d->_qmlObject->rootContext()] = this; + d->_qmlObject->setTranslationDomain(aboutData()->componentName()); + d->_qmlObject->setInitializationDelayed(true); + + KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("KPackage/GenericQML")); + package.setDefaultPackageRoot(QStringLiteral("kpackage/kcms")); + package.setPath(aboutData()->componentName()); + + if (!package.isValid()) { + d->_errorString = i18n("Invalid KPackage '%1'", aboutData()->componentName()); + qWarning() << "Error loading the module" << aboutData()->componentName() << ": invalid KPackage"; + return nullptr; + } + + if (package.filePath("mainscript").isEmpty()) { + d->_errorString = i18n("No QML file provided"); + qWarning() << "Error loading the module" << aboutData()->componentName() << ": no QML file provided"; + return nullptr; + } + + new QQmlFileSelector(d->_qmlObject->engine(), d->_qmlObject->engine()); + d->_qmlObject->setSource(package.fileUrl("mainscript")); + d->_qmlObject->rootContext()->setContextProperty(QStringLiteral("kcm"), this); + d->_qmlObject->completeInitialization(); + + if (d->_qmlObject->status() != QQmlComponent::Ready) { + d->_errorString = d->_qmlObject->mainComponent()->errorString(); + return nullptr; + } + + return qobject_cast(d->_qmlObject->rootObject()); +} + +void ConfigModule::push(const QString &fileName, const QVariantMap &propertyMap) +{ + //ensure main ui is created + if (!mainUi()) { + return; + } + + //TODO: package as member + KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("KPackage/GenericQML")); + package.setDefaultPackageRoot(QStringLiteral("kpackage/kcms")); + package.setPath(aboutData()->componentName()); + + QVariantHash propertyHash; + for (auto it = propertyMap.begin(), end = propertyMap.end(); it != end; ++it) { + propertyHash.insert(it.key(), it.value()); + } + + QObject *object = d->_qmlObject->createObjectFromSource(QUrl::fromLocalFile(package.filePath("ui", fileName)), + d->_qmlObject->rootContext(), + propertyHash); + + QQuickItem *item = qobject_cast(object); + if (!item) { + object->deleteLater(); + return; + } + + d->subPages << item; + emit pagePushed(item); + emit depthChanged(depth()); + setCurrentIndex(d->currentIndex + 1); +} + +void ConfigModule::push(QQuickItem *item) +{ + //ensure main ui is created + if (!mainUi()) { + return; + } + + d->subPages << item; + emit pagePushed(item); + emit depthChanged(depth()); + setCurrentIndex(d->currentIndex + 1); +} + +void ConfigModule::pop() +{ + if (d->subPages.isEmpty()) { + return; + } + QQuickItem *page = d->subPages.takeLast(); + emit pageRemoved(); + emit depthChanged(depth()); + page->deleteLater(); + + setCurrentIndex(qMin(d->currentIndex, depth() - 1)); +} + +void ConfigModule::showPassiveNotification(const QString &message, const QVariant &timeout, const QString &actionText, const QJSValue &callBack) +{ + emit passiveNotificationRequested(message, timeout, actionText, callBack); +} + +ConfigModule::Buttons ConfigModule::buttons() const +{ + return d->_buttons; +} + +void ConfigModule::setButtons(const KQuickAddons::ConfigModule::Buttons buttons) +{ + if (d->_buttons == buttons) { + return; + } + + d->_buttons = buttons; + emit buttonsChanged(); +} + +void ConfigModule::setNeedsAuthorization(bool needsAuth) +{ + if (d->_needsAuthorization == needsAuth) { + return; + } + + d->_needsAuthorization = needsAuth; + if (needsAuth && d->_about) { + d->_authActionName = QLatin1String("org.kde.kcontrol.") + d->_about->componentName() + QLatin1String(".save"); + d->_needsAuthorization = true; + + } else { + d->_authActionName = QString(); + } + + emit needsAuthorizationChanged(); + emit authActionNameChanged(); +} + +bool ConfigModule::needsAuthorization() const +{ + return d->_needsAuthorization; +} + +QString ConfigModule::name() const +{ + return d->_about->displayName(); +} + +QString ConfigModule::description() const +{ + return d->_about->shortDescription(); +} + +int ConfigModule::columnWidth() const +{ + return d->_columnWidth; +} + +void ConfigModule::setColumnWidth(int width) +{ + if (d->_columnWidth == width) { + return; + } + + d->_columnWidth = width; + emit columnWidthChanged(width); +} + +int ConfigModule::depth() const +{ + return d->subPages.count() + 1; +} + +void ConfigModule::setCurrentIndex(int index) +{ + if (index < 0 || index > d->subPages.count() || index == d->currentIndex) { + return; + } + + d->currentIndex = index; + + emit currentIndexChanged(index); +} + +int ConfigModule::currentIndex() const +{ + return d->currentIndex; +} + +void ConfigModule::setAuthActionName(const QString &name) +{ + if (d->_authActionName == name) { + return; + } + + d->_authActionName = name; + d->_needsAuthorization = true; + + emit needsAuthorizationChanged(); + emit authActionNameChanged(); +} + +QString ConfigModule::authActionName() const +{ + return d->_authActionName; +} + +QQmlEngine *ConfigModule::engine() const +{ + return d->_qmlObject->engine(); +} + +QQmlComponent::Status ConfigModule::status() const +{ + if (!d->_qmlObject) { + return QQmlComponent::Null; + } + + return d->_qmlObject->status(); +} + +QString ConfigModule::errorString() const +{ + return d->_errorString; +} + +void ConfigModule::load() +{ + setNeedsSave(false); +} + +void ConfigModule::save() +{ + setNeedsSave(false); +} + +void ConfigModule::defaults() +{ +} + +const KAboutData *ConfigModule::aboutData() const +{ + return d->_about; +} + +void ConfigModule::setAboutData(const KAboutData *about) +{ + if (about != d->_about) { + delete d->_about; + d->_about = about; + } +} + +void ConfigModule::setRootOnlyMessage(const QString &message) +{ + if (d->_rootOnlyMessage == message) { + return; + } + + d->_rootOnlyMessage = message; + emit rootOnlyMessageChanged(); +} + +QString ConfigModule::rootOnlyMessage() const +{ + return d->_rootOnlyMessage; +} + +void ConfigModule::setUseRootOnlyMessage(bool on) +{ + if (d->_useRootOnlyMessage == on) { + return; + } + + d->_useRootOnlyMessage = on; + + emit useRootOnlyMessageChanged(); +} + +bool ConfigModule::useRootOnlyMessage() const +{ + return d->_useRootOnlyMessage; +} + +void ConfigModule::setQuickHelp(const QString &help) +{ + if (d->_quickHelp == help) { + return; + } + + d->_quickHelp = help; + + emit quickHelpChanged(); +} + +QString ConfigModule::quickHelp() const +{ + return d->_quickHelp; +} + +void ConfigModule::setNeedsSave(bool needs) +{ + if (needs == d->_needsSave) { + return; + } + + d->_needsSave = needs; + emit needsSaveChanged(); +} + +bool ConfigModule::needsSave() +{ + return d->_needsSave; +} + +void ConfigModule::setRepresentsDefaults(bool defaults) +{ + if (defaults == d->_representsDefaults) { + return; + } + + d->_representsDefaults = defaults; + emit representsDefaultsChanged(); +} + +bool ConfigModule::representsDefaults() +{ + return d->_representsDefaults; +} + +} + +#include "moc_configmodule.cpp" + diff --git a/src/quickaddons/configmodule.h b/src/quickaddons/configmodule.h new file mode 100644 index 0000000..8010d36 --- /dev/null +++ b/src/quickaddons/configmodule.h @@ -0,0 +1,612 @@ +/* + This file is part of the KDE libraries + + Copyright (c) 1999 Matthias Hoelzer-Kluepfel + Copyright (c) 2001 Michael Goffioul + Copyright (C) 2004 Frans Englich + Copyright (C) 2009 Dario Freddi + Copyright (C) 2015 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#ifndef CONFIGMODULE_H +#define CONFIGMODULE_H + +#include "quickaddons_export.h" + +#include +#include +#include + +#include + +class QStringList; +class KAboutData; +class QQuickItem; +class QQmlEngine; + +namespace KQuickAddons { + +class ConfigModulePrivate; + +/** + * @class KQuickAddons::ConfigModule configmodule.h KQuickAddons/ConfigModule + * + * The base class for configuration modules. + * + * Configuration modules are realized as plugins that are loaded only when + * needed. + * + * The module in principle is a simple widget displaying the + * item to be changed. The module has a very small interface. + * + * All the necessary glue logic and the GUI bells and whistles + * are provided by the control center and must not concern + * the module author. + * + * To write a config module, you have to create a C++ library + * and an accompaning QML user interface. + * The library must contain a factory function like the following: + * + * \code + * #include + * + * K_PLUGIN_FACTORY(MyConfigModuleFactory, registerPlugin() ) + * \endcode + * + * The constructor of the ConfigModule then looks like this: + * \code + * YourConfigModule::YourConfigModule( QObject* parent ) + * : ConfigModule( parent ) + * { + * KAboutData *about = new KAboutData( + * , i18n( "..." ), + * KDE_VERSION_STRING, QString(), KAboutLicense::GPL, + * i18n( "Copyright 2006 ..." ) ); + * about->addAuthor( i18n(...) ); + * setAboutData( about ); + * . + * . + * . + * } + * \endcode + * + * The QML part must be in the KPackage format, installed under share/kpackage/kcms. + * @see KPackage::Package + * The package must have the same name as the KAboutData componentName, to be installed + * by CMake with the command: + * kpackage_install_package(package kcm_componentName kcms) + * given "package" is the subdirectory in the source tree where the package sources are + * located, and "kcm_componentName" is the componentname passed to the KAboutData in the + * C++ part. + * The main config dialog UI will be the file + * ui/main.qml from the package (or what X-KPackage-MainScript value is in the + * package metadata desktop file). + * + * The QML part can access all the properties of ConfigModule (together with the properties + * defined in its subclass) by accessing to the global object "kcm", or with the + * import of "org.kde.kcm 1.0" the ConfigModule attached property. + * + * \code + * import QtQuick 2.1 + * import QtQuick.Controls 1.0 as QtControls + * import org.kde.kcm 1.0 + * import org.kde.plasma.core 2.0 as PlasmaCore + * + * Item { + * //implicitWidth and implicitHeight will be used as initial size + * //when loaded in kcmshell5 + * implicitWidth: units.gridUnit * 20 + * implicitHeight: units.gridUnit * 20 + * + * ConfigModule.buttons: ConfigModule.Help|ConfigModule.Apply + * Label { + * text: kcm.needsSave + * } + * } + * \endcode + * + * See https://techbase.kde.org/Development/Tutorials/KCM_HowTo + * for more detailed documentation. + * + */ +class QUICKADDONS_EXPORT ConfigModule : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQuickItem *mainUi READ mainUi CONSTANT) + Q_PROPERTY(KQuickAddons::ConfigModule::Buttons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged) + Q_PROPERTY(bool needsSave READ needsSave WRITE setNeedsSave NOTIFY needsSaveChanged) + Q_PROPERTY(bool representsDefaults READ representsDefaults WRITE setRepresentsDefaults NOTIFY representsDefaultsChanged) + Q_PROPERTY(QString name READ name CONSTANT) + Q_PROPERTY(QString description READ description CONSTANT) + Q_PROPERTY(QString quickHelp READ quickHelp WRITE setQuickHelp NOTIFY quickHelpChanged) + Q_PROPERTY(QString rootOnlyMessage READ rootOnlyMessage WRITE setRootOnlyMessage NOTIFY rootOnlyMessageChanged) + Q_PROPERTY(bool useRootOnlyMessage READ useRootOnlyMessage WRITE setUseRootOnlyMessage NOTIFY useRootOnlyMessageChanged) + Q_PROPERTY(bool needsAuthorization READ needsAuthorization WRITE setNeedsAuthorization NOTIFY needsAuthorizationChanged) + Q_PROPERTY(int columnWidth READ columnWidth WRITE setColumnWidth NOTIFY columnWidthChanged) + Q_PROPERTY(int depth READ depth NOTIFY depthChanged) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) + +public: + + /** + * An enumeration type for the buttons used by this module. + * You should only use Help, Default and Apply. The rest is obsolete. + * NoAdditionalButton can be used when we do not want have other button that Ok Cancel + * + * @see ConfigModule::buttons @see ConfigModule::setButtons + */ + enum Button { + NoAdditionalButton = 0, + Help = 1, + Default = 2, + Apply = 4 + }; + Q_ENUM(Button) + Q_DECLARE_FLAGS(Buttons, Button) + Q_FLAG(Buttons) + + /** + * Base class for all KControlModules. + * + * @note do not emit changed signals here, since they are not yet connected + * to any slot. + * @param aboutData becomes owned by the ConfigModule + */ + explicit ConfigModule(const KAboutData *aboutData, QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * @note do not emit changed signals here, since they are not yet connected + * to any slot. + * @param metaData description for the plugin: it will generate a KAboutData from that + * @since 5.11 + */ + explicit ConfigModule(const KPluginMetaData &metaData, QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * Base class for all KControlModules. + * + * @note do not emit changed signals here, since they are not yet connected + * to any slot. + */ + explicit ConfigModule(QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * Destroys the module. + */ + ~ConfigModule(); + + /** + * This is generally only called for the KBugReport. + * If you override you should have it return a pointer to a constant. + * + * + * @returns the KAboutData for this module + */ + const KAboutData *aboutData() const; + + /** + * This sets the KAboutData returned by aboutData() + * The about data is now owned by ConfigModule. + */ + void setAboutData(const KAboutData *about); + + /** + * @brief Set if the module's save() method requires authorization to be executed + * + * It will still have to execute the action itself using the KAuth library, so + * this method is not technically needed to perform the action, but + * using this method will ensure that hosting + * applications like System Settings or kcmshell behave correctly. + * + * @param action the action that will be used by this ConfigModule + */ + void setAuthActionName(const QString &action); + + /** + * Returns the action previously set with setAuthActionName(). By default its an invalid action. + * + * @return The action that has to be authorized to execute the save() method. + */ + QString authActionName() const; + + + /** + * @return the qml engine that built the main config UI + */ + QQmlEngine *engine() const; + + /** + * The status of the mainUi component. + * @since 5.64 + */ + QQmlComponent::Status status() const; + + /** + * The error string in case the mainUi failed to load. + * @return 5.64 + */ + QString errorString() const; + +//QML property accessors + + /** + * @return The main UI for this configuration module. It's a QQuickItem coming from + * the QML package named the same as the KAboutData's component name for + * this config module + */ + QQuickItem *mainUi(); + + /** + * Sets the quick help. + */ + void setQuickHelp(const QString &help); + + /** + * Return a quick-help text. + * + * This method is called when the module is docked. + * The quick-help text should contain a short description of the module and + * links to the module's help files. You can use HTML formatting tags in the text. + * + * @note make sure the quick help text gets translated (use i18n()). + */ + QString quickHelp() const; + + /** + * Set this property to true when the user changes something in the module, + * signaling that a save (such as user pressing Ok or Apply) is needed. + */ + void setNeedsSave(bool needs); + + /** + * True when the module has something changed and needs save. + */ + bool needsSave(); + + /** + * Set this property to true when the user sets the state of the module + * to the default settings (e.g. clicking Defaults would do nothing). + */ + void setRepresentsDefaults(bool defaults); + + /** + * True when the module state represents the default settings. + */ + bool representsDefaults(); + + /** + * Sets the buttons to display. + * + * Help: shows a "Help" button. + * + * Default: shows a "Use Defaults" button. + * + * Apply: in kcontrol this will show an "Apply" and "Reset" button, + * in kcmshell this will show an "Ok", "Apply" and "Cancel" button. + * + * If Apply is not specified, kcmshell will show a "Close" button. + * + * @see ConfigModule::buttons + */ + void setButtons(const Buttons btn); + + /** + * Indicate which buttons will be used. + * + * The return value is a value or'ed together from + * the Button enumeration type. + * + * @see ConfigModule::setButtons + */ + Buttons buttons() const; + + + /** + * Sets the RootOnly message. + * + * This message will be shown at the top of the module if useRootOnlyMessage is + * set. If no message is set, a default one will be used. + * + * @see ConfigModule::rootOnlyMessage + */ + void setRootOnlyMessage(const QString &message); + + /** + * Get the RootOnly message for this module. + * + * When the module must be run as root, or acts differently + * for root and a normal user, it is sometimes useful to + * customize the message that appears at the top of the module + * when used as a normal user. This function returns this + * customized message. If none has been set, a default message + * will be used. + * + * @see ConfigModule::setRootOnlyMessage + */ + QString rootOnlyMessage() const; + + + /** + * Change whether or not the RootOnly message should be shown. + * + * Following the value of @p on, the RootOnly message will be + * shown or not. + * + * @see ConfigModule::useRootOnlyMessage + */ + void setUseRootOnlyMessage(bool on); + + /** + * Tell if KControl should show a RootOnly message when run as + * a normal user. + * + * In some cases, the module don't want a RootOnly message to + * appear (for example if it has already one). This function + * tells KControl if a RootOnly message should be shown + * + * @see ConfigModule::setUseRootOnlyMessage + */ + bool useRootOnlyMessage() const; + + + /** + * @brief Set if the module's save() method requires authorization to be executed. + * + * The module can set this property to @c true if it requires authorization. + * It will still have to execute the action itself using the KAuth library, so + * this method is not technically needed to perform the action, but + * using this and/or the setAuthActionName() method will ensure that hosting + * applications like System Settings or kcmshell behave correctly. + * + * Called with @c true, this method will set the action to "org.kde.kcontrol.name.save" where + * "name" is aboutData()->appName() return value. This default action won't be set if + * the aboutData() object is not valid. + * + * Note that called with @c false, this method will reset the action name set with setAuthActionName(). + * + * @param needsAuth Tells if the module's save() method requires authorization to be executed. + */ + void setNeedsAuthorization(bool needsAuth); + + /** + * Returns the value previously set with setNeedsAuthorization() or setAuthActionName(). By default it's @c false. + * + * @return @c true if the module's save() method requires authorization, @c false otherwise + */ + bool needsAuthorization() const; + + /** + * @returns the name of the config module + * @since 5.41 + */ + QString name() const; + + /** + * @returns the description of the config module + * @since 5.41 + */ + QString description() const; + + /** + * returns the width the kcm wants in column mode. + * If a columnWidth is valid ( > 0 ) and less than the systemsettings' view width, + * more than one will be visible at once, and the first page will be a sidebar to the last page pushed. + * As default, this is -1 which will make the shell always show only one page at a time. + * @since 5.50 + */ + int columnWidth() const; + + /** + * Sets the column width we want. + * @since 5.50 + */ + void setColumnWidth(int width); + + /** + * @returns how many pages this kcm has. + * It is guaranteed to be at least 1 9the main ui) plus how many times a new page has been pushed without pop + */ + int depth() const; + + /** + * Sets the current page index this kcm should display + * @since 5.53 + */ + void setCurrentIndex(int index); + + /** + * @returns the index of the page this kcm should display + * @since 5.53 + */ + int currentIndex() const; + + static ConfigModule *qmlAttachedProperties(QObject *object); + +public Q_SLOTS: + /** + * Load the configuration data into the module. + * + * The load method sets the user interface elements of the + * module to reflect the current settings stored in the + * configuration files. + * + * This method is invoked whenever the module should read its configuration + * (most of the times from a config file) and update the user interface. + * This happens when the user clicks the "Reset" button in the control + * center, to undo all of his changes and restore the currently valid + * settings. It is also called right after construction. + */ + virtual void load(); + + /** + * Save the configuration data. + * + * The save method stores the config information as shown + * in the user interface in the config files. + * + * If necessary, this method also updates the running system, + * e.g. by restarting applications. This normally does not apply for + * KSettings::Dialog modules where the updating is taken care of by + * KSettings::Dispatcher. + * + * save is called when the user clicks "Apply" or "Ok". + * + */ + virtual void save(); + + /** + * Sets the configuration to sensible default values. + * + * This method is called when the user clicks the "Default" + * button. It should set the display to useful values. + */ + virtual void defaults(); + + /** + * Push a new sub page in the KCM hyerarchy: pages will be seen as a Kirigami PageRow + * @since 5.50 + */ + void push(const QString &fileName, const QVariantMap &propertyMap = QVariantMap()); + + /** + * + */ + void push(QQuickItem *item); + + /** + * pop the last page of the KCM hyerarchy + * @since 5.50 + */ + void pop(); + + /** + * Ask the shell to show a passive notification + * @param message The message text to dispalay + * @param timeout (optional) the timeout, either in milliseconds or the strings "short" and "long" + * @param actionText (optional) The notification can have a button with this text + * @param callBack (optional) If actionText is set and callBack is a JavaScript function, it will be called when the use clicks the button. + * @since 5.68 + */ + void showPassiveNotification(const QString &message, const QVariant &timeout = QVariant(), const QString &actionText = QString(), const QJSValue &callBack = QJSValue()); +Q_SIGNALS: + + /** + * The auth action name has changed: this signal will relay it to the actual KCM + */ + void authActionNameChanged(); + + //QML NOTIFY signaling + /** + * Buttons to display changed. + */ + void buttonsChanged(); + + /** + * Indicate that the module's quickhelp has changed. + * + * Emit this signal whenever the module's quickhelp changes. + * Modules implemented as tabbed dialogs might want to implement + * per-tab quickhelp for example. + * + */ + void quickHelpChanged(); + + /** + * Indicate that the state of the modules contents has changed. + * + * This signal is emitted whenever the state of the configuration + * shown in the module changes. It allows the module container to + * keep track of unsaved changes. + */ + void needsSaveChanged(); + + /** + * Indicate that the state of the modules contents has changed + * in a way that it might represents the defaults settings, or + * stopped representing them. + */ + void representsDefaultsChanged(); + + /** + * Emits this signal whenever the need for root authorization to save changes. + */ + void needsAuthorizationChanged(); + + /** + * Indicate that the module's root message has changed. + * + * Emits this signal whenever the module's root message changes. + * + */ + void rootOnlyMessageChanged(); + + /** + * Emits this signal whenever the root only message gets used or discarded. + */ + void useRootOnlyMessageChanged(); + + /** + * Emitted when a new sub page is pushed + * @since 5.50 + */ + void pagePushed(QQuickItem *page); + + /** + * Emitted when a sub page is popped + * @since 5.50 + */ + //RFC: page argument? + void pageRemoved(); + + /** + * Emitted when the wanted column width of the kcm changes + * @since 5.50 + */ + void columnWidthChanged(int width); + + /** + * Emitted when the current page changed + * @since 5.53 + */ + void currentIndexChanged(int index); + + /** + * Emitted when the number of pages changed + * @since 5.53 + */ + void depthChanged(int index); + + /** + * Emitted when the kcm wants the shell to display a passive notification + * @since 5.68 + */ + void passiveNotificationRequested(const QString &message, const QVariant &timeout, const QString &actionText, const QJSValue &callBack); + +private: + ConfigModulePrivate *const d; +}; + +} + +Q_DECLARE_OPERATORS_FOR_FLAGS(KQuickAddons::ConfigModule::Buttons) +QML_DECLARE_TYPEINFO(KQuickAddons::ConfigModule, QML_HAS_ATTACHED_PROPERTIES) + +#endif //ConfigModule_H + diff --git a/src/quickaddons/imagetexturescache.cpp b/src/quickaddons/imagetexturescache.cpp new file mode 100644 index 0000000..a9ba956 --- /dev/null +++ b/src/quickaddons/imagetexturescache.cpp @@ -0,0 +1,70 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "imagetexturescache.h" +#include + +typedef QHash > > TexturesCache; + +class ImageTexturesCachePrivate +{ +public: + TexturesCache cache; +}; + +ImageTexturesCache::ImageTexturesCache() + : d(new ImageTexturesCachePrivate) +{ +} + +ImageTexturesCache::~ImageTexturesCache() +{ +} + +QSharedPointer ImageTexturesCache::loadTexture(QQuickWindow *window, const QImage &image, QQuickWindow::CreateTextureOptions options) +{ + qint64 id = image.cacheKey(); + QSharedPointer texture = d->cache.value(id).value(window).toStrongRef(); + + if (!texture) { + auto cleanAndDelete = [this, window, id](QSGTexture* texture) { + QHash >& textures = (d->cache)[id]; + textures.remove(window); + if (textures.isEmpty()) + d->cache.remove(id); + delete texture; + }; + texture = QSharedPointer(window->createTextureFromImage(image, options), cleanAndDelete); + (d->cache)[id][window] = texture.toWeakRef(); + } + + //if we have a cache in an atlas but our request cannot use an atlassed texture + //create a new texture and use that + //don't use removedFromAtlas() as that requires keeping a reference to the non atlased version + if (!(options & QQuickWindow::TextureCanUseAtlas) && texture->isAtlasTexture()) { + texture = QSharedPointer(window->createTextureFromImage(image, options)); + } + + return texture; +} + +QSharedPointer ImageTexturesCache::loadTexture(QQuickWindow *window, const QImage &image) +{ + return loadTexture(window, image, QQuickWindow::CreateTextureOptions()); +} diff --git a/src/quickaddons/imagetexturescache.h b/src/quickaddons/imagetexturescache.h new file mode 100644 index 0000000..c2f9487 --- /dev/null +++ b/src/quickaddons/imagetexturescache.h @@ -0,0 +1,65 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef IMAGETEXTURESCACHE_H +#define IMAGETEXTURESCACHE_H + +#include +#include + +#include "quickaddons_export.h" + +class QImage; +class QSGTexture; +class ImageTexturesCachePrivate; + +/** + * @class ImageTexturesCache imagetexturescache.h KQuickAddons/ImageTexturesCache + * + * @short Helps to manage textures by creating images and reference counts them. + * + * Use this class as a factory for textures, when creating them from a QImage + * instance. + * Keeps track of all the created textures in a map between the QImage::cacheKey() and + * the cached texture until it gets de-referenced. + * + * @see ManagedTextureNode + */ +class QUICKADDONS_EXPORT ImageTexturesCache +{ +public: + ImageTexturesCache(); + ~ImageTexturesCache(); + + /** + * @returns the texture for a given @p window and @p image. + * + * If an @p image id is the same as one already provided before, we won't create + * a new texture and return a shared pointer to the existing texture. + */ + QSharedPointer loadTexture(QQuickWindow *window, const QImage &image, QQuickWindow::CreateTextureOptions options); + + QSharedPointer loadTexture(QQuickWindow *window, const QImage &image); + + +private: + QScopedPointer d; +}; + +#endif // IMAGETEXTURESCACHE_H diff --git a/src/quickaddons/managedconfigmodule.cpp b/src/quickaddons/managedconfigmodule.cpp new file mode 100644 index 0000000..c29add3 --- /dev/null +++ b/src/quickaddons/managedconfigmodule.cpp @@ -0,0 +1,184 @@ +/* + This file is part of the KDE libraries + + Copyright (C) 2019 Kevin Ottens + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#include "managedconfigmodule.h" + +#include + +#include + +namespace KQuickAddons { + +class ManagedConfigModulePrivate +{ +public: + ManagedConfigModulePrivate(ManagedConfigModule *module): + _q(module) + { + QMetaObject::invokeMethod(_q, "_k_registerSettings", Qt::QueuedConnection); + } + + void _k_registerSettings(); + + ManagedConfigModule *_q; + QList> _skeletons; +}; + +ManagedConfigModule::ManagedConfigModule(const KAboutData *aboutData, QObject *parent, const QVariantList &args) + : ConfigModule(aboutData, parent, args), + d(new ManagedConfigModulePrivate(this)) +{ +} + +ManagedConfigModule::ManagedConfigModule(const KPluginMetaData &metaData, QObject *parent, const QVariantList &args) + : ConfigModule(metaData, parent, args), + d(new ManagedConfigModulePrivate(this)) +{ +} + +ManagedConfigModule::ManagedConfigModule(QObject *parent, const QVariantList &args) + : ConfigModule(parent, args), + d(new ManagedConfigModulePrivate(this)) +{ +} + +ManagedConfigModule::~ManagedConfigModule() +{ + delete d; +} + +void ManagedConfigModule::load() +{ + for (const auto &skeleton : qAsConst(d->_skeletons)) { + if (skeleton) { + skeleton->load(); + } + } +} + +void ManagedConfigModule::save() +{ + for (const auto &skeleton : qAsConst(d->_skeletons)) { + if (skeleton) { + skeleton->save(); + } + } +} + +void ManagedConfigModule::defaults() +{ + for (const auto &skeleton : qAsConst(d->_skeletons)) { + if (skeleton) { + skeleton->setDefaults(); + } + } +} + +bool ManagedConfigModule::isSaveNeeded() const +{ + return false; +} + +bool ManagedConfigModule::isDefaults() const +{ + return true; +} + +void ManagedConfigModulePrivate::_k_registerSettings() +{ + const auto skeletons = _q->findChildren(); + for (auto *skeleton : skeletons) { + _q->registerSettings(skeleton); + } +} + +void ManagedConfigModule::settingsChanged() +{ + bool needsSave = false; + bool representsDefaults = true; + for (const auto &skeleton : qAsConst(d->_skeletons)) { + if (skeleton) { + needsSave |= skeleton->isSaveNeeded(); + representsDefaults &= skeleton->isDefaults(); + } + } + + if (!needsSave) { + needsSave = isSaveNeeded(); + } + + if (representsDefaults) { + representsDefaults = isDefaults(); + } + + setRepresentsDefaults(representsDefaults); + setNeedsSave(needsSave); +} + +void ManagedConfigModule::registerSettings(KCoreConfigSkeleton *skeleton) +{ + if (!skeleton || d->_skeletons.contains(skeleton)) { + return; + } + + d->_skeletons.append(skeleton); + + auto settingsChangedSlotIndex = metaObject()->indexOfMethod("settingsChanged()"); + auto settingsChangedSlot = metaObject()->method(settingsChangedSlotIndex); + + QObject::connect(skeleton, &KCoreConfigSkeleton::configChanged, this, &ManagedConfigModule::settingsChanged); + + const auto items = skeleton->items(); + for (auto item : items) { + const auto itemHasSignals = dynamic_cast(item) || dynamic_cast(item); + if (!itemHasSignals) { + continue; + } + + auto name = item->name(); + if (name.at(0).isUpper()) { + name[0] = name[0].toLower(); + } + + const auto metaObject = skeleton->metaObject(); + const auto propertyIndex = metaObject->indexOfProperty(name.toUtf8().constData()); + const auto property = metaObject->property(propertyIndex); + if (!property.hasNotifySignal()) { + continue; + } + + const auto changedSignal = property.notifySignal(); + QObject::connect(skeleton, changedSignal, this, settingsChangedSlot); + } + + auto toRemove = std::remove_if(d->_skeletons.begin(), + d->_skeletons.end(), + [](const QPointer &value) { return value.isNull(); } ); + d->_skeletons.erase(toRemove, d->_skeletons.end()); + + QMetaObject::invokeMethod(this, "settingsChanged", Qt::QueuedConnection); +} + +} + +#include "moc_managedconfigmodule.cpp" + diff --git a/src/quickaddons/managedconfigmodule.h b/src/quickaddons/managedconfigmodule.h new file mode 100644 index 0000000..f687f98 --- /dev/null +++ b/src/quickaddons/managedconfigmodule.h @@ -0,0 +1,236 @@ +/* + This file is part of the KDE libraries + + Copyright (C) 2019 Kevin Ottens + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#ifndef MANAGEDCONFIGMODULE_H +#define MANAGEDCONFIGMODULE_H + +#include + +class KCoreConfigSkeleton; + +namespace KQuickAddons { + +class ManagedConfigModulePrivate; + +/** + * @class KQuickAddons::ManagedConfigModule managedconfigmodule.h KQuickAddons/ManagedConfigModule + * + * The base class for configuration modules using KConfigXT settings. + * + * Configuration modules are realized as plugins that are loaded only when + * needed. + * + * The module in principle is a simple widget displaying the + * item to be changed. The module has a very small interface. + * + * All the necessary glue logic and the GUI bells and whistles + * are provided by the control center and must not concern + * the module author. + * + * To write a config module, you have to create a C++ library + * and an accompaning QML user interface. + * The library must contain a factory function like the following: + * + * \code + * #include + * + * K_PLUGIN_FACTORY(MyConfigModuleFactory, registerPlugin() ) + * \endcode + * + * The constructor of the ConfigModule then looks like this: + * \code + * YourConfigModule::YourConfigModule( QObject* parent ) + * : ManagedConfigModule( parent ), + * SettingsObject( this ) + * { + * KAboutData *about = new KAboutData( + * , i18n( "..." ), + * KDE_VERSION_STRING, QString(), KAboutLicense::GPL, + * i18n( "Copyright 2006 ..." ) ); + * about->addAuthor( i18n(...) ); + * setAboutData( about ); + * . + * . + * . + * } + * \endcode + * + * We are assuming here that SettingsObject is a class generated from a kcfg file + * and that it will be somehow exposed as a constant property to be used from the QML side. + * It will be automatically discovered by ManagedConfigModule which will update + * the saveNeeded and defaults inherited properties by itself. Thus by inheriting from + * this class you shall not try to manage those properties yourselves. + * + * The QML part must be in the KPackage format, installed under share/kpackage/kcms. + * @see KPackage::Package + * The package must have the same name as the KAboutData componentName, to be installed + * by CMake with the command: + * kpackage_install_package(package kcm_componentName kcms) + * given "package" is the subdirectory in the source tree where the package sources are + * located, and "kcm_componentName" is the componentname passed to the KAboutData in the + * C++ part. + * The main config dialog UI will be the file + * ui/main.qml from the package (or what X-KPackage-MainScript value is in the + * package metadata desktop file). + * + * The QML part can access all the properties of ManagedConfigModule (together with the properties + * defined in its subclass) by accessing to the global object "kcm", or with the + * import of "org.kde.kcm 1.0" the ConfigModule attached property. + * + * \code + * import QtQuick 2.1 + * import QtQuick.Controls 1.0 as QtControls + * import org.kde.kcm 1.0 + * import org.kde.plasma.core 2.0 as PlasmaCore + * + * Item { + * //implicitWidth and implicitHeight will be used as initial size + * //when loaded in kcmshell5 + * implicitWidth: units.gridUnit * 20 + * implicitHeight: units.gridUnit * 20 + * + * ConfigModule.buttons: ConfigModule.Help|ConfigModule.Apply + * Label { + * text: kcm.needsSave + * } + * } + * \endcode + * + * See https://techbase.kde.org/Development/Tutorials/KCM_HowTo + * for more detailed documentation. + * + * @since 5.65 + */ +class QUICKADDONS_EXPORT ManagedConfigModule : public ConfigModule +{ + Q_OBJECT +public: + /** + * Base class for all modules which manage automatically some of their state. + * + * @param aboutData becomes owned by the ManagedConfigModule + */ + explicit ManagedConfigModule(const KAboutData *aboutData, QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * @param metaData description for the plugin: it will generate a KAboutData from that + */ + explicit ManagedConfigModule(const KPluginMetaData &metaData, QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * Base class for all KControlModules. + * + * @note do not emit changed signals here, since they are not yet connected + * to any slot. + */ + explicit ManagedConfigModule(QObject *parent = nullptr, const QVariantList &args = QVariantList()); + + /** + * Destroys the module. + */ + ~ManagedConfigModule(); + +public Q_SLOTS: + /** + * Load the configuration data into the module. + * + * This method is invoked whenever the module should read its configuration + * (most of the times from a config file) and update the user interface. + * This happens when the user clicks the "Reset" button in the control + * center, to undo all of his changes and restore the currently valid + * settings. It is also called right after construction. + * + * By default this will load the settings from the child setting objects + * of this module. + */ + void load() override; + + /** + * Save the configuration data. + * + * The save method stores the config information as shown + * in the user interface in the config files. + * It is called when the user clicks "Apply" or "Ok". + * + * By default this will save the child setting objects + * of this module. + */ + void save() override; + + /** + * Sets the configuration to sensible default values. + * + * This method is called when the user clicks the "Default" + * button. It should set the display to useful values. + * + * By default this will reset to defaults the child setting objects + * of this module. + */ + void defaults() override; + +protected Q_SLOTS: + /** + * Forces the module to reevaluate the saveNeeded and + * representsDefault state. + * + * This is required for some modules which might have + * some settings managed outside of KConfigXT objects. + */ + void settingsChanged(); + + /** + * Allow to register manually settings class generated from a kcfg file. + * Used by derived class when automatic discovery is not possible. + * After skeleton is registered it will automatically call settingsChanged(). + * + * @since 5.67 + */ + void registerSettings(KCoreConfigSkeleton *skeleton); + +private: + /** + * Allows to indicate if the module requires saving. + * + * By default this returns false, it needs to be overridden only + * if the module has state outside of the settings declared in + * the KConfigXT classes it uses. + */ + virtual bool isSaveNeeded() const; + + /** + * Allows to indicate if the module state is representing its defaults. + * + * By default this returns true, it needs to be overridden only + * if the module has state outside of the settings declared in + * the KConfigXT classes it uses. + */ + virtual bool isDefaults() const; + + Q_PRIVATE_SLOT(d, void _k_registerSettings()) + ManagedConfigModulePrivate *const d; + friend class ManagedConfigModulePrivate; +}; + +} + +#endif //MANAGEDCONFIGMODULE_H + diff --git a/src/quickaddons/managedtexturenode.cpp b/src/quickaddons/managedtexturenode.cpp new file mode 100644 index 0000000..408621e --- /dev/null +++ b/src/quickaddons/managedtexturenode.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "managedtexturenode.h" + +ManagedTextureNode::ManagedTextureNode() +{} + +void ManagedTextureNode::setTexture(QSharedPointer texture) +{ + m_texture = texture; + QSGSimpleTextureNode::setTexture(texture.data()); +} diff --git a/src/quickaddons/managedtexturenode.h b/src/quickaddons/managedtexturenode.h new file mode 100644 index 0000000..6e70108 --- /dev/null +++ b/src/quickaddons/managedtexturenode.h @@ -0,0 +1,57 @@ +/* + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef MANAGEDTEXTURENODE_H +#define MANAGEDTEXTURENODE_H + +#include "quickaddons_export.h" +#include +#include +#include +#include + +/** + * @class ManagedTextureNode managedtexturenode.h KQuickAddons/ManagedTextureNode + * + * @short Node that contains a reference counted texture + * + * Usually when assigning textures within a node, we'll want to delete the + * texture with the node. This class will take a shared texture and display it + * within the node. + * + * It's especially interesting to use this class together with the ImageTexturesCache + * that will offer us shareable textures and cache them transparently, when asking + * it to create the texture. + * + * @see ImageTexturesCache + */ + +class QUICKADDONS_EXPORT ManagedTextureNode : public QSGSimpleTextureNode +{ +Q_DISABLE_COPY(ManagedTextureNode) +public: + ManagedTextureNode(); + + void setTexture(QSharedPointer texture); + +private: + QSharedPointer m_texture; +}; + +#endif diff --git a/src/quickaddons/qtquicksettings.cpp b/src/quickaddons/qtquicksettings.cpp new file mode 100644 index 0000000..deb10de --- /dev/null +++ b/src/quickaddons/qtquicksettings.cpp @@ -0,0 +1,52 @@ +/* + * Copyright 2016 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "qtquicksettings.h" +#include "renderersettings.h" + +#include +#include +#include +#include + +void KQuickAddons::QtQuickSettings::init() +{ + PlasmaQtQuickSettings::RendererSettings s; + if (!s.renderLoop().isEmpty()) { + qputenv("QSG_RENDER_LOOP", s.renderLoop().toLatin1()); + } + + if (!s.sceneGraphBackend().isNull()) { + QQuickWindow::setSceneGraphBackend(s.sceneGraphBackend()); + } + auto format = QSurfaceFormat::defaultFormat(); + if (s.forceGlCoreProfile()) { + format.setVersion(3,2); + format.setProfile(QSurfaceFormat::CoreProfile); + } + // Before Qt 5.12.2 this setting was somewhat unstable + // it was opt-in to find bugs both in KDE and Qt + // For 5.13 with modern plasma it should be fine + if (s.graphicsResetNotifications() || + QLibraryInfo::version() >= QVersionNumber(5, 13, 0)) { + format.setOption(QSurfaceFormat::ResetNotification); + } + QSurfaceFormat::setDefaultFormat(format); +} + diff --git a/src/quickaddons/qtquicksettings.h b/src/quickaddons/qtquicksettings.h new file mode 100644 index 0000000..edebcf7 --- /dev/null +++ b/src/quickaddons/qtquicksettings.h @@ -0,0 +1,47 @@ +/* + * Copyright 2016 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef PLASMAQTQUICKSETTINGS_H +#define PLASMAQTQUICKSETTINGS_H + +#include "quickaddons_export.h" + +namespace KQuickAddons +{ + /** + * @namespace KQuickAddons::QtQuickSettings + * + * TODO + */ + namespace QtQuickSettings + { + /** + * Load settings from the appConfig (app + kdeglobals) which relate to QtQuick rendering. + * This will then set relevant default QWindow and QSurfaceFormat flags, or in some cases environment variables + * + * This function must be called at the start of your application before any windows are created. + * + * @since 5.26 + */ + QUICKADDONS_EXPORT void init(); + + } +} + +#endif diff --git a/src/quickaddons/quickviewsharedengine.cpp b/src/quickaddons/quickviewsharedengine.cpp new file mode 100644 index 0000000..3d64c8c --- /dev/null +++ b/src/quickaddons/quickviewsharedengine.cpp @@ -0,0 +1,269 @@ +/* + This file is part of the KDE libraries + + Copyright (C) 2015 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#include "quickviewsharedengine.h" + +#include +#include +#include +#include + +#include +#include + +#include +#include + +namespace KQuickAddons { + +class QuickViewSharedEnginePrivate +{ +public: + QuickViewSharedEnginePrivate(QuickViewSharedEngine *module) + : q(module), + resizeMode(QuickViewSharedEngine::ResizeMode::SizeRootObjectToView), + initialSize(0, 0) + { + qmlObject = new KDeclarative::QmlObjectSharedEngine(q); + QObject::connect(qmlObject, &KDeclarative::QmlObject::statusChanged, + q, &QuickViewSharedEngine::statusChanged); + QObject::connect(qmlObject, SIGNAL(finished()), + q, SLOT(executionFinished())); + } + + void executionFinished(); + void syncResizeMode(); + void syncWidth(); + void syncHeight(); + + + QuickViewSharedEngine *q; + KDeclarative::QmlObjectSharedEngine *qmlObject; + QuickViewSharedEngine::ResizeMode resizeMode; + QSize initialSize; + +}; + +void QuickViewSharedEnginePrivate::executionFinished() +{ + if (!qmlObject->rootObject()) { + return; + } + + QQuickItem *item = qobject_cast(qmlObject->rootObject()); + + if (!item) { + return; + } + + item->setParentItem(q->contentItem()); + initialSize = QSize(item->width(), item ->height()); + + if(q->size().isEmpty()) { + q->resize(initialSize); + q->contentItem()->setSize(initialSize); + } + + syncResizeMode(); +} + +void QuickViewSharedEnginePrivate::syncResizeMode() +{ + QQuickItem *item = qobject_cast(qmlObject->rootObject()); + + if (!item) { + return; + } + + if (resizeMode == QuickViewSharedEngine::SizeRootObjectToView) { + item->setSize(QSize(q->width(), q->height())); + + QObject::disconnect(item, SIGNAL(widthChanged()), + q, SLOT(syncWidth())); + QObject::disconnect(item, SIGNAL(heightChanged()), + q, SLOT(syncHeight())); + + } else { + + QObject::connect(item, SIGNAL(widthChanged()), + q, SLOT(syncWidth())); + QObject::connect(item, SIGNAL(heightChanged()), + q, SLOT(syncHeight())); + + syncWidth(); + syncHeight(); + } +} + +void QuickViewSharedEnginePrivate::syncWidth() +{ + QQuickItem *item = qobject_cast(qmlObject->rootObject()); + + if (!item) { + return; + } + + q->setWidth(item->width()); +} + +void QuickViewSharedEnginePrivate::syncHeight() +{ + QQuickItem *item = qobject_cast(qmlObject->rootObject()); + + if (!item) { + return; + } + + q->setHeight(item->height()); +} + + + +QuickViewSharedEngine::QuickViewSharedEngine(QWindow *parent) + : QQuickWindow(parent), + d(new QuickViewSharedEnginePrivate(this)) +{ +} + +QuickViewSharedEngine::~QuickViewSharedEngine() +{ +} + + +void QuickViewSharedEngine::setTranslationDomain(const QString &translationDomain) +{ + d->qmlObject->setTranslationDomain(translationDomain); +} + +QString QuickViewSharedEngine::translationDomain() const +{ + return d->qmlObject->translationDomain(); +} + +QQmlEngine *QuickViewSharedEngine::engine() const +{ + return d->qmlObject->engine(); +} + +QList QuickViewSharedEngine::errors() const +{ + QList errs; + + if (d->qmlObject->mainComponent()) { + errs = d->qmlObject->mainComponent()->errors(); + } + + return errs; +} + +QSize QuickViewSharedEngine::sizeHint() const +{ + QQuickItem *item = qobject_cast(d->qmlObject->rootObject()); + if (!item) { + return QSize(); + } + + const QSizeF implicitSize(item->implicitWidth(), item->implicitHeight()); + + if (!implicitSize.isEmpty()) { + return implicitSize.toSize(); + } + + return QSize(item->width(), item->height()); +} + +QSize QuickViewSharedEngine::initialSize() const +{ + return d->initialSize; +} + +QuickViewSharedEngine::ResizeMode QuickViewSharedEngine::resizeMode() const +{ + return d->resizeMode; +} + +QQmlContext *QuickViewSharedEngine::rootContext() const +{ + return d->qmlObject->rootContext(); +} + +QQuickItem *QuickViewSharedEngine::rootObject() const +{ + return qobject_cast(d->qmlObject->rootObject()); +} + +void QuickViewSharedEngine::setResizeMode(ResizeMode mode) +{ + if (d->resizeMode == mode) { + return; + } + + d->resizeMode = mode; + + emit resizeModeChanged(mode); + + QQuickItem *item = qobject_cast(d->qmlObject->rootObject()); + if (!item) { + return; + } + + d->syncResizeMode(); +} + +void QuickViewSharedEngine::setSource(const QUrl &url) +{ + if (d->qmlObject->source() == url) { + return; + } + + d->qmlObject->setSource(url); + emit sourceChanged(url); +} + +QUrl QuickViewSharedEngine::source() const +{ + return d->qmlObject->source(); +} + +QQmlComponent::Status QuickViewSharedEngine::status() const +{ + if (!d->qmlObject->mainComponent()) { + return QQmlComponent::Null; + } + + return QQmlComponent::Status(d->qmlObject->status()); +} + +void QuickViewSharedEngine::resizeEvent(QResizeEvent *e) +{ + QQuickItem *item = qobject_cast(d->qmlObject->rootObject()); + if (item && d->resizeMode == SizeRootObjectToView) { + item->setSize(e->size()); + } + + QQuickWindow::resizeEvent(e); +} + +} + +#include "moc_quickviewsharedengine.cpp" + diff --git a/src/quickaddons/quickviewsharedengine.h b/src/quickaddons/quickviewsharedengine.h new file mode 100644 index 0000000..d063b5a --- /dev/null +++ b/src/quickaddons/quickviewsharedengine.h @@ -0,0 +1,123 @@ +/* + This file is part of the KDE libraries + + Copyright (C) 2015 Marco Martin + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +#ifndef QUICKVIEWSHAREDENGINE_H +#define QUICKVIEWSHAREDENGINE_H + +#include "quickaddons_export.h" + +#include +#include +#include +#include +#include + +class QQuickItem; +class QQmlEngine; + +namespace KQuickAddons { + +class QuickViewSharedEnginePrivate; + +/** + * @class KQuickAddons::QuickViewSharedEngine quickviewsharedengine.h KQuickAddons/QuickViewSharedEngine + * + * TODO + */ +class QUICKADDONS_EXPORT QuickViewSharedEngine : public QQuickWindow +{ + Q_OBJECT + + Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode NOTIFY resizeModeChanged) + Q_PROPERTY(QQmlComponent::Status status READ status NOTIFY statusChanged) + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + +public: + enum ResizeMode { + SizeViewToRootObject, + SizeRootObjectToView + }; + Q_ENUM(ResizeMode) + + explicit QuickViewSharedEngine(QWindow *parent = nullptr); + ~QuickViewSharedEngine() override; + + /** + * Installs a translation domain for all + * i18n global functions. If a translation domain is set all i18n calls delegate to the + * matching i18nd calls with the provided translation domain. + * + * The translationDomain affects all i18n calls including those from imports. Because of + * that modules intended to be used as imports should prefer the i18nd variants and set + * the translation domain explicitly in each call. + * + * This method is only required if your declarative usage is inside a library. If it's + * in an application there is no need to set the translation domain as the application's + * domain can be used. + * + * @param translationDomain The translation domain to be used for i18n calls. + * @since 5.25 + */ + void setTranslationDomain(const QString &translationDomain); + + /** + * @return the translation domain for the i18n calls done in this QML engine + * @since 5.25 + */ + QString translationDomain() const; + + QQmlEngine *engine() const; + QList errors() const; + QSize sizeHint() const; + QSize initialSize() const; + QQmlContext *rootContext() const; + QQuickItem *rootObject() const; + QUrl source() const; + QQmlComponent::Status status() const; + ResizeMode resizeMode() const; + void setResizeMode(ResizeMode); + +protected: + void resizeEvent(QResizeEvent *e) override; + +public Q_SLOTS: + void setSource(const QUrl &url); + +Q_SIGNALS: + void statusChanged(QQmlComponent::Status status); + void resizeModeChanged(QuickViewSharedEngine::ResizeMode resizeMode); + void sourceChanged(const QUrl &source); + + +private: + const std::unique_ptr d; + + Q_PRIVATE_SLOT(d, void executionFinished()) + Q_PRIVATE_SLOT(d, void syncWidth()) + Q_PRIVATE_SLOT(d, void syncHeight()) +}; + +} + + +#endif //QuickViewSharedEngine_H + diff --git a/src/quickaddons/renderer.kcfg b/src/quickaddons/renderer.kcfg new file mode 100644 index 0000000..6c4be89 --- /dev/null +++ b/src/quickaddons/renderer.kcfg @@ -0,0 +1,21 @@ + + + + + + + + + + + + false + + + false + + + diff --git a/src/quickaddons/renderersettings.kcfgc b/src/quickaddons/renderersettings.kcfgc new file mode 100644 index 0000000..56af4bc --- /dev/null +++ b/src/quickaddons/renderersettings.kcfgc @@ -0,0 +1,4 @@ +File=renderer.kcfg +NameSpace=PlasmaQtQuickSettings +ClassName=RendererSettings +UseEnumTypes=true diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..08e535f --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,33 @@ +include(ECMMarkAsTest) + +find_package(Qt5Test REQUIRED) + +add_executable(kdeclarativetest kdeclarativetest.cpp) + +target_include_directories(kdeclarativetest + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../src + ${CMAKE_CURRENT_BINARY_DIR}/.. +) + +ecm_mark_as_test(kdeclarativetest) +target_link_libraries(kdeclarativetest + Qt5::Quick + Qt5::Test + KF5::Declarative +) + + +add_executable(qimageitemtest qimageitemtest.cpp) + +ecm_mark_as_test(qimageitemtest) +target_link_libraries(qimageitemtest + Qt5::Quick + Qt5::Test +) + +if (BUILD_EXAMPLES) + kpackage_install_package(helloworld org.kde.example.helloworld genericqml) + kpackage_install_package(helloworldnowindow org.kde.example.helloworldnowindow genericqml) +endif() + diff --git a/tests/colorButtonTest.qml b/tests/colorButtonTest.qml new file mode 100644 index 0000000..a69b879 --- /dev/null +++ b/tests/colorButtonTest.qml @@ -0,0 +1,54 @@ +/* + * Copyright 2015 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.1 +import org.kde.kquickcontrols 2.0 + +Rectangle { + width: 300 + height: 300 + color: "white" + + ColorButton { + id: btn + + anchors.top: parent.top + anchors.left: parent.left + anchors.margins: 10 + + dialogTitle: "I am title" + showAlphaChannel: true + + color: "blue" //a default colour + } + + + Rectangle { + anchors.top: parent.top + anchors.left: btn.right + anchors.margins: 10 + + width: 20 + height: 20 + + color: btn.color + } + + +} diff --git a/tests/eventgenerator.qml b/tests/eventgenerator.qml new file mode 100644 index 0000000..7158ca6 --- /dev/null +++ b/tests/eventgenerator.qml @@ -0,0 +1,69 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.1 +import org.kde.kquickcontrolsaddons 2.0 + +Rectangle { + width: 500 + height: 500 + color: "red" + + EventGenerator { + id: eventGenerator + } + + MouseArea { + id: parentMouseArea + anchors.fill: parent + drag.filterChildren: true + + onPressed: { + print("Parent Mouse Pressed"); + } + onPositionChanged: { + print("Parent Position changed " + mouse.x + " " + mouse.y); + } + onReleased: { + print("Parent Mouse Released"); + } + + onPressAndHold: { + print("Parent press and hold"); + + eventGenerator.sendGrabEvent(childMouseArea, EventGenerator.UngrabMouse); + eventGenerator.sendGrabEvent(parentMouseArea, EventGenerator.GrabMouse); + eventGenerator.sendMouseEvent(parentMouseArea, EventGenerator.MouseButtonPress, mouse.x, mouse.y, Qt.LeftButton, Qt.LeftButton, 0); + + print("Now Child Position changed events shouldn't appear anymore") + } + + MouseArea { + id: childMouseArea + width: 300 + height: 300 + Rectangle { + anchors.fill: parent + } + onPressed: print("Child Mouse Pressed"); + onPositionChanged: print("Child Position changed " + mouse.x + " " + mouse.y); + onReleased: print("Child Mouse Released"); + } + } +} diff --git a/tests/helloworld/contents/ui/main.qml b/tests/helloworld/contents/ui/main.qml new file mode 100644 index 0000000..d453396 --- /dev/null +++ b/tests/helloworld/contents/ui/main.qml @@ -0,0 +1,58 @@ +/* + * Copyright 2014 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.0 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +ApplicationWindow { + width: 300 + height: 100 + visible: true + + menuBar: MenuBar { + Menu { + title: i18n("Menu") + MenuItem { + text: i18n("item1") + } + MenuItem { + text: i18n("item1") + } + } + } + + toolBar: ToolBar { + RowLayout { + anchors.fill: parent + ToolButton { + text: i18n("Button") + } + } + } + + Column { + Label { + text: i18n("Hello world") + } + Label { + text: commandlineArguments.join(" ") + } + } +} diff --git a/tests/helloworld/metadata.desktop b/tests/helloworld/metadata.desktop new file mode 100644 index 0000000..719af0c --- /dev/null +++ b/tests/helloworld/metadata.desktop @@ -0,0 +1,55 @@ +[Desktop Entry] +Comment= +Encoding=UTF-8 +Keywords= +Name=hello world +Name[ast]=hola mundiu +Name[ca]=hola món +Name[ca@valencia]=hola món +Name[cs]=hello world +Name[da]=Hej verden +Name[de]=Hallo Welt +Name[el]=hello world +Name[en_GB]=hello world +Name[es]=hola mundo +Name[fi]=hei maailma +Name[gd]=shin thu, a shaoghail +Name[gl]=Ola, mundo! +Name[he]=שלום עולם +Name[hu]=Helló világ! +Name[it]=ciao mondo +Name[ko]=hello world +Name[nb]=hallo verden +Name[nl]=hallo wereld +Name[nn]=hei verda +Name[pl]=witaj świecie +Name[pt]=olá mundo +Name[pt_BR]=Olá mundo +Name[ru]=Здравствуй, мир! +Name[sk]=ahoj svet +Name[sl]=pozdravljen svet +Name[sr]=Здраво свете +Name[sr@ijekavian]=Здраво свете +Name[sr@ijekavianlatin]=Zdravo svete +Name[sr@latin]=Zdravo svete +Name[sv]=hello world +Name[tr]=merhaba dünya +Name[uk]=Привіт, світе +Name[x-test]=xxhello worldxx +Name[zh_CN]=你好世界 +Name[zh_TW]=hello world +Type=Application +Icon=package_toys +Exec=kpackagelauncherqml -a org.kde.example.helloworld +X-KDE-ParentApp= +X-KDE-PluginInfo-Author=Marco Martin +X-KDE-PluginInfo-Category=Miscellaneous +X-KDE-PluginInfo-Email=mart@kde.org +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-Name=org.kde.example.helloworld +X-KDE-PluginInfo-Version= +X-KDE-PluginInfo-Website= +X-KDE-ServiceTypes=KPackage/GenericQML + +X-Plasma-MainScript=ui/main.qml +X-Plasma-RemoteLocation= diff --git a/tests/helloworldnowindow/contents/ui/main.qml b/tests/helloworldnowindow/contents/ui/main.qml new file mode 100644 index 0000000..c4653bd --- /dev/null +++ b/tests/helloworldnowindow/contents/ui/main.qml @@ -0,0 +1,37 @@ +/* + * Copyright 2014 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.0 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +Item { + implicitWidth: 300 + implicitHeight: 100 + visible: true + + Column { + Label { + text: i18n("Hello world") + } + Label { + text: commandlineArguments.join(" ") + } + } +} diff --git a/tests/helloworldnowindow/metadata.desktop b/tests/helloworldnowindow/metadata.desktop new file mode 100644 index 0000000..4cc9517 --- /dev/null +++ b/tests/helloworldnowindow/metadata.desktop @@ -0,0 +1,55 @@ +[Desktop Entry] +Comment= +Encoding=UTF-8 +Keywords= +Name=hello world +Name[ast]=hola mundiu +Name[ca]=hola món +Name[ca@valencia]=hola món +Name[cs]=hello world +Name[da]=Hej verden +Name[de]=Hallo Welt +Name[el]=hello world +Name[en_GB]=hello world +Name[es]=hola mundo +Name[fi]=hei maailma +Name[gd]=shin thu, a shaoghail +Name[gl]=Ola, mundo! +Name[he]=שלום עולם +Name[hu]=Helló világ! +Name[it]=ciao mondo +Name[ko]=hello world +Name[nb]=hallo verden +Name[nl]=hallo wereld +Name[nn]=hei verda +Name[pl]=witaj świecie +Name[pt]=olá mundo +Name[pt_BR]=Olá mundo +Name[ru]=Здравствуй, мир! +Name[sk]=ahoj svet +Name[sl]=pozdravljen svet +Name[sr]=Здраво свете +Name[sr@ijekavian]=Здраво свете +Name[sr@ijekavianlatin]=Zdravo svete +Name[sr@latin]=Zdravo svete +Name[sv]=hello world +Name[tr]=merhaba dünya +Name[uk]=Привіт, світе +Name[x-test]=xxhello worldxx +Name[zh_CN]=你好世界 +Name[zh_TW]=hello world +Type=Application +Icon=package_toys +Exec=kpackagelauncherqml -a org.kde.example.helloworldnowindow +X-KDE-ParentApp= +X-KDE-PluginInfo-Author=Marco Martin +X-KDE-PluginInfo-Category=Miscellaneous +X-KDE-PluginInfo-Email=mart@kde.org +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-Name=org.kde.example.helloworldnowindow +X-KDE-PluginInfo-Version= +X-KDE-PluginInfo-Website= +X-KDE-ServiceTypes=KPackage/GenericQML + +X-Plasma-MainScript=ui/main.qml +X-Plasma-RemoteLocation= diff --git a/tests/icondialog.qml b/tests/icondialog.qml new file mode 100644 index 0000000..ac6434a --- /dev/null +++ b/tests/icondialog.qml @@ -0,0 +1,141 @@ +/* + * Copyright 2015 Kai Uwe Broulik + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.2 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +import org.kde.kquickcontrolsaddons 2.0 + +RowLayout { + spacing: 10 + + IconDialog { + id: iconDialog + iconSize: Number(iconSizeInput.text) + title: dialogTitleInput.text + user: userCheckbox.checked + customLocation: customLocationField.text + modality: { + switch(modalityCombo.currentIndex) { + case 0: return Qt.WindowModal + case 1: return Qt.ApplicationModal + case 2: return Qt.NonModal + } + } + } + + Button { + Layout.minimumWidth: 80 + Layout.maximumWidth: Layout.minimumWidth + Layout.minimumHeight: Layout.minimumWidth + Layout.maximumHeight: Layout.minimumWidth + iconName: iconDialog.iconName + onClicked: iconDialog.open() + } + + GridLayout { + Layout.fillWidth: true + columns: 2 + + Label { + Layout.columnSpan: 2 + font.pointSize: Math.round(someLabel.font.pointSize * 1.2) + text: "Push the button to open the icon dialog" + } + + Label { + id: someLabel + text: "Dialog visible:" + } + Label { + text: iconDialog.visible ? "yes" : "no" + } + + Label { + text: "Selected icon:" + } + Label { + text: iconDialog.iconName || "(none)" + } + + Label { + text: "Desired icon size (blank = default):" + } + TextField { + id: iconSizeInput + text: "" + } + + Label { + text: "Dialog title:" + } + TextField { + id: dialogTitleInput + Layout.minimumWidth: 250 + } + + Label { + Layout.columnSpan: 2 + Layout.fillWidth: true + font.pointSize: Math.round(someLabel.font.pointSize / 1.2) + opacity: 0.6 + wrapMode: Text.WordWrap + text: "Not setting a title at all will default to 'Choose Icon' " + + "whereas explicitly setting it to empty (which we do here) " + + "will default to the application name" + } + + CheckBox { + id: userCheckbox + Layout.columnSpan: 2 + text: "Begin with user icons rather than system icons" + } + + Label { + text: "Custom search location" + } + + TextField { + id: customLocationField + Layout.minimumWidth: 250 + } + + Label { + Layout.columnSpan: 2 + Layout.fillWidth: true + font.pointSize: Math.round(someLabel.font.pointSize / 1.2) + opacity: 0.6 + wrapMode: Text.WordWrap + text: "This needs to be a URL to a local folder. You should enable " + + "'Begin with user icons' when setting this" + } + + Label { + text: "Modality" + } + + ComboBox { + id: modalityCombo + Layout.minimumWidth: 250 + model: ["Window modal (default)", "Application modal", "Non-modal"] + } + + } +} diff --git a/tests/kdeclarativetest.cpp b/tests/kdeclarativetest.cpp new file mode 100644 index 0000000..efd9f28 --- /dev/null +++ b/tests/kdeclarativetest.cpp @@ -0,0 +1,47 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include + +#include + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQuickView view; + QQmlContext *context = view.rootContext(); + context->setContextProperty(QStringLiteral("backgroundColor"), + QColor(Qt::yellow)); + + KDeclarative::KDeclarative::setupEngine(view.engine()); + KDeclarative::KDeclarative kdeclarative; + kdeclarative.setDeclarativeEngine(view.engine()); + //binds things like kconfig and icons + kdeclarative.setupContext(); + + view.setSource(QUrl::fromLocalFile(QFINDTESTDATA("test.qml"))); + view.show(); + + return app.exec(); +} diff --git a/tests/mouseeventlistenertest.qml b/tests/mouseeventlistenertest.qml new file mode 100644 index 0000000..fd23916 --- /dev/null +++ b/tests/mouseeventlistenertest.qml @@ -0,0 +1,95 @@ +/* + Copyright 2014 David Edmundson + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +import org.kde.qtextracomponents 2.0 +import QtQuick 2.1 +import QtQuick.Layouts 1.0 + + +Item +{ + width: 800 + height: 400 + Row { + anchors.fill: parent + MouseEventListener { + width: 400 + height: 400 + id: mouseListener + acceptedButtons: Qt.LeftButton + hoverEnabled: true + onPressed: { + updateDebug("Pressed", mouse); + } + onPressAndHold: { + updateDebug("Held", mouse); + } + onReleased: { + mouseState.text = ""; + mousePos.text = ""; + screenPos.text = ""; + } + + function updateDebug(state, mouse) { + mouseState.text = state + mousePos.text = mouse.x + "," + mouse.y + screenPos.text = mouse.screenX + "," + mouse.screenY + } + + Rectangle { + color: "red" + anchors.fill: parent + + //MouseEventListener should still get events, even though this has a mousearea + MouseArea { + anchors.fill: parent + } + } + } + + GridLayout { + width: 400 + columns: 2 + Text { + text: "Mouse status:" + } + Text { + id: mouseState + } + Text { + text: "Contains Mouse: " + } + Text { + text: mouseListener.containsMouse + } + Text { + text: "Mouse Position: " + } + Text { + id: mousePos + } + Text { + text: "Screen Position: " + } + Text { + id: screenPos + } + } + } +} \ No newline at end of file diff --git a/tests/plotter.qml b/tests/plotter.qml new file mode 100644 index 0000000..c743fc7 --- /dev/null +++ b/tests/plotter.qml @@ -0,0 +1,81 @@ +/* + * Copyright 2015 by Marco Martin + * Copyright 2015 by David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.0 +import QtQuick.Controls 1.3 + +import org.kde.kquickcontrolsaddons 2.0 + +Item { + width: 500 + height: 200 + + Plotter { + id: renderer + anchors.fill: parent + anchors.margins: 0 + stacked: stackedButton.checked + autoRange: autoRangeButton.checked + horizontalGridLineCount: linesSpinner.value + + dataSets: [ + PlotData { + color: "#4cb2ff" + }, + PlotData { + color: "#00b200" + } + ] + + } + Row { + Button { + text: "Add values" + checkable: true + Timer { + interval: 100 + running: parent.checked + repeat: true + onTriggered: { + renderer.addSample([Math.random() * 40, Math.random() * 40]) + } + } + } + + Button { + id: stackedButton + text: "Stacked" + checkable: true + checked: true + } + Button { + id: autoRangeButton + text: "Auto Range" + checkable: true + checked: true + } + + SpinBox { + id: linesSpinner + value: 5 + minimumValue: 0 + } + } +} diff --git a/tests/qiconitem_resize.qml b/tests/qiconitem_resize.qml new file mode 100644 index 0000000..ae301e5 --- /dev/null +++ b/tests/qiconitem_resize.qml @@ -0,0 +1,27 @@ +import org.kde.kquickcontrolsaddons 2.0 +import QtQuick 2.2 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + + +Rectangle { + color: "white" + width: 400 + height: 400 + + QIconItem { + id: anIcon + icon: "rating" + width: 8 + height: 8 + } + + Button { + anchors.bottom: parent.bottom + text: "Resize" + onClicked: { + anIcon.width += 4 + anIcon.height += 4 + } + } +} diff --git a/tests/qiconitem_test.qml b/tests/qiconitem_test.qml new file mode 100644 index 0000000..2beae44 --- /dev/null +++ b/tests/qiconitem_test.qml @@ -0,0 +1,15 @@ +import org.kde.kquickcontrolsaddons 2.0 +import QtQuick 2.2 + +GridView { + width: 300 + cellWidth: 16 + cellHeight: 16 + + model: 50000 + delegate: QIconItem { + width: 16 + height: 16 + icon: "rating" + } +} diff --git a/tests/qimageitemtest.cpp b/tests/qimageitemtest.cpp new file mode 100644 index 0000000..d56656d --- /dev/null +++ b/tests/qimageitemtest.cpp @@ -0,0 +1,50 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QQuickView view; + QQmlContext *context = view.rootContext(); + + QImage image; + if (app.devicePixelRatio() < 2) { + image = QImage(QFINDTESTDATA("testimage.png")); + } else { + image = QImage(QFINDTESTDATA("testimage@2x.png")); + image.setDevicePixelRatio(2); + } + + context->setContextProperty(QStringLiteral("testImage"), + image); + + + view.setSource(QUrl::fromLocalFile(QFINDTESTDATA("qimageitemtest.qml"))); + view.show(); + + return app.exec(); +} diff --git a/tests/qimageitemtest.qml b/tests/qimageitemtest.qml new file mode 100644 index 0000000..0eefcfe --- /dev/null +++ b/tests/qimageitemtest.qml @@ -0,0 +1,62 @@ +import QtQuick 2.0 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.1 +import org.kde.kquickcontrolsaddons 2.0 as KQCA + +//this file should be used via qimageitemtest executable +//unless you want to test isNull + +Rectangle { + color: "white" + width: 500 + height: 500 + + RowLayout { + anchors.fill: parent + KQCA.QImageItem { + implicitWidth: 300 + implicitHeight: 300 + + id: image + image: testImage + fillMode: fillModeCombo.currentIndex + } + GridLayout { + columns: 2 + Text {text: "fillMode"} + ComboBox { + id: fillModeCombo + model: ListModel{ + ListElement { + display: "Stretch" + } + ListElement { + display: "PreserveAspectFit" + }ListElement { + display: "PreserveAspectCrop" + }ListElement { + display: "Tile" + }ListElement { + display: "TileVertically" + } + ListElement { + display: "TileHorizontally" + } + } + } + + Text {text: "isNull:"} + Text {text: image.null} + Text {text: "nativeWidth:"} + Text {text: image.nativeWidth} + Text {text: "nativeHeight:"} + Text {text: image.nativeHeight} + Text {text: "paintedWidth:"} + Text {text: image.paintedWidth} + Text {text: "paintedHeight:"} + Text {text: image.paintedHeight} + + Text {text: "rect size is 300x300"} + } + } +} \ No newline at end of file diff --git a/tests/test.qml b/tests/test.qml new file mode 100644 index 0000000..9f14243 --- /dev/null +++ b/tests/test.qml @@ -0,0 +1,31 @@ +/* + * Copyright 2011 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.1 + +Rectangle { + width: 300 + height: 300 + color: "red" + + Text { + anchors.fill: parent + text: i18n("Hello") + } +} diff --git a/tests/testimage.png b/tests/testimage.png new file mode 100644 index 0000000..8481698 Binary files /dev/null and b/tests/testimage.png differ diff --git a/tests/testimage@2x.png b/tests/testimage@2x.png new file mode 100644 index 0000000..4653968 Binary files /dev/null and b/tests/testimage@2x.png differ