commit a074eb77e048af75e5c9fa8ae9e9f07364bd6664 Author: Andrew Lee (李健秋) Date: Wed Aug 12 04:56:32 2015 +0800 Adding upstream version 0.9.0. Signed-off-by: Andrew Lee (李健秋) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..513eaeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build +*.kdev4 diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..190d298 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,10 @@ +Upstream Authors: + LXQt team: http://lxqt.org + Razor team: http://razor-qt.org + +Copyright: + Copyright (c) 2010-2012 Razor team + Copyright (c) 2012-2014 LXQt team + +License: GPL-2 and LGPL-2.1+ +The full text of the licenses can be found in the 'COPYING' file. diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..dcd4d65 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,253 @@ +cmake_minimum_required(VERSION 2.8.11) +project(lxqt-panel) + +option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) + +# additional cmake files +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +macro(setByDefault VAR_NAME VAR_VALUE) + if(NOT DEFINED ${VAR_NAME}) + set (${VAR_NAME} ${VAR_VALUE}) + endif(NOT DEFINED ${VAR_NAME}) +endmacro() + +# use gcc visibility feature to decrease unnecessary exported symbols +if (CMAKE_COMPILER_IS_GNUCXX) + # set visibility to hidden to hide symbols, unlesss they're exporeted manually in the code + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-no-undefined") +endif() + +######################################################################### + +add_definitions (-Wall) +include(GNUInstallDirs) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +# set(CMAKE_AUTOMOC ON) + +find_package(Qt5Widgets REQUIRED) +find_package(Qt5DBus REQUIRED) +find_package(Qt5LinguistTools REQUIRED) +find_package(Qt5Xml REQUIRED) +find_package(Qt5X11Extras REQUIRED) +find_package(KF5WindowSystem REQUIRED) + +find_package(lxqt REQUIRED) +find_package(Qt5Xdg REQUIRED QUIET) +find_package(lxqt-globalkeys REQUIRED) +find_package(lxqt-globalkeys-ui REQUIRED) + +include(${LXQT_USE_FILE}) +include(${QTXDG_USE_FILE}) +include(${LXQT_GLOBALKEYS_USE_FILE}) +include(${LXQT_GLOBALKEYS_UI_USE_FILE}) + +include(LXQtTranslate) + +include_directories( + ${LXQT_INCLUDE_DIRS} + ${QTXDG_INCLUDE_DIRS} + ${Qt5X11Extras_INCLUDE_DIRS} +) + +# Warning: This must be before add_subdirectory(panel). Move with caution. +set(PLUGIN_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/lxqt-panel") +add_definitions(-DPLUGIN_DIR=\"${PLUGIN_DIR}\") +message(STATUS "Panel plugins location: ${PLUGIN_DIR}") + +add_subdirectory(panel) + +######################################################################### + +# Plugin system +# You can enable/disable building of the plugin using cmake options. +# cmake -DCLOCK_PLUGIN=Yes .. # Enable clock plugin +# cmake -DCLOCK_PLUGIN=No .. # Disable clock plugin + +include("cmake/BuildPlugin.cmake") + +set(ENABLED_PLUGINS) + +setByDefault(CLOCK_PLUGIN Yes) +if(CLOCK_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Clock") + add_subdirectory(plugin-clock) +endif() + +setByDefault(COLORPICKER_PLUGIN Yes) +if(COLORPICKER_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Color Picker") + add_subdirectory(plugin-colorpicker) +endif() + +setByDefault(CPULOAD_PLUGIN Yes) +if(CPULOAD_PLUGIN) + find_library(STATGRAB_LIB statgrab) + + if(NOT(${STATGRAB_LIB} MATCHES "NOTFOUND")) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Cpu Load") + add_subdirectory(plugin-cpuload) + else() + message(STATUS "") + message(STATUS "CPU Load plugin requires libstatgrab") + message(STATUS "") + endif() +endif() + +setByDefault(DOM_PLUGIN Yes) +if(DOM_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "DOM") + add_subdirectory(plugin-dom) +endif(DOM_PLUGIN) + +setByDefault(DESKTOPSWITCH_PLUGIN Yes) +if(DESKTOPSWITCH_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Desktop Switcher") + add_subdirectory(plugin-desktopswitch) +endif() + +setByDefault(KBINDICATOR_PLUGIN Yes) +if(KBINDICATOR_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Keyboard Indicator") + add_subdirectory(plugin-kbindicator) +endif(KBINDICATOR_PLUGIN) + +setByDefault(MAINMENU_PLUGIN Yes) +if(MAINMENU_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Application menu") + add_subdirectory(plugin-mainmenu) +endif() + +setByDefault(MOUNT_PLUGIN Yes) +if(MOUNT_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Mount") + + find_package(lxqtmount REQUIRED) + include(${LXQTMOUNT_USE_FILE}) + + add_subdirectory(plugin-mount) +endif(MOUNT_PLUGIN) + +setByDefault(QUICKLAUNCH_PLUGIN Yes) +if(QUICKLAUNCH_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Quicklaunch") + add_subdirectory(plugin-quicklaunch) +endif() + +setByDefault(SCREENSAVER_PLUGIN Yes) +if(SCREENSAVER_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Screensaver") + add_subdirectory(plugin-screensaver) +endif() + +setByDefault(SENSORS_PLUGIN Yes) +if(SENSORS_PLUGIN) + find_library(SENSORS_LIB sensors) + + if(NOT(${SENSORS_LIB} MATCHES "NOTFOUND")) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Sensors") + add_subdirectory(plugin-sensors) + else() + message(STATUS "") + message(STATUS "Sensors plugin requires lm_sensors") + message(STATUS "") + endif() +endif() + +setByDefault(SHOWDESKTOP_PLUGIN Yes) +if(SHOWDESKTOP_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Show Desktop") + add_subdirectory(plugin-showdesktop) +endif() + +setByDefault(NETWORKMONITOR_PLUGIN Yes) +if(NETWORKMONITOR_PLUGIN) + find_library(STATGRAB_LIB statgrab) + + if(NOT(${STATGRAB_LIB} MATCHES "NOTFOUND")) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Network Monitor") + add_subdirectory(plugin-networkmonitor) + else() + message(STATUS "") + message(STATUS "Network Monitor plugin requires libstatgrab") + message(STATUS "") + endif() +endif() + +setByDefault(SYSSTAT_PLUGIN Yes) +if(SYSSTAT_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "System Stats") + add_subdirectory(plugin-sysstat) +endif(SYSSTAT_PLUGIN) + +setByDefault(TASKBAR_PLUGIN Yes) +if(TASKBAR_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Taskbar") + add_subdirectory(plugin-taskbar) +endif() + +setByDefault(TRAY_PLUGIN Yes) +if(TRAY_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "System Tray") + add_subdirectory(plugin-tray) +endif() + +setByDefault(VOLUME_PLUGIN Yes) +setByDefault(VOLUME_USE_PULSEAUDIO Yes) +setByDefault(VOLUME_USE_ALSA Yes) +if(VOLUME_PLUGIN) + if (VOLUME_USE_PULSEAUDIO) + find_package(PulseAudio) + endif(VOLUME_USE_PULSEAUDIO) + + if(VOLUME_USE_ALSA) + find_package(ALSA) + endif() + + if(PULSEAUDIO_FOUND OR ALSA_FOUND) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "Volume") + message(STATUS "") + message(STATUS "Volume plugin will be built") + message(STATUS " ALSA: ${ALSA_FOUND}") + message(STATUS " PulseAudio: ${PULSEAUDIO_FOUND}") + message(STATUS "") + add_subdirectory(plugin-volume) + else() + message(STATUS "") + message(STATUS "Volume plugin requires pulseaudio or alsa") + message(STATUS " ALSA: ${ALSA_FOUND}") + message(STATUS " PulseAudio: ${PULSEAUDIO_FOUND}") + message(STATUS "") + endif() +endif() + +setByDefault(WORLDCLOCK_PLUGIN Yes) +if(WORLDCLOCK_PLUGIN) + set(ENABLED_PLUGINS ${ENABLED_PLUGINS} "World Clock") + add_subdirectory(plugin-worldclock) +endif(WORLDCLOCK_PLUGIN) + +######################################################################### + +message(STATUS "**************** The following plugins will be built ****************") +foreach (PLUGIN_STR ${ENABLED_PLUGINS}) + message(STATUS " ${PLUGIN_STR}") +endforeach() +message(STATUS "*********************************************************************") + +# building tarball with CPack ------------------------------------------------- +include(InstallRequiredSystemLibraries) +set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION}) +set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION}) +set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION}) +set(CPACK_GENERATOR TBZ2) +set(CPACK_SOURCE_GENERATOR TBZ2) +set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp) +include(CPack) diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..a8dd823 --- /dev/null +++ b/COPYING @@ -0,0 +1,461 @@ + + 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 diff --git a/cmake/BuildPlugin.cmake b/cmake/BuildPlugin.cmake new file mode 100644 index 0000000..cecbf74 --- /dev/null +++ b/cmake/BuildPlugin.cmake @@ -0,0 +1,54 @@ +MACRO (BUILD_LXQT_PLUGIN NAME) + set(PROGRAM "lxqt-panel") + project(${PROGRAM}_${NAME}) + + set(PROG_SHARE_DIR ${CMAKE_INSTALL_FULL_DATAROOTDIR}/lxqt/${PROGRAM}) + set(PLUGIN_SHARE_DIR ${PROG_SHARE_DIR}/${NAME}) + + # Translations ********************************** + lxqt_translate_ts(${PROJECT_NAME}_QM_FILES + UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS} + SOURCES + ${HEADERS} + ${SOURCES} + ${MOCS} + ${UIS} + TEMPLATE + ${NAME} + INSTALL_DIR + ${LXQT_TRANSLATIONS_DIR}/${PROGRAM}/${NAME} + ) + + #lxqt_translate_to(QM_FILES ${CMAKE_INSTALL_FULL_DATAROOTDIR}/lxqt/${PROGRAM}/${PROJECT_NAME}) + file (GLOB ${PROJECT_NAME}_DESKTOP_FILES_IN resources/*.desktop.in) + lxqt_translate_desktop(DESKTOP_FILES + SOURCES + ${${PROJECT_NAME}_DESKTOP_FILES_IN} + ) + #************************************************ + + file (GLOB CONFIG_FILES resources/*.conf) + + if (NOT DEFINED PLUGIN_DIR) + set (PLUGIN_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROGRAM}) + endif (NOT DEFINED PLUGIN_DIR) + + qt5_wrap_cpp(MOC_SOURCES ${MOCS}) + qt5_add_resources(QRC_SOURCES ${RESOURCES}) + qt5_wrap_ui(UI_SOURCES ${UIS}) + set(QTX_LIBRARIES Qt5::Widgets) + if(QT_USE_QTXML) + set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt5::Xml) + endif() + if(QT_USE_QTDBUS) + set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt5::DBus) + endif() + + add_library(${NAME} MODULE ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${${PROJECT_NAME}_QM_FILES} ${QRC_SOURCES} ${UIS} ${DESKTOP_FILES}) + target_link_libraries(${NAME} ${QTX_LIBRARIES} ${LXQT_LIBRARIES} ${LIBRARIES} KF5::WindowSystem) + + install(TARGETS ${NAME} DESTINATION ${PLUGIN_DIR}) + install(FILES ${CONFIG_FILES} DESTINATION ${PLUGIN_SHARE_DIR}) + install(FILES ${DESKTOP_FILES} DESTINATION ${PROG_SHARE_DIR}) + +ENDMACRO(BUILD_LXQT_PLUGIN) diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt new file mode 100644 index 0000000..1ef3a32 --- /dev/null +++ b/panel/CMakeLists.txt @@ -0,0 +1,100 @@ +set(PROJECT lxqt-panel) + +set(lxqt-panel_PRIV_H_FILES + lxqtpanel.h + lxqtpanelapplication.h + lxqtpanellayout.h + lxqtpanelpluginconfigdialog.h + config/configpaneldialog.h + plugin.h + lxqtpanellimits.h + popupmenu.h + pluginmoveprocessor.h +) + +# using LXQt namespace in the public headers. +set(lxqt-panel_PUB_H_FILES + lxqtpanelglobals.h + ilxqtpanelplugin.h + ilxqtpanel.h +) + +set(lxqt-panel_CPP_FILES + main.cpp + lxqtpanel.cpp + lxqtpanelapplication.cpp + lxqtpanellayout.cpp + lxqtpanelpluginconfigdialog.cpp + config/configpaneldialog.cpp + plugin.cpp + popupmenu.cpp + pluginmoveprocessor.cpp +) + +set(MOCS + lxqtpanel.h + lxqtpanelapplication.h + lxqtpanellayout.h + lxqtpanelpluginconfigdialog.h + config/configpaneldialog.h + plugin.h + pluginmoveprocessor.h +) + +set(LIBRARIES + ${LXQT_LIBRARIES} + ${QTXDG_LIBRARIES} +) + +set(RESOURCES "") + +set(lxqt-panel_UI_FILES + config/configpaneldialog.ui +) + +qt5_wrap_ui(UI_HEADERS ${lxqt-panel_UI_FILES}) + +file(GLOB CONFIG_FILES resources/*.conf) + +############################################ + +add_definitions(-DCOMPILE_LXQT_PANEL) + +set(PLUGIN_DESKTOPS_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/lxqt/${PROJECT}") +add_definitions(-DPLUGIN_DESKTOPS_DIR=\"${PLUGIN_DESKTOPS_DIR}\") + +project(${PROJECT}) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${LXQT_INCLUDE_DIRS} + ${LXQT_INCLUDE_DIRS}/LXQt # FIXME: liblxqt seems to be broken, workaround it. +) + +qt5_wrap_cpp(MOC_SOURCES ${MOCS}) +qt5_wrap_ui(UI_HEADERS ${FORMS}) +qt5_add_resources(QRC_SOURCES ${RESOURCES}) +set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::DBus) + +# Translations +lxqt_translate_ts(lxqt-runner_QM_FILES SOURCES + UPDATE_TRANSLATIONS + ${UPDATE_TRANSLATIONS} + SOURCES + ${lxqt-panel_PUB_H_FILES} + ${lxqt-panel_PRIV_H_FILES} + ${lxqt-panel_CPP_FILES} + ${lxqt-panel_UI_FILES} + INSTALL_DIR + "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}" +) + +lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME}) + + +add_executable(${PROJECT} ${lxqt-panel_PUB_H_FILES} ${lxqt-panel_PRIV_H_FILES} ${lxqt-panel_CPP_FILES} ${MOC_SOURCES} ${lxqt-runner_QM_FILES} ${QRC_SOURCES} ${UI_HEADERS} ${QM_LOADER}) +target_link_libraries(${PROJECT} ${LIBRARIES} ${QTX_LIBRARIES} KF5::WindowSystem) + +install(TARGETS ${PROJECT} RUNTIME DESTINATION bin) +install(FILES ${CONFIG_FILES} DESTINATION ${LXQT_ETC_XDG_DIR}/lxqt) +install(FILES ${lxqt-panel_PUB_H_FILES} DESTINATION include/lxqt) diff --git a/panel/config/configpaneldialog.cpp b/panel/config/configpaneldialog.cpp new file mode 100644 index 0000000..cb34770 --- /dev/null +++ b/panel/config/configpaneldialog.cpp @@ -0,0 +1,427 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Marat "Morion" Talipov + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "configpaneldialog.h" +#include "ui_configpaneldialog.h" +#include "../lxqtpanel.h" +#include "../lxqtpanellimits.h" + +#include +#include +#include +#include +#include +#include +#include + +using namespace LxQt; + +struct ScreenPosition +{ + int screen; + ILxQtPanel::Position position; +}; +Q_DECLARE_METATYPE(ScreenPosition) + + + +/************************************************ + + ************************************************/ +ConfigPanelDialog *ConfigPanelDialog::exec(LxQtPanel *panel) +{ + ConfigPanelDialog *dialog = + panel->findChild(); + + if (!dialog) + { + dialog = new ConfigPanelDialog(panel, panel); + } + + dialog->show(); + dialog->raise(); + dialog->activateWindow(); + WId wid = dialog->windowHandle()->winId(); + + KWindowSystem::activateWindow(wid); + KWindowSystem::setOnDesktop(wid, KWindowSystem::currentDesktop()); + return dialog; +} + + +/************************************************ + + ************************************************/ +ConfigPanelDialog::ConfigPanelDialog(LxQtPanel *panel, QWidget *parent): + LxQt::ConfigDialog(tr("Configure Panel"), panel->settings(), parent) +{ + setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); + setAttribute(Qt::WA_DeleteOnClose); + + ConfigPanelWidget* page = new ConfigPanelWidget(panel, this); + addPage(page, tr("Configure Panel")); + connect(this, SIGNAL(reset()), page, SLOT(reset())); + connect(this, SIGNAL(accepted()), panel, SLOT(saveSettings())); +} + + +/************************************************ + + ************************************************/ +ConfigPanelWidget::ConfigPanelWidget(LxQtPanel *panel, QWidget *parent) : + QWidget(parent), + ui(new Ui::ConfigPanelWidget), + mPanel(panel) +{ + ui->setupUi(this); + + fillComboBox_position(); + fillComboBox_alignment(); + + mOldPanelSize = mPanel->panelSize(); + mOldIconSize = mPanel->iconSize(); + mOldLineCount = mPanel->lineCount(); + + mOldLength = mPanel->length(); + mOldLengthInPercents = mPanel->lengthInPercents(); + + mOldAlignment = mPanel->alignment(); + + mOldScreenNum = mPanel->screenNum(); + mScreenNum = mOldScreenNum; + + mOldPosition = mPanel->position(); + mPosition = mOldPosition; + + ui->spinBox_panelSize->setMinimum(PANEL_MINIMUM_SIZE); + ui->spinBox_panelSize->setMaximum(PANEL_MAXIMUM_SIZE); + + mOldFontColor = mPanel->fontColor(); + mFontColor = mOldFontColor; + mOldBackgroundColor = mPanel->backgroundColor(); + mBackgroundColor = mOldBackgroundColor; + mOldBackgroundImage = mPanel->backgroundImage(); + mOldOpacity = mPanel->opacity(); + + reset(); + + connect(ui->spinBox_panelSize, SIGNAL(valueChanged(int)), this, SLOT(editChanged())); + connect(ui->spinBox_iconSize, SIGNAL(valueChanged(int)), this, SLOT(editChanged())); + connect(ui->spinBox_lineCount, SIGNAL(valueChanged(int)), this, SLOT(editChanged())); + + connect(ui->spinBox_length, SIGNAL(valueChanged(int)), this, SLOT(editChanged())); + connect(ui->comboBox_lenghtType, SIGNAL(activated(int)), this, SLOT(widthTypeChanged())); + + connect(ui->comboBox_alignment, SIGNAL(activated(int)), this, SLOT(editChanged())); + connect(ui->comboBox_position, SIGNAL(activated(int)), this, SLOT(positionChanged())); + + connect(ui->checkBox_customFontColor, SIGNAL(toggled(bool)), this, SLOT(editChanged())); + connect(ui->pushButton_customFontColor, SIGNAL(clicked(bool)), this, SLOT(pickFontColor())); + connect(ui->checkBox_customBgColor, SIGNAL(toggled(bool)), this, SLOT(editChanged())); + connect(ui->pushButton_customBgColor, SIGNAL(clicked(bool)), this, SLOT(pickBackgroundColor())); + connect(ui->checkBox_customBgImage, SIGNAL(toggled(bool)), this, SLOT(editChanged())); + connect(ui->lineEdit_customBgImage, SIGNAL(textChanged(QString)), this, SLOT(editChanged())); + connect(ui->pushButton_customBgImage, SIGNAL(clicked(bool)), this, SLOT(pickBackgroundImage())); + connect(ui->slider_opacity, SIGNAL(sliderReleased()), this, SLOT(editChanged())); +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::reset() +{ + ui->spinBox_panelSize->setValue(mOldPanelSize); + ui->spinBox_iconSize->setValue(mOldIconSize); + ui->spinBox_lineCount->setValue(mOldLineCount); + + ui->comboBox_position->setCurrentIndex(indexForPosition(mOldScreenNum, mOldPosition)); + + fillComboBox_alignment(); + ui->comboBox_alignment->setCurrentIndex(mOldAlignment + 1); + + ui->comboBox_lenghtType->setCurrentIndex(mOldLengthInPercents ? 0 : 1); + widthTypeChanged(); + ui->spinBox_length->setValue(mOldLength); + + mFontColor.setNamedColor(mOldFontColor.name()); + ui->pushButton_customFontColor->setStyleSheet(QString("background: %1").arg(mOldFontColor.name())); + mBackgroundColor.setNamedColor(mOldBackgroundColor.name()); + ui->pushButton_customBgColor->setStyleSheet(QString("background: %1").arg(mOldBackgroundColor.name())); + ui->lineEdit_customBgImage->setText(mOldBackgroundImage); + ui->slider_opacity->setValue(mOldOpacity); + + ui->checkBox_customFontColor->setChecked(mOldFontColor.isValid()); + ui->checkBox_customBgColor->setChecked(mOldBackgroundColor.isValid()); + ui->checkBox_customBgImage->setChecked(QFileInfo(mOldBackgroundImage).exists()); + + // update position + positionChanged(); +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::fillComboBox_position() +{ + int screenCount = QApplication::desktop()->screenCount(); + if (screenCount == 1) + { + addPosition(tr("Top of desktop"), 0, LxQtPanel::PositionTop); + addPosition(tr("Left of desktop"), 0, LxQtPanel::PositionLeft); + addPosition(tr("Right of desktop"), 0, LxQtPanel::PositionRight); + addPosition(tr("Bottom of desktop"), 0, LxQtPanel::PositionBottom); + } + else + { + for (int screenNum = 0; screenNum < screenCount; screenNum++) + { + if (screenNum) + ui->comboBox_position->insertSeparator(9999); + + addPosition(tr("Top of desktop %1").arg(screenNum +1), screenNum, LxQtPanel::PositionTop); + addPosition(tr("Left of desktop %1").arg(screenNum +1), screenNum, LxQtPanel::PositionLeft); + addPosition(tr("Right of desktop %1").arg(screenNum +1), screenNum, LxQtPanel::PositionRight); + addPosition(tr("Bottom of desktop %1").arg(screenNum +1), screenNum, LxQtPanel::PositionBottom); + } + } +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::fillComboBox_alignment() +{ + ui->comboBox_alignment->setItemData(0, QVariant(LxQtPanel::AlignmentLeft)); + ui->comboBox_alignment->setItemData(1, QVariant(LxQtPanel::AlignmentCenter)); + ui->comboBox_alignment->setItemData(2, QVariant(LxQtPanel::AlignmentRight)); + + + if (mPosition == ILxQtPanel::PositionTop || + mPosition == ILxQtPanel::PositionBottom) + { + ui->comboBox_alignment->setItemText(0, tr("Left")); + ui->comboBox_alignment->setItemText(1, tr("Center")); + ui->comboBox_alignment->setItemText(2, tr("Right")); + } + else + { + ui->comboBox_alignment->setItemText(0, tr("Top")); + ui->comboBox_alignment->setItemText(1, tr("Center")); + ui->comboBox_alignment->setItemText(2, tr("Bottom")); + }; +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::addPosition(const QString& name, int screen, LxQtPanel::Position position) +{ + if (LxQtPanel::canPlacedOn(screen, position)) + ui->comboBox_position->addItem(name, QVariant::fromValue((ScreenPosition){screen, position})); +} + + +/************************************************ + + ************************************************/ +int ConfigPanelWidget::indexForPosition(int screen, ILxQtPanel::Position position) +{ + for (int i = 0; i < ui->comboBox_position->count(); i++) + { + ScreenPosition sp = ui->comboBox_position->itemData(i).value(); + if (screen == sp.screen && position == sp.position) + return i; + } + return -1; +} + + +/************************************************ + + ************************************************/ +ConfigPanelWidget::~ConfigPanelWidget() +{ + delete ui; +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::editChanged() +{ + mPanel->setPanelSize(ui->spinBox_panelSize->value(), true); + mPanel->setIconSize(ui->spinBox_iconSize->value(), true); + mPanel->setLineCount(ui->spinBox_lineCount->value(), true); + + mPanel->setLength(ui->spinBox_length->value(), + ui->comboBox_lenghtType->currentIndex() == 0, + true); + + LxQtPanel::Alignment align = LxQtPanel::Alignment( + ui->comboBox_alignment->itemData( + ui->comboBox_alignment->currentIndex() + ).toInt()); + + mPanel->setAlignment(align, true); + mPanel->setPosition(mScreenNum, mPosition, true); + + mPanel->setFontColor(ui->checkBox_customFontColor->isChecked() ? mFontColor : QColor(), true); + if (ui->checkBox_customBgColor->isChecked()) + { + mPanel->setBackgroundColor(mBackgroundColor, true); + mPanel->setOpacity(ui->slider_opacity->value(), true); + } + else + { + mPanel->setBackgroundColor(QColor(), true); + mPanel->setOpacity(-1, true); + } + + QString image = ui->checkBox_customBgImage->isChecked() ? ui->lineEdit_customBgImage->text() : QString(); + mPanel->setBackgroundImage(image, true); +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::widthTypeChanged() +{ + int max = getMaxLength(); + + if (ui->comboBox_lenghtType->currentIndex() == 0) + { + // Percents ............................. + int v = ui->spinBox_length->value() * 100.0 / max; + ui->spinBox_length->setRange(1, 100); + ui->spinBox_length->setValue(v); + } + else + { + // Pixels ............................... + int v = max / 100.0 * ui->spinBox_length->value(); + ui->spinBox_length->setRange(-max, max); + ui->spinBox_length->setValue(v); + } +} + + +/************************************************ + + ************************************************/ +int ConfigPanelWidget::getMaxLength() +{ + QDesktopWidget* dw = QApplication::desktop(); + + if (mPosition == ILxQtPanel::PositionTop || + mPosition == ILxQtPanel::PositionBottom) + return dw->screenGeometry(mScreenNum).width(); + else + return dw->screenGeometry(mScreenNum).height(); +} + + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::positionChanged() +{ + ScreenPosition sp = ui->comboBox_position->itemData( + ui->comboBox_position->currentIndex()).value(); + + bool updateAlig = (sp.position == ILxQtPanel::PositionTop || + sp.position == ILxQtPanel::PositionBottom) != + (mPosition == ILxQtPanel::PositionTop || + mPosition == ILxQtPanel::PositionBottom); + + int oldMax = getMaxLength(); + mPosition = sp.position; + mScreenNum = sp.screen; + int newMax = getMaxLength(); + + if (ui->comboBox_lenghtType->currentIndex() == 1 && + oldMax != newMax) + { + // Pixels ............................... + int v = ui->spinBox_length->value() * 1.0 * newMax / oldMax; + ui->spinBox_length->setMaximum(newMax); + ui->spinBox_length->setValue(v); + } + + if (updateAlig) + fillComboBox_alignment(); + + editChanged(); +} + +/************************************************ + * + ************************************************/ +void ConfigPanelWidget::pickFontColor() +{ + QColor newColor = QColorDialog::getColor(QColor(mFontColor.name()), this, tr("Pick color")); + if (newColor.isValid()) + { + mFontColor.setNamedColor(newColor.name()); + ui->pushButton_customFontColor->setStyleSheet(QString("background: %1").arg(mFontColor.name())); + editChanged(); + } +} + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::pickBackgroundColor() +{ + QColor newColor = QColorDialog::getColor(QColor(mBackgroundColor.name()), this, tr("Pick color")); + if (newColor.isValid()) + { + mBackgroundColor.setNamedColor(newColor.name()); + ui->pushButton_customBgColor->setStyleSheet(QString("background: %1").arg(mBackgroundColor.name())); + editChanged(); + } +} + +/************************************************ + + ************************************************/ +void ConfigPanelWidget::pickBackgroundImage() +{ + QString picturesLocation; + picturesLocation = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); + + QString file = QFileDialog::getOpenFileName(this, + "Pick image", + picturesLocation, + tr("Images (*.png *.gif *.jpg)")); + ui->lineEdit_customBgImage->setText(file); +} diff --git a/panel/config/configpaneldialog.h b/panel/config/configpaneldialog.h new file mode 100644 index 0000000..605e005 --- /dev/null +++ b/panel/config/configpaneldialog.h @@ -0,0 +1,109 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Marat "Morion" Talipov + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef CONFIGPANELDIALOG_H +#define CONFIGPANELDIALOG_H + +#include "../lxqtpanel.h" +#include +#include +#include + + +class LxQtPanel; + +class ConfigPanelDialog : public LxQt::ConfigDialog +{ + Q_OBJECT +public: + static ConfigPanelDialog *exec(LxQtPanel *panel); + + ConfigPanelDialog(LxQtPanel *panel, QWidget *parent = 0); +}; + +namespace Ui { +class ConfigPanelWidget; +} + +class ConfigPanelWidget : public QWidget +{ + Q_OBJECT + +public: + explicit ConfigPanelWidget(LxQtPanel *panel, QWidget *parent = 0); + ~ConfigPanelWidget(); + + int screenNum() const { return mScreenNum; } + ILxQtPanel::Position position() const { return mPosition; } + + +signals: + void changed(); + +public slots: + void reset(); + +private slots: + void editChanged(); + void widthTypeChanged(); + void positionChanged(); + void pickFontColor(); + void pickBackgroundColor(); + void pickBackgroundImage(); + +private: + Ui::ConfigPanelWidget *ui; + LxQtPanel *mPanel; + int mScreenNum; + ILxQtPanel::Position mPosition; + + void addPosition(const QString& name, int screen, LxQtPanel::Position position); + void fillComboBox_position(); + void fillComboBox_alignment(); + int indexForPosition(int screen, ILxQtPanel::Position position); + int getMaxLength(); + + // new values + QColor mFontColor; + QColor mBackgroundColor; + + // For reset function + int mOldPanelSize; + int mOldIconSize; + int mOldLineCount; + int mOldLength; + bool mOldLengthInPercents; + LxQtPanel::Alignment mOldAlignment; + ILxQtPanel::Position mOldPosition; + int mOldScreenNum; + QColor mOldFontColor; + QColor mOldBackgroundColor; + QString mOldBackgroundImage; + int mOldOpacity; +}; + +#endif // CONFIGPANELDIALOG_H diff --git a/panel/config/configpaneldialog.ui b/panel/config/configpaneldialog.ui new file mode 100644 index 0000000..f72ca29 --- /dev/null +++ b/panel/config/configpaneldialog.ui @@ -0,0 +1,474 @@ + + + ConfigPanelWidget + + + + 0 + 0 + 365 + 462 + + + + + 0 + 0 + + + + Configure panel + + + + + + + 0 + 0 + + + + Size + + + false + + + + + + Size: + + + + + + + px + + + 24 + + + + + + + Icon size: + + + + + + + Length: + + + + + + + 1 + + + 20 + + + + + + + px + + + 10 + + + 128 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + 1 + + + 100 + + + + + + + + % + + + + + px + + + + + + + + + + + Rows count: + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 10 + 20 + + + + + + + + + + + + 0 + 0 + + + + Alignment && position + + + + + + 1 + + + + Left + + + + + Center + + + + + Right + + + + + + + + Alignment: + + + + + + + + + + Position: + + + + + + + + + + + 0 + 0 + + + + Styling + + + + + + Custom font color: + + + + + + + Custom background image: + + + + + + + false + + + + + + + Custom background color: + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 6 + + + 0 + + + + + false + + + Opacity + + + + + + + false + + + 100 + + + 5 + + + 100 + + + Qt::Horizontal + + + + + + + + + + + + + + + checkBox_customBgColor + toggled(bool) + pushButton_customBgColor + setEnabled(bool) + + + 144 + 332 + + + 350 + 350 + + + + + checkBox_customBgImage + toggled(bool) + lineEdit_customBgImage + setEnabled(bool) + + + 137 + 403 + + + 149 + 440 + + + + + checkBox_customBgImage + toggled(bool) + pushButton_customBgImage + setEnabled(bool) + + + 125 + 403 + + + 350 + 441 + + + + + checkBox_customFontColor + toggled(bool) + pushButton_customFontColor + setEnabled(bool) + + + 190 + 294 + + + 350 + 312 + + + + + checkBox_customBgColor + toggled(bool) + slider_opacity + setEnabled(bool) + + + 99 + 333 + + + 114 + 367 + + + + + checkBox_customBgColor + toggled(bool) + label_2 + setEnabled(bool) + + + 34 + 341 + + + 32 + 362 + + + + + diff --git a/panel/ilxqtpanel.h b/panel/ilxqtpanel.h new file mode 100644 index 0000000..39c3e07 --- /dev/null +++ b/panel/ilxqtpanel.h @@ -0,0 +1,78 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef ILXQTPANEL_H +#define ILXQTPANEL_H +#include +#include "lxqtpanelglobals.h" + +class ILxQtPanelPlugin; + +/** + **/ +class LXQT_PANEL_API ILxQtPanel +{ +public: + /** + Specifies the position of the panel on screen. + **/ + enum Position{ + PositionBottom, //! The bottom side of the screen. + PositionTop, //! The top side of the screen. + PositionLeft, //! The left side of the screen. + PositionRight //! The right side of the screen. + }; + + /** + This property holds position of the panel. + Possible values for this property are described by the Position enum + **/ + virtual Position position() const = 0; + + virtual int iconSize() const = 0; + virtual int lineCount() const = 0; + + /** + Helper functions for eazy direction checking. + Retuns true if panel on the top or bottom of the screen; otherwise returns false. + **/ + bool isHorizontal() const { return position() == PositionBottom || position() == PositionTop; } + + /** + Returns global screen coordinates of the panel. You no need to use mapToGlobal. + **/ + virtual QRect globalGometry() const = 0; + + /** + Helper functions for calculating global screen position of some popup window with windowSize size. + If you need to show some popup window, you can use it, to get global screen position for the new window. + **/ + virtual QRect calculatePopupWindowPos(const ILxQtPanelPlugin *plugin, const QSize &windowSize) const = 0; +}; + +#endif // ILXQTPANEL_H diff --git a/panel/ilxqtpanelplugin.h b/panel/ilxqtpanelplugin.h new file mode 100644 index 0000000..683d2a0 --- /dev/null +++ b/panel/ilxqtpanelplugin.h @@ -0,0 +1,230 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef ILXQTPANELPLUGIN_H +#define ILXQTPANELPLUGIN_H + +#include +#include // For XEvent +#include +#include +#include "ilxqtpanel.h" +#include "lxqtpanelglobals.h" + +/** +LxQt panel plugins are standalone sharedlibraries +(*.so) located in PLUGIN_DIR (define provided by CMakeLists.txt). + +Plugin for the panel is a library written on C++. One more necessary thing +is a .desktop file describing this plugin. The same may be additional files, +like translations. Themselves plugins will be installed to +/usr/local/lib/lxqt-panel or /usr/lib/lxqt-panel (dependent on cmake option +-DCMAKE_INSTALL_PREFIX). Desktop files are installed to +/usr/local/share/lxqt/lxqt-panel, translations to +/usr/local/share/lxqt/lxqt-panel/PLUGIN_NAME. +**/ + +class QDialog; + +struct LXQT_PANEL_API ILxQtPanelPluginStartupInfo +{ + ILxQtPanel *lxqtPanel; + QSettings *settings; + const LxQt::PluginInfo *desktopFile; +}; + + +/** \brief Base abstract class for LxQt panel widgets/plugins. +All plugins *must* be inherited from this one. + +This class provides some basic API and inherited/implemented +plugins GUIs will be responsible on the functionality itself. + +See +How to write the panel plugin for more information about how to make your plugins. +**/ + +class LXQT_PANEL_API ILxQtPanelPlugin +{ +public: + /** + This enum describes the properties of an plugin. + **/ + enum Flag { + NoFlags = 0, ///< It does not have any properties set. + PreferRightAlignment = 1, /**< The plugin is prefer right alignment (for example the clock plugin); + otherwise plugin prefer left (like main menu). + This flag is used only at the first start, later positions of all + plugins saved in a config, and this saved information is used. */ + HaveConfigDialog = 2 ///< The plugin have a configuration dialog. + }; + + Q_DECLARE_FLAGS(Flags, Flag) + + /** + This enum describes the reason the plugin was activated. + **/ + enum ActivationReason { + Unknown = 0, ///< Unknown reason + DoubleClick = 2, ///< The plugin entry was double clicked + Trigger = 3, ///< The plugin was clicked + MiddleClick = 4 ///< The plugin was clicked with the middle mouse button + }; + + /** + Constructs a ILxQtPanelPlugin object with the given startupInfo. You do not have to worry + about the startupInfo parameters, ILxQtPanelPlugin process the parameters yourself. + **/ + ILxQtPanelPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + mSettings(startupInfo.settings), + mPanel(startupInfo.lxqtPanel), + mDesktopFile(startupInfo.desktopFile) + {} + + /** + Destroys the object. + **/ + virtual ~ILxQtPanelPlugin() {} + + /** + Returns the plugin flags. + The base class implementation returns a NoFlags. + **/ + virtual Flags flags() const { return NoFlags; } + + /** + Returns the string that is used in the theme QSS file. + If you retuns "WorldClock" string, theme author may write something like `#WorldClock { border: 1px solid red; }` + to set custom border for the your plugin. + **/ + virtual QString themeId() const = 0; + + /** + From users point of view plugin is a some visual widget on the panel. This function retuns pointer to it. + This method called only once, so you are free to return pointer on class member, or create widget on the fly. + **/ + virtual QWidget *widget() = 0; + + /** + Returns the plugin settings dialog. Reimplement this function if your plugin has it. + The panel does not take ownership of the dialog, it would probably a good idea to set Qt::WA_DeleteOnClose + attribute for the dialog. + The default implementation returns 0, no dialog; + + Note that the flags method has to return HaveConfigDialog flag. + To save the settings you should use a ready-to-use ILxQtPanelPlugin::settings() object. + + **/ + virtual QDialog *configureDialog() { return 0; } + + /** + This function is called when values are changed in the plugin settings. + Reimplement this function to your plugin corresponded the new settings. + + The default implementation do nothing. + **/ + virtual void settingsChanged() {} + + /** + This function is called when the user activates the plugin. reason specifies the reason for activation. + ILxQtPanelPlugin::ActivationReason enumerates the various reasons. + + The default implementation do nothing. + **/ + virtual void activated(ActivationReason reason) {} + + /** + This function is called when the panel geometry or lines count are changed. + + The default implementation do nothing. + + **/ + virtual void realign() {} + + /** + Returns the panel object. + **/ + ILxQtPanel *panel() const { return mPanel; } + + + QSettings *settings() const { return mSettings; } + const LxQt::PluginInfo *desktopFile() const { return mDesktopFile; } + + /** + Helper functions for calculating global screen position of some popup window with windowSize size. + If you need to show some popup window, you can use it, to get global screen position for the new window. + **/ + virtual QRect calculatePopupWindowPos(const QSize &windowSize) + { + return mPanel->calculatePopupWindowPos(this, windowSize); + } + + + virtual bool isSeparate() const { return false; } + virtual bool isExpandable() const { return false; } +private: + QSettings *mSettings; + ILxQtPanel *mPanel; + const LxQt::PluginInfo *mDesktopFile; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(ILxQtPanelPlugin::Flags) + +/** +Every plugin must has the loader. You shoul only reimplement instance() method, and return your plugin. +Example: +@code +class LxQtClockPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) { return new LxQtClock(startupInfo);} +}; +@endcode +**/ +class LXQT_PANEL_API ILxQtPanelPluginLibrary +{ +public: + /** + Destroys the ILxQtPanelPluginLibrary object. + **/ + virtual ~ILxQtPanelPluginLibrary() {} + + /** + Returns the root component object of the plugin. When the library is finally unloaded, the root component will automatically be deleted. + **/ + virtual ILxQtPanelPlugin* instance(const ILxQtPanelPluginStartupInfo &startupInfo) = 0; +}; + + +Q_DECLARE_INTERFACE(ILxQtPanelPluginLibrary, + "lxde-qt.org/Panel/PluginInterface/3.0") + +#endif // ILXQTPANELPLUGIN_H diff --git a/panel/lxqtpanel.cpp b/panel/lxqtpanel.cpp new file mode 100644 index 0000000..9115d12 --- /dev/null +++ b/panel/lxqtpanel.cpp @@ -0,0 +1,1130 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtpanel.h" +#include "lxqtpanellimits.h" +#include "ilxqtpanelplugin.h" +#include "lxqtpanelapplication.h" +#include "lxqtpanellayout.h" +#include "config/configpaneldialog.h" +#include "popupmenu.h" +#include "plugin.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +// Config keys and groups +#define CFG_KEY_SCREENNUM "desktop" +#define CFG_KEY_POSITION "position" +#define CFG_KEY_PANELSIZE "panelSize" +#define CFG_KEY_ICONSIZE "iconSize" +#define CFG_KEY_LINECNT "lineCount" +#define CFG_KEY_LENGTH "width" +#define CFG_KEY_PERCENT "width-percent" +#define CFG_KEY_ALIGNMENT "alignment" +#define CFG_KEY_FONTCOLOR "font-color" +#define CFG_KEY_BACKGROUNDCOLOR "background-color" +#define CFG_KEY_BACKGROUNDIMAGE "background-image" +#define CFG_KEY_OPACITY "opacity" +#define CFG_KEY_PLUGINS "plugins" + +/************************************************ + Returns the Position by the string. + String is one of "Top", "Left", "Bottom", "Right", string is not case sensitive. + If the string is not correct, returns defaultValue. + ************************************************/ +ILxQtPanel::Position LxQtPanel::strToPosition(const QString& str, ILxQtPanel::Position defaultValue) +{ + if (str.toUpper() == "TOP") return LxQtPanel::PositionTop; + if (str.toUpper() == "LEFT") return LxQtPanel::PositionLeft; + if (str.toUpper() == "RIGHT") return LxQtPanel::PositionRight; + if (str.toUpper() == "BOTTOM") return LxQtPanel::PositionBottom; + return defaultValue; +} + + +/************************************************ + Return string representation of the position + ************************************************/ +QString LxQtPanel::positionToStr(ILxQtPanel::Position position) +{ + switch (position) + { + case LxQtPanel::PositionTop: + return QString("Top"); + case LxQtPanel::PositionLeft: + return QString("Left"); + case LxQtPanel::PositionRight: + return QString("Right"); + case LxQtPanel::PositionBottom: + return QString("Bottom"); + } + + return QString(); +} + + +/************************************************ + + ************************************************/ +LxQtPanel::LxQtPanel(const QString &configGroup, QWidget *parent) : + QFrame(parent), + mConfigGroup(configGroup), + mPanelSize(0), + mIconSize(0), + mLineCount(0), + mLength(0), + mAlignment(AlignmentLeft), + mPosition(ILxQtPanel::PositionBottom) +{ + Qt::WindowFlags flags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; + + // NOTE: by PCMan: + // In Qt 4, the window is not activated if it has Qt::WA_X11NetWmWindowTypeDock. + // Since Qt 5, the default behaviour is changed. A window is always activated on mouse click. + // Please see the source code of Qt5: src/plugins/platforms/xcb/qxcbwindow.cpp. + // void QXcbWindow::handleButtonPressEvent(const xcb_button_press_event_t *event) + // This new behaviour caused lxqt bug #161 - Cannot minimize windows from panel 1 when two task managers are open + // Besides, this breaks minimizing or restoring windows when clicking on the taskbar buttons. + // To workaround this regression bug, we need to add this window flag here. + // However, since the panel gets no keyboard focus, this may decrease accessibility since + // it's not possible to use the panel with keyboards. We need to find a better solution later. + flags |= Qt::WindowDoesNotAcceptFocus; + + setWindowFlags(flags); + setAttribute(Qt::WA_X11NetWmWindowTypeDock); + setAttribute(Qt::WA_AlwaysShowToolTips); + setAttribute(Qt::WA_TranslucentBackground); + + setWindowTitle("LxQt Panel"); + setObjectName(QString("LxQtPanel %1").arg(configGroup)); + + LxQtPanelWidget = new QFrame(this); + LxQtPanelWidget->setObjectName("BackgroundWidget"); + QGridLayout* lav = new QGridLayout(); + lav->setContentsMargins(QMargins(0,0,0,0)); + setLayout(lav); + this->layout()->addWidget(LxQtPanelWidget); + + mLayout = new LxQtPanelLayout(LxQtPanelWidget); + connect(mLayout, SIGNAL(pluginMoved()), this, SLOT(pluginMoved())); + LxQtPanelWidget->setLayout(mLayout); + mLayout->setLineCount(mLineCount); + + mDelaySave.setSingleShot(true); + mDelaySave.setInterval(SETTINGS_SAVE_DELAY); + connect(&mDelaySave, SIGNAL(timeout()), this, SLOT(saveSettings())); + + connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(realign())); + connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(ensureVisible())); + connect(LxQt::Settings::globalSettings(), SIGNAL(settingsChanged()), this, SLOT(update())); + connect(lxqtApp, SIGNAL(themeChanged()), this, SLOT(realign())); + + LxQtPanelApplication *app = reinterpret_cast(qApp); + mSettings = app->settings(); + readSettings(); + // the old position might be on a visible screen + ensureVisible(); + loadPlugins(); + + show(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::readSettings() +{ + // Read settings ...................................... + mSettings->beginGroup(mConfigGroup); + + // By default we are using size & count from theme. + setPanelSize(mSettings->value(CFG_KEY_PANELSIZE, PANEL_DEFAULT_SIZE).toInt(), false); + setIconSize(mSettings->value(CFG_KEY_ICONSIZE, PANEL_DEFAULT_ICON_SIZE).toInt(), false); + setLineCount(mSettings->value(CFG_KEY_LINECNT, PANEL_DEFAULT_LINE_COUNT).toInt(), false); + + setLength(mSettings->value(CFG_KEY_LENGTH, 100).toInt(), + mSettings->value(CFG_KEY_PERCENT, true).toBool(), + false); + + setPosition(mSettings->value(CFG_KEY_SCREENNUM, QApplication::desktop()->primaryScreen()).toInt(), + strToPosition(mSettings->value(CFG_KEY_POSITION).toString(), PositionBottom), + false); + + setAlignment(Alignment(mSettings->value(CFG_KEY_ALIGNMENT, mAlignment).toInt()), false); + + QColor color = mSettings->value(CFG_KEY_FONTCOLOR, "").value(); + if (color.isValid()) + setFontColor(color, true); + + setOpacity(mSettings->value(CFG_KEY_OPACITY, 100).toInt(), true); + color = mSettings->value(CFG_KEY_BACKGROUNDCOLOR, "").value(); + if (color.isValid()) + setBackgroundColor(color, true); + + QString image = mSettings->value(CFG_KEY_BACKGROUNDIMAGE, "").toString(); + if (!image.isEmpty()) + setBackgroundImage(image, false); + + + mSettings->endGroup(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::saveSettings(bool later) +{ + mDelaySave.stop(); + if (later) + { + mDelaySave.start(); + return; + } + + QStringList pluginsList; + + mSettings->beginGroup(mConfigGroup); + + foreach (const Plugin *plugin, mPlugins) + pluginsList << plugin->settingsGroup(); + + mSettings->setValue(CFG_KEY_PLUGINS, (pluginsList.isEmpty() ? "" : QVariant(pluginsList))); + + mSettings->setValue(CFG_KEY_PANELSIZE, mPanelSize); + mSettings->setValue(CFG_KEY_ICONSIZE, mIconSize); + mSettings->setValue(CFG_KEY_LINECNT, mLineCount); + + mSettings->setValue(CFG_KEY_LENGTH, mLength); + mSettings->setValue(CFG_KEY_PERCENT, mLengthInPercents); + + mSettings->setValue(CFG_KEY_SCREENNUM, mScreenNum); + mSettings->setValue(CFG_KEY_POSITION, positionToStr(mPosition)); + + mSettings->setValue(CFG_KEY_ALIGNMENT, mAlignment); + + mSettings->setValue(CFG_KEY_FONTCOLOR, mFontColor.isValid() ? mFontColor : QColor()); + mSettings->setValue(CFG_KEY_BACKGROUNDCOLOR, mBackgroundColor.isValid() ? mBackgroundColor : QColor()); + mSettings->setValue(CFG_KEY_BACKGROUNDIMAGE, QFileInfo(mBackgroundImage).exists() ? mBackgroundImage : QString()); + mSettings->setValue(CFG_KEY_OPACITY, mOpacity); + + mSettings->endGroup(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::ensureVisible() +{ + if (!canPlacedOn(mScreenNum, mPosition)) + setPosition(findAvailableScreen(mPosition), mPosition, true); + + // the screen size might be changed, let's update the reserved screen space. + updateWmStrut(); +} + + +/************************************************ + + ************************************************/ +LxQtPanel::~LxQtPanel() +{ + mLayout->setEnabled(false); + // do not save settings because of "user deleted panel" functionality saveSettings(); + qDeleteAll(mPlugins); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::show() +{ + QWidget::show(); + KWindowSystem::setOnDesktop(effectiveWinId(), NET::OnAllDesktops); +} + + +/************************************************ + + ************************************************/ +QStringList pluginDesktopDirs() +{ + QStringList dirs; + dirs << QString(getenv("LXQT_PANEL_PLUGINS_DIR")).split(':', QString::SkipEmptyParts); + dirs << QString("%1/%2").arg(XdgDirs::dataHome(), "/lxqt/lxqt-panel"); + dirs << PLUGIN_DESKTOPS_DIR; + return dirs; +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::loadPlugins() +{ + QStringList desktopDirs = pluginDesktopDirs(); + mSettings->beginGroup(mConfigGroup); + QStringList sections = mSettings->value(CFG_KEY_PLUGINS).toStringList(); + mSettings->endGroup(); + + foreach (QString sect, sections) + { + QString type = mSettings->value(sect+"/type").toString(); + if (type.isEmpty()) + { + qWarning() << QString("Section \"%1\" not found in %2.").arg(sect, mSettings->fileName()); + continue; + } + + LxQt::PluginInfoList list = LxQt::PluginInfo::search(desktopDirs, "LxQtPanel/Plugin", QString("%1.desktop").arg(type)); + if( !list.count()) + { + qWarning() << QString("Plugin \"%1\" not found.").arg(type); + continue; + } + + loadPlugin(list.first(), sect); + } +} + + +/************************************************ + + ************************************************/ +Plugin *LxQtPanel::loadPlugin(const LxQt::PluginInfo &desktopFile, const QString &settingsGroup) +{ + Plugin *plugin = new Plugin(desktopFile, mSettings->fileName(), settingsGroup, this); + if (plugin->isLoaded()) + { + mPlugins.append(plugin); + connect(plugin, SIGNAL(startMove()), mLayout, SLOT(startMovePlugin())); + connect(plugin, SIGNAL(remove()), this, SLOT(removePlugin())); + connect(this, SIGNAL(realigned()), plugin, SLOT(realign())); + mLayout->addWidget(plugin); + return plugin; + } + + delete plugin; + return 0; +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::realign() +{ + if (!isVisible()) + return; +#if 0 + qDebug() << "** Realign *********************"; + qDebug() << "PanelSize: " << mPanelSize; + qDebug() << "IconSize: " << mIconSize; + qDebug() << "LineCount: " << mLineCount; + qDebug() << "Length: " << mLength << (mLengthInPercents ? "%" : "px"); + qDebug() << "Alignment: " << (mAlignment == 0 ? "center" : (mAlignment < 0 ? "left" : "right")); + qDebug() << "Position: " << positionToStr(mPosition) << "on" << mScreenNum; + qDebug() << "Plugins count: " << mPlugins.count(); +#endif + + const QRect currentScreen = QApplication::desktop()->screenGeometry(mScreenNum); + QSize size = sizeHint(); + QRect rect; + + if (isHorizontal()) + { + // Horiz panel *************************** + size.setHeight(mPanelSize); + + // Size ....................... + rect.setHeight(qMax(PANEL_MINIMUM_SIZE, size.height())); + if (mLengthInPercents) + rect.setWidth(currentScreen.width() * mLength / 100.0); + else + { + if (mLength <= 0) + rect.setWidth(currentScreen.width() + mLength); + else + rect.setWidth(mLength); + } + + rect.setWidth(qMax(rect.size().width(), mLayout->minimumSize().width())); + + // Horiz ...................... + switch (mAlignment) + { + case LxQtPanel::AlignmentLeft: + rect.moveLeft(currentScreen.left()); + break; + + case LxQtPanel::AlignmentCenter: + rect.moveCenter(currentScreen.center()); + break; + + case LxQtPanel::AlignmentRight: + rect.moveRight(currentScreen.right()); + break; + } + + // Vert ....................... + if (mPosition == ILxQtPanel::PositionTop) + rect.moveTop(currentScreen.top()); + else + rect.moveBottom(currentScreen.bottom()); + } + else + { + // Vert panel *************************** + size.setWidth(mPanelSize); + + // Size ....................... + rect.setWidth(qMax(PANEL_MINIMUM_SIZE, size.width())); + if (mLengthInPercents) + rect.setHeight(currentScreen.height() * mLength / 100.0); + else + { + if (mLength <= 0) + rect.setHeight(currentScreen.height() + mLength); + else + rect.setHeight(mLength); + } + + rect.setHeight(qMax(rect.size().height(), mLayout->minimumSize().height())); + + // Vert ....................... + switch (mAlignment) + { + case LxQtPanel::AlignmentLeft: + rect.moveTop(currentScreen.top()); + break; + + case LxQtPanel::AlignmentCenter: + rect.moveCenter(currentScreen.center()); + break; + + case LxQtPanel::AlignmentRight: + rect.moveBottom(currentScreen.bottom()); + break; + } + + // Horiz ...................... + if (mPosition == ILxQtPanel::PositionLeft) + rect.moveLeft(currentScreen.left()); + else + rect.moveRight(currentScreen.right()); + } + if (rect != geometry()) + { + setGeometry(rect); + setFixedSize(rect.size()); + } + // Reserve our space on the screen .......... + // It's possible that our geometry is not changed, but screen resolution is changed, + // so resetting WM_STRUT is still needed. To make it simple, we always do it. + updateWmStrut(); +} + + +// Update the _NET_WM_PARTIAL_STRUT and _NET_WM_STRUT properties for the window +void LxQtPanel::updateWmStrut() +{ + WId wid = effectiveWinId(); + if(wid == 0 || !isVisible()) + return; + + const QRect wholeScreen = QApplication::desktop()->geometry(); + // qDebug() << "wholeScreen" << wholeScreen; + const QRect rect = geometry(); + // NOTE: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html + // Quote from the EWMH spec: " Note that the strut is relative to the screen edge, and not the edge of the xinerama monitor." + // So, we use the geometry of the whole screen to calculate the strut rather than using the geometry of individual monitors. + // Though the spec only mention Xinerama and did not mention XRandR, the rule should still be applied. + // At least openbox is implemented like this. + switch (mPosition) + { + case LxQtPanel::PositionTop: + KWindowSystem::setExtendedStrut(wid, + /* Left */ 0, 0, 0, + /* Right */ 0, 0, 0, + /* Top */ height(), rect.left(), rect.right(), + /* Bottom */ 0, 0, 0 + ); + break; + + case LxQtPanel::PositionBottom: + KWindowSystem::setExtendedStrut(wid, + /* Left */ 0, 0, 0, + /* Right */ 0, 0, 0, + /* Top */ 0, 0, 0, + /* Bottom */ wholeScreen.bottom() - rect.y(), rect.left(), rect.right() + ); + break; + + case LxQtPanel::PositionLeft: + KWindowSystem::setExtendedStrut(wid, + /* Left */ width(), rect.top(), rect.bottom(), + /* Right */ 0, 0, 0, + /* Top */ 0, 0, 0, + /* Bottom */ 0, 0, 0 + ); + + break; + + case LxQtPanel::PositionRight: + KWindowSystem::setExtendedStrut(wid, + /* Left */ 0, 0, 0, + /* Right */ wholeScreen.right() - rect.x(), rect.top(), rect.bottom(), + /* Top */ 0, 0, 0, + /* Bottom */ 0, 0, 0 + ); + break; + } +} + + +/************************************************ + The panel can't be placed on boundary of two displays. + This function checks, is the panel can be placed on the display + @displayNum on @position. + ************************************************/ +bool LxQtPanel::canPlacedOn(int screenNum, LxQtPanel::Position position) +{ + QDesktopWidget* dw = QApplication::desktop(); + + switch (position) + { + case LxQtPanel::PositionTop: + for (int i = 0; i < dw->screenCount(); ++i) + if (dw->screenGeometry(i).bottom() < dw->screenGeometry(screenNum).top()) + return false; + return true; + + case LxQtPanel::PositionBottom: + for (int i = 0; i < dw->screenCount(); ++i) + if (dw->screenGeometry(i).top() > dw->screenGeometry(screenNum).bottom()) + return false; + return true; + + case LxQtPanel::PositionLeft: + for (int i = 0; i < dw->screenCount(); ++i) + if (dw->screenGeometry(i).right() < dw->screenGeometry(screenNum).left()) + return false; + return true; + + case LxQtPanel::PositionRight: + for (int i = 0; i < dw->screenCount(); ++i) + if (dw->screenGeometry(i).left() > dw->screenGeometry(screenNum).right()) + return false; + return true; + } + + return false; +} + + +/************************************************ + + ************************************************/ +int LxQtPanel::findAvailableScreen(LxQtPanel::Position position) +{ + int current = mScreenNum; + + for (int i = current; i < QApplication::desktop()->screenCount(); ++i) + if (canPlacedOn(i, position)) + return i; + + for (int i = 0; i < current; ++i) + if (canPlacedOn(i, position)) + return i; + + return 0; +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::showConfigDialog() +{ + ConfigPanelDialog::exec(this); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::showAddPluginDialog() +{ + LxQt::AddPluginDialog *dialog = findChild(); + + if (!dialog) + { + dialog = new LxQt::AddPluginDialog(pluginDesktopDirs(), "LxQtPanel/Plugin", "*", this); + dialog->setWindowTitle(tr("Add Panel Widgets")); + dialog->setAttribute(Qt::WA_DeleteOnClose); + connect(dialog, SIGNAL(pluginSelected(const LxQt::PluginInfo&)), this, SLOT(addPlugin(const LxQt::PluginInfo&))); + connect(this, SIGNAL(pluginAdded(QString)), dialog, SLOT(pluginAdded(const QString &))); + connect(this, SIGNAL(pluginRemoved(QString)), dialog, SLOT(pluginRemoved(const QString &))); + } + + QStringList pluginsInUseIDs; + foreach (Plugin *i, mPlugins) + pluginsInUseIDs << i->desktopFile().id(); + dialog->setPluginsInUse(pluginsInUseIDs); + + dialog->show(); + KWindowSystem::setOnDesktop(dialog->effectiveWinId(), KWindowSystem::currentDesktop()); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::addPlugin(const LxQt::PluginInfo &desktopFile) +{ + QString settingsGroup = findNewPluginSettingsGroup(desktopFile.id()); + loadPlugin(desktopFile, settingsGroup); + saveSettings(true); + + realign(); + emit realigned(); + + emit pluginAdded(desktopFile.id()); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::updateStyleSheet() +{ + QStringList sheet; + sheet << QString("Plugin > * { qproperty-iconSize: %1px %1px; }").arg(mIconSize); + sheet << QString("Plugin > * > * { qproperty-iconSize: %1px %1px; }").arg(mIconSize); + + if (mFontColor.isValid()) + sheet << QString("Plugin * { color: " + mFontColor.name() + "; }"); + + QString object = LxQtPanelWidget->objectName(); + + if (mBackgroundColor.isValid()) + { + QString color = QString("%1, %2, %3, %4") + .arg(mBackgroundColor.red()) + .arg(mBackgroundColor.green()) + .arg(mBackgroundColor.blue()) + .arg((float) mOpacity / 100); + sheet << QString("LxQtPanel #BackgroundWidget { background-color: rgba(" + color + "); }"); + } + + if (QFileInfo(mBackgroundImage).exists()) + sheet << QString("LxQtPanel #BackgroundWidget { background-image: url('" + mBackgroundImage + "');}"); + + setStyleSheet(sheet.join("\n")); +} + + + +/************************************************ + + ************************************************/ +void LxQtPanel::setPanelSize(int value, bool save) +{ + if (mPanelSize != value) + { + mPanelSize = value; + realign(); + emit realigned(); + + if (save) + saveSettings(true); + } +} + + + +/************************************************ + + ************************************************/ +void LxQtPanel::setIconSize(int value, bool save) +{ + if (mIconSize != value) + { + mIconSize = value; + updateStyleSheet(); + mLayout->setLineSize(mIconSize); + + if (save) + saveSettings(true); + + realign(); + emit realigned(); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::setLineCount(int value, bool save) +{ + if (mLineCount != value) + { + mLineCount = value; + mLayout->setEnabled(false); + mLayout->setLineCount(mLineCount); + mLayout->setEnabled(true); + + if (save) + saveSettings(true); + + realign(); + emit realigned(); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::setLength(int length, bool inPercents, bool save) +{ + if (mLength == length && + mLengthInPercents == inPercents) + return; + + mLength = length; + mLengthInPercents = inPercents; + + if (save) + saveSettings(true); + + realign(); + emit realigned(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::setPosition(int screen, ILxQtPanel::Position position, bool save) +{ + if (mScreenNum == screen && + mPosition == position) + return; + + mScreenNum = screen; + mPosition = position; + mLayout->setPosition(mPosition); + + if (save) + saveSettings(true); + + // Qt 5 adds a new class QScreen and add API for setting the screen of a QWindow. + // so we had better use it. However, without this, our program should still work + // as long as XRandR is used. Since XRandR combined all screens into a large virtual desktop + // every screen and their virtual siblings are actually on the same virtual desktop. + // So things still work if we don't set the screen correctly, but this is not the case + // for other backends, such as the upcoming wayland support. Hence it's better to set it. + if(windowHandle()) + { + // QScreen* newScreen = qApp->screens().at(screen); + // QScreen* oldScreen = windowHandle()->screen(); + // const bool shouldRecreate = windowHandle()->handle() && !(oldScreen && oldScreen->virtualSiblings().contains(newScreen)); + // Q_ASSERT(shouldRecreate == false); + + // NOTE: When you move a window to another screen, Qt 5 might recreate the window as needed + // But luckily, this never happen in XRandR, so Qt bug #40681 is not triggered here. + // (The only exception is when the old screen is destroyed, Qt always re-create the window and + // this corner case triggers #40681.) + // When using other kind of multihead settings, such as Xinerama, this might be different and + // unless Qt developers can fix their bug, we have no way to workaround that. + windowHandle()->setScreen(qApp->screens().at(screen)); + } + + realign(); + emit realigned(); +} + +/************************************************ + * + ************************************************/ +void LxQtPanel::setAlignment(Alignment value, bool save) +{ + if (mAlignment == value) + return; + + mAlignment = value; + + if (save) + saveSettings(true); + + realign(); + emit realigned(); +} + +/************************************************ + * + ************************************************/ +void LxQtPanel::setFontColor(QColor color, bool save) +{ + mFontColor = color; + updateStyleSheet(); + + if (save) + saveSettings(true); +} + +/************************************************ + + ************************************************/ +void LxQtPanel::setBackgroundColor(QColor color, bool save) +{ + mBackgroundColor = color; + updateStyleSheet(); + + if (save) + saveSettings(true); +} + +/************************************************ + + ************************************************/ +void LxQtPanel::setBackgroundImage(QString path, bool save) +{ + mBackgroundImage = path; + updateStyleSheet(); + + if (save) + saveSettings(true); +} + + +/************************************************ + * + ************************************************/ +void LxQtPanel::setOpacity(int opacity, bool save) +{ + mOpacity = opacity; + updateStyleSheet(); + + if (save) + saveSettings(true); +} + + +/************************************************ + + ************************************************/ +QRect LxQtPanel::globalGometry() const +{ + return QRect(mapToGlobal(QPoint(0, 0)), this->size()); +} + + +/************************************************ + + ************************************************/ +bool LxQtPanel::event(QEvent *event) +{ + switch (event->type()) + { + case QEvent::ContextMenu: + showPopupMenu(); + break; + + case QEvent::LayoutRequest: + realign(); + emit realigned(); + break; + + case QEvent::WinIdChange: + { + // qDebug() << "WinIdChange" << hex << effectiveWinId(); + if(effectiveWinId() == 0) + break; + + // Sometimes Qt needs to re-create the underlying window of the widget and + // the winId() may be changed at runtime. So we need to reset all X11 properties + // when this happens. + qDebug() << "WinIdChange" << hex << effectiveWinId() << "handle" << windowHandle() << windowHandle()->screen(); + + // Qt::WA_X11NetWmWindowTypeDock becomes ineffective in Qt 5 + // See QTBUG-39887: https://bugreports.qt-project.org/browse/QTBUG-39887 + // Let's do it manually + NETWinInfo info(QX11Info::connection(), effectiveWinId(), QX11Info::appRootWindow(), NET::WMWindowType, 0); + info.setWindowType(NET::Dock); + + updateWmStrut(); // reserve screen space for the panel + KWindowSystem::setOnAllDesktops(effectiveWinId(), true); + break; + } + default: + break; + } + + return QFrame::event(event); +} + +/************************************************ + + ************************************************/ + +void LxQtPanel::showEvent(QShowEvent *event) +{ + QFrame::showEvent(event); + realign(); + emit realigned(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::showPopupMenu(Plugin *plugin) +{ + QList pluginsMenus; + PopupMenu menu(tr("Panel")); + + menu.setIcon(XdgIcon::fromTheme("configure-toolbars")); + + // Plugin Menu .............................. + if (plugin) + { + QMenu *m = plugin->popupMenu(); + + if (m) + { + menu.addTitle(plugin->windowTitle()); + menu.addActions(m->actions()); + pluginsMenus << m; + } + } + + // Panel menu ............................... + + menu.addTitle(QIcon(), tr("Panel")); + + menu.addAction(XdgIcon::fromTheme(QStringLiteral("configure")), + tr("Configure Panel..."), + this, SLOT(showConfigDialog()) + ); + + menu.addAction(XdgIcon::fromTheme("preferences-plugin"), + tr("Add Panel Widgets..."), + this, SLOT(showAddPluginDialog()) + ); + + LxQtPanelApplication *a = reinterpret_cast(qApp); + menu.addAction(XdgIcon::fromTheme(QLatin1String("list-add")), + tr("Add Panel"), + a, SLOT(addNewPanel()) + ); + + if (a->count() > 1) + { + menu.addAction(XdgIcon::fromTheme(QStringLiteral("list-remove")), + tr("Remove Panel"), + this, SLOT(userRequestForDeletion()) + ); + } + +#ifdef DEBUG + menu.addSeparator(); + menu.addAction("Exit (debug only)", qApp, SLOT(quit())); +#endif + + menu.exec(QCursor::pos()); + qDeleteAll(pluginsMenus); +} + + +/************************************************ + + ************************************************/ +Plugin *LxQtPanel::findPlugin(const ILxQtPanelPlugin *iPlugin) const +{ + foreach(Plugin *plugin, mPlugins) + { + if (plugin->iPlugin() == iPlugin) + return plugin; + } + + return 0; +} + + +/************************************************ + + ************************************************/ +QRect LxQtPanel::calculatePopupWindowPos(const ILxQtPanelPlugin *plugin, const QSize &windowSize) const +{ + Plugin *panelPlugin = findPlugin(plugin); + if (!plugin) + return QRect(); + + int x=0, y=0; + + switch (position()) + { + case ILxQtPanel::PositionTop: + x = panelPlugin->mapToGlobal(QPoint(0, 0)).x(); + y = globalGometry().bottom(); + break; + + case ILxQtPanel::PositionBottom: + x = panelPlugin->mapToGlobal(QPoint(0, 0)).x(); + y = globalGometry().top() - windowSize.height(); + break; + + case ILxQtPanel::PositionLeft: + x = globalGometry().right(); + y = panelPlugin->mapToGlobal(QPoint(0, 0)).y(); + break; + + case ILxQtPanel::PositionRight: + x = globalGometry().left() - windowSize.width(); + y = panelPlugin->mapToGlobal(QPoint(0, 0)).y(); + break; + } + + QRect res(QPoint(x, y), windowSize); + + QRect screen = QApplication::desktop()->screenGeometry(this); + // NOTE: We cannot use AvailableGeometry() which returns the work area here because when in a + // multihead setup with different resolutions. In this case, the size of the work area is limited + // by the smallest monitor and may be much smaller than the current screen and we will place the + // menu at the wrong place. This is very bad for UX. So let's use the full size of the screen. + if (res.right() > screen.right()) + res.moveRight(screen.right()); + + if (res.bottom() > screen.bottom()) + res.moveBottom(screen.bottom()); + + if (res.left() < screen.left()) + res.moveLeft(screen.left()); + + if (res.top() < screen.top()) + res.moveTop(screen.top()); + + return res; +} + + +/************************************************ + + ************************************************/ +QString LxQtPanel::qssPosition() const +{ + return positionToStr(position()); +} + + +/************************************************ + + ************************************************/ +QString LxQtPanel::findNewPluginSettingsGroup(const QString &pluginType) const +{ + QStringList groups = mSettings->childGroups(); + groups.sort(); + + // Generate new section name + for (int i = 2; true; ++i) + if (!groups.contains(QString("%1%2").arg(pluginType).arg(i))) + return QString("%1%2").arg(pluginType).arg(i); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::removePlugin() +{ + Plugin *plugin = qobject_cast(sender()); + QString id; + if (plugin) + { + mSettings->remove(plugin->settingsGroup()); + id = mPlugins.takeAt(mPlugins.indexOf(plugin))->desktopFile().id(); + } + + saveSettings(); + emit pluginRemoved(id); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::pluginMoved() +{ + mPlugins.clear(); + for (int i=0; icount(); ++i) + { + Plugin *plugin = qobject_cast(mLayout->itemAt(i)->widget()); + if (plugin) + mPlugins << plugin; + } + saveSettings(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanel::userRequestForDeletion() +{ + mSettings->beginGroup(mConfigGroup); + QStringList plugins = mSettings->value("plugins").toStringList(); + mSettings->endGroup(); + + Q_FOREACH(QString i, plugins) + if (!i.isEmpty()) + mSettings->remove(i); + + mSettings->remove(mConfigGroup); + + emit deletedByUser(this); +} diff --git a/panel/lxqtpanel.h b/panel/lxqtpanel.h new file mode 100644 index 0000000..f1b2123 --- /dev/null +++ b/panel/lxqtpanel.h @@ -0,0 +1,175 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTPANEL_H +#define LXQTPANEL_H + +#include +#include +#include +#include "ilxqtpanel.h" +#include "lxqtpanelglobals.h" + +class QMenu; +class Plugin; + +namespace LxQt { +class Settings; +class PluginInfo; +} +class LxQtPanelLayout; + +/*! \brief The LxQtPanel class provides a single lxqt-panel. + */ +class LXQT_PANEL_API LxQtPanel : public QFrame, public ILxQtPanel +{ + Q_OBJECT + + Q_PROPERTY(QString position READ qssPosition) + +public: + enum Alignment { + AlignmentLeft = -1, + AlignmentCenter = 0, + AlignmentRight = 1 + }; + + LxQtPanel(const QString &configGroup, QWidget *parent = 0); + virtual ~LxQtPanel(); + + QString name() { return mConfigGroup; } + + void readSettings(); + + void showPopupMenu(Plugin *plugin = 0); + + // ILxQtPanel ......................... + ILxQtPanel::Position position() const { return mPosition; } + QRect globalGometry() const; + QRect calculatePopupWindowPos(const ILxQtPanelPlugin *plugin, const QSize &windowSize) const; + + // For QSS properties .................. + QString qssPosition() const; + + static bool canPlacedOn(int screenNum, LxQtPanel::Position position); + static QString positionToStr(ILxQtPanel::Position position); + static ILxQtPanel::Position strToPosition(const QString &str, ILxQtPanel::Position defaultValue); + + // Settings + int panelSize() const { return mPanelSize; } + int iconSize() const { return mIconSize; } + int lineCount() const { return mLineCount; } + int length() const { return mLength; } + bool lengthInPercents() const { return mLengthInPercents; } + LxQtPanel::Alignment alignment() const { return mAlignment; } + int screenNum() const { return mScreenNum; } + QColor fontColor() const { return mFontColor; }; + QColor backgroundColor() const { return mBackgroundColor; }; + QString backgroundImage() const { return mBackgroundImage; }; + int opacity() const { return mOpacity; }; + + LxQt::Settings *settings() const { return mSettings; } + +public slots: + void show(); + + // Settings + void setPanelSize(int value, bool save); + void setIconSize(int value, bool save); + void setLineCount(int value, bool save); + void setLength(int length, bool inPercents, bool save); + void setPosition(int screen, ILxQtPanel::Position position, bool save); + void setAlignment(LxQtPanel::Alignment value, bool save); + void setFontColor(QColor color, bool save); + void setBackgroundColor(QColor color, bool save); + void setBackgroundImage(QString path, bool save); + void setOpacity(int opacity, bool save); + + void saveSettings(bool later=false); + void ensureVisible(); + +signals: + void realigned(); + void deletedByUser(LxQtPanel *self); + + void pluginAdded(QString id); + void pluginRemoved(QString id); + +protected: + bool event(QEvent *event); + void showEvent(QShowEvent *event); + +private slots: + void addPlugin(const LxQt::PluginInfo &desktopFile); + void showConfigDialog(); + void showAddPluginDialog(); + void realign(); + void removePlugin(); + void pluginMoved(); + void userRequestForDeletion(); + +private: + LxQtPanelLayout* mLayout; + LxQt::Settings *mSettings; + QFrame *LxQtPanelWidget; + QString mConfigGroup; + QList mPlugins; + + int findAvailableScreen(LxQtPanel::Position position); + void updateWmStrut(); + + void loadPlugins(); + Plugin *loadPlugin(const LxQt::PluginInfo &desktopFile, const QString &settingsGroup); + Plugin *findPlugin(const ILxQtPanelPlugin *iPlugin) const; + + QString findNewPluginSettingsGroup(const QString &pluginType) const; + + int mPanelSize; + int mIconSize; + int mLineCount; + + int mLength; + bool mLengthInPercents; + + Alignment mAlignment; + + ILxQtPanel::Position mPosition; + int mScreenNum; + QTimer mDelaySave; + + QColor mFontColor; + QColor mBackgroundColor; + QString mBackgroundImage; + // 0 to 100 + int mOpacity; + + void updateStyleSheet(); +}; + + +#endif // LXQTPANEL_H diff --git a/panel/lxqtpanelapplication.cpp b/panel/lxqtpanelapplication.cpp new file mode 100644 index 0000000..4e0fa14 --- /dev/null +++ b/panel/lxqtpanelapplication.cpp @@ -0,0 +1,188 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtpanelapplication.h" +#include "lxqtpanel.h" +#include "config/configpaneldialog.h" +#include +#include +#include +#include +#include + +LxQtPanelApplication::LxQtPanelApplication(int& argc, char** argv, const QString &configFile) + : LxQt::Application(argc, argv) +{ + if (configFile.isEmpty()) + mSettings = new LxQt::Settings("panel", this); + else + mSettings = new LxQt::Settings(configFile, QSettings::IniFormat, this); + + // This is a workaround for Qt 5 bug #40681. + Q_FOREACH(QScreen* screen, screens()) + { + connect(screen, &QScreen::destroyed, this, &LxQtPanelApplication::screenDestroyed); + } + connect(this, &QGuiApplication::screenAdded, this, &LxQtPanelApplication::handleScreenAdded); + + QStringList panels = mSettings->value("panels").toStringList(); + + if (panels.isEmpty()) + { + panels << "panel1"; + } + + Q_FOREACH(QString i, panels) + { + addPanel(i); + } +} + +LxQtPanelApplication::~LxQtPanelApplication() +{ + qDeleteAll(mPanels); +} + +void LxQtPanelApplication::addNewPanel() +{ + QString name("panel_" + QUuid::createUuid().toString()); + LxQtPanel *p = addPanel(name); + QStringList panels = mSettings->value("panels").toStringList(); + panels << name; + mSettings->setValue("panels", panels); + + // Poupup the configuration dialog to allow user configuration right away + ConfigPanelDialog::exec(p); +} + +LxQtPanel* LxQtPanelApplication::addPanel(const QString& name) +{ + LxQtPanel *panel = new LxQtPanel(name); + mPanels << panel; + connect(panel, SIGNAL(deletedByUser(LxQtPanel*)), + this, SLOT(removePanel(LxQtPanel*))); + return panel; +} + +void LxQtPanelApplication::handleScreenAdded(QScreen* newScreen) +{ + // qDebug() << "LxQtPanelApplication::handleScreenAdded" << newScreen; + connect(newScreen, &QScreen::destroyed, this, &LxQtPanelApplication::screenDestroyed); +} + +void LxQtPanelApplication::reloadPanelsAsNeeded() +{ + // NOTE by PCMan: This is a workaround for Qt 5 bug #40681. + // Here we try to re-create the missing panels which are deleted in + // LxQtPanelApplication::screenDestroyed(). + + // qDebug() << "LxQtPanelApplication::reloadPanelsAsNeeded()"; + QStringList names = mSettings->value("panels").toStringList(); + Q_FOREACH(const QString& name, names) + { + bool found = false; + Q_FOREACH(LxQtPanel* panel, mPanels) + { + if(panel->name() == name) + { + found = true; + break; + } + } + if(!found) + { + // the panel is found in the config file but does not exist, create it. + qDebug() << "Workaround Qt 5 bug #40681: re-create panel:" << name; + addPanel(name); + } + } + qApp->setQuitOnLastWindowClosed(true); +} + +void LxQtPanelApplication::screenDestroyed(QObject* screenObj) +{ + // NOTE by PCMan: This is a workaround for Qt 5 bug #40681. + // With this very dirty workaround, we can fix lxde/lxde-qt bug #204, #205, and #206. + // Qt 5 has two new regression bugs which breaks lxqt-panel in a multihead environment. + // #40681: Regression bug: QWidget::winId() returns old value and QEvent::WinIdChange event is not emitted sometimes. (multihead setup) + // #40791: Regression: QPlatformWindow, QWindow, and QWidget::winId() are out of sync. + // Explanations for the workaround: + // Internally, Qt mantains a list of QScreens and update it when XRandR configuration changes. + // When the user turn off an monitor with xrandr --output --off, this will destroy the QScreen + // object which represent the output. If the QScreen being destroyed contains our panel widget, + // Qt will call QWindow::setScreen(0) on the internal windowHandle() of our panel widget to move it + // to the primary screen. However, moving a window to a different screen is more than just changing + // its position. With XRandR, all screens are actually part of the same virtual desktop. However, + // this is not the case in other setups, such as Xinerama and moving a window to another screen is + // not possible unless you destroy the widget and create it again for a new screen. + // Therefore, Qt destroy the widget and re-create it when moving our panel to a new screen. + // Unfortunately, destroying the window also destroy the child windows embedded into it, + // using XEMBED such as the tray icons. (#206) + // Second, when the window is re-created, the winId of the QWidget is changed, but Qt failed to + // generate QEvent::WinIdChange event so we have no way to know that. We have to set + // some X11 window properties using the native winId() to make it a dock, but this stop working + // because we cannot get the correct winId(), so this causes #204 and #205. + // + // The workaround is very simple. Just completely destroy the panel before Qt has a chance to do + // QWindow::setScreen() for it. Later, we reload the panel ourselves. So this can bypassing the Qt bugs. + QScreen* screen = static_cast(screenObj); + bool reloadNeeded = false; + qApp->setQuitOnLastWindowClosed(false); + Q_FOREACH(LxQtPanel* panel, mPanels) + { + QWindow* panelWindow = panel->windowHandle(); + if(panelWindow && panelWindow->screen() == screen) + { + // the screen containing the panel is destroyed + // delete and then re-create the panel ourselves + QString name = panel->name(); + panel->saveSettings(false); + delete panel; // delete the panel, so Qt does not have a chance to set a new screen to it. + mPanels.removeAll(panel); + reloadNeeded = true; + qDebug() << "Workaround Qt 5 bug #40681: delete panel:" << name; + } + } + if(reloadNeeded) + QTimer::singleShot(1000, this, SLOT(reloadPanelsAsNeeded())); + else + qApp->setQuitOnLastWindowClosed(true); +} + +void LxQtPanelApplication::removePanel(LxQtPanel* panel) +{ + Q_ASSERT(mPanels.contains(panel)); + + mPanels.removeAll(panel); + + QStringList panels = mSettings->value("panels").toStringList(); + panels.removeAll(panel->name()); + mSettings->setValue("panels", panels); + + panel->deleteLater(); +} diff --git a/panel/lxqtpanelapplication.h b/panel/lxqtpanelapplication.h new file mode 100644 index 0000000..0b5f258 --- /dev/null +++ b/panel/lxqtpanelapplication.h @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTPANELAPPLICATION_H +#define LXQTPANELAPPLICATION_H + +#include +#include "ilxqtpanelplugin.h" + +class QScreen; + +class LxQtPanel; +namespace LxQt { +class Settings; +} + +class LxQtPanelApplication : public LxQt::Application +{ + Q_OBJECT +public: + explicit LxQtPanelApplication(int& argc, char** argv, const QString &configFile); + ~LxQtPanelApplication(); + + int count() { return mPanels.count(); } + LxQt::Settings *settings() { return mSettings; } + +public slots: + void addNewPanel(); + +private: + QList mPanels; + + LxQtPanel* addPanel(const QString &name); + +private slots: + void removePanel(LxQtPanel* panel); + + void handleScreenAdded(QScreen* newScreen); + void screenDestroyed(QObject* screenObj); + void reloadPanelsAsNeeded(); + +private: + LxQt::Settings *mSettings; +}; + + +#endif // LXQTPANELAPPLICATION_H diff --git a/panel/lxqtpanelglobals.h b/panel/lxqtpanelglobals.h new file mode 100644 index 0000000..b3550d8 --- /dev/null +++ b/panel/lxqtpanelglobals.h @@ -0,0 +1,39 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://lxde.org/ + * + * Copyright: 2013 LXDE-Qt team + * Authors: + * Hong Jen Yee (PCMan) + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef __LXQT_PANEL_GLOBALS_H__ +#define __LXQT_PANEL_GLOBALS_H__ + +#include + +#ifdef COMPILE_LXQT_PANEL +#define LXQT_PANEL_API Q_DECL_EXPORT +#else +#define LXQT_PANEL_API Q_DECL_IMPORT +#endif + +#endif // __LXQT_PANEL_GLOBALS_H__ diff --git a/panel/lxqtpanellayout.cpp b/panel/lxqtpanellayout.cpp new file mode 100644 index 0000000..4cabdb1 --- /dev/null +++ b/panel/lxqtpanellayout.cpp @@ -0,0 +1,965 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtpanellayout.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "plugin.h" +#include "lxqtpanellimits.h" +#include "ilxqtpanelplugin.h" +#include "lxqtpanel.h" +#include "pluginmoveprocessor.h" +#include +#include + +#define ANIMATION_DURATION 250 + +class ItemMoveAnimation : public QVariantAnimation +{ +public: + ItemMoveAnimation(QLayoutItem *item) : + mItem(item) + { + setEasingCurve(QEasingCurve::OutBack); + setDuration(ANIMATION_DURATION); + } + + void updateCurrentValue(const QVariant ¤t) + { + mItem->setGeometry(current.toRect()); + } + +private: + QLayoutItem* mItem; + +}; + + +struct LayoutItemInfo +{ + LayoutItemInfo(QLayoutItem *layoutItem=0); + QLayoutItem *item; + QRect geometry; + bool separate; + bool expandable; +}; + + +LayoutItemInfo::LayoutItemInfo(QLayoutItem *layoutItem): + item(layoutItem), + separate(false), + expandable(false) +{ + if (!item) + return; + + Plugin *p = qobject_cast(item->widget()); + if (p) + { + separate = p->isSeparate(); + expandable = p->isExpandable(); + return; + } +} + + + +/************************************************ + This is logical plugins grid, it's same for + horizontal and vertical panel. Plugins keeps as: + + <---LineCount--> + + ---+----+----+ + | P1 | P2 | P3 | + +----+----+----+ + | P4 | P5 | | + +----+----+----+ + ... + +----+----+----+ + | PN | | | + +----+----+----+ + ************************************************/ +class LayoutItemGrid +{ +public: + explicit LayoutItemGrid(); + + void addItem(QLayoutItem *item); + int count() const { return mItems.count(); } + QLayoutItem *itemAt(int index) const { return mItems[index]; } + QLayoutItem *takeAt(int index); + + + const LayoutItemInfo &itemInfo(int row, int col) const; + LayoutItemInfo &itemInfo(int row, int col); + + void update(); + + int lineSize() const { return mLineSize; } + void setLineSize(int value); + + int colCount() const { return mColCount; } + void setColCount(int value); + + int usedColCount() const { return mUsedColCount; } + + int rowCount() const { return mRowCount; } + + void invalidate() { mValid = false; } + bool isValid() const { return mValid; } + + QSize sizeHint() const { return mSizeHint; } + + bool horiz() const { return mHoriz; } + void setHoriz(bool value); + + void clear(); + void rebuild(); + + bool isExpandable() const { return mExpandable; } + int expandableSize() const { return mExpandableSize; } + + void moveItem(int from, int to); + +private: + QVector mInfoItems; + int mColCount; + int mUsedColCount; + int mRowCount; + bool mValid; + int mExpandableSize; + int mLineSize; + + QSize mSizeHint; + QSize mMinSize; + bool mHoriz; + + int mNextRow; + int mNextCol; + bool mExpandable; + QList mItems; + + void doAddToGrid(QLayoutItem *item); +}; + + +/************************************************ + + ************************************************/ +LayoutItemGrid::LayoutItemGrid() +{ + mLineSize = 0; + mHoriz = true; + clear(); +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::clear() +{ + mRowCount = 0; + mNextRow = 0; + mNextCol = 0; + mInfoItems.resize(0); + mValid = false; + mExpandable = false; + mExpandableSize = 0; + mUsedColCount = 0; + mSizeHint = QSize(0,0); + mMinSize = QSize(0,0); +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::rebuild() +{ + clear(); + + foreach(QLayoutItem *item, mItems) + { + doAddToGrid(item); + } +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::addItem(QLayoutItem *item) +{ + doAddToGrid(item); + mItems.append(item); +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::doAddToGrid(QLayoutItem *item) +{ + LayoutItemInfo info(item); + + if (info.separate && mNextCol > 0) + { + mNextCol = 0; + mNextRow++; + } + + int cnt = (mNextRow + 1 ) * mColCount; + if (mInfoItems.count() <= cnt) + mInfoItems.resize(cnt); + + int idx = mNextRow * mColCount + mNextCol; + mInfoItems[idx] = info; + mUsedColCount = qMax(mUsedColCount, mNextCol + 1); + mExpandable = mExpandable || info.expandable; + mRowCount = qMax(mRowCount, mNextRow+1); + + if (info.separate || mNextCol >= mColCount-1) + { + mNextRow++; + mNextCol = 0; + } + else + { + mNextCol++; + } + + invalidate(); +} + + +/************************************************ + + ************************************************/ +QLayoutItem *LayoutItemGrid::takeAt(int index) +{ + QLayoutItem *item = mItems.takeAt(index); + rebuild(); + return item; +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::moveItem(int from, int to) +{ + mItems.move(from, to); + rebuild(); +} + + +/************************************************ + + ************************************************/ +const LayoutItemInfo &LayoutItemGrid::itemInfo(int row, int col) const +{ + return mInfoItems[row * mColCount + col]; +} + + +/************************************************ + + ************************************************/ +LayoutItemInfo &LayoutItemGrid::itemInfo(int row, int col) +{ + return mInfoItems[row * mColCount + col]; +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::update() +{ + mExpandableSize = 0; + mSizeHint = QSize(0,0); + + if (mHoriz) + { + mSizeHint.setHeight(mLineSize * mColCount); + int x = 0; + for (int r=0; rsizeHint(); + info.geometry = QRect(QPoint(x,y), sz); + y += sz.height(); + rw = qMax(rw, sz.width()); + } + x += rw; + + if (itemInfo(r, 0).expandable) + mExpandableSize += rw; + + mSizeHint.setWidth(x); + mSizeHint.rheight() = qMax(mSizeHint.rheight(), y); + } + } + else + { + mSizeHint.setWidth(mLineSize * mColCount); + int y = 0; + for (int r=0; rsizeHint(); + info.geometry = QRect(QPoint(x,y), sz); + x += sz.width(); + rh = qMax(rh, sz.height()); + } + y += rh; + + if (itemInfo(r, 0).expandable) + mExpandableSize += rh; + + mSizeHint.setHeight(y); + mSizeHint.rwidth() = qMax(mSizeHint.rwidth(), x); + } + } + + mValid = true; +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::setLineSize(int value) +{ + mLineSize = qMax(1, value); + invalidate(); +} + + +/************************************************ + + ************************************************/ +void LayoutItemGrid::setColCount(int value) +{ + mColCount = qMax(1, value); + rebuild(); +} + +/************************************************ + + ************************************************/ +void LayoutItemGrid::setHoriz(bool value) +{ + mHoriz = value; + invalidate(); +} + + + +/************************************************ + + ************************************************/ +LxQtPanelLayout::LxQtPanelLayout(QWidget *parent) : + QLayout(parent), + mLeftGrid(new LayoutItemGrid()), + mRightGrid(new LayoutItemGrid()), + mPosition(ILxQtPanel::PositionBottom), + mAnimate(false) +{ + setMargin(0); +} + + +/************************************************ + + ************************************************/ +LxQtPanelLayout::~LxQtPanelLayout() +{ + delete mLeftGrid; + delete mRightGrid; +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::addItem(QLayoutItem *item) +{ + LayoutItemGrid *grid = mRightGrid; + + Plugin *p = qobject_cast(item->widget()); + if (p && p->alignment() == Plugin::AlignLeft) + grid = mLeftGrid; + + grid->addItem(item); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::globalIndexToLocal(int index, LayoutItemGrid **grid, int *gridIndex) +{ + if (index < mLeftGrid->count()) + { + *grid = mLeftGrid; + *gridIndex = index; + return; + } + + *grid = mRightGrid; + *gridIndex = index - mLeftGrid->count(); +} + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::globalIndexToLocal(int index, LayoutItemGrid **grid, int *gridIndex) const +{ + if (index < mLeftGrid->count()) + { + *grid = mLeftGrid; + *gridIndex = index; + return; + } + + *grid = mRightGrid; + *gridIndex = index - mLeftGrid->count(); +} + + +/************************************************ + + ************************************************/ +QLayoutItem *LxQtPanelLayout::itemAt(int index) const +{ + if (index < 0 || index >= count()) + return 0; + + LayoutItemGrid *grid=0; + int idx=0; + globalIndexToLocal(index, &grid, &idx); + + return grid->itemAt(idx); +} + + +/************************************************ + + ************************************************/ +QLayoutItem *LxQtPanelLayout::takeAt(int index) +{ + if (index < 0 || index >= count()) + return 0; + + LayoutItemGrid *grid=0; + int idx=0; + globalIndexToLocal(index, &grid, &idx); + + return grid->takeAt(idx); +} + + +/************************************************ + + ************************************************/ +int LxQtPanelLayout::count() const +{ + return mLeftGrid->count() + mRightGrid->count(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::moveItem(int from, int to, bool withAnimation) +{ + if (from != to) + { + LayoutItemGrid *fromGrid=0; + int fromIdx=0; + globalIndexToLocal(from, &fromGrid, &fromIdx); + + LayoutItemGrid *toGrid=0; + int toIdx=0; + globalIndexToLocal(to, &toGrid, &toIdx); + + if (fromGrid == toGrid) + { + fromGrid->moveItem(fromIdx, toIdx); + } + else + { + QLayoutItem *item = fromGrid->takeAt(fromIdx); + toGrid->addItem(item); + toGrid->moveItem(toGrid->count()-1, toIdx); + } + } + + mAnimate = withAnimation; + invalidate(); +} + + +/************************************************ + + ************************************************/ +QSize LxQtPanelLayout::sizeHint() const +{ + if (!mLeftGrid->isValid()) + mLeftGrid->update(); + + if (!mRightGrid->isValid()) + mRightGrid->update(); + + QSize ls = mLeftGrid->sizeHint(); + QSize rs = mRightGrid->sizeHint(); + + if (isHorizontal()) + { + return QSize(ls.width() + rs.width(), + qMax(ls.height(), rs.height())); + } + else + { + return QSize(qMax(ls.width(), rs.width()), + ls.height() + rs.height()); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setGeometry(const QRect &geometry) +{ + if (!mLeftGrid->isValid()) + mLeftGrid->update(); + + if (!mRightGrid->isValid()) + mRightGrid->update(); + + if (count()) + { + if (isHorizontal()) + setGeometryHoriz(geometry); + else + setGeometryVert(geometry); + } + + mAnimate = false; + QLayout::setGeometry(geometry); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setItemGeometry(QLayoutItem *item, const QRect &geometry, bool withAnimation) +{ + Plugin *plugin = qobject_cast(item->widget()); + if (withAnimation && plugin) + { + ItemMoveAnimation* animation = new ItemMoveAnimation(item); + animation->setStartValue(item->geometry()); + animation->setEndValue(geometry); + animation->start(animation->DeleteWhenStopped); + } + else + { + item->setGeometry(geometry); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setGeometryHoriz(const QRect &geometry) +{ + // Calc expFactor for expandable plugins like TaskBar. + double expFactor; + { + int expWidth = mLeftGrid->expandableSize() + mRightGrid->expandableSize(); + int nonExpWidth = mLeftGrid->sizeHint().width() - mLeftGrid->expandableSize() + + mRightGrid->sizeHint().width() - mRightGrid->expandableSize(); + expFactor = expWidth ? ((1.0 * geometry.width() - nonExpWidth) / expWidth) : 1; + } + + // Calc baselines for plugins like button. + QVector baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount())); + { + int bh = (geometry.height() / baseLines.count()) / 2; + for (int i=0; icolCount() << " rows:" << mLeftGrid->rowCount(); + qDebug() << " usedCols" << mLeftGrid->usedColCount(); + + qDebug() << "Right grid"; + qDebug() << " cols:" << mRightGrid->colCount() << " rows:" << mRightGrid->rowCount(); + qDebug() << " usedCols" << mRightGrid->usedColCount(); +#endif + + + // Left aligned plugins. + int left=geometry.left(); + for (int r=0; rrowCount(); ++r) + { + int rw = 0; + for (int c=0; cusedColCount(); ++c) + { + const LayoutItemInfo &info = mLeftGrid->itemInfo(r, c); + if (info.item) + { + QRect rect; + if (info.separate) + { + rect.setLeft(left); + rect.setTop(geometry.top()); + rect.setHeight(geometry.height()); + + if (info.expandable) + rect.setWidth(info.geometry.width() * expFactor); + else + rect.setWidth(info.geometry.width()); + } + else + { + rect.setSize(info.geometry.size()); + rect.moveCenter(QPoint(0, baseLines[c])); + rect.moveLeft(left); + } + + rw = qMax(rw, rect.width()); + setItemGeometry(info.item, rect, mAnimate); + } + } + left += rw; + } + + // Right aligned plugins. + int right=geometry.right(); + for (int r=mRightGrid->rowCount()-1; r>=0; --r) + { + int rw = 0; + for (int c=0; cusedColCount(); ++c) + { + const LayoutItemInfo &info = mRightGrid->itemInfo(r, c); + if (info.item) + { + QRect rect; + if (info.separate) + { + rect.setTop(geometry.top()); + rect.setHeight(geometry.height()); + + if (info.expandable) + rect.setWidth(info.geometry.width() * expFactor); + else + rect.setWidth(info.geometry.width()); + + rect.moveRight(right); + } + else + { + rect.setSize(info.geometry.size()); + rect.moveCenter(QPoint(0, baseLines[c])); + rect.moveRight(right); + } + + rw = qMax(rw, rect.width()); + setItemGeometry(info.item, rect, mAnimate); + } + } + right -= rw; + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setGeometryVert(const QRect &geometry) +{ + // Calc expFactor for expandable plugins like TaskBar. + double expFactor; + { + int expHeight = mLeftGrid->expandableSize() + mRightGrid->expandableSize(); + int nonExpHeight = mLeftGrid->sizeHint().height() - mLeftGrid->expandableSize() + + mRightGrid->sizeHint().height() - mRightGrid->expandableSize(); + expFactor = expHeight ? ((1.0 * geometry.height() - nonExpHeight) / expHeight) : 1; + } + + // Calc baselines for plugins like button. + QVector baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount())); + { + int bw = (geometry.width() / baseLines.count()) / 2; + for (int i=0; icolCount() << " rows:" << mLeftGrid->rowCount(); + qDebug() << " usedCols" << mLeftGrid->usedColCount(); + + qDebug() << "Right grid"; + qDebug() << " cols:" << mRightGrid->colCount() << " rows:" << mRightGrid->rowCount(); + qDebug() << " usedCols" << mRightGrid->usedColCount(); +#endif + + // Top aligned plugins. + int top=geometry.top(); + for (int r=0; rrowCount(); ++r) + { + int rh = 0; + for (int c=0; cusedColCount(); ++c) + { + const LayoutItemInfo &info = mLeftGrid->itemInfo(r, c); + if (info.item) + { + QRect rect; + if (info.separate) + { + rect.moveTop(top); + rect.setLeft(geometry.left()); + rect.setWidth(geometry.width()); + + if (info.expandable) + rect.setHeight(info.geometry.height() * expFactor); + else + rect.setHeight(info.geometry.height()); + } + else + { + rect.setSize(info.geometry.size()); + rect.moveCenter(QPoint(baseLines[c], 0)); + rect.moveTop(top); + } + + rh = qMax(rh, rect.height()); + setItemGeometry(info.item, rect, mAnimate); + } + } + top += rh; + } + + + // Bottom aligned plugins. + int bottom=geometry.bottom(); + for (int r=mRightGrid->rowCount()-1; r>=0; --r) + { + int rh = 0; + for (int c=0; cusedColCount(); ++c) + { + const LayoutItemInfo &info = mRightGrid->itemInfo(r, c); + if (info.item) + { + QRect rect; + if (info.separate) + { + rect.setLeft(geometry.left()); + rect.setWidth(geometry.width()); + + if (info.expandable) + rect.setHeight(info.geometry.height() * expFactor); + else + rect.setHeight(info.geometry.height()); + rect.moveBottom(bottom); + } + else + { + rect.setSize(info.geometry.size()); + rect.moveCenter(QPoint(baseLines[c], 0)); + rect.moveBottom(bottom); + } + + rh = qMax(rh, rect.height()); + setItemGeometry(info.item, rect, mAnimate); + } + } + bottom -= rh; + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::invalidate() +{ + mLeftGrid->invalidate(); + mRightGrid->invalidate(); + mMinPluginSize = QSize(); + QLayout::invalidate(); +} + + +/************************************************ + + ************************************************/ +int LxQtPanelLayout::lineCount() const +{ + return mLeftGrid->colCount(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setLineCount(int value) +{ + mLeftGrid->setColCount(value); + mRightGrid->setColCount(value); + invalidate(); +} + + +/************************************************ + + ************************************************/ +int LxQtPanelLayout::lineSize() const +{ + return mLeftGrid->lineSize(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setLineSize(int value) +{ + mLeftGrid->setLineSize(value); + mRightGrid->setLineSize(value); + invalidate(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::setPosition(ILxQtPanel::Position value) +{ + mPosition = value; + mLeftGrid->setHoriz(isHorizontal()); + mRightGrid->setHoriz(isHorizontal()); +} + + +/************************************************ + + ************************************************/ +bool LxQtPanelLayout::isHorizontal() const +{ + return mPosition == ILxQtPanel::PositionTop || + mPosition == ILxQtPanel::PositionBottom; +} + + +/************************************************ + + ************************************************/ +bool LxQtPanelLayout::itemIsSeparate(QLayoutItem *item) +{ + if (!item) + return true; + + Plugin *p = qobject_cast(item->widget()); + if (!p) + return true; + + return p->isSeparate(); +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::startMovePlugin() +{ + Plugin *plugin = qobject_cast(sender()); + if (plugin) + { + // We have not memoryleaks there. + // The processor will be automatically deleted when stopped. + PluginMoveProcessor *moveProcessor = new PluginMoveProcessor(this, plugin); + moveProcessor->start(); + connect(moveProcessor, SIGNAL(finished()), this, SLOT(finishMovePlugin())); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelLayout::finishMovePlugin() +{ + PluginMoveProcessor *moveProcessor = qobject_cast(sender()); + if (moveProcessor) + { + Plugin *plugin = moveProcessor->plugin(); + int n = indexOf(plugin); + plugin->setAlignment(ncount() ? Plugin::AlignLeft : Plugin::AlignRight); + emit pluginMoved(); + } +} diff --git a/panel/lxqtpanellayout.h b/panel/lxqtpanellayout.h new file mode 100644 index 0000000..e3b950b --- /dev/null +++ b/panel/lxqtpanellayout.h @@ -0,0 +1,100 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTPANELLAYOUT_H +#define LXQTPANELLAYOUT_H + +#include +#include +#include +#include +#include "ilxqtpanel.h" +#include "lxqtpanelglobals.h" + +class MoveInfo; +class QMouseEvent; +class QEvent; + +class Plugin; +class LayoutItemGrid; + +class LXQT_PANEL_API LxQtPanelLayout : public QLayout +{ + Q_OBJECT +public: + explicit LxQtPanelLayout(QWidget *parent); + ~LxQtPanelLayout(); + + void addItem(QLayoutItem *item); + QLayoutItem *itemAt(int index) const; + QLayoutItem *takeAt(int index); + int count() const; + void moveItem(int from, int to, bool withAnimation=false); + + QSize sizeHint() const; + //QSize minimumSize() const; + void setGeometry(const QRect &geometry); + + bool isHorizontal() const; + + void invalidate(); + + int lineCount() const; + void setLineCount(int value); + + int lineSize() const; + void setLineSize(int value); + + ILxQtPanel::Position position() const { return mPosition; } + void setPosition(ILxQtPanel::Position value); + + static bool itemIsSeparate(QLayoutItem *item); +signals: + void pluginMoved(); + +public slots: + void startMovePlugin(); + void finishMovePlugin(); + +private: + mutable QSize mMinPluginSize; + LayoutItemGrid *mLeftGrid; + LayoutItemGrid *mRightGrid; + ILxQtPanel::Position mPosition; + bool mAnimate; + + + void setGeometryHoriz(const QRect &geometry); + void setGeometryVert(const QRect &geometry); + void globalIndexToLocal(int index, LayoutItemGrid **grid, int *gridIndex); + void globalIndexToLocal(int index, LayoutItemGrid **grid, int *gridIndex) const; + + void setItemGeometry(QLayoutItem *item, const QRect &geometry, bool withAnimation); +}; + +#endif // LXQTPANELLAYOUT_H diff --git a/panel/lxqtpanellimits.h b/panel/lxqtpanellimits.h new file mode 100644 index 0000000..ffc7dea --- /dev/null +++ b/panel/lxqtpanellimits.h @@ -0,0 +1,41 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Luís Pereira + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTPANELLIMITS_H +#define LXQTPANELLIMITS_H + +#define PANEL_DEFAULT_SIZE 32 +#define PANEL_MINIMUM_SIZE 16 +#define PANEL_MAXIMUM_SIZE 200 + +#define PANEL_DEFAULT_ICON_SIZE 22 +#define PANEL_DEFAULT_LINE_COUNT 1 + +#define PANEL_DEFAULT_BACKGROUND_COLOR "#CCCCCC" + +#define SETTINGS_SAVE_DELAY 3000 +#endif // LXQTPANELLIMITS_H diff --git a/panel/lxqtpanelpluginconfigdialog.cpp b/panel/lxqtpanelpluginconfigdialog.cpp new file mode 100644 index 0000000..57bedaf --- /dev/null +++ b/panel/lxqtpanelpluginconfigdialog.cpp @@ -0,0 +1,94 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtpanelpluginconfigdialog.h" + + +#include +#include +#include +#include +/************************************************ + + ************************************************/ +LxQtPanelPluginConfigDialog::LxQtPanelPluginConfigDialog(QSettings &settings, QWidget *parent) : + QDialog(parent), + mSettings(settings), + mOldSettings(settings) +{ +} + + +/************************************************ + + ************************************************/ +LxQtPanelPluginConfigDialog::~LxQtPanelPluginConfigDialog() +{ +} + + +/************************************************ + + ************************************************/ +QSettings& LxQtPanelPluginConfigDialog::settings() const +{ + return mSettings; +} + + + +/************************************************ + + ************************************************/ +void LxQtPanelPluginConfigDialog::dialogButtonsAction(QAbstractButton *btn) +{ + QDialogButtonBox *box = qobject_cast(btn->parent()); + + if (box && box->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + mOldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + + +/************************************************ + + ************************************************/ +void LxQtPanelPluginConfigDialog::setComboboxIndexByData(QComboBox *comboBox, const QVariant &data, int defaultIndex) const +{ + int index = comboBox ->findData(data); + if (index < 0) + index = defaultIndex; + + comboBox->setCurrentIndex(index); +} diff --git a/panel/lxqtpanelpluginconfigdialog.h b/panel/lxqtpanelpluginconfigdialog.h new file mode 100644 index 0000000..690e383 --- /dev/null +++ b/panel/lxqtpanelpluginconfigdialog.h @@ -0,0 +1,64 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTPANELPLUGINCONFIGDIALOG_H +#define LXQTPANELPLUGINCONFIGDIALOG_H + +#include +#include +#include +#include "lxqtpanelglobals.h" + +class QComboBox; + +class LXQT_PANEL_API LxQtPanelPluginConfigDialog : public QDialog +{ + Q_OBJECT +public: + explicit LxQtPanelPluginConfigDialog(QSettings &settings, QWidget *parent = 0); + virtual ~LxQtPanelPluginConfigDialog(); + + QSettings& settings() const; + +protected slots: + /* + Saves settings in conf file. + */ + virtual void loadSettings() = 0; + virtual void dialogButtonsAction(QAbstractButton *btn); + +protected: + void setComboboxIndexByData(QComboBox *comboBox, const QVariant &data, int defaultIndex = 0) const; + +private: + QSettings &mSettings; + LxQt::SettingsCache mOldSettings; + +}; + +#endif // LXQTPANELPLUGINCONFIGDIALOG_H diff --git a/panel/main.cpp b/panel/main.cpp new file mode 100644 index 0000000..c5ec668 --- /dev/null +++ b/panel/main.cpp @@ -0,0 +1,115 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include +#include +#include +#include +#include +#include + +#include "lxqtpanelapplication.h" +#include "lxqtpanel.h" + +/*! The lxqt-panel is the panel of LXDE-Qt. + Usage: lxqt-panel [CONFIG_ID] + CONFIG_ID Section name in config file ~/.config/lxqt-panel/panel.conf + (default main) + */ + +void termSignalHandler(int) +{ + qApp->quit(); +} + + +void printHelp() +{ + QTextStream out(stdout); + out << "Usage: lxqt-panel [options]" << endl; + out << endl; + out << "Start lxde-qt panel and its plugins" << endl; + out << endl; + out << "Options:" << endl; + out << " -h, --help Show help about options" << endl; + out << " --version Show version information" << endl; + out << " -c, --configfile=CONFIGFILE Use alternate configuration file" << endl; +} + + +void printVersion() +{ + QTextStream out(stdout); + out << "lxqt-panel " << LXQT_VERSION << endl; +} + + +int main(int argc, char *argv[]) +{ + QString configFile; + for (int i=1; i < argc; ++i) + { + QString arg = QString::fromLocal8Bit(argv[i]); + + if (arg == "--help" || arg == "-h") + { + printHelp(); + return 0; + } + + if (arg == "--version") + { + printVersion(); + return 0; + } + + if (arg == "-c" || arg.startsWith("--conf")) + { + if (i+1 < argc) + { + configFile = QString::fromLocal8Bit(argv[i+1]); + } + } + } + + LxQtPanelApplication *app = new LxQtPanelApplication(argc, argv, configFile); + + + //Setup Unix signal handlers + struct sigaction term; + term.sa_handler = termSignalHandler; + sigemptyset(&term.sa_mask); + term.sa_flags |= SA_RESTART; + sigaction(SIGTERM, &term, 0); + sigaction(SIGINT, &term, 0); + + bool res = app->exec(); + + app->deleteLater(); + return res; +} diff --git a/panel/man/lxqt-panel.1 b/panel/man/lxqt-panel.1 new file mode 100644 index 0000000..1eb6416 --- /dev/null +++ b/panel/man/lxqt-panel.1 @@ -0,0 +1,57 @@ +.TH lxqt-panel "1" "September 2012" "LxQt\-qt\ 0.5.0" "LxQt\-qt\ Module" +.SH NAME +lxqt-panel \- Panel of \fBLXDE-Qt\fR: the faster and lighter QT Desktop Environment +.SH SYNOPSIS +.B lxqt-panel +.br +.SH DESCRIPTION +This module adds a panel to the desktop. +.P +.P +The \fBLXDE-Qt modules\fR are desktop independent tools, +and operate as daemons for the local user for desktop specific operations. +.P +\fBLXDE-Qt\fR is an advanced, easy-to-use, and fast desktop environment based on Qt +technologies, ships several core desktop components, all of which are optional: +.P + * Panel \fI(this)\fR + * Desktop + * Application launcher + * Settings center + * Session handler + * Polkit handler + * SSH password access + * Display manager handler +.P +These components perform similar actions to those available in other desktop +environments, and their name is self-descriptive. They are usually not launched +by hand but automatically, when choosing a \fBLxQt\-qt\fR session in the Display +Manager. +.SH BEHAVIOR +The module can be run standard alone, and also autostarted at logon. Show a bar panel +by default in bottom of desktop. +.P +The panel works with plugins, each component are a plugin, like the menu or the volume icon. +.P +Several plugins are loaded by default, the desktop menu and windows workspaces can also managed here. +.SH CONFIGURATIONS +By right clickin over there show config setting options for each plugins and also panel itsefl. +.SH AUTOSTART +The module only are showed on \fBLXDE-Qt\fR desktop environment, but you can create an autostart action +for you prefered desktop environment. +.SH "REPORTING BUGS" +Report bugs to https://github.com/LXDE-Qt/LXDE-Qt/issues +.SH "SEE ALSO" +\fBLXDE-Qt\fR it has been tailored for users who value simplicity, speed, and +an intuitive interface, also intended for less powerful machines. See: +.\" any module must refers to session app, for more info on start it +.P +\fBlxqt-session.1\fR LXDE-Qt for manage LXDE-Qt complete environment +.P +\fBstart-lxqt.1\fR LXDE-Qt display management independient starup. +.P +\fBlxqt-config.1\fR LXDE-Qt config center application for performing settings +.P +.SH AUTHOR +This manual page was created by \fBPICCORO Lenz McKAY\fR \fI\fR +for \fBLXDE-Qt\fR project and VENENUX GNU/Linux but can be used by others. diff --git a/panel/plugin.cpp b/panel/plugin.cpp new file mode 100644 index 0000000..e561c5b --- /dev/null +++ b/panel/plugin.cpp @@ -0,0 +1,392 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "plugin.h" +#include "ilxqtpanelplugin.h" +#include "lxqtpanel.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +QColor Plugin::mMoveMarkerColor= QColor(255, 0, 0, 255); + +/************************************************ + + ************************************************/ +Plugin::Plugin(const LxQt::PluginInfo &desktopFile, const QString &settingsFile, const QString &settingsGroup, LxQtPanel *panel) : + QFrame(panel), + mDesktopFile(desktopFile), + mPluginLoader(0), + mPlugin(0), + mPluginWidget(0), + mAlignment(AlignLeft), + mSettingsGroup(settingsGroup), + mPanel(panel) +{ + + mSettings = new LxQt::Settings(settingsFile, QSettings::IniFormat, this); + connect(mSettings, SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); + mSettings->beginGroup(settingsGroup); + + mSettingsHash = calcSettingsHash(); + + setWindowTitle(desktopFile.name()); + mName = desktopFile.name(); + + QStringList dirs; + dirs << QProcessEnvironment::systemEnvironment().value("LXQTPANEL_PLUGIN_PATH").split(":"); + dirs << PLUGIN_DIR; + + QString baseName = QString("lib%1.so").arg(desktopFile.id()); + bool found = false; + foreach(QString dirName, dirs) + { + QFileInfo fi(QDir(dirName), baseName); + + if (fi.exists()) + { + found = true; + if (loadLib(fi.absoluteFilePath())) + break; + } + } + + if (!isLoaded()) + { + if (!found) + qWarning() << QString("Plugin %1 not found in the").arg(baseName) << dirs; + + return; + } + + // Load plugin translations + LxQt::Translator::translatePlugin(desktopFile.id(), QLatin1String("lxqt-panel")); + + setObjectName(mPlugin->themeId() + "Plugin"); + QString s = mSettings->value("alignment").toString(); + + // Retrun default value + if (s.isEmpty()) + { + mAlignment = (mPlugin->flags().testFlag(ILxQtPanelPlugin::PreferRightAlignment)) ? + Plugin::AlignRight : + Plugin::AlignLeft; + } + else + { + mAlignment = (s.toUpper() == "RIGHT") ? + Plugin::AlignRight : + Plugin::AlignLeft; + + } + + if (mPluginWidget) + { + QGridLayout* layout = new QGridLayout(this); + layout->setSpacing(0); + layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); + setLayout(layout); + layout->addWidget(mPluginWidget, 0, 0); + } + + saveSettings(); +} + + +/************************************************ + + ************************************************/ +Plugin::~Plugin() +{ + delete mPlugin; + if (mPluginLoader) + { + mPluginLoader->unload(); + delete mPluginLoader; + } +} + +void Plugin::setAlignment(Plugin::Alignment alignment) +{ + mAlignment = alignment; + saveSettings(); +} + + +/************************************************ + + ************************************************/ +bool Plugin::loadLib(const QString &libraryName) +{ + mPluginLoader = new QPluginLoader(libraryName); + + if (!mPluginLoader->load()) + { + qWarning() << mPluginLoader->errorString(); + return false; + } + + QObject *obj = mPluginLoader->instance(); + if (!obj) + { + qWarning() << mPluginLoader->errorString(); + return false; + } + + ILxQtPanelPluginLibrary* pluginLib= qobject_cast(obj); + if (!pluginLib) + { + qWarning() << QString("Can't load plugin \"%1\". Plugin is not a ILxQtPanelPluginLibrary.").arg(mPluginLoader->fileName()); + delete obj; + return false; + } + + ILxQtPanelPluginStartupInfo startupInfo; + startupInfo.settings = mSettings; + startupInfo.desktopFile = &mDesktopFile; + startupInfo.lxqtPanel = mPanel; + + mPlugin = pluginLib->instance(startupInfo); + if (!mPlugin) + { + qWarning() << QString("Can't load plugin \"%1\". Plugin can't build ILxQtPanelPlugin.").arg(mPluginLoader->fileName()); + delete obj; + return false; + } + + mPluginWidget = mPlugin->widget(); + if (mPluginWidget) + { + mPluginWidget->setObjectName(mPlugin->themeId()); + } + this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + return true; +} + + +/************************************************ + + ************************************************/ +QByteArray Plugin::calcSettingsHash() +{ + QCryptographicHash hash(QCryptographicHash::Md5); + QStringList keys = mSettings->allKeys(); + foreach (const QString &key, keys) + { + hash.addData(key.toUtf8()); + hash.addData(mSettings->value(key).toByteArray()); + } + return hash.result(); +} + + +/************************************************ + + ************************************************/ +void Plugin::settingsChanged() +{ + QByteArray hash = calcSettingsHash(); + if (mSettingsHash != hash) + { + mSettingsHash = hash; + mPlugin->settingsChanged(); + } +} + + +/************************************************ + + ************************************************/ +void Plugin::saveSettings() +{ + mSettings->setValue("alignment", (mAlignment == AlignLeft) ? "Left" : "Right"); + mSettings->setValue("type", mDesktopFile.id()); + mSettings->sync(); + +} + + +/************************************************ + + ************************************************/ +void Plugin::contextMenuEvent(QContextMenuEvent *event) +{ + mPanel->showPopupMenu(this); +} + + +/************************************************ + + ************************************************/ +void Plugin::mousePressEvent(QMouseEvent *event) +{ + switch (event->button()) + { + case Qt::LeftButton: + mPlugin->activated(ILxQtPanelPlugin::Trigger); + break; + + case Qt::MidButton: + mPlugin->activated(ILxQtPanelPlugin::MiddleClick); + break; + + default: + break; + } +} + + +/************************************************ + + ************************************************/ +void Plugin::mouseDoubleClickEvent(QMouseEvent*) +{ + mPlugin->activated(ILxQtPanelPlugin::DoubleClick); +} + + +/************************************************ + + ************************************************/ +void Plugin::showEvent(QShowEvent *) +{ + if (mPluginWidget) + mPluginWidget->adjustSize(); +} + + +/************************************************ + + ************************************************/ +QMenu *Plugin::popupMenu() const +{ + QString name = this->name().replace("&", "&&"); + QMenu* menu = new QMenu(windowTitle()); + + if (mPlugin->flags().testFlag(ILxQtPanelPlugin::HaveConfigDialog)) + { + QAction* configAction = new QAction( + XdgIcon::fromTheme(QStringLiteral("preferences-other")), + tr("Configure \"%1\"").arg(name), menu); + menu->addAction(configAction); + connect(configAction, SIGNAL(triggered()), this, SLOT(showConfigureDialog())); + } + + QAction* moveAction = new QAction(XdgIcon::fromTheme("transform-move"), tr("Move \"%1\"").arg(name), menu); + menu->addAction(moveAction); + connect(moveAction, SIGNAL(triggered()), this, SIGNAL(startMove())); + + menu->addSeparator(); + + QAction* removeAction = new QAction( + XdgIcon::fromTheme(QStringLiteral("list-remove")), + tr("Remove \"%1\"").arg(name), menu); + menu->addAction(removeAction); + connect(removeAction, SIGNAL(triggered()), this, SLOT(requestRemove())); + + return menu; +} + + +/************************************************ + + ************************************************/ +bool Plugin::isSeparate() const +{ + return mPlugin->isSeparate(); +} + + +/************************************************ + + ************************************************/ +bool Plugin::isExpandable() const +{ + return mPlugin->isExpandable(); +} + + +/************************************************ + + ************************************************/ +void Plugin::realign() +{ + if (mPlugin) + mPlugin->realign(); +} + + +/************************************************ + + ************************************************/ +void Plugin::showConfigureDialog() +{ + // store a pointer to each plugin using the plugins' names + static QHash > refs; + QDialog *dialog = refs[name()].data(); + + if (!dialog) + { + dialog = mPlugin->configureDialog(); + refs[name()] = dialog; + connect(this, SIGNAL(destroyed()), dialog, SLOT(close())); + } + + if (!dialog) + return; + + dialog->show(); + dialog->raise(); + dialog->activateWindow(); +} + + +/************************************************ + + ************************************************/ +void Plugin::requestRemove() +{ + emit remove(); + deleteLater(); +} diff --git a/panel/plugin.h b/panel/plugin.h new file mode 100644 index 0000000..ca47c1f --- /dev/null +++ b/panel/plugin.h @@ -0,0 +1,122 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef PLUGIN_H +#define PLUGIN_H + +#include +#include +#include +#include "ilxqtpanel.h" +#include "lxqtpanelglobals.h" + +class QPluginLoader; +class QSettings; +class ILxQtPanelPlugin; +class ILxQtPanelPluginLibrary; +class LxQtPanel; +class QMenu; + + +class LXQT_PANEL_API Plugin : public QFrame +{ + Q_OBJECT + + Q_PROPERTY(QColor moveMarkerColor READ moveMarkerColor WRITE setMoveMarkerColor) +public: + enum Alignment { + AlignLeft, + AlignRight + }; + + + explicit Plugin(const LxQt::PluginInfo &desktopFile, const QString &settingsFile, const QString &settingsGroup, LxQtPanel *panel); + ~Plugin(); + + bool isLoaded() const { return mPlugin != 0; } + Alignment alignment() const { return mAlignment; } + void setAlignment(Alignment alignment); + + QString settingsGroup() const { return mSettingsGroup; } + + void saveSettings(); + + QMenu* popupMenu() const; + ILxQtPanelPlugin * iPlugin() const { return mPlugin; } + + const LxQt::PluginInfo desktopFile() { return mDesktopFile; } + + bool isSeparate() const; + bool isExpandable() const; + + QWidget *widget() { return mPluginWidget; } + + QString name() const { return mName; } + + // For QSS properties .................. + static QColor moveMarkerColor() { return mMoveMarkerColor; } + static void setMoveMarkerColor(QColor color) { mMoveMarkerColor = color; } + +public slots: + void realign(); + +signals: + void startMove(); + void remove(); + +protected: + void contextMenuEvent(QContextMenuEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseDoubleClickEvent(QMouseEvent *event); + void showEvent(QShowEvent *event); + +private: + bool loadLib(const QString &libraryName); + + const LxQt::PluginInfo mDesktopFile; + QByteArray calcSettingsHash(); + QPluginLoader *mPluginLoader; + ILxQtPanelPlugin *mPlugin; + QWidget *mPluginWidget; + Alignment mAlignment; + QSettings *mSettings; + QString mSettingsGroup; + LxQtPanel *mPanel; + QByteArray mSettingsHash; + static QColor mMoveMarkerColor; + QString mName; + +private slots: + void settingsChanged(); + void showConfigureDialog(); + void requestRemove(); + +}; + + +#endif // PLUGIN_H diff --git a/panel/pluginmoveprocessor.cpp b/panel/pluginmoveprocessor.cpp new file mode 100644 index 0000000..4b7ddb0 --- /dev/null +++ b/panel/pluginmoveprocessor.cpp @@ -0,0 +1,314 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "pluginmoveprocessor.h" +#include "plugin.h" +#include "lxqtpanellayout.h" +#include + + +/************************************************ + + ************************************************/ +PluginMoveProcessor::PluginMoveProcessor(LxQtPanelLayout *layout, Plugin *plugin): + QWidget(plugin), + mLayout(layout), + mPlugin(plugin) +{ + mDestIndex = mLayout->indexOf(plugin); + + grabKeyboard(); +} + + +/************************************************ + + ************************************************/ +PluginMoveProcessor::~PluginMoveProcessor() +{ +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::start() +{ + // We have not memoryleaks there. + // The animation will be automatically deleted when stopped. + CursorAnimation *cursorAnimation = new CursorAnimation(); + connect(cursorAnimation, SIGNAL(finished()), this, SLOT(doStart())); + cursorAnimation->setEasingCurve(QEasingCurve::InOutQuad); + cursorAnimation->setDuration(150); + + cursorAnimation->setStartValue(QCursor::pos()); + cursorAnimation->setEndValue(mPlugin->mapToGlobal(mPlugin->rect().center())); + cursorAnimation->start(QAbstractAnimation::DeleteWhenStopped); +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::doStart() +{ + setMouseTracking(true); + show(); // Only visible widgets can grab mouse input. + grabMouse(mLayout->isHorizontal() ? Qt::SizeHorCursor : Qt::SizeVerCursor); +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::mouseMoveEvent(QMouseEvent *event) +{ + QPoint mouse = mLayout->parentWidget()->mapFromGlobal(event->globalPos()); + + MousePosInfo pos = itemByMousePos(mouse); + + QLayoutItem *prevItem = 0; + QLayoutItem *nextItem = 0; + if (pos.after) + { + mDestIndex = pos.index + 1; + prevItem = pos.item; + nextItem = mLayout->itemAt(pos.index + 1); + } + else + { + prevItem = mLayout->itemAt(pos.index - 1); + nextItem = pos.item; + mDestIndex = pos.index; + } + + bool plugSep = mPlugin->isSeparate(); + bool prevSep = LxQtPanelLayout::itemIsSeparate(prevItem); + bool nextSep = LxQtPanelLayout::itemIsSeparate(nextItem); + + if (!nextItem) + { + if (mLayout->isHorizontal()) + drawMark(prevItem, prevSep ? RightMark : BottomMark); + else + drawMark(prevItem, prevSep ? BottomMark : RightMark); + return; + } + + if (mLayout->lineCount() == 1) + { + if (mLayout->isHorizontal()) + drawMark(nextItem, LeftMark); + else + drawMark(nextItem, TopMark); + return; + } + + + if (!prevItem) + { + if (mLayout->isHorizontal()) + drawMark(nextItem, nextSep ? LeftMark : TopMark); + else + drawMark(nextItem, nextSep ? TopMark : LeftMark); + return; + } + + // We prefer to draw line at the top/left of next item. + // But if next item and moved plugin have different types (separate an not) and + // previous item hase same type as moved plugin we draw line at the end of previous one. + if (plugSep != nextSep && plugSep == prevSep) + { + if (mLayout->isHorizontal()) + drawMark(prevItem, prevSep ? RightMark : BottomMark); + else + drawMark(prevItem, prevSep ? BottomMark : RightMark); + } + else + { + if (mLayout->isHorizontal()) + drawMark(nextItem, nextSep ? LeftMark : TopMark); + else + drawMark(nextItem, nextSep ? TopMark : LeftMark); + } +} + + +/************************************************ + + ************************************************/ +PluginMoveProcessor::MousePosInfo PluginMoveProcessor::itemByMousePos(const QPoint mouse) const +{ + MousePosInfo ret; + + for (int i = mLayout->count()-1; i > -1; --i) + { + QLayoutItem *item = mLayout->itemAt(i); + QRect itemRect = item->geometry(); + if (mouse.x() > itemRect.left() && + mouse.y() > itemRect.top()) + { + + ret.index = i; + ret.item = item; + if (mLayout->isHorizontal()) + { + ret.after = LxQtPanelLayout::itemIsSeparate(item) ? + mouse.x() > itemRect.center().x() : + mouse.y() > itemRect.center().y() ; + } + else + { + ret.after = LxQtPanelLayout::itemIsSeparate(item) ? + mouse.y() > itemRect.center().y() : + mouse.x() > itemRect.center().x() ; + } + return ret; + } + } + + ret.index = 0; + ret.item = mLayout->itemAt(0); + ret.after = false; + return ret; +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::drawMark(QLayoutItem *item, MarkType markType) +{ + QWidget *widget = (item) ? item->widget() : 0; + + static QWidget *prevWidget = 0; + if (prevWidget && prevWidget != widget) + prevWidget->setStyleSheet(""); + + prevWidget = widget; + + if (!widget) + return; + + QString border1; + QString border2; + switch(markType) + { + case TopMark: + border1 = "top"; + border2 = "bottom"; + break; + + case BottomMark: + border1 = "bottom"; + border2 = "top"; + break; + + case LeftMark: + border1 = "left"; + border2 = "right"; + break; + + case RightMark: + border1 = "right"; + border2 = "left"; + break; + + } + + widget->setStyleSheet(QString("#%1 {" + "border-%2: 2px solid rgba(%4, %5, %6, %7); " + "border-%3: -2px solid; " + "background-color: transparent; }") + .arg(widget->objectName()) + .arg(border1) + .arg(border2) + .arg(Plugin::moveMarkerColor().red()) + .arg(Plugin::moveMarkerColor().green()) + .arg(Plugin::moveMarkerColor().blue()) + .arg(Plugin::moveMarkerColor().alpha()) + ); +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::mousePressEvent(QMouseEvent *event) +{ + event->accept(); +} + + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::mouseReleaseEvent(QMouseEvent *event) +{ + event->accept(); + releaseMouse(); + setMouseTracking(false); + doFinish(false); +} + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::keyPressEvent(QKeyEvent *event) +{ + if (event->key() == Qt::Key_Escape) { + doFinish(true); + return; + } + QWidget::keyPressEvent(event); +} + +/************************************************ + + ************************************************/ +void PluginMoveProcessor::doFinish(bool cancel) +{ + releaseKeyboard(); + + drawMark(0, TopMark); + + if (!cancel) + { + int currentIdx = mLayout->indexOf(mPlugin); + if (currentIdx == mDestIndex) + return; + + if (mDestIndex > currentIdx) + mDestIndex--; + + mLayout->moveItem(currentIdx, mDestIndex, true); + } + + emit finished(); + deleteLater(); +} diff --git a/panel/pluginmoveprocessor.h b/panel/pluginmoveprocessor.h new file mode 100644 index 0000000..9a25ebb --- /dev/null +++ b/panel/pluginmoveprocessor.h @@ -0,0 +1,99 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef PLUGINMOVEPROCESSOR_H +#define PLUGINMOVEPROCESSOR_H + +#include +#include +#include +#include "plugin.h" +#include "lxqtpanelglobals.h" + +class LxQtPanelLayout; +class QLayoutItem; + + +class LXQT_PANEL_API PluginMoveProcessor : public QWidget +{ + Q_OBJECT +public: + explicit PluginMoveProcessor(LxQtPanelLayout *layout, Plugin *plugin); + ~PluginMoveProcessor(); + + Plugin *plugin() const { return mPlugin; } + +signals: + void finished(); + +public slots: + void start(); + +protected: + void mouseMoveEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void keyPressEvent(QKeyEvent *event); + +private slots: + void doStart(); + void doFinish(bool cancel); + +private: + enum MarkType + { + TopMark, + BottomMark, + LeftMark, + RightMark + }; + + struct MousePosInfo + { + int index; + QLayoutItem *item; + bool after; + }; + + LxQtPanelLayout *mLayout; + Plugin *mPlugin; + int mDestIndex; + + MousePosInfo itemByMousePos(const QPoint mouse) const; + void drawMark(QLayoutItem *item, MarkType markType); +}; + + +class LXQT_PANEL_API CursorAnimation: public QVariantAnimation +{ + Q_OBJECT +public: + void updateCurrentValue(const QVariant &value) { QCursor::setPos(value.toPoint()); } +}; + +#endif // PLUGINMOVEPROCESSOR_H diff --git a/panel/popupmenu.cpp b/panel/popupmenu.cpp new file mode 100644 index 0000000..d8aa3b6 --- /dev/null +++ b/panel/popupmenu.cpp @@ -0,0 +1,123 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "popupmenu.h" +#include +#include +#include +#include + +static const char POPUPMENU_TITLE[] = "POPUP_MENU_TITLE_OBJECT_NAME"; + +/************************************************ + + ************************************************/ +QAction* PopupMenu::addTitle(const QIcon &icon, const QString &text) +{ + QAction *buttonAction = new QAction(this); + QFont font = buttonAction->font(); + font.setBold(true); + buttonAction->setText(QString(text).replace("&", "&&")); + buttonAction->setFont(font); + buttonAction->setIcon(icon); + + QWidgetAction *action = new QWidgetAction(this); + action->setObjectName(POPUPMENU_TITLE); + QToolButton *titleButton = new QToolButton(this); + titleButton->installEventFilter(this); // prevent clicks on the title of the menu + titleButton->setDefaultAction(buttonAction); + titleButton->setDown(true); // prevent hover style changes in some styles + titleButton->setCheckable(true); + titleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + action->setDefaultWidget(titleButton); + + addAction(action); + return action; +} + + +/************************************************ + + ************************************************/ +QAction* PopupMenu::addTitle(const QString &text) +{ + return addTitle(QIcon(), text); +} + + +/************************************************ + + ************************************************/ +bool PopupMenu::eventFilter(QObject *object, QEvent *event) +{ + Q_UNUSED(object); + + if (event->type() == QEvent::Paint || + event->type() == QEvent::KeyPress || + event->type() == QEvent::KeyRelease + ) + { + return false; + } + + event->accept(); + return true; +} + + +/************************************************ + + ************************************************/ +void PopupMenu::keyPressEvent(QKeyEvent* e) +{ + if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) + { + QMenu::keyPressEvent(e); + + QWidgetAction *action = qobject_cast(this->activeAction()); + QWidgetAction *firstAction = action; + + while (action && action->objectName() == POPUPMENU_TITLE) + { + this->keyPressEvent(e); + action = qobject_cast(this->activeAction()); + + if (firstAction == action) // we looped and only found titles + { + this->setActiveAction(0); + break; + } + } + + return; + } + + QMenu::keyPressEvent(e); +} + + diff --git a/panel/popupmenu.h b/panel/popupmenu.h new file mode 100644 index 0000000..408b913 --- /dev/null +++ b/panel/popupmenu.h @@ -0,0 +1,50 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef POPUPMENU_H +#define POPUPMENU_H + +#include +#include "lxqtpanelglobals.h" + +class LXQT_PANEL_API PopupMenu: public QMenu +{ +public: + explicit PopupMenu(QWidget *parent = 0): QMenu(parent) {} + explicit PopupMenu(const QString &title, QWidget *parent = 0): QMenu(title, parent) {} + + QAction* addTitle(const QIcon &icon, const QString &text); + QAction* addTitle(const QString &text); + + bool eventFilter(QObject *object, QEvent *event); + +protected: + virtual void keyPressEvent(QKeyEvent* e); +}; + +#endif // POPUPMENU_H diff --git a/panel/resources/panel.conf b/panel/resources/panel.conf new file mode 100644 index 0000000..a423df9 --- /dev/null +++ b/panel/resources/panel.conf @@ -0,0 +1,37 @@ +panels=panel1 + +[panel1] +plugins=mainmenu,desktopswitch,quicklaunch,taskbar,tray,mount,panelvolume,clock +position=Bottom +desktop=0 + +[mainmenu] +type=mainmenu + +[desktopswitch] +type=desktopswitch + +[quicklaunch] +type=quicklaunch +apps/size=5 +apps/1/desktop=firefox.desktop +apps/2/desktop=chromium-browser.desktop +apps/3/desktop=pcmanfm-qt.desktop +apps/4/desktop=KMail.desktop +apps/5/desktop=lxqt-config.desktop + +[taskbar] +type=taskbar + +[tray] +type=tray + +[mount] +type=mount + +[clock] +type=clock + +[panelvolume] +device=0 +type=panelvolume diff --git a/panel/translations/lxqt-panel.ts b/panel/translations/lxqt-panel.ts new file mode 100644 index 0000000..581fe61 --- /dev/null +++ b/panel/translations/lxqt-panel.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_ar.ts b/panel/translations/lxqt-panel_ar.ts new file mode 100644 index 0000000..5b7564c --- /dev/null +++ b/panel/translations/lxqt-panel_ar.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + تهيئة اللوحة + + + Panel size + حجم اللوحة + + + Size: + الحجم: + + + px + نقطة ضوئيَّة + + + Use automatic sizing + استخدم التَّحجيم اﻵلي + + + Panel length && position + طول وموقع اللوحة + + + Left + اليسار + + + Center + الوسظ + + + Right + اليمين + + + % + % + + + Alignment: + المحاذاة: + + + Length: + الطُّول: + + + Position: + الموقع: + + + Top of desktop + أعلى سطح المكتب + + + Left of desktop + يسار سطح المكتب + + + Right of desktop + يمين سطح المكتب + + + Bottom of desktop + أسفل سطح المكتب + + + Top of desktop %1 + أعلى سطح المكتب %1 + + + Left of desktop %1 + يسار سطح المكتب %1 + + + Right of desktop %1 + يمين سطح المكتب %1 + + + Bottom of desktop %1 + أسفل سطح المكتب %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + تهيئة اللوحة + + + + Size + + + + + Size: + الحجم: + + + + + px + + + + + Icon size: + + + + + Length: + الطُّول: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + نقطة ضوئيَّة + + + + Rows count: + + + + + Alignment && position + + + + + + Left + اليسار + + + + + + Center + الوسظ + + + + + Right + اليمين + + + + Alignment: + المحاذاة: + + + + Position: + الموقع: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + أعلى سطح المكتب + + + + Left of desktop + يسار سطح المكتب + + + + Right of desktop + يمين سطح المكتب + + + + Bottom of desktop + أسفل سطح المكتب + + + + Top of desktop %1 + أعلى سطح المكتب %1 + + + + Left of desktop %1 + يسار سطح المكتب %1 + + + + Right of desktop %1 + يمين سطح المكتب %1 + + + + Bottom of desktop %1 + أسفل سطح المكتب %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + قائمة التطبيقات + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + تهيئة اللوحة... + + + Add plugins ... + ضمُّ إضافات... + + + + LxQtPanelPlugin + + Configure + تهيئة + + + Move + تحريك + + + Remove + إزالة + + + + LxQtPanelPrivate + + Configure panel + تهيئة اللوحة + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_cs.ts b/panel/translations/lxqt-panel_cs.ts new file mode 100644 index 0000000..debfd1f --- /dev/null +++ b/panel/translations/lxqt-panel_cs.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Nastavit panel + + + Panel size + Velikost panelu + + + Size: + Velikost: + + + px + px + + + Use automatic sizing + Použít automatickou velikost + + + Panel length && position + Délka &a poloha panelu + + + Left + Zarovnat vlevo + + + Center + Zarovnat na střed + + + Right + Zarovnat vpravo + + + % + % + + + Alignment: + Zarovnání: + + + Length: + Délka: + + + Position: + Poloha: + + + Top of desktop + Horní strana pracovní plochy + + + Left of desktop + Levá strana pracovní plochy + + + Right of desktop + Pravá strana pracovní plochy + + + Bottom of desktop + Dolní strana pracovní plochy + + + Top of desktop %1 + Horní strana pracovní plochy %1 + + + Left of desktop %1 + Levá strana pracovní plochy %1 + + + Right of desktop %1 + Pravá strana pracovní plochy %1 + + + Bottom of desktop %1 + Dolní strana pracovní plochy %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Nastavit panel + + + + Size + + + + + Size: + Velikost: + + + + + px + + + + + Icon size: + + + + + Length: + Délka: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Zarovnat vlevo + + + + + + Center + Zarovnat na střed + + + + + Right + Zarovnat vpravo + + + + Alignment: + Zarovnání: + + + + Position: + Poloha: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Horní strana pracovní plochy + + + + Left of desktop + Levá strana pracovní plochy + + + + Right of desktop + Pravá strana pracovní plochy + + + + Bottom of desktop + Dolní strana pracovní plochy + + + + Top of desktop %1 + Horní strana pracovní plochy %1 + + + + Left of desktop %1 + Levá strana pracovní plochy %1 + + + + Right of desktop %1 + Pravá strana pracovní plochy %1 + + + + Bottom of desktop %1 + Dolní strana pracovní plochy %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Nastavit panel... + + + Add plugins ... + Přidat přídavné moduly... + + + + LxQtPanelPlugin + + Configure + Nastavit + + + Move + Přesunout + + + Remove + Odstranit + + + + LxQtPanelPrivate + + Configure panel + Nastavit panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_cs_CZ.ts b/panel/translations/lxqt-panel_cs_CZ.ts new file mode 100644 index 0000000..9652242 --- /dev/null +++ b/panel/translations/lxqt-panel_cs_CZ.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Nastavit panel + + + Panel size + Velikost panelu + + + Size: + Velikost: + + + px + px + + + Use automatic sizing + Použít automatickou velikost + + + Panel length && position + Délka &a poloha panelu + + + Left + Zarovnat vlevo + + + Center + Zarovnat na střed + + + Right + Zarovnat vpravo + + + % + % + + + Alignment: + Zarovnání: + + + Length: + Délka: + + + Position: + Poloha: + + + Top of desktop + Horní strana pracovní plochy + + + Left of desktop + Levá strana pracovní plochy + + + Right of desktop + Pravá strana pracovní plochy + + + Bottom of desktop + Dolní strana pracovní plochy + + + Top of desktop %1 + Horní strana pracovní plochy %1 + + + Left of desktop %1 + Levá strana pracovní plochy %1 + + + Right of desktop %1 + Pravá strana pracovní plochy %1 + + + Bottom of desktop %1 + Dolní strana pracovní plochy %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Nastavit panel + + + + Size + + + + + Size: + Velikost: + + + + + px + + + + + Icon size: + + + + + Length: + Délka: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Zarovnat vlevo + + + + + + Center + Zarovnat na střed + + + + + Right + Zarovnat vpravo + + + + Alignment: + Zarovnání: + + + + Position: + Poloha: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Horní strana pracovní plochy + + + + Left of desktop + Levá strana pracovní plochy + + + + Right of desktop + Pravá strana pracovní plochy + + + + Bottom of desktop + Dolní strana pracovní plochy + + + + Top of desktop %1 + Horní strana pracovní plochy %1 + + + + Left of desktop %1 + Levá strana pracovní plochy %1 + + + + Right of desktop %1 + Pravá strana pracovní plochy %1 + + + + Bottom of desktop %1 + Dolní strana pracovní plochy %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Nastavit panel... + + + Add plugins ... + Přidat přídavné moduly... + + + + LxQtPanelPlugin + + Configure + Nastavit + + + Move + Přesunout + + + Remove + Odstranit + + + + LxQtPanelPrivate + + Configure panel + Nastavit panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_da.ts b/panel/translations/lxqt-panel_da.ts new file mode 100644 index 0000000..2f55f13 --- /dev/null +++ b/panel/translations/lxqt-panel_da.ts @@ -0,0 +1,372 @@ + + + + + ConfigPanelDialog + + Configure panel + Indstil panel + + + Panel size + Panelstørrelse + + + Size: + Størrelse: + + + px + pkt + + + Use theme size + Brug tema-størrelse + + + Panel lenght & position + Panel længde & position + + + Length: + Længde: + + + Alignment: + Placering: + + + Left + Venstre + + + Center + Midtpå + + + Right + Højre + + + % + % + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Indstil panel + + + + Size + + + + + Size: + Størrelse: + + + + + px + + + + + Icon size: + + + + + Length: + Længde: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + pkt + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Venstre + + + + + + Center + Midtpå + + + + + Right + Højre + + + + Alignment: + Placering: + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Toppen af skrivebordet + + + + Left of desktop + Venstre side af skrivebordet + + + + Right of desktop + Højre side af skrivebordet + + + + Bottom of desktop + Bunden af skrivebordet + + + + Top of desktop %1 + Toppen af skrivebord %1 + + + + Left of desktop %1 + Venstre side af skrivebord %1 + + + + Right of desktop %1 + Højre side af skrivebord %1 + + + + Bottom of desktop %1 + Bunden af skrivebord %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + LxQtPanelPluginPrivate + + Configure + Indstil + + + Move + Flyt + + + Delete + Slet + + + + LxQtPanelPrivate + + Panel + Panel + + + Plugins + Udvidelsesmoduler + + + Add plugins ... + Tilføj udvidelsesmoduler ... + + + Move plugin + Flyt udvidelsesmodul + + + Configure plugin + Indstil udvidelsesmodul + + + Delete plugin + Fjern udvidelsesmodul + + + Show this panel at + Vis dette panel ved + + + Configure panel + Indstil panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + + PositionAction + + Top of desktop + Toppen af skrivebordet + + + Bottom of desktop + Bunden af skrivebordet + + + Left of desktop + Venstre side af skrivebordet + + + Right of desktop + Højre side af skrivebordet + + + Top of desktop %1 + Toppen af skrivebord %1 + + + Bottom of desktop %1 + Bunden af skrivebord %1 + + + Left of desktop %1 + Venstre side af skrivebord %1 + + + Right of desktop %1 + Højre side af skrivebord %1 + + + diff --git a/panel/translations/lxqt-panel_da_DK.ts b/panel/translations/lxqt-panel_da_DK.ts new file mode 100644 index 0000000..6f94773 --- /dev/null +++ b/panel/translations/lxqt-panel_da_DK.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Panelindstillinger + + + Panel size + Panelstørrelse + + + Size: + Størrelse: + + + px + px + + + Use automatic sizing + Brug automatisk dimensionering + + + Panel length && position + Panel længde && position + + + Left + Venstrestillet + + + Center + Midterstillet + + + Right + Højrestillet + + + % + % + + + Alignment: + Tilpasning: + + + Length: + Længde: + + + Position: + Position: + + + Top of desktop + Toppen af skrivebordet + + + Left of desktop + Venstre side af skrivebordet + + + Right of desktop + Højre side af skrivebordet + + + Bottom of desktop + Bunden af skrivebordet + + + Top of desktop %1 + Toppen af skrivebord %1 + + + Left of desktop %1 + Venstre side af skrivebord %1 + + + Right of desktop %1 + Højre side af skrivebord %1 + + + Bottom of desktop %1 + Bunden af skrivebord %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Størrelse: + + + + + px + + + + + Icon size: + + + + + Length: + Længde: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Venstrestillet + + + + + + Center + Midterstillet + + + + + Right + Højrestillet + + + + Alignment: + Tilpasning: + + + + Position: + Position: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Toppen af skrivebordet + + + + Left of desktop + Venstre side af skrivebordet + + + + Right of desktop + Højre side af skrivebordet + + + + Bottom of desktop + Bunden af skrivebordet + + + + Top of desktop %1 + Toppen af skrivebord %1 + + + + Left of desktop %1 + Venstre side af skrivebord %1 + + + + Right of desktop %1 + Højre side af skrivebord %1 + + + + Bottom of desktop %1 + Bunden af skrivebord %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Hej Verden + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Indstil panelet... + + + Add plugins ... + Tilføj plugins ... + + + + LxQtPanelPlugin + + Configure + Indstil + + + Move + Flyt + + + Remove + Fjern + + + + LxQtPanelPrivate + + Configure panel + Indstil panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_de.ts b/panel/translations/lxqt-panel_de.ts new file mode 100644 index 0000000..a333361 --- /dev/null +++ b/panel/translations/lxqt-panel_de.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Panel konfigurieren + + + Panel size + Leistengröße + + + Size: + Höhe: + + + px + px + + + Use automatic sizing + Automatische Größe verwenden + + + Panel length && position + Leistenlänge und Position + + + Left + Links + + + Center + Zentriert + + + Right + Rechts + + + % + % + + + Alignment: + Ausrichtung: + + + Length: + Länge: + + + Position: + Position: + + + Top of desktop + Oben + + + Left of desktop + Links + + + Right of desktop + Rechts + + + Bottom of desktop + Unten + + + Top of desktop %1 + Oben %1 + + + Left of desktop %1 + Links %1 + + + Right of desktop %1 + Rechts %1 + + + Bottom of desktop %1 + Unten %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Panel konfigurieren + + + + Size + + + + + Size: + Höhe: + + + + + px + + + + + Icon size: + + + + + Length: + Länge: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Links + + + + + + Center + Zentriert + + + + + Right + Rechts + + + + Alignment: + Ausrichtung: + + + + Position: + Position: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Oben + + + + Left of desktop + Links + + + + Right of desktop + Rechts + + + + Bottom of desktop + Unten + + + + Top of desktop %1 + Oben %1 + + + + Left of desktop %1 + Links %1 + + + + Right of desktop %1 + Rechts %1 + + + + Bottom of desktop %1 + Unten %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + LxQt Konfigurations Center + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Panel konfigurieren... + + + Add plugins ... + Plugins hinzufügen ... + + + + LxQtPanelPlugin + + Configure + Konfigurieren + + + Move + Verschieben + + + Remove + Entfernen + + + + LxQtPanelPrivate + + Configure panel + Panel konfigurieren + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_de_DE.ts b/panel/translations/lxqt-panel_de_DE.ts new file mode 100644 index 0000000..4f1c3dd --- /dev/null +++ b/panel/translations/lxqt-panel_de_DE.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Panel konfigurieren + + + Panel size + Panelgröße + + + Size: + Größe: + + + px + px + + + Use automatic sizing + Größe automatisch anpassen + + + Panel length && position + Panel Länge && Position + + + Left + Links + + + Center + Mitte + + + Right + Rechts + + + % + % + + + Alignment: + Ausrichtung: + + + Length: + Länge: + + + Position: + Position: + + + Top of desktop + Oben auf dem Desktop + + + Left of desktop + Links auf dem Desktop + + + Right of desktop + Rechts auf dem Desktop + + + Bottom of desktop + Unten auf dem Desktop + + + Top of desktop %1 + Oben auf dem Desktop %1 + + + Left of desktop %1 + Links auf dem Desktop %1 + + + Right of desktop %1 + Rechts auf dem Desktop %1 + + + Bottom of desktop %1 + Unten auf dem Desktop %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Panel konfigurieren + + + + Size + + + + + Size: + Größe: + + + + + px + + + + + Icon size: + + + + + Length: + Länge: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Links + + + + + + Center + Mitte + + + + + Right + Rechts + + + + Alignment: + Ausrichtung: + + + + Position: + Position: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Oben auf dem Desktop + + + + Left of desktop + Links auf dem Desktop + + + + Right of desktop + Rechts auf dem Desktop + + + + Bottom of desktop + Unten auf dem Desktop + + + + Top of desktop %1 + Oben auf dem Desktop %1 + + + + Left of desktop %1 + Links auf dem Desktop %1 + + + + Right of desktop %1 + Rechts auf dem Desktop %1 + + + + Bottom of desktop %1 + Unten auf dem Desktop %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Anwendungsmenü + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Konfiguriere Panel... + + + Add plugins ... + Plugins hinzufügen ... + + + + LxQtPanelPlugin + + Configure + Konfigurieren + + + Move + Bewegen + + + Remove + Entfernen + + + + LxQtPanelPrivate + + Configure panel + Panel konfigurieren + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_el_GR.ts b/panel/translations/lxqt-panel_el_GR.ts new file mode 100644 index 0000000..30802d2 --- /dev/null +++ b/panel/translations/lxqt-panel_el_GR.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Διαμόρφωση πίνακα + + + Panel size + Μέγεθος πίνακα + + + Size: + Μέγεθος: + + + px + px + + + Use automatic sizing + Χρήση αυτόματου μεγέθους + + + Panel length && position + Μήκος && θέση πίνακα + + + Left + Αριστερά + + + Center + Κέντρο + + + Right + Δεξιά + + + % + % + + + Alignment: + Στοίχιση: + + + Length: + Μήκος: + + + Position: + Θέση: + + + Top of desktop + Επάνω στην επιφάνεια εργασίας + + + Left of desktop + Αριστερά στην επιφάνεια εργασίας + + + Right of desktop + Δεξιά στην επιφάνεια εργασίας + + + Bottom of desktop + Κάτω στην επιφάνεια εργασίας + + + Top of desktop %1 + Επάνω στην επιφάνεια εργασίας %1 + + + Left of desktop %1 + Αριστερά στην επιφάνεια εργασίας %1 + + + Right of desktop %1 + Δεξιά στην επιφάνεια εργασίας %1 + + + Bottom of desktop %1 + Κάτω στην επιφάνεια εργασίας %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Διαμόρφωση πίνακα + + + + Size + + + + + Size: + Μέγεθος: + + + + + px + + + + + Icon size: + + + + + Length: + Μήκος: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Αριστερά + + + + + + Center + Κέντρο + + + + + Right + Δεξιά + + + + Alignment: + Στοίχιση: + + + + Position: + Θέση: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Επάνω στην επιφάνεια εργασίας + + + + Left of desktop + Αριστερά στην επιφάνεια εργασίας + + + + Right of desktop + Δεξιά στην επιφάνεια εργασίας + + + + Bottom of desktop + Κάτω στην επιφάνεια εργασίας + + + + Top of desktop %1 + Επάνω στην επιφάνεια εργασίας %1 + + + + Left of desktop %1 + Αριστερά στην επιφάνεια εργασίας %1 + + + + Right of desktop %1 + Δεξιά στην επιφάνεια εργασίας %1 + + + + Bottom of desktop %1 + Κάτω στην επιφάνεια εργασίας %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Πίνακας + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Διαμόρφωση πίνακα... + + + Add plugins ... + Προσθήκη επεκτάσεων... + + + + LxQtPanelPlugin + + Configure + Διαμόρφωση + + + Move + Μετακίνηση + + + Remove + Αφαίρεση + + + + LxQtPanelPrivate + + Configure panel + Διαμόρφωση πίνακα + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_eo.ts b/panel/translations/lxqt-panel_eo.ts new file mode 100644 index 0000000..61d265c --- /dev/null +++ b/panel/translations/lxqt-panel_eo.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Agordi panelon + + + Panel size + Grando de panelo + + + Size: + Grando: + + + px + rastr + + + Use automatic sizing + Uzi aŭtomatan grandigon + + + Panel length && position + Longo kaj loko de panelo + + + Left + Maldekstre + + + Center + Centre + + + Right + Dekstre + + + % + % + + + Alignment: + Loko: + + + Length: + Longo: + + + Position: + Loko: + + + Top of desktop + Supre de labortablo + + + Left of desktop + Maldekstre de labortablo + + + Right of desktop + Dekstre de labortablo + + + Bottom of desktop + Malsupre de labortablo + + + Top of desktop %1 + Supre de labortablo %1 + + + Left of desktop %1 + Maldekstre de labortablo %1 + + + Right of desktop %1 + Dekstre de labortablo %1 + + + Bottom of desktop %1 + Malsupre de labortablo %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Agordi panelon + + + + Size + + + + + Size: + Grando: + + + + + px + + + + + Icon size: + + + + + Length: + Longo: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + rastr + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Maldekstre + + + + + + Center + Centre + + + + + Right + Dekstre + + + + Alignment: + Loko: + + + + Position: + Loko: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Supre de labortablo + + + + Left of desktop + Maldekstre de labortablo + + + + Right of desktop + Dekstre de labortablo + + + + Bottom of desktop + Malsupre de labortablo + + + + Top of desktop %1 + Supre de labortablo %1 + + + + Left of desktop %1 + Maldekstre de labortablo %1 + + + + Right of desktop %1 + Dekstre de labortablo %1 + + + + Bottom of desktop %1 + Malsupre de labortablo %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Agordoj de muso por LxQto + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Agordi panelon... + + + Add plugins ... + Aldoni kromprogramojn... + + + + LxQtPanelPlugin + + Configure + Agordi + + + Move + Movi + + + Remove + Forigi + + + + LxQtPanelPrivate + + Configure panel + Agordi panelon + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_es.ts b/panel/translations/lxqt-panel_es.ts new file mode 100644 index 0000000..c51e074 --- /dev/null +++ b/panel/translations/lxqt-panel_es.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurar panel + + + Panel size + Tamaño del panel + + + Size: + Tamaño: + + + px + px + + + Use automatic sizing + Usar tamaño automático + + + Panel length && position + Largo y posición del panel + + + Left + Izquierda + + + Center + Centro + + + Right + Derecha + + + % + % + + + Alignment: + Alineación: + + + Length: + Largo: + + + Position: + Posición: + + + Top of desktop + Extremo superior del escritorio + + + Left of desktop + Extremo izquierdo del escritorio + + + Right of desktop + Extremo derecho del escritorio + + + Bottom of desktop + Extremo inferior del escritorio + + + Top of desktop %1 + Extremo superior del escritorio %1 + + + Left of desktop %1 + Extremo izquierdo del escritorio %1 + + + Right of desktop %1 + Extremo derecho del escritorio %1 + + + Bottom of desktop %1 + Extremo inferior del escritorio %1 + + + + + Configure Panel + Configurar Panel + + + + ConfigPanelWidget + + + Configure panel + Configurar panel + + + + Size + Tamaño + + + + Size: + Tamaño: + + + + + px + px + + + + Icon size: + Tamaño de ícono: + + + + Length: + Largo: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + <p>Un largo negativo en píxeles configura el largo del panel a esa cantidad de píxeles menos que el espacio disponible en la pantalla.</p><p/><p><i>E.j. "Largo" configurado a -100px, el tamaño de la pantalla es 1000px, entonces el largo real del panel será de 900 px.</i></p> + + + + % + % + + + + px + px + + + + Rows count: + Cantidad de filas: + + + + Alignment && position + Alineación y posición + + + + + Left + Izquierda + + + + + + Center + Centro + + + + + Right + Derecha + + + + Alignment: + Alineación: + + + + Position: + Posición: + + + + Styling + Estilo + + + + Custom font color: + Color de fuente personalizado: + + + + Custom background image: + Imagen de fondo personalizada: + + + + Custom background color: + Color de fondo personalizado: + + + + Opacity + Opacidad + + + + Top of desktop + Extremo superior del escritorio + + + + Left of desktop + Extremo izquierdo del escritorio + + + + Right of desktop + Extremo derecho del escritorio + + + + Bottom of desktop + Extremo inferior del escritorio + + + + Top of desktop %1 + Extremo superior del escritorio %1 + + + + Left of desktop %1 + Extremo izquierdo del escritorio %1 + + + + Right of desktop %1 + Extremo derecho del escritorio %1 + + + + Bottom of desktop %1 + Extremo inferior del escritorio %1 + + + + Top + Arriba + + + + Bottom + Abajo + + + + + Pick color + Seleccione un color + + + + Images (*.png *.gif *.jpg) + Imágenes (*.png *.gif *.jpg) + + + + LxQtPanel + + + Add Panel Widgets + Agregar Widgets al Panel + + + + + Panel + Panel + + + + Configure Panel... + Configurar Panel... + + + + Add Panel Widgets... + Agregar Widgets al Panel... + + + + Add Panel + Agregar Panel + + + + Remove Panel + Eliminar Panel + + + Configure panel... + Configuración del panel... + + + Add plugins ... + Añadir extensiones... + + + + LxQtPanelPlugin + + Configure + Configurar + + + Move + Mover + + + Remove + Quitar + + + + LxQtPanelPrivate + + Configure panel + Configurar panel + + + + Plugin + + + Configure "%1" + Configurar "%1" + + + + Move "%1" + Mover "%1" + + + + Remove "%1" + Eliminar "%1" + + + diff --git a/panel/translations/lxqt-panel_es_UY.ts b/panel/translations/lxqt-panel_es_UY.ts new file mode 100644 index 0000000..a7ff1c3 --- /dev/null +++ b/panel/translations/lxqt-panel_es_UY.ts @@ -0,0 +1,305 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Arriba del escritorio + + + + Left of desktop + A la izquierda del escritorio + + + + Right of desktop + A la derecha del escritorio + + + + Bottom of desktop + Abajo del escritorio + + + + Top of desktop %1 + Arriba del escritorio %1 + + + + Left of desktop %1 + A la izquierda del escritorio %1 + + + + Right of desktop %1 + A la derecha del excritorio %1 + + + + Bottom of desktop %1 + Abajo del escritorio %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + LxQtPanelPrivate + + Panel + Panel + + + Plugins + Complementos + + + Add plugins ... + Agregar complemento ... + + + Move plugin + Mover complemento + + + Configure plugin + Configurar complemento + + + Delete plugin + Borrar complemento + + + Show this panel at + Mostrar este complemento + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + + PositionAction + + Top of desktop + Arriba del escritorio + + + Bottom of desktop + Abajo del escritorio + + + Left of desktop + A la izquierda del escritorio + + + Right of desktop + A la derecha del escritorio + + + Top of desktop %1 + Arriba del escritorio %1 + + + Bottom of desktop %1 + Abajo del escritorio %1 + + + Left of desktop %1 + A la izquierda del escritorio %1 + + + Right of desktop %1 + A la derecha del excritorio %1 + + + diff --git a/panel/translations/lxqt-panel_es_VE.ts b/panel/translations/lxqt-panel_es_VE.ts new file mode 100644 index 0000000..2b3e6ec --- /dev/null +++ b/panel/translations/lxqt-panel_es_VE.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurar panel + + + Panel size + Tamaño de panel + + + Size: + Tamaño: + + + px + px + + + Use automatic sizing + Tamaño automatico + + + Panel length && position + Tamaño & posicion el panel + + + Left + Izquierda + + + Center + Centrado + + + Right + Derecha + + + % + % + + + Alignment: + Alineacion: + + + Length: + Largo: + + + Position: + Posicion: + + + Top of desktop + Tope del escritorio + + + Left of desktop + Izquierda del escritorio + + + Right of desktop + Derecha del escritorio + + + Bottom of desktop + Inferior del escritorio + + + Top of desktop %1 + Tope del escritorio %1 + + + Left of desktop %1 + Izquierda del escritorio %1 + + + Right of desktop %1 + Derecha del escritorio %1 + + + Bottom of desktop %1 + Inferior del escritorio %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configurar panel + + + + Size + + + + + Size: + Tamaño: + + + + + px + + + + + Icon size: + + + + + Length: + Largo: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Izquierda + + + + + + Center + Centrado + + + + + Right + Derecha + + + + Alignment: + Alineacion: + + + + Position: + Posicion: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Tope del escritorio + + + + Left of desktop + Izquierda del escritorio + + + + Right of desktop + Derecha del escritorio + + + + Bottom of desktop + Inferior del escritorio + + + + Top of desktop %1 + Tope del escritorio %1 + + + + Left of desktop %1 + Izquierda del escritorio %1 + + + + Right of desktop %1 + Derecha del escritorio %1 + + + + Bottom of desktop %1 + Inferior del escritorio %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configura el panel + + + Add plugins ... + Agregar plugins + + + + LxQtPanelPlugin + + Configure + Configurar + + + Move + Mover + + + Remove + Remover + + + + LxQtPanelPrivate + + Configure panel + Configurar panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_eu.ts b/panel/translations/lxqt-panel_eu.ts new file mode 100644 index 0000000..a23e5d7 --- /dev/null +++ b/panel/translations/lxqt-panel_eu.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Konfiguratu panela + + + Panel size + Panelaren tamaina + + + Size: + Tamaina: + + + px + px + + + Use automatic sizing + Erabili tamaina automatikoa + + + Panel length && position + Panelaren luzera eta posizioa + + + Left + Ezkerra + + + Center + Erdia + + + Right + Eskuina + + + % + % + + + Alignment: + Lerrokatzea: + + + Length: + Luzera: + + + Position: + Posizioa: + + + Top of desktop + Mahaigainaren goialdea + + + Left of desktop + Mahaigainaren ezkerraldea + + + Right of desktop + Mahaigainaren eskuinaldea + + + Bottom of desktop + Mahaigainaren behealdea + + + Top of desktop %1 + %1 mahaigainaren goialdea + + + Left of desktop %1 + %1 mahaigainaren ezkerraldea + + + Right of desktop %1 + %1 mahaigainaren eskuinaldea + + + Bottom of desktop %1 + %1 mahaigainaren behealdea + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Konfiguratu panela + + + + Size + + + + + Size: + Tamaina: + + + + + px + + + + + Icon size: + + + + + Length: + Luzera: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Ezkerra + + + + + + Center + Erdia + + + + + Right + Eskuina + + + + Alignment: + Lerrokatzea: + + + + Position: + Posizioa: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Mahaigainaren goialdea + + + + Left of desktop + Mahaigainaren ezkerraldea + + + + Right of desktop + Mahaigainaren eskuinaldea + + + + Bottom of desktop + Mahaigainaren behealdea + + + + Top of desktop %1 + %1 mahaigainaren goialdea + + + + Left of desktop %1 + %1 mahaigainaren ezkerraldea + + + + Right of desktop %1 + %1 mahaigainaren eskuinaldea + + + + Bottom of desktop %1 + %1 mahaigainaren behealdea + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panela + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Konfiguratu panela... + + + Add plugins ... + Gehitu pluginak... + + + + LxQtPanelPlugin + + Configure + Konfiguratu + + + Move + Mugitu + + + Remove + Kendu + + + + LxQtPanelPrivate + + Configure panel + Konfiguratu panela + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_fi.ts b/panel/translations/lxqt-panel_fi.ts new file mode 100644 index 0000000..e948b50 --- /dev/null +++ b/panel/translations/lxqt-panel_fi.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Muokkaa paneelia + + + Panel size + Paneelin koko + + + Size: + Koko: + + + px + pikseliä + + + Use automatic sizing + Käytä automaattista kokoa + + + Panel length && position + Paneelin pituus && sijainti + + + Left + Vasemmalla + + + Center + Keskellä + + + Right + Oikealla + + + % + % + + + Alignment: + Kohdistus: + + + Length: + Leveys: + + + Position: + Sijainti: + + + Top of desktop + Työpöydän yläosassa + + + Left of desktop + Työpöydän vasemmassa laidassa + + + Right of desktop + Työpöydän oikeassa laidassa + + + Bottom of desktop + Työpöydän alaosassa + + + Top of desktop %1 + Työpöydän %1 yläosassa + + + Left of desktop %1 + Työpöydän %1 vasemmassa laidassa + + + Right of desktop %1 + Työpöydän %1 oikeassa laidassa + + + Bottom of desktop %1 + Työpöydän %1 alaosassa + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Muokkaa paneelia + + + + Size + + + + + Size: + Koko: + + + + + px + + + + + Icon size: + + + + + Length: + Leveys: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + pikseliä + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Vasemmalla + + + + + + Center + Keskellä + + + + + Right + Oikealla + + + + Alignment: + Kohdistus: + + + + Position: + Sijainti: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Työpöydän yläosassa + + + + Left of desktop + Työpöydän vasemmassa laidassa + + + + Right of desktop + Työpöydän oikeassa laidassa + + + + Bottom of desktop + Työpöydän alaosassa + + + + Top of desktop %1 + Työpöydän %1 yläosassa + + + + Left of desktop %1 + Työpöydän %1 vasemmassa laidassa + + + + Right of desktop %1 + Työpöydän %1 oikeassa laidassa + + + + Bottom of desktop %1 + Työpöydän %1 alaosassa + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Paneeli + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Muokkaa paneelia... + + + Add plugins ... + Lisää liitännäisiä... + + + + LxQtPanelPlugin + + Configure + Muokkaa + + + Move + Siirrä + + + Remove + Poista + + + + LxQtPanelPrivate + + Configure panel + Muokkaa paneelia + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_fr_FR.ts b/panel/translations/lxqt-panel_fr_FR.ts new file mode 100644 index 0000000..1313fcc --- /dev/null +++ b/panel/translations/lxqt-panel_fr_FR.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurer le tableau de bord + + + Panel size + Taille du tableau de bord + + + Size: + Taille : + + + px + px + + + Use automatic sizing + Utiliser le dimensionnement automatique + + + Panel length && position + Longueur et position du tableau de bord + + + Left + Gauche + + + Center + Centre + + + Right + Droite + + + % + % + + + Alignment: + Alignement : + + + Length: + Longueur : + + + Position: + Position : + + + Top of desktop + Haut du bureau + + + Left of desktop + Gauche du bureau + + + Right of desktop + Droite du bureau + + + Bottom of desktop + Bas du bureau + + + Top of desktop %1 + Haut du bureau %1 + + + Left of desktop %1 + Gauche du bureau %1 + + + Right of desktop %1 + Droite du bureau %1 + + + Bottom of desktop %1 + Bas du bureau %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configurer le tableau de bord + + + + Size + + + + + Size: + Taille : + + + + + px + + + + + Icon size: + + + + + Length: + Longueur : + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Gauche + + + + + + Center + Centre + + + + + Right + Droite + + + + Alignment: + Alignement : + + + + Position: + Position : + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Haut du bureau + + + + Left of desktop + Gauche du bureau + + + + Right of desktop + Droite du bureau + + + + Bottom of desktop + Bas du bureau + + + + Top of desktop %1 + Haut du bureau %1 + + + + Left of desktop %1 + Gauche du bureau %1 + + + + Right of desktop %1 + Droite du bureau %1 + + + + Bottom of desktop %1 + Bas du bureau %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Bloc-notes + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configurer le tableau de bord... + + + Add plugins ... + Ajouter des extensions... + + + + LxQtPanelPlugin + + Configure + Configurer + + + Move + Déplacer + + + Remove + Supprimer + + + + LxQtPanelPrivate + + Configure panel + Configurer le tableau de bord + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_hu.ts b/panel/translations/lxqt-panel_hu.ts new file mode 100644 index 0000000..dbb708e --- /dev/null +++ b/panel/translations/lxqt-panel_hu.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Panelbeállítás + + + Panel size + Panelméret + + + Size: + Méret: + + + px + px + + + Use automatic sizing + Automatikus méretezés + + + Panel length && position + Panelhossz és elhelyezkedés + + + Left + Balra + + + Center + Középre + + + Right + Jobbra + + + % + % + + + Alignment: + Igazítás: + + + Length: + Hossz: + + + Position: + Pozíció: + + + Top of desktop + Az asztal tetején + + + Left of desktop + Az asztal bal oldalán + + + Right of desktop + Az asztal jobb oldalán + + + Bottom of desktop + Az asztal alján + + + Top of desktop %1 + A(z) %1. asztal tetején + + + Left of desktop %1 + A(z) %1. asztal bal oldalán + + + Right of desktop %1 + A(z) %1. asztal jobb oldalán + + + Bottom of desktop %1 + A(z) %1. asztal alján + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Panelbeállítás + + + + Size + + + + + Size: + Méret: + + + + + px + + + + + Icon size: + + + + + Length: + Hossz: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Balra + + + + + + Center + Középre + + + + + Right + Jobbra + + + + Alignment: + Igazítás: + + + + Position: + Pozíció: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Az asztal tetején + + + + Left of desktop + Az asztal bal oldalán + + + + Right of desktop + Az asztal jobb oldalán + + + + Bottom of desktop + Az asztal alján + + + + Top of desktop %1 + A(z) %1. asztal tetején + + + + Left of desktop %1 + A(z) %1. asztal bal oldalán + + + + Right of desktop %1 + A(z) %1. asztal jobb oldalán + + + + Bottom of desktop %1 + A(z) %1. asztal alján + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Alkalmazásmenü + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Panel beállítása… + + + Add plugins ... + Bővítmények hozzáadása… + + + + LxQtPanelPlugin + + Configure + Beállítás + + + Move + Mozgatás + + + Remove + Eltávolítás + + + + LxQtPanelPrivate + + Configure panel + Panelbeállítás + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_hu_HU.ts b/panel/translations/lxqt-panel_hu_HU.ts new file mode 100644 index 0000000..7a409b6 --- /dev/null +++ b/panel/translations/lxqt-panel_hu_HU.ts @@ -0,0 +1,275 @@ + + + + + ConfigPanelDialog + + Top of desktop + Az asztal tetejére + + + Left of desktop + Az asztal bal oldalára + + + Right of desktop + Az asztal jobb oldalára + + + Bottom of desktop + Az asztal aljára + + + Top of desktop %1 + A(z) %1. asztal tetejére + + + Left of desktop %1 + A(z) %1. asztal bal oldalára + + + Right of desktop %1 + A(z) %1. asztal jobb oldalára + + + Bottom of desktop %1 + A(z) %1. asztal aljára + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Az asztal tetejére + + + + Left of desktop + Az asztal bal oldalára + + + + Right of desktop + Az asztal jobb oldalára + + + + Bottom of desktop + Az asztal aljára + + + + Top of desktop %1 + A(z) %1. asztal tetejére + + + + Left of desktop %1 + A(z) %1. asztal bal oldalára + + + + Right of desktop %1 + A(z) %1. asztal jobb oldalára + + + + Bottom of desktop %1 + A(z) %1. asztal aljára + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Add plugins ... + Bővítmények hozzáadása… + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_ia.ts b/panel/translations/lxqt-panel_ia.ts new file mode 100644 index 0000000..df840bf --- /dev/null +++ b/panel/translations/lxqt-panel_ia.ts @@ -0,0 +1,247 @@ + + + + + ConfigPanelDialog + + Panel size + Dimension de pannello + + + Size: + Dimension + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Dimension + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_id_ID.ts b/panel/translations/lxqt-panel_id_ID.ts new file mode 100644 index 0000000..d96a9ce --- /dev/null +++ b/panel/translations/lxqt-panel_id_ID.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Hell World + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_it.ts b/panel/translations/lxqt-panel_it.ts new file mode 100644 index 0000000..bf4acf0 --- /dev/null +++ b/panel/translations/lxqt-panel_it.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configura il pannello + + + Panel size + Dimensione pannello + + + Size: + Dimensione: + + + px + px + + + Use automatic sizing + Usa dimensionamento automatico + + + Panel length && position + Lunghezza e posizione del pannello + + + Left + Sinistra + + + Center + Centro + + + Right + Destra + + + % + % + + + Alignment: + Allineamento: + + + Length: + Lunghezza: + + + Position: + Posizione: + + + Top of desktop + Alto del desktop + + + Left of desktop + Sinistra del desktop + + + Right of desktop + Destra del desktop + + + Bottom of desktop + Basso del desktop + + + Top of desktop %1 + Alto del desktop %1 + + + Left of desktop %1 + Sinistra del desktop %1 + + + Right of desktop %1 + Destra del desktop %1 + + + Bottom of desktop %1 + Basso del desktop %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Dimensione: + + + + + px + + + + + Icon size: + + + + + Length: + Lunghezza: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Sinistra + + + + + + Center + Centro + + + + + Right + Destra + + + + Alignment: + Allineamento: + + + + Position: + Posizione: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Alto del desktop + + + + Left of desktop + Sinistra del desktop + + + + Right of desktop + Destra del desktop + + + + Bottom of desktop + Basso del desktop + + + + Top of desktop %1 + Alto del desktop %1 + + + + Left of desktop %1 + Sinistra del desktop %1 + + + + Right of desktop %1 + Destra del desktop %1 + + + + Bottom of desktop %1 + Basso del desktop %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Centro di Configurazione LxQt + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configura pannello... + + + Add plugins ... + Aggiungi plugin... + + + + LxQtPanelPlugin + + Configure + Configura + + + Move + Sposta + + + Remove + Rimuovi + + + + LxQtPanelPrivate + + Configure panel + Configura pannello + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_it_IT.ts b/panel/translations/lxqt-panel_it_IT.ts new file mode 100644 index 0000000..ebdc5ba --- /dev/null +++ b/panel/translations/lxqt-panel_it_IT.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configura il pannello + + + Panel size + Dimensione del pannello + + + Size: + Dimensione: + + + px + px + + + Use automatic sizing + Utilizza il dimensionamento automatico + + + Panel length && position + Posizione e larghezza del pannello + + + Left + Sinistra + + + Center + Centro + + + Right + Destra + + + % + % + + + Alignment: + Allineamento: + + + Length: + Larghezza: + + + Position: + Posizione: + + + Top of desktop + In alto nel desktop + + + Left of desktop + A sinistra nel desktop + + + Right of desktop + A destra nel desktop + + + Bottom of desktop + In basso nel desktop + + + Top of desktop %1 + In alto nel desktop %1 + + + Left of desktop %1 + A sinistra nel desktop %1 + + + Right of desktop %1 + A destra nel desktop %1 + + + Bottom of desktop %1 + In basso nel desktop %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configura il pannello + + + + Size + + + + + Size: + Dimensione: + + + + + px + + + + + Icon size: + + + + + Length: + Larghezza: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Sinistra + + + + + + Center + Centro + + + + + Right + Destra + + + + Alignment: + Allineamento: + + + + Position: + Posizione: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + In alto nel desktop + + + + Left of desktop + A sinistra nel desktop + + + + Right of desktop + A destra nel desktop + + + + Bottom of desktop + In basso nel desktop + + + + Top of desktop %1 + In alto nel desktop %1 + + + + Left of desktop %1 + A sinistra nel desktop %1 + + + + Right of desktop %1 + A destra nel desktop %1 + + + + Bottom of desktop %1 + In basso nel desktop %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Esci + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configura il pannello... + + + Add plugins ... + Aggiungi plugin ... + + + + LxQtPanelPlugin + + Configure + Configura + + + Move + Sposta + + + Remove + Rimuovi + + + + LxQtPanelPrivate + + Configure panel + Configura il pannello + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_ja.ts b/panel/translations/lxqt-panel_ja.ts new file mode 100644 index 0000000..2392f5a --- /dev/null +++ b/panel/translations/lxqt-panel_ja.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + パネルを設定 + + + + ConfigPanelWidget + + + Configure panel + パネルを設定 + + + + Size + 大きさ + + + + Size: + 幅: + + + + + px + ピクセル + + + + Icon size: + アイコンの大きさ: + + + + Length: + 長さ: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + <p>負のピクセル値を設定すると、スクリーンの最大領域からその値を差し引いた長さになります。</p><p/><p><i>例: スクリーンの大きさが 1000 ピクセルである場合に -100 ピクセルを設定すると、パネルの長さは 900 ピクセルになります。</i></p> + + + + % + % + + + + px + ピクセル + + + + Rows count: + 列の数 + + + + Alignment && position + 位置寄せと場所 + + + + + Left + 左寄せ + + + + + + Center + 中央 + + + + + Right + 右寄せ + + + + Alignment: + 位置寄せ: + + + + Position: + 場所: + + + + Styling + 見た目 + + + + Custom font color: + フォントの色を変更: + + + + Custom background image: + 背景画像を指定 + + + + Custom background color: + 背景の色を変更: + + + + Opacity + 透明度 + + + + Top of desktop + デスクトップの上 + + + + Left of desktop + デスクトップの左 + + + + Right of desktop + デスクトップの右 + + + + Bottom of desktop + デスクトップの下 + + + + Top of desktop %1 + デスクトップ %1 の上 + + + + Left of desktop %1 + デスクトップ %1 の左 + + + + Right of desktop %1 + デスクトップ %1 の右 + + + + Bottom of desktop %1 + デスクトップ %1 の下 + + + + Top + + + + + Bottom + + + + + + Pick color + 色を選ぶ + + + + Images (*.png *.gif *.jpg) + 画像 (*.png *.gif *.jpg) + + + + LxQtPanel + + + Add Panel Widgets + パネルウィジェットを追加 + + + + + Panel + パネル + + + + Configure Panel... + パネルの設定 + + + + Add Panel Widgets... + ウィジェットを追加 + + + + Add Panel + パネルを追加 + + + + Remove Panel + パネルを削除 + + + + Plugin + + + Configure "%1" + "%1" を設定 + + + + Move "%1" + "%1" を移動 + + + + Remove "%1" + "%1" を削除 + + + diff --git a/panel/translations/lxqt-panel_ko.ts b/panel/translations/lxqt-panel_ko.ts new file mode 100644 index 0000000..b7217b5 --- /dev/null +++ b/panel/translations/lxqt-panel_ko.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_lt.ts b/panel/translations/lxqt-panel_lt.ts new file mode 100644 index 0000000..3aacd0b --- /dev/null +++ b/panel/translations/lxqt-panel_lt.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Skydelio konfigūravimas + + + Panel size + Skydelio dydis + + + Size: + Dydis: + + + px + taškeliai + + + Use automatic sizing + Automatinis dydis + + + Panel length && position + Skydelio ilgis ir padėtis + + + Left + Kairinė + + + Center + Centrinė + + + Right + Dešininė + + + % + % + + + Alignment: + Lygiuotė: + + + Length: + Ilgis: + + + Position: + Padėtis: + + + Top of desktop + Darbalaukio viršuje + + + Left of desktop + Darbalaukio kairėje + + + Right of desktop + Darbalaukio dešinėje + + + Bottom of desktop + Darbalaukio apačioje + + + Top of desktop %1 + %1 darbalaukio viršuje + + + Left of desktop %1 + %1 darbalaukio kairėje + + + Right of desktop %1 + %1 darbalaukio dešinėje + + + Bottom of desktop %1 + %1 darbalaukio apačioje + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Skydelio konfigūravimas + + + + Size + + + + + Size: + Dydis: + + + + + px + + + + + Icon size: + + + + + Length: + Ilgis: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + taškeliai + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Kairinė + + + + + + Center + Centrinė + + + + + Right + Dešininė + + + + Alignment: + Lygiuotė: + + + + Position: + Padėtis: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Darbalaukio viršuje + + + + Left of desktop + Darbalaukio kairėje + + + + Right of desktop + Darbalaukio dešinėje + + + + Bottom of desktop + Darbalaukio apačioje + + + + Top of desktop %1 + %1 darbalaukio viršuje + + + + Left of desktop %1 + %1 darbalaukio kairėje + + + + Right of desktop %1 + %1 darbalaukio dešinėje + + + + Bottom of desktop %1 + %1 darbalaukio apačioje + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Qlipper + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Konfigūruoti skydelį... + + + Add plugins ... + Įdėti papildinių... + + + + LxQtPanelPlugin + + Configure + Konfigūruoti + + + Move + Perkelti + + + Remove + Pašalinti + + + + LxQtPanelPrivate + + Configure panel + Skydelio konfigūravimas + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_nl.ts b/panel/translations/lxqt-panel_nl.ts new file mode 100644 index 0000000..d3801de --- /dev/null +++ b/panel/translations/lxqt-panel_nl.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Paneel instellen + + + Panel size + Paneelgrootte + + + Size: + Grootte: + + + px + px + + + Use automatic sizing + Gebruik automatische afmetingen + + + Panel length && position + Lengte && positie van paneel + + + Left + Links + + + Center + Midden + + + Right + Rechts + + + % + % + + + Alignment: + Uitlijning: + + + Length: + Lengte: + + + Position: + Positie: + + + Top of desktop + Bovenaan bureaublad + + + Left of desktop + Linkerzijkant van bureaublad + + + Right of desktop + Rechterzijkant van bureaublad + + + Bottom of desktop + Onderkant van bureaublad + + + Top of desktop %1 + Bovenkant van bureaublad %1 + + + Left of desktop %1 + Linkerzijkant van bureaublad %1 + + + Right of desktop %1 + Rechterzijkant van bureaublad %1 + + + Bottom of desktop %1 + Onderkant van bureaublad %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Grootte: + + + + + px + + + + + Icon size: + + + + + Length: + Lengte: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Links + + + + + + Center + Midden + + + + + Right + Rechts + + + + Alignment: + Uitlijning: + + + + Position: + Positie: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Bovenaan bureaublad + + + + Left of desktop + Linkerzijkant van bureaublad + + + + Right of desktop + Rechterzijkant van bureaublad + + + + Bottom of desktop + Onderkant van bureaublad + + + + Top of desktop %1 + Bovenkant van bureaublad %1 + + + + Left of desktop %1 + Linkerzijkant van bureaublad %1 + + + + Right of desktop %1 + Rechterzijkant van bureaublad %1 + + + + Bottom of desktop %1 + Onderkant van bureaublad %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Paneel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Paneel instellen... + + + Add plugins ... + Invoegtoepassingen toevoegen... + + + + LxQtPanelPlugin + + Configure + Instellen + + + Move + Verplaatsen + + + Remove + Verwijderen + + + + LxQtPanelPrivate + + Configure panel + Paneel instellingen + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_pl.ts b/panel/translations/lxqt-panel_pl.ts new file mode 100644 index 0000000..4087d11 --- /dev/null +++ b/panel/translations/lxqt-panel_pl.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Menu + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_pl_PL.ts b/panel/translations/lxqt-panel_pl_PL.ts new file mode 100644 index 0000000..2246317 --- /dev/null +++ b/panel/translations/lxqt-panel_pl_PL.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Konfiguruj panel + + + Panel size + Rozmiar panelu + + + Size: + Rozmiar: + + + px + px + + + Use automatic sizing + Użyj automatycznego dopasowywania + + + Panel length && position + Długość i położenie panelu + + + Left + Lewa + + + Center + Środek + + + Right + Prawa + + + % + % + + + Alignment: + Wyrównanie: + + + Length: + Długość: + + + Position: + Pozycja: + + + Top of desktop + Górna krawędź pulpitu + + + Left of desktop + Lewa krawędź pulpitu + + + Right of desktop + Prawa krawędź pulpitu + + + Bottom of desktop + Dolna krawędź pulpitu + + + Top of desktop %1 + Górna krawędź pulpitu %1 + + + Left of desktop %1 + Lewa krawędź pulpitu %1 + + + Right of desktop %1 + Prawa krawędź pulpitu %1 + + + Bottom of desktop %1 + Dolna krawędź pulpitu %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Konfiguruj panel + + + + Size + + + + + Size: + Rozmiar: + + + + + px + + + + + Icon size: + + + + + Length: + Długość: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Lewa + + + + + + Center + Środek + + + + + Right + Prawa + + + + Alignment: + Wyrównanie: + + + + Position: + Pozycja: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Górna krawędź pulpitu + + + + Left of desktop + Lewa krawędź pulpitu + + + + Right of desktop + Prawa krawędź pulpitu + + + + Bottom of desktop + Dolna krawędź pulpitu + + + + Top of desktop %1 + Górna krawędź pulpitu %1 + + + + Left of desktop %1 + Lewa krawędź pulpitu %1 + + + + Right of desktop %1 + Prawa krawędź pulpitu %1 + + + + Bottom of desktop %1 + Dolna krawędź pulpitu %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Konfiguruj panel... + + + Add plugins ... + Dodaj wtyczkę ... + + + + LxQtPanelPlugin + + Configure + Konfiguruj + + + Move + Przesuń + + + Remove + Usuń + + + + LxQtPanelPrivate + + Configure panel + Konfiguruj panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_pt.ts b/panel/translations/lxqt-panel_pt.ts new file mode 100644 index 0000000..f78691c --- /dev/null +++ b/panel/translations/lxqt-panel_pt.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurar painel + + + Panel size + Tamanho do painel + + + Size: + Tamanho: + + + px + px + + + Use automatic sizing + Tamanho automático + + + Panel length && position + Posição e comprimento do painel + + + Left + À esquerda + + + Center + Ao centro + + + Right + À direita + + + % + % + + + Alignment: + Alinhamento + + + Length: + Comprimento: + + + Position: + Posição: + + + Top of desktop + Em cima + + + Left of desktop + À esquerda + + + Right of desktop + À direita + + + Bottom of desktop + Em baixo + + + Top of desktop %1 + Em cima, área de trabalho %1 + + + Left of desktop %1 + À esquerda, área de trabalho %1 + + + Right of desktop %1 + À direita, área de trabalho %1 + + + Bottom of desktop %1 + Em baixo, área de trabalho %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configurar painel + + + + Size + + + + + Size: + Tamanho: + + + + + px + + + + + Icon size: + + + + + Length: + Comprimento: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + À esquerda + + + + + + Center + Ao centro + + + + + Right + À direita + + + + Alignment: + Alinhamento + + + + Position: + Posição: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Em cima + + + + Left of desktop + À esquerda + + + + Right of desktop + À direita + + + + Bottom of desktop + Em baixo + + + + Top of desktop %1 + Em cima, área de trabalho %1 + + + + Left of desktop %1 + À esquerda, área de trabalho %1 + + + + Right of desktop %1 + À direita, área de trabalho %1 + + + + Bottom of desktop %1 + Em baixo, área de trabalho %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Painel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configurar painel... + + + Add plugins ... + Adicionar extras... + + + + LxQtPanelPlugin + + Configure + Configurar + + + Move + Mover + + + Remove + Remover + + + + LxQtPanelPrivate + + Configure panel + Configurar painel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_pt_BR.ts b/panel/translations/lxqt-panel_pt_BR.ts new file mode 100644 index 0000000..f15d600 --- /dev/null +++ b/panel/translations/lxqt-panel_pt_BR.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurar painel + + + Panel size + Tamanho do painel + + + Size: + Tamanho: + + + px + px + + + Use automatic sizing + Usar dimensionamento automático + + + Panel length && position + Comprimento e posição do painel + + + Left + Esquerda + + + Center + Centro + + + Right + Direita + + + % + % + + + Alignment: + Alinhamento: + + + Length: + Comprimento: + + + Position: + Posição: + + + Top of desktop + Na parte superior da área de trabalho + + + Left of desktop + À esquerda da área de trabalho + + + Right of desktop + À direita da área de trabalho + + + Bottom of desktop + Na parte inferior da área de trabalho + + + Top of desktop %1 + Na parte superior da área de trabalho %1 + + + Left of desktop %1 + A esquerda da área de trabalho %1 + + + Right of desktop %1 + À direita da área de trabalho %1 + + + Bottom of desktop %1 + Na parte inferior da área de trabalho %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configurar painel + + + + Size + + + + + Size: + Tamanho: + + + + + px + + + + + Icon size: + + + + + Length: + Comprimento: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Esquerda + + + + + + Center + Centro + + + + + Right + Direita + + + + Alignment: + Alinhamento: + + + + Position: + Posição: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Na parte superior da área de trabalho + + + + Left of desktop + À esquerda da área de trabalho + + + + Right of desktop + À direita da área de trabalho + + + + Bottom of desktop + Na parte inferior da área de trabalho + + + + Top of desktop %1 + Na parte superior da área de trabalho %1 + + + + Left of desktop %1 + A esquerda da área de trabalho %1 + + + + Right of desktop %1 + À direita da área de trabalho %1 + + + + Bottom of desktop %1 + Na parte inferior da área de trabalho %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Suspender Automaticamente + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configurar painel... + + + Add plugins ... + Adicionar plug-ins... + + + + LxQtPanelPlugin + + Configure + Configurar + + + Move + Mover + + + Remove + Remover + + + + LxQtPanelPrivate + + Configure panel + Configurar painel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_ro_RO.ts b/panel/translations/lxqt-panel_ro_RO.ts new file mode 100644 index 0000000..80a4b1c --- /dev/null +++ b/panel/translations/lxqt-panel_ro_RO.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Configurează panoul + + + Panel size + Dimensiune panou + + + Size: + Dimensiune: + + + px + px + + + Use automatic sizing + Utilizează dimensionarea automată + + + Panel length && position + Lungime și &poziție panou + + + Left + Stânga + + + Center + Centru + + + Right + Dreapta + + + % + % + + + Alignment: + Aliniere: + + + Length: + Lungime: + + + Position: + Poziție: + + + Top of desktop + Partea de sus a ecranului + + + Left of desktop + Stânga ecranului + + + Right of desktop + Dreapta ecranului + + + Bottom of desktop + Partea de jos a ecranului + + + Top of desktop %1 + Partea de sus a ecranului %1 + + + Left of desktop %1 + Stânga ecranului %1 + + + Right of desktop %1 + Dreapta ecranului %1 + + + Bottom of desktop %1 + Partea de jos a ecranului %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Configurează panoul + + + + Size + + + + + Size: + Dimensiune: + + + + + px + + + + + Icon size: + + + + + Length: + Lungime: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Stânga + + + + + + Center + Centru + + + + + Right + Dreapta + + + + Alignment: + Aliniere: + + + + Position: + Poziție: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Partea de sus a ecranului + + + + Left of desktop + Stânga ecranului + + + + Right of desktop + Dreapta ecranului + + + + Bottom of desktop + Partea de jos a ecranului + + + + Top of desktop %1 + Partea de sus a ecranului %1 + + + + Left of desktop %1 + Stânga ecranului %1 + + + + Right of desktop %1 + Dreapta ecranului %1 + + + + Bottom of desktop %1 + Partea de jos a ecranului %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Părăsește + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Configurează panoul... + + + Add plugins ... + Adaugă module.... + + + + LxQtPanelPlugin + + Configure + Configurează + + + Move + Mută + + + Remove + Elimină + + + + LxQtPanelPrivate + + Configure panel + Configurează panoul + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_ru.ts b/panel/translations/lxqt-panel_ru.ts new file mode 100644 index 0000000..5bfb9f4 --- /dev/null +++ b/panel/translations/lxqt-panel_ru.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + Настроить панель + + + + ConfigPanelWidget + + + Configure panel + Настроить панель + + + + px + пикс + + + + Rows count: + Количество строк: + + + + Icon size: + Размер иконок: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + <p>Отрицательное число пикселей устанавливает длину панели на столько же пикселей меньше, чем доступное место экрана.</p><p/><p><i>Т.е. «Длина» выставленная на -100 пикс, размер экрана 1000 пикс, тогда реальная длина панели будет 900 пикс.</i></p> + + + + + Left + Слева + + + + + + Center + По центру + + + + + Right + Справа + + + + % + % + + + + Size + Размер + + + + Size: + Размер: + + + + + px + пикс + + + + Alignment && position + Выравнивание && расположение + + + + Alignment: + Выравнивание: + + + + Styling + Стиль + + + + Custom font color: + Свой цвет шрифта: + + + + Custom background image: + Своё фоновое изображение: + + + + Custom background color: + Свой цвет фона: + + + + Opacity + Непрозрачность + + + + Length: + Длина: + + + + Position: + Расположение: + + + + Top of desktop + Вверху + + + + Left of desktop + Слева + + + + Right of desktop + Справа + + + + Bottom of desktop + Внизу + + + + Top of desktop %1 + Вверху %1 рабочего стола + + + + Left of desktop %1 + Слева на %1 рабочем столе + + + + Right of desktop %1 + Справа на %1 рабочем столе + + + + Bottom of desktop %1 + Внизу %1 рабочего стола + + + + Top + Вверху + + + + Bottom + Внизу + + + + + Pick color + Выбрать цвет + + + + Images (*.png *.gif *.jpg) + Изображения (*.png *.gif *.jpg) + + + + LxQtPanel + + + Add Panel Widgets + Добавить виджеты на панель + + + + + Panel + Панель + + + + Configure Panel... + Настроить панель… + + + + Add Panel Widgets... + Добавить виджеты на панель… + + + + Add Panel + Добавить панель + + + + Remove Panel + Удалить панель + + + + Plugin + + + Configure "%1" + Настроить «%1» + + + + Move "%1" + Переместить «%1» + + + + Remove "%1" + Удалить «%1» + + + diff --git a/panel/translations/lxqt-panel_ru_RU.ts b/panel/translations/lxqt-panel_ru_RU.ts new file mode 100644 index 0000000..4e5738a --- /dev/null +++ b/panel/translations/lxqt-panel_ru_RU.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + Настроить панель + + + + ConfigPanelWidget + + + Configure panel + Настроить панель + + + + px + пикс + + + + Rows count: + Количество строк: + + + + Icon size: + Размер иконок: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + <p>Отрицательное число пикселей устанавливает длину панели на столько же пикселей меньше, чем доступное место экрана.</p><p/><p><i>Т.е. «Длина» выставленная на -100 пикс, размер экрана 1000 пикс, тогда реальная длина панели будет 900 пикс.</i></p> + + + + + Left + Слева + + + + + + Center + По центру + + + + + Right + Справа + + + + % + % + + + + Size + Размер + + + + Size: + Размер: + + + + + px + пикс + + + + Alignment && position + Выравнивание && расположение + + + + Alignment: + Выравнивание: + + + + Styling + Стиль + + + + Custom font color: + Свой цвет шрифта: + + + + Custom background image: + Своё фоновое изображение: + + + + Custom background color: + Свой цвет фона: + + + + Opacity + Непрозрачность + + + + Length: + Длина: + + + + Position: + Расположение: + + + + Top of desktop + Вверху + + + + Left of desktop + Слева + + + + Right of desktop + Справа + + + + Bottom of desktop + Внизу + + + + Top of desktop %1 + Вверху %1 рабочего стола + + + + Left of desktop %1 + Слева на %1 рабочем столе + + + + Right of desktop %1 + Справа на %1 рабочем столе + + + + Bottom of desktop %1 + Внизу %1 рабочего стола + + + + Top + Вверху + + + + Bottom + Внизу + + + + + Pick color + Выбрать цвет + + + + Images (*.png *.gif *.jpg) + Изображения (*.png *.gif *.jpg) + + + + LxQtPanel + + + Add Panel Widgets + Добавить виджеты на панель + + + + + Panel + Панель + + + + Configure Panel... + Настроить панель… + + + + Add Panel Widgets... + Добавить виджеты на панель… + + + + Add Panel + Добавить панель + + + + Remove Panel + Удалить панель + + + + Plugin + + + Configure "%1" + Настроить «%1» + + + + Move "%1" + Переместить «%1» + + + + Remove "%1" + Удалить «%1» + + + diff --git a/panel/translations/lxqt-panel_sk_SK.ts b/panel/translations/lxqt-panel_sk_SK.ts new file mode 100644 index 0000000..75bda96 --- /dev/null +++ b/panel/translations/lxqt-panel_sk_SK.ts @@ -0,0 +1,306 @@ + + + + + ConfigPanelDialog + + Configure panel + Nastaviť panel + + + px + px + + + Left + Vľavo + + + Center + Stred + + + Right + Vpravo + + + % + % + + + Top of desktop + Vrch plochy + + + Left of desktop + Ľavá strana plochy + + + Right of desktop + Pravá strana plochy + + + Bottom of desktop + Spodok plochy + + + Top of desktop %1 + Vrch plochy %1 + + + Left of desktop %1 + Ľavá strana plochy %1 + + + Right of desktop %1 + Pravá strana plochy %1 + + + Bottom of desktop %1 + Spodok plochy %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Nastaviť panel + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Vľavo + + + + + + Center + Stred + + + + + Right + Vpravo + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Vrch plochy + + + + Left of desktop + Ľavá strana plochy + + + + Right of desktop + Pravá strana plochy + + + + Bottom of desktop + Spodok plochy + + + + Top of desktop %1 + Vrch plochy %1 + + + + Left of desktop %1 + Ľavá strana plochy %1 + + + + Right of desktop %1 + Pravá strana plochy %1 + + + + Bottom of desktop %1 + Spodok plochy %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Panel + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Add plugins ... + Pridať moduly... + + + + LxQtPanelPrivate + + Configure panel + Nastaviť panel + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_sl.ts b/panel/translations/lxqt-panel_sl.ts new file mode 100644 index 0000000..05f7bad --- /dev/null +++ b/panel/translations/lxqt-panel_sl.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Nastavitev pulta + + + Panel size + Velikost pulta + + + Size: + Velikost: + + + px + pik + + + Use automatic sizing + Uporabi samodejno prilagajanje velikosti + + + Panel length && position + Dolžina in položaj pulta + + + Left + Levo + + + Center + Na sredini + + + Right + Desno + + + % + % + + + Alignment: + Poravnava: + + + Length: + Dolžina: + + + Position: + Položaj: + + + Top of desktop + Vrh namizja + + + Left of desktop + Leva stran namizja + + + Right of desktop + Desna stran namizja + + + Bottom of desktop + Dno namizja + + + Top of desktop %1 + Vrh namizja %1 + + + Left of desktop %1 + Leva stran namizja %1 + + + Right of desktop %1 + Desna stran namizja %1 + + + Bottom of desktop %1 + Dno namizja %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Nastavitev pulta + + + + Size + + + + + Size: + Velikost: + + + + + px + + + + + Icon size: + + + + + Length: + Dolžina: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + pik + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Levo + + + + + + Center + Na sredini + + + + + Right + Desno + + + + Alignment: + Poravnava: + + + + Position: + Položaj: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Vrh namizja + + + + Left of desktop + Leva stran namizja + + + + Right of desktop + Desna stran namizja + + + + Bottom of desktop + Dno namizja + + + + Top of desktop %1 + Vrh namizja %1 + + + + Left of desktop %1 + Leva stran namizja %1 + + + + Right of desktop %1 + Desna stran namizja %1 + + + + Bottom of desktop %1 + Dno namizja %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Pult + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Nastavitev pulta ... + + + Add plugins ... + Dodaj vstavke ... + + + + LxQtPanelPlugin + + Configure + Nastavitev + + + Move + Premakni + + + Remove + Odstrani + + + + LxQtPanelPrivate + + Configure panel + Nastavitev pulta + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_sr@latin.ts b/panel/translations/lxqt-panel_sr@latin.ts new file mode 100644 index 0000000..82a2bfc --- /dev/null +++ b/panel/translations/lxqt-panel_sr@latin.ts @@ -0,0 +1,239 @@ + + + + + ConfigPanelDialog + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + + + + + + px + + + + + Icon size: + + + + + Length: + + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + + + + + px + + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + + + + + + Right + + + + + Alignment: + + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + + + + + Left of desktop + + + + + Right of desktop + + + + + Bottom of desktop + + + + + Top of desktop %1 + + + + + Left of desktop %1 + + + + + Right of desktop %1 + + + + + Bottom of desktop %1 + + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Automatsko suspendovanje + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_sr_BA.ts b/panel/translations/lxqt-panel_sr_BA.ts new file mode 100644 index 0000000..e584b21 --- /dev/null +++ b/panel/translations/lxqt-panel_sr_BA.ts @@ -0,0 +1,372 @@ + + + + + ConfigPanelDialog + + Configure panel + Подешавање панела + + + % + % + + + px + px + + + Left + Лијево + + + Right + Десно + + + Center + Центар + + + Panel size + Величина панела + + + Size: + Величина: + + + Use theme size + Величина постављена темом + + + Panel lenght & position + Дужина и положај панела + + + Length: + Дужина: + + + Alignment: + Поравнање: + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Величина: + + + + + px + + + + + Icon size: + + + + + Length: + Дужина: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Лијево + + + + + + Center + Центар + + + + + Right + Десно + + + + Alignment: + Поравнање: + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + врху површи + + + + Left of desktop + лијевој страни површи + + + + Right of desktop + десној страни површи + + + + Bottom of desktop + дну површи + + + + Top of desktop %1 + врху површи %1 + + + + Left of desktop %1 + лијевој страни површи %1 + + + + Right of desktop %1 + десној страни површи %1 + + + + Bottom of desktop %1 + дну површи %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Панел + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + + LxQtPanelPluginPrivate + + Configure + Подеси + + + Move + Помјери + + + Delete + Обриши + + + + LxQtPanelPrivate + + Panel + Панел + + + Plugins + Модули + + + Add plugins ... + Додај модуле... + + + Move plugin + Помјери модул + + + Configure plugin + Подеси модул + + + Delete plugin + Обриши модул + + + Show this panel at + Прикажи овај панел на + + + Configure panel + Подеси панел + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + + PositionAction + + Top of desktop + врху површи + + + Bottom of desktop + дну површи + + + Left of desktop + лијевој страни површи + + + Right of desktop + десној страни површи + + + Top of desktop %1 + врху површи %1 + + + Bottom of desktop %1 + дну површи %1 + + + Left of desktop %1 + лијевој страни површи %1 + + + Right of desktop %1 + десној страни површи %1 + + + diff --git a/panel/translations/lxqt-panel_sr_RS.ts b/panel/translations/lxqt-panel_sr_RS.ts new file mode 100644 index 0000000..6cf98ee --- /dev/null +++ b/panel/translations/lxqt-panel_sr_RS.ts @@ -0,0 +1,333 @@ + + + + + ConfigPanelDialog + + Configure panel + Подешавање панела + + + Panel size + Величина панела + + + Size: + Величина: + + + px + px + + + Left + Лево + + + Center + Центар + + + Right + Десно + + + % + % + + + Alignment: + Поравнање: + + + Length: + Дужина: + + + Top of desktop + врху површи + + + Left of desktop + левој страни површи + + + Right of desktop + десној страни површи + + + Bottom of desktop + дну површи + + + Top of desktop %1 + врху површи %1 + + + Left of desktop %1 + левој страни површи %1 + + + Right of desktop %1 + десној страни површи %1 + + + Bottom of desktop %1 + дну површи %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + + + + + Size + + + + + Size: + Величина: + + + + + px + + + + + Icon size: + + + + + Length: + Дужина: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Лево + + + + + + Center + Центар + + + + + Right + Десно + + + + Alignment: + Поравнање: + + + + Position: + + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + врху површи + + + + Left of desktop + левој страни површи + + + + Right of desktop + десној страни површи + + + + Bottom of desktop + дну површи + + + + Top of desktop %1 + врху површи %1 + + + + Left of desktop %1 + левој страни површи %1 + + + + Right of desktop %1 + десној страни површи %1 + + + + Bottom of desktop %1 + дну површи %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Панел + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Add plugins ... + Додај модуле... + + + + LxQtPanelPlugin + + Configure + Подеси + + + Move + Помери + + + + LxQtPanelPrivate + + Configure panel + Подеси панел + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_th_TH.ts b/panel/translations/lxqt-panel_th_TH.ts new file mode 100644 index 0000000..d64e24c --- /dev/null +++ b/panel/translations/lxqt-panel_th_TH.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + ปรับแต่งพาเนล + + + Panel size + ขนาดพาเนล + + + Size: + ขนาด: + + + px + px + + + Use automatic sizing + ใช้การปรับขนาดอัตโนมัติ + + + Panel length && position + ความยาว && ตำแหน่งพาเนล + + + Left + ทางซ้าย + + + Center + ตรงกลาง + + + Right + ทางขวา + + + % + % + + + Alignment: + การจัดวาง: + + + Length: + ความยาว: + + + Position: + ตำแหน่ง: + + + Top of desktop + ด้านบนของหน้าจอ + + + Left of desktop + ด้านซ้ายของหน้าจอ + + + Right of desktop + ด้านขวาของหน้าจอ + + + Bottom of desktop + ด้านล่างของหน้าจอ + + + Top of desktop %1 + ด้านบนของหน้าจอ %1 + + + Left of desktop %1 + ด้านซ้ายของหน้าจอ %1 + + + Right of desktop %1 + ด้านขวาของหน้าจอ %1 + + + Bottom of desktop %1 + ด้านล่างของหน้าจอ %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + ปรับแต่งพาเนล + + + + Size + + + + + Size: + ขนาด: + + + + + px + + + + + Icon size: + + + + + Length: + ความยาว: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + ทางซ้าย + + + + + + Center + ตรงกลาง + + + + + Right + ทางขวา + + + + Alignment: + การจัดวาง: + + + + Position: + ตำแหน่ง: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + ด้านบนของหน้าจอ + + + + Left of desktop + ด้านซ้ายของหน้าจอ + + + + Right of desktop + ด้านขวาของหน้าจอ + + + + Bottom of desktop + ด้านล่างของหน้าจอ + + + + Top of desktop %1 + ด้านบนของหน้าจอ %1 + + + + Left of desktop %1 + ด้านซ้ายของหน้าจอ %1 + + + + Right of desktop %1 + ด้านขวาของหน้าจอ %1 + + + + Bottom of desktop %1 + ด้านล่างของหน้าจอ %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + พาเนล + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + ปรับแต่งพาเนล... + + + Add plugins ... + เพิ่มปลั๊กอิน + + + + LxQtPanelPlugin + + Configure + ปรับแต่ง + + + Move + ย้าย + + + Remove + ลบทิ้ง + + + + LxQtPanelPrivate + + Configure panel + ปรับแต่งพาเนล + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_tr.ts b/panel/translations/lxqt-panel_tr.ts new file mode 100644 index 0000000..b2e5d13 --- /dev/null +++ b/panel/translations/lxqt-panel_tr.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Paneli yapılandır + + + Panel size + Panel boyutu + + + Size: + Boyut: + + + px + px + + + Use automatic sizing + Otomatik boyutlandırmayı kullan + + + Panel length && position + Panel uzunluğu && konumu + + + Left + Sol + + + Center + Merkez + + + Right + Sağ + + + % + % + + + Alignment: + Yerleştirme: + + + Length: + Uzunluk: + + + Position: + Konum: + + + Top of desktop + Masasüstünün üst kısmı + + + Left of desktop + Masaüstünün sol kısmı + + + Right of desktop + Masaüstünün sağ kısmı + + + Bottom of desktop + Masaüstünün alt kısmı + + + Top of desktop %1 + Masaüstünün üst kısmı %1 + + + Left of desktop %1 + Masaüstünün sol kısmı %1 + + + Right of desktop %1 + Masaüstünün sağ kısmı %1 + + + Bottom of desktop %1 + Masaüstünün alt kısmı %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Paneli yapılandır + + + + Size + + + + + Size: + Boyut: + + + + + px + + + + + Icon size: + + + + + Length: + Uzunluk: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Sol + + + + + + Center + Merkez + + + + + Right + Sağ + + + + Alignment: + Yerleştirme: + + + + Position: + Konum: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Masasüstünün üst kısmı + + + + Left of desktop + Masaüstünün sol kısmı + + + + Right of desktop + Masaüstünün sağ kısmı + + + + Bottom of desktop + Masaüstünün alt kısmı + + + + Top of desktop %1 + Masaüstünün üst kısmı %1 + + + + Left of desktop %1 + Masaüstünün sol kısmı %1 + + + + Right of desktop %1 + Masaüstünün sağ kısmı %1 + + + + Bottom of desktop %1 + Masaüstünün alt kısmı %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Not Defteri + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Paneli yapılandır... + + + Add plugins ... + Eklenti ekle... + + + + LxQtPanelPlugin + + Configure + Yapılandır + + + Move + Taşı + + + Remove + Sil + + + + LxQtPanelPrivate + + Configure panel + Paneli yapılandır + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_uk.ts b/panel/translations/lxqt-panel_uk.ts new file mode 100644 index 0000000..4c0a3ea --- /dev/null +++ b/panel/translations/lxqt-panel_uk.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + Налаштувати панель + + + Panel size + Розмір панелі + + + Size: + Розмір: + + + px + px + + + Use automatic sizing + Використовувати автоматичний розмір + + + Panel length && position + Довжина та місце панелі + + + Left + Зліва + + + Center + Посередині + + + Right + Справа + + + % + % + + + Alignment: + Вирівнювання: + + + Length: + Довжина: + + + Position: + Місце: + + + Top of desktop + Згори стільниці + + + Left of desktop + Зліва стільниці + + + Right of desktop + Справа стільниці + + + Bottom of desktop + Знизу стільниці + + + Top of desktop %1 + Згори стільниці %1 + + + Left of desktop %1 + Зліва стільниці %1 + + + Right of desktop %1 + Справа стільниці %1 + + + Bottom of desktop %1 + Знизу стільниці %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + Налаштувати панель + + + + Size + + + + + Size: + Розмір: + + + + + px + + + + + Icon size: + + + + + Length: + Довжина: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + Зліва + + + + + + Center + Посередині + + + + + Right + Справа + + + + Alignment: + Вирівнювання: + + + + Position: + Місце: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + Згори стільниці + + + + Left of desktop + Зліва стільниці + + + + Right of desktop + Справа стільниці + + + + Bottom of desktop + Знизу стільниці + + + + Top of desktop %1 + Згори стільниці %1 + + + + Left of desktop %1 + Зліва стільниці %1 + + + + Right of desktop %1 + Справа стільниці %1 + + + + Bottom of desktop %1 + Знизу стільниці %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + Панель + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + Налаштувати панель... + + + Add plugins ... + Додати плаґіни... + + + + LxQtPanelPlugin + + Configure + Налаштувати + + + Move + Пересунути + + + Remove + Вилучити + + + + LxQtPanelPrivate + + Configure panel + Налаштувати панель + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_zh_CN.ts b/panel/translations/lxqt-panel_zh_CN.ts new file mode 100644 index 0000000..860a8ef --- /dev/null +++ b/panel/translations/lxqt-panel_zh_CN.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + 配置面板 + + + Panel size + 面板大小 + + + Size: + 大小: + + + px + px + + + Use automatic sizing + 使用自动缩放 + + + Panel length && position + 面板长度和位置 + + + Left + + + + Center + 居中 + + + Right + + + + % + % + + + Alignment: + 对齐: + + + Length: + 长度: + + + Position: + 位置: + + + Top of desktop + 桌面顶部 + + + Left of desktop + 桌面左侧 + + + Right of desktop + 桌面右侧 + + + Bottom of desktop + 桌面底部 + + + Top of desktop %1 + 桌面顶部 %1 + + + Left of desktop %1 + 桌面左侧 %1 + + + Right of desktop %1 + 左面右侧 %1 + + + Bottom of desktop %1 + 桌面底部 %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + 配置面板 + + + + Size + + + + + Size: + 大小: + + + + + px + + + + + Icon size: + + + + + Length: + 长度: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + + + + + + + Center + 居中 + + + + + Right + + + + + Alignment: + 对齐: + + + + Position: + 位置: + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + 桌面顶部 + + + + Left of desktop + 桌面左侧 + + + + Right of desktop + 桌面右侧 + + + + Bottom of desktop + 桌面底部 + + + + Top of desktop %1 + 桌面顶部 %1 + + + + Left of desktop %1 + 桌面左侧 %1 + + + + Right of desktop %1 + 左面右侧 %1 + + + + Bottom of desktop %1 + 桌面底部 %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + qxkb + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + 配置面板... + + + Add plugins ... + 添加插件 ... + + + + LxQtPanelPlugin + + Configure + 配置 + + + Move + 移动 + + + Remove + 删除 + + + + LxQtPanelPrivate + + Configure panel + 配置面板 + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/panel/translations/lxqt-panel_zh_TW.ts b/panel/translations/lxqt-panel_zh_TW.ts new file mode 100644 index 0000000..221c7ce --- /dev/null +++ b/panel/translations/lxqt-panel_zh_TW.ts @@ -0,0 +1,353 @@ + + + + + ConfigPanelDialog + + Configure panel + 設定面板 + + + Panel size + 面板尺寸 + + + Size: + 尺寸: + + + px + px + + + Use automatic sizing + 大小自動調整 + + + Panel length && position + 面板長度以及位置 + + + Left + 向左 + + + Center + 中間 + + + Right + 向右 + + + % + % + + + Alignment: + 對齊: + + + Length: + 長度: + + + Position: + 位置 : + + + Top of desktop + 桌面頂端 + + + Left of desktop + 桌面左方 + + + Right of desktop + 桌面右方 + + + Bottom of desktop + 桌面底端 + + + Top of desktop %1 + 桌面頂端 %1 + + + Left of desktop %1 + 桌面左方 %1 + + + Right of desktop %1 + 桌面右方 %1 + + + Bottom of desktop %1 + 桌面底端 %1 + + + + + Configure Panel + + + + + ConfigPanelWidget + + + Configure panel + 設定面板 + + + + Size + + + + + Size: + 尺寸: + + + + + px + + + + + Icon size: + + + + + Length: + 長度: + + + + <p>Negative pixel value sets the panel length to that many pixels less than available screen space.</p><p/><p><i>E.g. "Length" set to -100px, screen size is 1000px, then real panel length will be 900 px.</i></p> + + + + + % + % + + + + px + px + + + + Rows count: + + + + + Alignment && position + + + + + + Left + 向左 + + + + + + Center + 中間 + + + + + Right + 向右 + + + + Alignment: + 對齊: + + + + Position: + 位置 : + + + + Styling + + + + + Custom font color: + + + + + Custom background image: + + + + + Custom background color: + + + + + Opacity + + + + + Top of desktop + 桌面頂端 + + + + Left of desktop + 桌面左方 + + + + Right of desktop + 桌面右方 + + + + Bottom of desktop + 桌面底端 + + + + Top of desktop %1 + 桌面頂端 %1 + + + + Left of desktop %1 + 桌面左方 %1 + + + + Right of desktop %1 + 桌面右方 %1 + + + + Bottom of desktop %1 + 桌面底端 %1 + + + + Top + + + + + Bottom + + + + + + Pick color + + + + + Images (*.png *.gif *.jpg) + + + + + LxQtPanel + + + Add Panel Widgets + + + + + + Panel + LxQt滑鼠設定 + + + + Configure Panel... + + + + + Add Panel Widgets... + + + + + Add Panel + + + + + Remove Panel + + + + Configure panel... + 面板設定... + + + Add plugins ... + 新增外掛... + + + + LxQtPanelPlugin + + Configure + 設定 + + + Move + 移動 + + + Remove + 移除 + + + + LxQtPanelPrivate + + Configure panel + 設定面板 + + + + Plugin + + + Configure "%1" + + + + + Move "%1" + + + + + Remove "%1" + + + + diff --git a/plugin-clock/CMakeLists.txt b/plugin-clock/CMakeLists.txt new file mode 100644 index 0000000..57ad575 --- /dev/null +++ b/plugin-clock/CMakeLists.txt @@ -0,0 +1,25 @@ +set(PLUGIN "clock") + +set(HEADERS + lxqtclock.h + lxqtclockconfiguration.h + calendarpopup.h +) + +set(SOURCES + lxqtclock.cpp + lxqtclockconfiguration.cpp + calendarpopup.cpp +) + +set(MOCS + lxqtclock.h + lxqtclockconfiguration.h + calendarpopup.h +) + +set(UIS + lxqtclockconfiguration.ui +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-clock/calendarpopup.cpp b/plugin-clock/calendarpopup.cpp new file mode 100644 index 0000000..fec20cf --- /dev/null +++ b/plugin-clock/calendarpopup.cpp @@ -0,0 +1,62 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2014 LXQt team + * Authors: + * Paulo Lieuthier + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "calendarpopup.h" +#include +#include +#include + +CalendarPopup::CalendarPopup(QWidget *parent): + QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::Popup | Qt::X11BypassWindowManagerHint) +{ + setLayout(new QHBoxLayout(this)); + layout()->setMargin(1); + + cal = new QCalendarWidget(this); + cal->setFirstDayOfWeek(QLocale::system().firstDayOfWeek()); + layout()->addWidget(cal); + adjustSize(); +} + +CalendarPopup::~CalendarPopup() +{ +} + +void CalendarPopup::show() +{ + cal->setSelectedDate(QDate::currentDate()); + activateWindow(); + QDialog::show(); +} + +bool CalendarPopup::event(QEvent *event) +{ + if (event->type() == QEvent::WindowDeactivate) + hide(); + + return QDialog::event(event); +} diff --git a/plugin-clock/calendarpopup.h b/plugin-clock/calendarpopup.h new file mode 100644 index 0000000..bc33c61 --- /dev/null +++ b/plugin-clock/calendarpopup.h @@ -0,0 +1,51 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2014 LXQt team + * Authors: + * Paulo Lieuthier + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef CALENDARPOPUP_H +#define CALENDARPOPUP_H + +#include +#include + +class CalendarPopup : public QDialog +{ + Q_OBJECT + +public: + CalendarPopup(QWidget *parent = 0); + ~CalendarPopup(); + + void show(); + +protected: + virtual bool event(QEvent* ); + +private: + QCalendarWidget *cal; +}; + +#endif // CALENDARPOPUP_H diff --git a/plugin-clock/lxqtclock.cpp b/plugin-clock/lxqtclock.cpp new file mode 100644 index 0000000..dca028e --- /dev/null +++ b/plugin-clock/lxqtclock.cpp @@ -0,0 +1,359 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2013 Razor team + * Authors: + * Christopher "VdoP" Regali + * Alexander Sokoloff + * Maciej Płaza + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtclock.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/** + * @file lxqtclock.cpp + * @brief implements LxQtclock and LxQtclockgui + * @author Christopher "VdoP" Regali + * @author Kuzma Shapran + */ + +/** + * @brief constructor + */ +LxQtClock::LxQtClock(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mAutoRotate(true) +{ + mMainWidget = new QWidget(); + mRotatedWidget = new LxQt::RotatedWidget(*(new QWidget()), mMainWidget); + mContent = mRotatedWidget->content(); + mTimeLabel = new QLabel(mContent); + mDateLabel = new QLabel(mContent); + + QVBoxLayout *borderLayout = new QVBoxLayout(mMainWidget); + borderLayout->setContentsMargins(0, 0, 0, 0); + borderLayout->setSpacing(0); + borderLayout->addWidget(mRotatedWidget, 0, Qt::AlignCenter); + + mTimeLabel->setObjectName("TimeLabel"); + mDateLabel->setObjectName("DateLabel"); + + mTimeLabel->setAlignment(Qt::AlignCenter); + mDateLabel->setAlignment(Qt::AlignCenter); + + QVBoxLayout *contentLayout = new QVBoxLayout(mContent); + contentLayout->setContentsMargins(0, 0, 0, 0); + contentLayout->setSpacing(1); + contentLayout->addWidget(mTimeLabel, 0, Qt::AlignCenter); + contentLayout->addWidget(mDateLabel, 0, Qt::AlignCenter); + mContent->setLayout(contentLayout); + + mTimeLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); + mDateLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); + mContent->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); + mRotatedWidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); + mMainWidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); + + + mClockTimer = new QTimer(this); + connect (mClockTimer, SIGNAL(timeout()), SLOT(updateTime())); + + mClockFormat = "hh:mm"; + + mCalendarPopup = new CalendarPopup(mContent); + + mMainWidget->installEventFilter(this); + settingsChanged(); +} + +/** + * @brief destructor + */ +LxQtClock::~LxQtClock() +{ + delete mMainWidget; +} + +QDateTime LxQtClock::currentDateTime() +{ + return QDateTime(mUseUTC ? QDateTime::currentDateTimeUtc() : QDateTime::currentDateTime()); +} + +/** + * @brief updates the time + * Color and font settings can be configured in Qt CSS + */ +void LxQtClock::updateTime() +{ + QDateTime now = currentDateTime(); + + if (now.time().msec() > 500) + restartTimer(now); + + showTime(now); +} + +void LxQtClock::showTime(const QDateTime &now) +{ + if (mDateOnNewLine) + { + mTimeLabel->setText(QLocale::system().toString(now, mTimeFormat)); + mDateLabel->setText(QLocale::system().toString(now, mDateFormat)); + } + else + { + mTimeLabel->setText(QLocale::system().toString(now, mClockFormat)); + } + + mRotatedWidget->adjustContentSize(); + + mRotatedWidget->update(); +} + +void LxQtClock::restartTimer(const QDateTime &now) +{ + if (mClockTimer->isActive()) + mClockTimer->stop(); + int updateInterval = mClockTimer->interval(); + int delay = static_cast((updateInterval + 100 /* ms after time change */ - ((now.time().msec() + now.time().second() * 1000) % updateInterval)) % updateInterval); + QTimer::singleShot(delay, this, SLOT(updateTime())); + QTimer::singleShot(delay, mClockTimer, SLOT(start())); +} + +void LxQtClock::settingsChanged() +{ + mTimeFormat = settings()->value("timeFormat", QLocale::system().timeFormat(QLocale::ShortFormat).toUpper().contains("AP") ? "h:mm AP" : "HH:mm").toString(); + + mUseUTC = settings()->value("UTC", false).toBool(); + if (mUseUTC) + mTimeFormat += "' Z'"; + + mDateFormat = settings()->value("dateFormat", Qt::SystemLocaleShortDate).toString(); + + bool dateBeforeTime = (settings()->value("showDate", "no").toString().toLower() == "before"); + bool dateAfterTime = (settings()->value("showDate", "no").toString().toLower() == "after"); + mDateOnNewLine = (settings()->value("showDate", "no").toString().toLower() == "below"); + + bool autoRotate = settings()->value("autoRotate", true).toBool(); + if (autoRotate != mAutoRotate) + { + mAutoRotate = autoRotate; + realign(); + } + + + if (dateBeforeTime) + mClockFormat = QString("%1 %2").arg(mDateFormat).arg(mTimeFormat); + else if (dateAfterTime) + mClockFormat = QString("%1 %2").arg(mTimeFormat).arg(mDateFormat); + else + mClockFormat = mTimeFormat; + + mDateLabel->setVisible(mDateOnNewLine); + + updateMinWidth(); + + // mDateFormat usually does not contain time portion, but since it's possible to use custom date format - it has to be supported. [Kuzma Shapran] + int updateInterval = QString(mTimeFormat + " " + mDateFormat).replace(QRegExp("'[^']*'"),"").contains("s") ? 1000 : 60000; + + QDateTime now = currentDateTime(); + + showTime(now); + + if (mClockTimer->interval() != updateInterval) + { + mClockTimer->setInterval(updateInterval); + + restartTimer(now); + } +} + +void LxQtClock::realign() +{ + if (mAutoRotate) + switch (panel()->position()) + { + case ILxQtPanel::PositionTop: + case ILxQtPanel::PositionBottom: + mRotatedWidget->setOrigin(Qt::TopLeftCorner); + break; + + case ILxQtPanel::PositionLeft: + mRotatedWidget->setOrigin(Qt::BottomLeftCorner); + break; + + case ILxQtPanel::PositionRight: + mRotatedWidget->setOrigin(Qt::TopRightCorner); + break; + } + else + mRotatedWidget->setOrigin(Qt::TopLeftCorner); +} + +static QDate getMaxDate(const QFontMetrics &metrics, const QString &format) +{ + QDate d(QDate::currentDate().year(), 1, 1); + QDateTime dt(d); + QDate res; + + int maxWidth = 0; + while (dt.date().year() == d.year()) + { + int w = metrics.boundingRect(dt.toString(format)).width(); + //qDebug() << "*" << dt.toString(format) << w; + if (w > maxWidth) + { + res = dt.date(); + maxWidth = w; + } + dt = dt.addDays(1); + } + + //qDebug() << "Max date:" << res.toString(format); + return res; +} + + +static QTime getMaxTime(const QFontMetrics &metrics, const QString &format) +{ + int maxMinSec = 0; + for (int width=0, i=0; i<60; ++i) + { + int w = metrics.boundingRect(QString("%1").arg(i, 2, 10, QChar('0'))).width(); + if (w > width) + { + maxMinSec = i; + width = w; + } + } + + QTime res; + QDateTime dt(QDate(1, 1, 1), QTime(0, maxMinSec, maxMinSec)); + + int maxWidth = 0; + while (dt.date().day() == 1) + { + int w = metrics.boundingRect(dt.toString(format)).width(); + //qDebug() << "*" << dt.toString(format) << w; + if (w > maxWidth) + { + res = dt.time(); + maxWidth = w; + } + dt = dt.addSecs(3600); + } + + //qDebug() << "Max time:" << res.toString(); + return res; +} + +/************************************************ + Issue #18: Panel clock plugin changes your size + ************************************************/ +void LxQtClock::updateMinWidth() +{ + QFontMetrics timeLabelMetrics(mTimeLabel->font()); + QFontMetrics dateLabelMetrics(mDateLabel->font()); + QDate maxDate = getMaxDate(mDateOnNewLine ? dateLabelMetrics : timeLabelMetrics, mDateFormat); + QTime maxTime = getMaxTime(timeLabelMetrics, mTimeFormat); + QDateTime dt(maxDate, maxTime); + + //qDebug() << "T:" << metrics.boundingRect(dt.toString(mTimeFormat)).width(); + //qDebug() << "C:" << metrics.boundingRect(QTime::currentTime().toString(mTimeFormat)).width() << QTime::currentTime().toString(mTimeFormat); + //qDebug() << "D:" << metrics.boundingRect(dt.toString(mDateFormat)).width(); + + int width; + int height; + if (mDateOnNewLine) + { + QRect rect1(timeLabelMetrics.boundingRect(dt.toString(mTimeFormat))); + mTimeLabel->setMinimumSize(rect1.size()); + QRect rect2(dateLabelMetrics.boundingRect(dt.toString(mDateFormat))); + mDateLabel->setMinimumSize(rect2.size()); + width = qMax(rect1.width(), rect2.width()); + height = rect1.height() + rect2.height(); +// qDebug() << "LxQtClock Recalc size" << width << height << dt.toString(mTimeFormat) << dt.toString(mDateFormat); + } + else + { + QRect rect(timeLabelMetrics.boundingRect(dt.toString(mClockFormat))); + mTimeLabel->setMinimumSize(rect.size()); + mDateLabel->setMinimumSize(0, 0); + width = rect.width(); + height = rect.height(); +// qDebug() << "LxQtClock Recalc size" << width << height << dt.toString(mClockFormat); + } + + + mContent->setMinimumSize(width, height); +} + +void LxQtClock::activated(ActivationReason reason) +{ + if (reason != ILxQtPanelPlugin::Trigger) + return; + + if (!mCalendarPopup->isVisible()) + { + QRect pos = calculatePopupWindowPos(mCalendarPopup->size()); + mCalendarPopup->move(pos.topLeft()); + mCalendarPopup->show(); + } + else + { + mCalendarPopup->hide(); + } +} + +QDialog * LxQtClock::configureDialog() +{ + return new LxQtClockConfiguration(*settings()); +} + +bool LxQtClock::eventFilter(QObject *watched, QEvent *event) +{ + if (watched == mMainWidget) + { + if (event->type() == QEvent::ToolTip) + mMainWidget->setToolTip(QDateTime::currentDateTime().toString(Qt::DefaultLocaleLongDate)); + + return false; + } + + return false; +} diff --git a/plugin-clock/lxqtclock.h b/plugin-clock/lxqtclock.h new file mode 100644 index 0000000..8912ee8 --- /dev/null +++ b/plugin-clock/lxqtclock.h @@ -0,0 +1,105 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2013 Razor team + * Authors: + * Christopher "VdoP" Regali + * Alexander Sokoloff + * Maciej Płaza + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTCLOCK_H +#define LXQTCLOCK_H + +#include "../panel/ilxqtpanelplugin.h" +#include "lxqtclockconfiguration.h" +#include "calendarpopup.h" +#include + +#include + +class QLabel; +class QDialog; +class QTimer; + +class LxQtClock : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtClock(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtClock(); + + virtual Flags flags() const { return PreferRightAlignment | HaveConfigDialog ; } + QString themeId() const { return "Clock"; } + QWidget *widget() { return mMainWidget; } + QDialog *configureDialog(); + void settingsChanged(); + + void activated(ActivationReason reason); + bool isSeparate() const { return true; } + + void realign(); + +public slots: + void updateTime(); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + +private: + QTimer* mClockTimer; + QWidget *mMainWidget; + QWidget *mContent; + LxQt::RotatedWidget* mRotatedWidget; + QLabel* mTimeLabel; + QLabel* mDateLabel; + QString mClockFormat; + QString mToolTipFormat; + CalendarPopup* mCalendarPopup; + QString mTimeFormat; + QString mDateFormat; + bool mDateOnNewLine; + bool mUseUTC; + Qt::DayOfWeek mFirstDayOfWeek; + bool mAutoRotate; + + QDateTime currentDateTime(); + void showTime(const QDateTime &); + void restartTimer(const QDateTime&); + +private slots: + void updateMinWidth(); +}; + + +class LxQtClockPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) { return new LxQtClock(startupInfo);} +}; + + +#endif diff --git a/plugin-clock/lxqtclockconfiguration.cpp b/plugin-clock/lxqtclockconfiguration.cpp new file mode 100644 index 0000000..82a86b1 --- /dev/null +++ b/plugin-clock/lxqtclockconfiguration.cpp @@ -0,0 +1,268 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include + +#include "lxqtclockconfiguration.h" +#include "ui_lxqtclockconfiguration.h" + + +LxQtClockConfiguration::LxQtClockConfiguration(QSettings &settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtClockConfiguration), + mSettings(settings), + oldSettings(settings), + mOldIndex(1) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("ClockConfigurationWindow"); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), SLOT(dialogButtonsAction(QAbstractButton*))); + + loadSettings(); + /* We use clicked() and activated(int) because these signals aren't emitting after programmaticaly + change of state */ + + connect(ui->dateFormatCOB, SIGNAL(activated(int)), SLOT(dateFormatActivated(int))); + + connect(ui->showSecondsCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->ampmClockCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->useUtcCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->dontShowDateRB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->showDateBeforeTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->showDateAfterTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->showDateBelowTimeRB, SIGNAL(clicked()), SLOT(saveSettings())); + + connect(ui->autorotateCB, SIGNAL(clicked()), SLOT(saveSettings())); +} + +LxQtClockConfiguration::~LxQtClockConfiguration() +{ + delete ui; +} + +static int currentYear = QDate::currentDate().year(); + +void LxQtClockConfiguration::addDateFormat(const QString &format) +{ + if (ui->dateFormatCOB->findData(QVariant(format)) == -1) + ui->dateFormatCOB->addItem(QDate(currentYear, 1, 1).toString(format), QVariant(format)); +} + +void LxQtClockConfiguration::createDateFormats() +{ + ui->dateFormatCOB->clear(); + + QString systemDateLocale = QLocale::system().dateFormat(QLocale::ShortFormat).toUpper(); + + if (systemDateLocale.indexOf("Y") < systemDateLocale.indexOf("D")) + // Big-endian (year, month, day) -> in some Asia countires like China or Japan + { + addDateFormat("MMM d"); + addDateFormat("MMMM d"); + addDateFormat("MMM d, ddd"); + addDateFormat("MMMM d, dddd"); + addDateFormat("yyyy MMM d"); + addDateFormat("yyyy MMMM d"); + addDateFormat("yyyy MMM d, ddd"); + addDateFormat("yyyy MMMM d, dddd"); + addDateFormat("MMM dd"); + addDateFormat("MMMM dd"); + addDateFormat("MMM dd, ddd"); + addDateFormat("MMMM dd, dddd"); + addDateFormat("yyyy MMM dd"); + addDateFormat("yyyy MMMM dd"); + addDateFormat("yyyy MMM dd, ddd"); + addDateFormat("yyyy MMMM dd, dddd"); + } + else if (systemDateLocale.indexOf("M") < systemDateLocale.indexOf("D")) + // Middle-endian (month, day, year) -> USA + { + addDateFormat("MMM d"); + addDateFormat("MMMM d"); + addDateFormat("ddd, MMM d"); + addDateFormat("dddd, MMMM d"); + addDateFormat("MMM d yyyy"); + addDateFormat("MMMM d yyyy"); + addDateFormat("ddd, MMM d yyyy"); + addDateFormat("dddd, MMMM d yyyy"); + addDateFormat("MMM dd"); + addDateFormat("MMMM dd"); + addDateFormat("ddd, MMM dd"); + addDateFormat("dddd, MMMM dd"); + addDateFormat("MMM dd yyyy"); + addDateFormat("MMMM dd yyyy"); + addDateFormat("ddd, MMM dd yyyy"); + addDateFormat("dddd, MMMM dd yyyy"); + } + else + // Little-endian (day, month, year) -> most of Europe + { + addDateFormat("d MMM"); + addDateFormat("d MMMM"); + addDateFormat("ddd, d MMM"); + addDateFormat("dddd, d MMMM"); + addDateFormat("d MMM yyyy"); + addDateFormat("d MMMM yyyy"); + addDateFormat("ddd, d MMM yyyy"); + addDateFormat("dddd, d MMMM yyyy"); + addDateFormat("dd MMM"); + addDateFormat("dd MMMM"); + addDateFormat("ddd, dd MMM"); + addDateFormat("dddd, dd MMMM"); + addDateFormat("dd MMM yyyy"); + addDateFormat("dd MMMM yyyy"); + addDateFormat("ddd, dd MMM yyyy"); + addDateFormat("dddd, dd MMMM yyyy"); + } + + addDateFormat(QLocale::system().dateFormat(QLocale::ShortFormat)); + addDateFormat(QLocale::system().dateFormat(QLocale::LongFormat)); + + addDateFormat("yyyy-MM-dd"); // ISO + + if (mCustomDateFormat.isEmpty()) + ui->dateFormatCOB->addItem("Custom ...", QVariant(mCustomDateFormat)); + else + ui->dateFormatCOB->addItem(QString("Custom (%1) ...").arg(QDate(currentYear, 1, 1).toString(mCustomDateFormat)), QVariant(mCustomDateFormat)); +} + +void LxQtClockConfiguration::loadSettings() +{ + QString systemDateLocale = QLocale::system().dateFormat(QLocale::ShortFormat).toUpper(); + QString systemTimeLocale = QLocale::system().timeFormat(QLocale::ShortFormat).toUpper(); + + QString timeFormat = mSettings.value("timeFormat", systemTimeLocale.contains("AP") ? "h:mm AP" : "HH:mm").toString(); + + ui->showSecondsCB->setChecked(timeFormat.indexOf("ss") > -1); + + ui->ampmClockCB->setChecked(timeFormat.toUpper().indexOf("AP") > -1); + + ui->useUtcCB->setChecked(mSettings.value("UTC", false).toBool()); + + ui->dontShowDateRB->setChecked(true); + ui->showDateBeforeTimeRB->setChecked(mSettings.value("showDate", "no").toString().toLower() == "before"); + ui->showDateAfterTimeRB->setChecked(mSettings.value("showDate", "no").toString().toLower() == "after"); + ui->showDateBelowTimeRB->setChecked(mSettings.value("showDate", "no").toString().toLower() == "below"); + + mCustomDateFormat = mSettings.value("customDateFormat", QString()).toString(); + QString dateFormat = mSettings.value("dateFormat", QLocale::system().dateFormat(QLocale::ShortFormat)).toString(); + + createDateFormats(); + + if (mCustomDateFormat == dateFormat) + ui->dateFormatCOB->setCurrentIndex(ui->dateFormatCOB->count() - 1); + else + { + ui->dateFormatCOB->setCurrentIndex(ui->dateFormatCOB->findData(dateFormat)); + if (ui->dateFormatCOB->currentIndex() < 0) + ui->dateFormatCOB->setCurrentIndex(1); + } + mOldIndex = ui->dateFormatCOB->currentIndex(); + + ui->autorotateCB->setChecked(mSettings.value("autoRotate", true).toBool()); +} + +void LxQtClockConfiguration::saveSettings() +{ + QString timeFormat(ui->ampmClockCB->isChecked() ? "h:mm AP" : "HH:mm"); + + if (ui->showSecondsCB->isChecked()) + timeFormat.insert(timeFormat.indexOf("mm") + 2, ":ss"); + + mSettings.setValue("timeFormat", timeFormat); + + mSettings.setValue("UTC", ui->useUtcCB->isChecked()); + + mSettings.setValue("showDate", + ui->showDateBeforeTimeRB->isChecked() ? "before" : + (ui->showDateAfterTimeRB->isChecked() ? "after" : + (ui->showDateBelowTimeRB->isChecked() ? "below" : "no" ))); + + mSettings.setValue("customDateFormat", mCustomDateFormat); + if (ui->dateFormatCOB->currentIndex() == (ui->dateFormatCOB->count() - 1)) + mSettings.setValue("dateFormat", mCustomDateFormat); + else + mSettings.setValue("dateFormat", ui->dateFormatCOB->itemData(ui->dateFormatCOB->currentIndex())); + + mSettings.setValue("autoRotate", ui->autorotateCB->isChecked()); +} + +void LxQtClockConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + oldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + +void LxQtClockConfiguration::dateFormatActivated(int index) +{ + if (index == ui->dateFormatCOB->count() - 1) + { + bool ok; + QString newCustomDateFormat = QInputDialog::getText(this, tr("Input custom date format"), tr( + "Interpreted sequences of date format are:\n" + "\n" + "d\tthe day as number without a leading zero (1 to 31)\n" + "dd\tthe day as number with a leading zero (01 to 31)\n" + "ddd\tthe abbreviated localized day name (e.g. 'Mon' to 'Sun').\n" + "dddd\tthe long localized day name (e.g. 'Monday' to 'Sunday').\n" + "M\tthe month as number without a leading zero (1-12)\n" + "MM\tthe month as number with a leading zero (01-12)\n" + "MMM\tthe abbreviated localized month name (e.g. 'Jan' to 'Dec').\n" + "MMMM\tthe long localized month name (e.g. 'January' to 'December').\n" + "yy\tthe year as two digit number (00-99)\n" + "yyyy\tthe year as four digit number\n" + "\n" + "All other input characters will be treated as text.\n" + "Any sequence of characters that are enclosed in single quotes (')\n" + "will also be treated as text and not be used as an expression.\n" + "\n" + "\n" + "Custom date format:" + ), QLineEdit::Normal, mCustomDateFormat, &ok); + if (ok) + { + mCustomDateFormat = newCustomDateFormat; + mOldIndex = index; + createDateFormats(); + } + ui->dateFormatCOB->setCurrentIndex(mOldIndex); + } + else + mOldIndex = index; + + saveSettings(); +} diff --git a/plugin-clock/lxqtclockconfiguration.h b/plugin-clock/lxqtclockconfiguration.h new file mode 100644 index 0000000..96e508d --- /dev/null +++ b/plugin-clock/lxqtclockconfiguration.h @@ -0,0 +1,82 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTCLOCKCONFIGURATION_H +#define LXQTCLOCKCONFIGURATION_H + +#include +#include +#include +#include +#include + +#include + +namespace Ui { + class LxQtClockConfiguration; +} + +class LxQtClockConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtClockConfiguration(QSettings &settings, QWidget *parent = 0); + ~LxQtClockConfiguration(); + +private: + Ui::LxQtClockConfiguration *ui; + QSettings &mSettings; + LxQt::SettingsCache oldSettings; + + /* + Read settings from conf file and put data into controls. + */ + void loadSettings(); + + /* + Creates a date formats consistent with the region read from locale. + */ + void createDateFormats(); + +private slots: + /* + Saves settings in conf file. + */ + void saveSettings(); + void dialogButtonsAction(QAbstractButton *btn); + void dateFormatActivated(int); + +private: + int mOldIndex; + QString mCustomDateFormat; + + void addDateFormat(const QString &format); +}; + +#endif // LXQTCLOCKCONFIGURATION_H diff --git a/plugin-clock/lxqtclockconfiguration.ui b/plugin-clock/lxqtclockconfiguration.ui new file mode 100644 index 0000000..0e728b2 --- /dev/null +++ b/plugin-clock/lxqtclockconfiguration.ui @@ -0,0 +1,218 @@ + + + LxQtClockConfiguration + + + + 0 + 0 + 330 + 433 + + + + Clock Settings + + + + + + Time + + + + + + &Show seconds + + + + + + + 12 &hour style + + + + + + + &Use UTC + + + + + + + + + + Date + + + + + + false + + + Date &format + + + dateFormatCOB + + + + + + + false + + + + + + + &Do not show date + + + true + + + + + + + Show date &before time + + + + + + + Show date &after time + + + + + + + Show date below time on new &line + + + + + + + + + + Orientation + + + + + + Auto&rotate when the panel is vertical + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + buttons + accepted() + LxQtClockConfiguration + accept() + + + 214 + 350 + + + 157 + 274 + + + + + buttons + rejected() + LxQtClockConfiguration + reject() + + + 214 + 350 + + + 196 + 274 + + + + + dontShowDateRB + toggled(bool) + dateFormatL + setDisabled(bool) + + + 68 + 166 + + + 63 + 267 + + + + + dontShowDateRB + toggled(bool) + dateFormatCOB + setDisabled(bool) + + + 174 + 167 + + + 239 + 275 + + + + + diff --git a/plugin-clock/resources/clock.desktop.in b/plugin-clock/resources/clock.desktop.in new file mode 100644 index 0000000..6c9cb32 --- /dev/null +++ b/plugin-clock/resources/clock.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. +Icon=preferences-system-time + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-clock/translations/clock.ts b/plugin-clock/translations/clock.ts new file mode 100644 index 0000000..6f817e7 --- /dev/null +++ b/plugin-clock/translations/clock.ts @@ -0,0 +1,100 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + + + + + Time + + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + + + + + Date &format + + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_ar.desktop b/plugin-clock/translations/clock_ar.desktop new file mode 100644 index 0000000..92f15ce --- /dev/null +++ b/plugin-clock/translations/clock_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=السَّاعة والتَّقويم +Name[ar]=السَّاعة diff --git a/plugin-clock/translations/clock_ar.ts b/plugin-clock/translations/clock_ar.ts new file mode 100644 index 0000000..19a0bfe --- /dev/null +++ b/plugin-clock/translations/clock_ar.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + إعدادات ساعة ريزر + + + + Clock Settings + + + + + Time + الوقت + + + + &Show seconds + إ&ظهار الثَّواني + + + + 12 &hour style + عرض 12 سا&عة + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + ال&خطُّ + + + Font + الخطُّ + + + + Date + التَّاريخ + + + Show &date + إظهار ال&تَّاريخ + + + D&ate format + تنسيق التَّ&أريخ + + + Fon&t + الخ&طُّ + + + Show date in &new line + إظهار التَّارخ في سطرٍ &جديدٍ + + + &Use theme fonts + استخد&م خطوط الواجهة المخصَّصة + + + Time font + الخطُّ المستخدم للوقت + + + Date font + الخطُّ المستخدم للتَّاريخ + + + Ultra light + فاتحٌ زيادة + + + Light + فاتح + + + Ultra black + أسود دامس + + + Black + أسود + + + Bold + ثخين + + + Demi bold + نصف ثخين + + + Italic + مائل + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_cs.desktop b/plugin-clock/translations/clock_cs.desktop new file mode 100644 index 0000000..47cf14a --- /dev/null +++ b/plugin-clock/translations/clock_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Hodiny a kalendář +Name[cs]=Hodiny diff --git a/plugin-clock/translations/clock_cs.ts b/plugin-clock/translations/clock_cs.ts new file mode 100644 index 0000000..a83c320 --- /dev/null +++ b/plugin-clock/translations/clock_cs.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Nastavení hodin + + + + Clock Settings + + + + + Time + Čas + + + + &Show seconds + &Ukázat sekundy + + + + 12 &hour style + 12 &hodinový styl + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Písmo + + + Font + Písmo + + + + Date + Datum + + + Show &date + Ukázat &datum + + + D&ate format + Formát d&ata + + + Fon&t + Pí&smo + + + Show date in &new line + Ukázat datum na &novém řádku + + + &Use theme fonts + &Použít písma motivu + + + Time font + Písmo pro čas + + + Date font + Písmo pro datum + + + Ultra light + Hodně světlé + + + Light + Světlé + + + Ultra black + Hodně černé + + + Black + Černé + + + Bold + Tučné + + + Demi bold + Polotučné + + + Italic + Kurzíva + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_cs_CZ.desktop b/plugin-clock/translations/clock_cs_CZ.desktop new file mode 100644 index 0000000..186125e --- /dev/null +++ b/plugin-clock/translations/clock_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Hodiny a kalendář +Name[cs_CZ]=Hodiny diff --git a/plugin-clock/translations/clock_cs_CZ.ts b/plugin-clock/translations/clock_cs_CZ.ts new file mode 100644 index 0000000..f37ec65 --- /dev/null +++ b/plugin-clock/translations/clock_cs_CZ.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Nastavení hodin + + + + Clock Settings + + + + + Time + Čas + + + + &Show seconds + &Ukázat sekundy + + + + 12 &hour style + 12 &hodinový styl + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Písmo + + + Font + Písmo + + + + Date + Datum + + + Show &date + Ukázat &datum + + + D&ate format + Formát d&ata + + + Fon&t + Pí&smo + + + Show date in &new line + Ukázat datum na &novém řádku + + + &Use theme fonts + &Použít písma motivu + + + Time font + Písmo pro čas + + + Date font + Písmo pro datum + + + Ultra light + Hodně světlé + + + Light + Světlé + + + Ultra black + Hodně černé + + + Black + Černé + + + Bold + Tučné + + + Demi bold + Polotučné + + + Italic + Kurzíva + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_da.desktop b/plugin-clock/translations/clock_da.desktop new file mode 100644 index 0000000..297c3d5 --- /dev/null +++ b/plugin-clock/translations/clock_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Ur og kalender +Name[da]=Ur diff --git a/plugin-clock/translations/clock_da.ts b/plugin-clock/translations/clock_da.ts new file mode 100644 index 0000000..7011668 --- /dev/null +++ b/plugin-clock/translations/clock_da.ts @@ -0,0 +1,124 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LXQt Ur-Indstillinger + + + + Clock Settings + + + + + Time + Tid + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + Show seconds + Vis sekunder + + + 12 hour style + 12 timers visning + + + + Date + Dato + + + Show date + Vis dato + + + Show date in new line + Vis dato i ny linie + + + Date format + Datoformat + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_da_DK.desktop b/plugin-clock/translations/clock_da_DK.desktop new file mode 100644 index 0000000..b9b678a --- /dev/null +++ b/plugin-clock/translations/clock_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Ur og kalender +Name[da_DK]=Ur diff --git a/plugin-clock/translations/clock_da_DK.ts b/plugin-clock/translations/clock_da_DK.ts new file mode 100644 index 0000000..36848c1 --- /dev/null +++ b/plugin-clock/translations/clock_da_DK.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt Urindstillinger + + + + Clock Settings + + + + + Time + Tid + + + + &Show seconds + Vis &sekunder + + + + 12 &hour style + 12 &timers ur + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + Skri&fttype + + + Font + Skrifttype + + + + Date + Dato + + + Show &date + Vis &dato + + + D&ate format + D&atoformat + + + Fon&t + Skrif&ttype + + + Show date in &new line + Vis dato i &ny linie + + + &Use theme fonts + Br&ug temaskrifttyper + + + Time font + Dato skrifttype + + + Date font + Dato skrifttype + + + Ultra light + Ultralyst + + + Light + Lyst + + + Ultra black + Ultramørkt + + + Black + Mørkt + + + Bold + Fed + + + Demi bold + Halvfed + + + Italic + Kursiv + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_de.desktop b/plugin-clock/translations/clock_de.desktop new file mode 100644 index 0000000..50e99aa --- /dev/null +++ b/plugin-clock/translations/clock_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Uhr und Kalender +Name[de]=Uhr diff --git a/plugin-clock/translations/clock_de.ts b/plugin-clock/translations/clock_de.ts new file mode 100644 index 0000000..d24f7d2 --- /dev/null +++ b/plugin-clock/translations/clock_de.ts @@ -0,0 +1,124 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt Uhr Einstellungen + + + + Clock Settings + + + + + Time + Zeit + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + Show seconds + Zeige Sekunden + + + 12 hour style + 12-Stunden-Format + + + + Date + Datum + + + Show date + Zeige Datum + + + Show date in new line + Zeige Datum in einer neuen Zeile + + + Date format + Datumsformat + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_de_DE.desktop b/plugin-clock/translations/clock_de_DE.desktop new file mode 100644 index 0000000..ee59172 --- /dev/null +++ b/plugin-clock/translations/clock_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Uhr und Kalender +Name[de_DE]=Uhr diff --git a/plugin-clock/translations/clock_de_DE.ts b/plugin-clock/translations/clock_de_DE.ts new file mode 100644 index 0000000..e211e6e --- /dev/null +++ b/plugin-clock/translations/clock_de_DE.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt-Uhr Einstellungen + + + + Clock Settings + + + + + Time + Zeit + + + + &Show seconds + &Sekunden anzeigen + + + + 12 &hour style + 12 Stunden U&hr-Stil + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Font + + + Font + Schriftart + + + + Date + Datum + + + Show &date + Zeige &Datum + + + D&ate format + D&atumsformat + + + Fon&t + Schriftar&t + + + Show date in &new line + Datum in &neuer Zeile zeigen + + + &Use theme fonts + Ben&utze System-Schriftart + + + Time font + Zeit Schriftart + + + Date font + Datum Schriftart + + + Ultra light + Ultra light + + + Light + Light + + + Ultra black + Ultra schwarz + + + Black + Schwarz + + + Bold + Fett + + + Demi bold + Halbfett + + + Italic + Kursiv + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_el_GR.desktop b/plugin-clock/translations/clock_el_GR.desktop new file mode 100644 index 0000000..6d41201 --- /dev/null +++ b/plugin-clock/translations/clock_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Ρολόι και ημερολόγιο +Name[el_GR]=Ρολόι diff --git a/plugin-clock/translations/clock_el_GR.ts b/plugin-clock/translations/clock_el_GR.ts new file mode 100644 index 0000000..3bc2875 --- /dev/null +++ b/plugin-clock/translations/clock_el_GR.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Ρυθμίσεις ρολογιού LxQt + + + + Clock Settings + + + + + Time + Ώρα + + + + &Show seconds + Εμ&φάνιση δευτερολέπτων + + + + 12 &hour style + 12 &ωρη μορφή + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Γραμματοσειρά + + + Font + Γραμματοσειρά + + + + Date + Ημερομηνία + + + Show &date + Εμφάνιση &ημερομηνίας + + + D&ate format + Μορφή η&μερομηνίας + + + Fon&t + Γρ&αμματοσειρά + + + Show date in &new line + Εμφάνιση ημερομηνίας σε &νέα γραμμή + + + &Use theme fonts + Χρήση γραμματοσειρών &θέματος + + + Time font + Γραμματοσειρά ώρας + + + Date font + Γραμματοσειρά ημερομηνίας + + + Ultra light + Υπερβολικά ελαφρύ + + + Light + Ελαφρύ + + + Ultra black + Υπερβολικά μαύρο + + + Black + Μαύρο + + + Bold + Έντονο + + + Demi bold + Ελαφρώς έντονο + + + Italic + Πλάγια + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_eo.desktop b/plugin-clock/translations/clock_eo.desktop new file mode 100644 index 0000000..829eca2 --- /dev/null +++ b/plugin-clock/translations/clock_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Horloĝo kaj kalendaro +Name[eo]=Horloĝo diff --git a/plugin-clock/translations/clock_eo.ts b/plugin-clock/translations/clock_eo.ts new file mode 100644 index 0000000..f5a3967 --- /dev/null +++ b/plugin-clock/translations/clock_eo.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Agordoj de horloĝo de LxQt + + + + Clock Settings + + + + + Time + Tempo + + + + &Show seconds + Montri &sekundojn + + + + 12 &hour style + 12-&hora aranĝo + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Tiparo + + + Font + Tiparo + + + + Date + Dato + + + Show &date + Montri &daton + + + D&ate format + &Aranĝo de dato + + + Fon&t + &Tiparo + + + Show date in &new line + Montri daton en &nova linio + + + &Use theme fonts + &Uzi tiparojn de etoso + + + Time font + Tiparo de tempo + + + Date font + Tiparo de dato + + + Ultra light + Tre maldike + + + Light + Maldike + + + Ultra black + Tre nigre + + + Black + Nigre + + + Bold + Dike + + + Demi bold + Mezdike + + + Italic + Kursive + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_es.desktop b/plugin-clock/translations/clock_es.desktop new file mode 100644 index 0000000..4532966 --- /dev/null +++ b/plugin-clock/translations/clock_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Reloj y calendario +Name[es]=Reloj diff --git a/plugin-clock/translations/clock_es.ts b/plugin-clock/translations/clock_es.ts new file mode 100644 index 0000000..3e4df0d --- /dev/null +++ b/plugin-clock/translations/clock_es.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Configuración del reloj de LxQt + + + + Clock Settings + + + + + Time + Hora + + + + &Show seconds + &Mostrar segundos + + + + 12 &hour style + Estilo de 12 &horas + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Fuente + + + Font + Fuente + + + + Date + Fecha + + + Show &date + Mostrar &fecha + + + D&ate format + Formato de &fecha + + + Fon&t + Fuen&te + + + Show date in &new line + Mostrar fecha en &nueva línea + + + &Use theme fonts + &Usar fuente del tema + + + Time font + Fuente de la hora + + + Date font + Fuente de la fecha + + + Ultra light + Ultra ligero + + + Light + Ligero + + + Ultra black + Ultra negro + + + Black + Negro + + + Bold + Negrita + + + Demi bold + Semi negrita + + + Italic + Cursiva + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_es_UY.ts b/plugin-clock/translations/clock_es_UY.ts new file mode 100644 index 0000000..81fd031 --- /dev/null +++ b/plugin-clock/translations/clock_es_UY.ts @@ -0,0 +1,104 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Configuración de Reloj LxQt + + + + Clock Settings + + + + + Time + Hora + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Fecha + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_es_VE.desktop b/plugin-clock/translations/clock_es_VE.desktop new file mode 100644 index 0000000..57a9390 --- /dev/null +++ b/plugin-clock/translations/clock_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Reloj y calendario +Name[es_VE]=Reloj diff --git a/plugin-clock/translations/clock_es_VE.ts b/plugin-clock/translations/clock_es_VE.ts new file mode 100644 index 0000000..294e378 --- /dev/null +++ b/plugin-clock/translations/clock_es_VE.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Configuración de Reloj LxQt + + + + Clock Settings + + + + + Time + Hora + + + + &Show seconds + Mostrar &Segundos + + + + 12 &hour style + Estilo 12 &horas + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Fuente + + + Font + Fuente + + + + Date + Fecha + + + Show &date + Mostrar &fecha + + + D&ate format + Formato &De Fecha + + + Fon&t + Fuen&te + + + Show date in &new line + Mostrar la fecha en una &nueva linea + + + &Use theme fonts + &Usar las letras del tema + + + Time font + Fuente de hora + + + Date font + Fuente de fecha + + + Ultra light + Ultra delgada + + + Light + Delgada + + + Ultra black + Ultra negrita + + + Black + Negra + + + Bold + Negrita + + + Demi bold + Semi negrilla + + + Italic + Italica + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_eu.desktop b/plugin-clock/translations/clock_eu.desktop new file mode 100644 index 0000000..50de260 --- /dev/null +++ b/plugin-clock/translations/clock_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Erlojua eta egutegia +Name[eu]=Erlojua diff --git a/plugin-clock/translations/clock_eu.ts b/plugin-clock/translations/clock_eu.ts new file mode 100644 index 0000000..76c7dba --- /dev/null +++ b/plugin-clock/translations/clock_eu.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt erlojuaren ezarpenak + + + + Clock Settings + + + + + Time + Ordua + + + + &Show seconds + &Erakutsi segundoak + + + + 12 &hour style + 12 &orduko estiloa + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Letra-tipoa + + + Font + Letra-tipoa + + + + Date + Data + + + Show &date + Erakutsi &data + + + D&ate format + D&ata-formatua + + + Fon&t + Letra-&tipoa + + + Show date in &new line + Erakutsi data lerro &berri batean + + + &Use theme fonts + &Erabili letra-tipoen gaiak + + + Time font + Orduaren letra-tipoa + + + Date font + Dataren letra-tipoa + + + Ultra light + Ultra argia + + + Light + Argia + + + Ultra black + Ultra beltza + + + Black + Beltza + + + Bold + Lodia + + + Demi bold + Erdi-lodia + + + Italic + Etzana + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_fi.desktop b/plugin-clock/translations/clock_fi.desktop new file mode 100644 index 0000000..1607eed --- /dev/null +++ b/plugin-clock/translations/clock_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Kello ja kalenteri +Name[fi]=Kello diff --git a/plugin-clock/translations/clock_fi.ts b/plugin-clock/translations/clock_fi.ts new file mode 100644 index 0000000..b4779e7 --- /dev/null +++ b/plugin-clock/translations/clock_fi.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQtin kellon asetukset + + + + Clock Settings + + + + + Time + Aika + + + + &Show seconds + &Näytä sekunnit + + + + 12 &hour style + &12 tunnin esitystapa + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Kirjasin + + + Font + Kirjasin + + + + Date + Päivä + + + Show &date + Näytä &päivä + + + D&ate format + Päiväyksen &muoto + + + Fon&t + Ki&rjasin + + + Show date in &new line + Näytä päivä &omalla rivillä + + + &Use theme fonts + Käytä &teeman kirjasimia + + + Time font + Kirjasin aikaa varten + + + Date font + Kirjasin päiväystä varten + + + Ultra light + Todella vaalea + + + Light + Vaalea + + + Ultra black + Todella musta + + + Black + Musta + + + Bold + Lihavoitu + + + Demi bold + Hieman lihavoitu + + + Italic + Kursivoitu + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_fr_FR.desktop b/plugin-clock/translations/clock_fr_FR.desktop new file mode 100644 index 0000000..0c70162 --- /dev/null +++ b/plugin-clock/translations/clock_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Horloge et calendrier +Name[fr_FR]=Horloge diff --git a/plugin-clock/translations/clock_fr_FR.ts b/plugin-clock/translations/clock_fr_FR.ts new file mode 100644 index 0000000..0006d4e --- /dev/null +++ b/plugin-clock/translations/clock_fr_FR.ts @@ -0,0 +1,116 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Paramètres de l'horloge de LxQt + + + + Clock Settings + + + + + Time + Heure + + + + &Show seconds + &Montrer les secondes + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + Font + Police + + + + Date + Date + + + Bold + Gras + + + Italic + Italique + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_hu.desktop b/plugin-clock/translations/clock_hu.desktop new file mode 100644 index 0000000..89658b5 --- /dev/null +++ b/plugin-clock/translations/clock_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Óra és naptár +Name[hu]=Óra diff --git a/plugin-clock/translations/clock_hu.ts b/plugin-clock/translations/clock_hu.ts new file mode 100644 index 0000000..cae89c4 --- /dev/null +++ b/plugin-clock/translations/clock_hu.ts @@ -0,0 +1,100 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + + + + + Time + + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_hu_HU.ts b/plugin-clock/translations/clock_hu_HU.ts new file mode 100644 index 0000000..98f0d04 --- /dev/null +++ b/plugin-clock/translations/clock_hu_HU.ts @@ -0,0 +1,104 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LXDE-Qt - Órabeállítás + + + + Clock Settings + + + + + Time + Idő + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Dátum + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_ia.desktop b/plugin-clock/translations/clock_ia.desktop new file mode 100644 index 0000000..525a89d --- /dev/null +++ b/plugin-clock/translations/clock_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Clock +Comment=Clock and calendar + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-clock/translations/clock_ia.ts b/plugin-clock/translations/clock_ia.ts new file mode 100644 index 0000000..ab27126 --- /dev/null +++ b/plugin-clock/translations/clock_ia.ts @@ -0,0 +1,100 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + + + + + Time + + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_id_ID.desktop b/plugin-clock/translations/clock_id_ID.desktop new file mode 100644 index 0000000..525a89d --- /dev/null +++ b/plugin-clock/translations/clock_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Clock +Comment=Clock and calendar + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-clock/translations/clock_id_ID.ts b/plugin-clock/translations/clock_id_ID.ts new file mode 100644 index 0000000..7316a31 --- /dev/null +++ b/plugin-clock/translations/clock_id_ID.ts @@ -0,0 +1,104 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Setting Waktu LxQt + + + + Clock Settings + + + + + Time + Waktu + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Tanggal + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_it_IT.desktop b/plugin-clock/translations/clock_it_IT.desktop new file mode 100644 index 0000000..599acac --- /dev/null +++ b/plugin-clock/translations/clock_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Orologio e calendario +Name[it_IT]=Orologio diff --git a/plugin-clock/translations/clock_it_IT.ts b/plugin-clock/translations/clock_it_IT.ts new file mode 100644 index 0000000..ded6702 --- /dev/null +++ b/plugin-clock/translations/clock_it_IT.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Impostazioni dell'orologio di LxQt + + + + Clock Settings + + + + + Time + Ora + + + + &Show seconds + &Mostra i secondi + + + + 12 &hour style + &Stile 12 ore + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Carattere + + + Font + Carattere + + + + Date + Data + + + Show &date + Mostra la &data + + + D&ate format + &Formato della data + + + Fon&t + Cara&ttere + + + Show date in &new line + Mostra la data in una &nuova riga + + + &Use theme fonts + &Utilizza i caratteri del tema + + + Time font + Carattere dell'ora + + + Date font + Carattere della data + + + Ultra light + Chiarissimo + + + Light + Chiaro + + + Ultra black + Nerissimo + + + Black + Nero + + + Bold + Grassetto + + + Demi bold + Neretto + + + Italic + Corsivo + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_ja.desktop b/plugin-clock/translations/clock_ja.desktop new file mode 100644 index 0000000..e931829 --- /dev/null +++ b/plugin-clock/translations/clock_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=時計とカレンダー +Name[ja]=時計 diff --git a/plugin-clock/translations/clock_ja.ts b/plugin-clock/translations/clock_ja.ts new file mode 100644 index 0000000..383d054 --- /dev/null +++ b/plugin-clock/translations/clock_ja.ts @@ -0,0 +1,118 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + 時計の設定 + + + + Time + 時刻 + + + + &Show seconds + 秒を表示(&S) + + + + 12 &hour style + 12時間表示(&H) + + + + &Use UTC + UTCを使用する(&U) + + + + Date &format + 日時の形式(&F) + + + + &Do not show date + 日付を表示しない(&D) + + + + Show date &before time + 日付のあとに時刻(&B) + + + + Show date &after time + 時刻のあとに日付(&A) + + + + Show date below time on new &line + 時刻の下に日付(&L) + + + + Orientation + 回転 + + + + Auto&rotate when the panel is vertical + パネルが縦のときに自動回転(&R) + + + + Date + 日付 + + + + Input custom date format + 日付の表示形式を指定 + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + 解釈される記法: + +d 日(ゼロなし) (1 - 31) +dd 日(ゼロ埋め) (01 - 31) +ddd 曜日(短い) ('月' - '日') +dddd 曜日(長い) ('月曜日' - '日曜日') +M 月(ゼロなし) (1 - 12) +MM 月(ゼロ埋め) (01 - 12) +MMM 月の名称(短い) ('1月' - '12月') +MMMM 月の名称 (長い) ('1月' - '12月'、※日本語では上記と同じ) +yy 西暦年(2桁) (00 - 99) +yyyy 西暦年(4桁) + +そのほかの文字は解釈されず、テキストとして表示されます。 +上記の解釈される文字も、シングルクオーテーション(')で括ると +一般の文字として扱われ、上記の解釈はされません。 + + +日付形式の指定: + + + diff --git a/plugin-clock/translations/clock_ko.desktop b/plugin-clock/translations/clock_ko.desktop new file mode 100644 index 0000000..525a89d --- /dev/null +++ b/plugin-clock/translations/clock_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Clock +Comment=Clock and calendar + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-clock/translations/clock_ko.ts b/plugin-clock/translations/clock_ko.ts new file mode 100644 index 0000000..1269b4a --- /dev/null +++ b/plugin-clock/translations/clock_ko.ts @@ -0,0 +1,100 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + + + + + Time + + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_lt.desktop b/plugin-clock/translations/clock_lt.desktop new file mode 100644 index 0000000..d19d0b4 --- /dev/null +++ b/plugin-clock/translations/clock_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Laikrodis ir kalendorius +Name[lt]=Laikrodis diff --git a/plugin-clock/translations/clock_lt.ts b/plugin-clock/translations/clock_lt.ts new file mode 100644 index 0000000..fb0004e --- /dev/null +++ b/plugin-clock/translations/clock_lt.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt laikrodžio nuostatos + + + + Clock Settings + + + + + Time + Laikas + + + + &Show seconds + &Rodyti sekundes + + + + 12 &hour style + 12 &valandų stilius + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + Šri&ftas + + + Font + Šriftas + + + + Date + Data + + + Show &date + Rodyti &datą + + + D&ate format + D&atos formatas + + + Fon&t + Šrif&tas + + + Show date in &new line + Datą rodyti &naujoje eilutėje + + + &Use theme fonts + Na&udoti apipavidalinimo šriftus + + + Time font + Laiko šriftas + + + Date font + Datos šriftas + + + Ultra light + Ypač lengvas + + + Light + Lengvas + + + Ultra black + Ypač juodas + + + Black + Juodas + + + Bold + Pusjuodis + + + Demi bold + Šiek tiek pastorintas + + + Italic + Pasviręs + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_nl.desktop b/plugin-clock/translations/clock_nl.desktop new file mode 100644 index 0000000..e188043 --- /dev/null +++ b/plugin-clock/translations/clock_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Klok en kalender +Name[nl]=Klok diff --git a/plugin-clock/translations/clock_nl.ts b/plugin-clock/translations/clock_nl.ts new file mode 100644 index 0000000..3f4874d --- /dev/null +++ b/plugin-clock/translations/clock_nl.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Instellingen van LxQt Klok + + + + Clock Settings + + + + + Time + Tijd + + + + &Show seconds + &Toon seconden + + + + 12 &hour style + 12 &uur stijl + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Lettertype + + + Font + Lettertype + + + + Date + Datum + + + Show &date + Toon &datum + + + D&ate format + Datumnotatie + + + Fon&t + Lettertype + + + Show date in &new line + Toon datum in &nieuwe regel + + + &Use theme fonts + &Gebruik lettertypes van thema + + + Time font + Lettertype voor de tijd + + + Date font + Lettertype voor de datum + + + Ultra light + Ultralicht + + + Light + Licht + + + Ultra black + Ultrazwart + + + Black + Zwart + + + Bold + Vet + + + Demi bold + Halfvet + + + Italic + Schuin + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_pl.desktop b/plugin-clock/translations/clock_pl.desktop new file mode 100644 index 0000000..bbfd0ef --- /dev/null +++ b/plugin-clock/translations/clock_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Zegar oraz kalendarz +Name[pl]=Zegar diff --git a/plugin-clock/translations/clock_pl_PL.desktop b/plugin-clock/translations/clock_pl_PL.desktop new file mode 100644 index 0000000..7abe53d --- /dev/null +++ b/plugin-clock/translations/clock_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Zegar i kalendarz +Name[pl_PL]=Zegar diff --git a/plugin-clock/translations/clock_pl_PL.ts b/plugin-clock/translations/clock_pl_PL.ts new file mode 100644 index 0000000..1a8738d --- /dev/null +++ b/plugin-clock/translations/clock_pl_PL.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Ustawienia zegara LxQt + + + + Clock Settings + + + + + Time + Czas + + + + &Show seconds + &Pokaż sekundy + + + + 12 &hour style + 12 &godzinny styl + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Czcionka + + + Font + Czcionka + + + + Date + Data + + + Show &date + Pokaż &date + + + D&ate format + Format C&zasu + + + Fon&t + Czcionk&a + + + Show date in &new line + Pokaż datę w &nowej linii + + + &Use theme fonts + &Użyj motywów czcionek + + + Time font + Czcionka czasu + + + Date font + Czcionka daty + + + Ultra light + Bardzo cienka + + + Light + Cienka + + + Ultra black + Bardzo czarna + + + Black + Czarna + + + Bold + Pogrubiona + + + Demi bold + Wpół pogrubiona + + + Italic + Kursywa + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_pt.desktop b/plugin-clock/translations/clock_pt.desktop new file mode 100644 index 0000000..059951e --- /dev/null +++ b/plugin-clock/translations/clock_pt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Relógio +Comment[pt]=Relógio e calendário + diff --git a/plugin-clock/translations/clock_pt.ts b/plugin-clock/translations/clock_pt.ts new file mode 100644 index 0000000..20619b4 --- /dev/null +++ b/plugin-clock/translations/clock_pt.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Definições do relógio LxQt + + + + Clock Settings + + + + + Time + Horas + + + + &Show seconds + Mo&strar segundos + + + + 12 &hour style + Estilo 12 &horas + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + Tipo &de letra + + + Font + Tipo de letra + + + + Date + Data + + + Show &date + Mostrar &data + + + D&ate format + Form&ato da data + + + Fon&t + &Tipo de letra + + + Show date in &new line + Mostrar data em linha disti&nta + + + &Use theme fonts + &Utilizar tipo de letra do tema + + + Time font + Tipo de letra das horas + + + Date font + Tipo de letra da data + + + Ultra light + Mais clara + + + Light + Clara + + + Ultra black + Normal carregado + + + Black + Normal + + + Bold + Negrito + + + Demi bold + Negrito suave + + + Italic + Itálico + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_pt_BR.desktop b/plugin-clock/translations/clock_pt_BR.desktop new file mode 100644 index 0000000..e36ef5f --- /dev/null +++ b/plugin-clock/translations/clock_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Relógio e calendário +Name[pt_BR]=Relógio diff --git a/plugin-clock/translations/clock_pt_BR.ts b/plugin-clock/translations/clock_pt_BR.ts new file mode 100644 index 0000000..3732985 --- /dev/null +++ b/plugin-clock/translations/clock_pt_BR.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Configurações do relógio do LxQt + + + + Clock Settings + + + + + Time + Hora + + + + &Show seconds + &Mostrar segundos + + + + 12 &hour style + Estilo 12 &horas + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Fonte + + + Font + Fonte + + + + Date + Data + + + Show &date + Mostrar &data + + + D&ate format + Formato da d&ata + + + Fon&t + Fon&te + + + Show date in &new line + Mostrar data em &nova linha + + + &Use theme fonts + &Utilizar fontes do tema + + + Time font + Fonte da hora + + + Date font + Fonte da data + + + Ultra light + Super claro + + + Light + Claro + + + Ultra black + Super escuro + + + Black + Escuro + + + Bold + Negrito + + + Demi bold + Semi negrito + + + Italic + Itálico + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_ro_RO.desktop b/plugin-clock/translations/clock_ro_RO.desktop new file mode 100644 index 0000000..ce729cf --- /dev/null +++ b/plugin-clock/translations/clock_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Ceas și calendar +Name[ro_RO]=Ceas diff --git a/plugin-clock/translations/clock_ro_RO.ts b/plugin-clock/translations/clock_ro_RO.ts new file mode 100644 index 0000000..5903de0 --- /dev/null +++ b/plugin-clock/translations/clock_ro_RO.ts @@ -0,0 +1,116 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Setări ceas LxQt + + + + Clock Settings + + + + + Time + Oră + + + + &Show seconds + Afișează &secundele + + + + 12 &hour style + Stil 12 de &ore + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Dată + + + Show &date + Afișează &data + + + D&ate format + Format d&ată + + + Show date in &new line + Afișează data pe rând &nou + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_ru.desktop b/plugin-clock/translations/clock_ru.desktop new file mode 100644 index 0000000..4645ab6 --- /dev/null +++ b/plugin-clock/translations/clock_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Часы и календарь +Name[ru]=Дата и время diff --git a/plugin-clock/translations/clock_ru.ts b/plugin-clock/translations/clock_ru.ts new file mode 100644 index 0000000..93229f9 --- /dev/null +++ b/plugin-clock/translations/clock_ru.ts @@ -0,0 +1,118 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + Настройка даты и времени + + + + Time + Время + + + + &Show seconds + &Показывать секунды + + + + 12 &hour style + 12 &часовой формат + + + + &Use UTC + &Использовать UTC + + + + Date + Дата + + + + Date &format + Ф&ормат даты + + + + &Do not show date + &Не показывать дату + + + + Show date &before time + Показывать дату &перед временем + + + + Show date &after time + Показывать дату &после времени + + + + Show date below time on new &line + Показывать дату под временем новой &строкой + + + + Orientation + Ориентация + + + + Auto&rotate when the panel is vertical + Авто&поворот для вертикальной панели + + + + Input custom date format + Введите свой формат даты + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + Интерпретация последовательностей формата даты: + +d день как число без ноля перед ним (от 1 до 31) +dd день как число с нолём перед ним (от 01 до 31) +ddd аббревиат́ура названия дня недели (от «Пн» к «Вс»). +dddd полное название дня недели (от «Понедельник» к «Воскресенье»). +M месяц как число без ноля перед ним (от 1 до 12) +MM месяц как число с нолём перед ним (от 01 до 12) +MMM аббревиат́ура названия месяца (от «Янв» до «Дек»). +MMMM полное название месяца (от «Январь» до «Декабрь»). +yy год как двухразрядное число (00-99) +yyyy год как четырёхразрядное число + +Все прочие введёные знаки будут обработаны как текст. +Любая последовательность знаков, заключённая в одинарные кавычки ('), +также будет обработана как текст и не будет использована в выражении. + + +Свой формат даты: + + + diff --git a/plugin-clock/translations/clock_ru_RU.desktop b/plugin-clock/translations/clock_ru_RU.desktop new file mode 100644 index 0000000..2203144 --- /dev/null +++ b/plugin-clock/translations/clock_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Часы и календарь +Name[ru_RU]=Дата и время diff --git a/plugin-clock/translations/clock_ru_RU.ts b/plugin-clock/translations/clock_ru_RU.ts new file mode 100644 index 0000000..51a51a0 --- /dev/null +++ b/plugin-clock/translations/clock_ru_RU.ts @@ -0,0 +1,118 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + Настройка даты и времени + + + + Time + Время + + + + &Show seconds + &Показывать секунды + + + + 12 &hour style + 12 &часовой формат + + + + &Use UTC + &Использовать UTC + + + + Date + Дата + + + + Date &format + Ф&ормат даты + + + + &Do not show date + &Не показывать дату + + + + Show date &before time + Показывать дату &перед временем + + + + Show date &after time + Показывать дату &после времени + + + + Show date below time on new &line + Показывать дату под временем новой &строкой + + + + Orientation + Ориентация + + + + Auto&rotate when the panel is vertical + Авто&поворот для вертикальной панели + + + + Input custom date format + Введите свой формат даты + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + Интерпретация последовательностей формата даты: + +d день как число без ноля перед ним (от 1 до 31) +dd день как число с нолём перед ним (от 01 до 31) +ddd аббревиат́ура названия дня недели (от «Пн» к «Вс»). +dddd полное название дня недели (от «Понедельник» к «Воскресенье»). +M месяц как число без ноля перед ним (от 1 до 12) +MM месяц как число с нолём перед ним (от 01 до 12) +MMM аббревиат́ура названия месяца (от «Янв» до «Дек»). +MMMM полное название месяца (от «Январь» до «Декабрь»). +yy год как двухразрядное число (00-99) +yyyy год как четырёхразрядное число + +Все прочие введёные знаки будут обработаны как текст. +Любая последовательность знаков, заключённая в одинарные кавычки ('), +также будет обработана как текст и не будет использована в выражении. + + +Свой формат даты: + + + diff --git a/plugin-clock/translations/clock_sk.desktop b/plugin-clock/translations/clock_sk.desktop new file mode 100644 index 0000000..3dd7569 --- /dev/null +++ b/plugin-clock/translations/clock_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Hodiny a kalendár +Name[sk]=Hodiny diff --git a/plugin-clock/translations/clock_sk_SK.ts b/plugin-clock/translations/clock_sk_SK.ts new file mode 100644 index 0000000..0aa8fca --- /dev/null +++ b/plugin-clock/translations/clock_sk_SK.ts @@ -0,0 +1,104 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Nastavenia hodín prostredia LxQt + + + + Clock Settings + + + + + Time + Čas + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Dátum + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_sl.desktop b/plugin-clock/translations/clock_sl.desktop new file mode 100644 index 0000000..746a765 --- /dev/null +++ b/plugin-clock/translations/clock_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Ura in koledar +Name[sl]=Ura diff --git a/plugin-clock/translations/clock_sl.ts b/plugin-clock/translations/clock_sl.ts new file mode 100644 index 0000000..38dc1a5 --- /dev/null +++ b/plugin-clock/translations/clock_sl.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Nastavitve ure za LxQt + + + + Clock Settings + + + + + Time + Čas + + + + &Show seconds + Pokaži &sekunde + + + + 12 &hour style + 12-&urni slog + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Pisava + + + Font + Pisava + + + + Date + Datum + + + Show &date + Pokaži &datum + + + D&ate format + &Oblika datuma + + + Fon&t + P&isava + + + Show date in &new line + Pokaži datum v &novi vrstici + + + &Use theme fonts + &Uporabi pisavo teme + + + Time font + Pisava za čas + + + Date font + Pisava za datum + + + Ultra light + Ultra lahko + + + Light + Lahko + + + Ultra black + Ultra krepko + + + Black + Krepko + + + Bold + Polkrepko + + + Demi bold + Pol-polkrepko + + + Italic + Ležeče + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_sr.desktop b/plugin-clock/translations/clock_sr.desktop new file mode 100644 index 0000000..5d8c28d --- /dev/null +++ b/plugin-clock/translations/clock_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Сат и календар +Name[sr]=Сат diff --git a/plugin-clock/translations/clock_sr@ijekavian.desktop b/plugin-clock/translations/clock_sr@ijekavian.desktop new file mode 100644 index 0000000..2c1f609 --- /dev/null +++ b/plugin-clock/translations/clock_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Сат +Comment[sr@ijekavian]=Сат и календар diff --git a/plugin-clock/translations/clock_sr@ijekavianlatin.desktop b/plugin-clock/translations/clock_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..f484549 --- /dev/null +++ b/plugin-clock/translations/clock_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Sat +Comment[sr@ijekavianlatin]=Sat i kalendar diff --git a/plugin-clock/translations/clock_sr@latin.desktop b/plugin-clock/translations/clock_sr@latin.desktop new file mode 100644 index 0000000..6a2d68d --- /dev/null +++ b/plugin-clock/translations/clock_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Sat i kalendar +Name[sr@latin]=Sat diff --git a/plugin-clock/translations/clock_sr@latin.ts b/plugin-clock/translations/clock_sr@latin.ts new file mode 100644 index 0000000..0afbda2 --- /dev/null +++ b/plugin-clock/translations/clock_sr@latin.ts @@ -0,0 +1,100 @@ + + + + + LxQtClockConfiguration + + + Clock Settings + + + + + Time + + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_sr_BA.ts b/plugin-clock/translations/clock_sr_BA.ts new file mode 100644 index 0000000..4083314 --- /dev/null +++ b/plugin-clock/translations/clock_sr_BA.ts @@ -0,0 +1,124 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Подешавање Рејзоровог сата + + + + Clock Settings + + + + + Time + Вријеме + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + Show seconds + Прикажи секунде + + + 12 hour style + 12-часовни сат + + + + Date + Датум + + + Show date + Прикажи датум + + + Show date in new line + Прикажи датум у новој линији + + + Date format + Формат датума + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_sr_RS.ts b/plugin-clock/translations/clock_sr_RS.ts new file mode 100644 index 0000000..95103bf --- /dev/null +++ b/plugin-clock/translations/clock_sr_RS.ts @@ -0,0 +1,104 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Подешавање Рејзоровог сата + + + + Clock Settings + + + + + Time + Време + + + + &Show seconds + + + + + 12 &hour style + + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + + Date + Датум + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_th_TH.desktop b/plugin-clock/translations/clock_th_TH.desktop new file mode 100644 index 0000000..77446b0 --- /dev/null +++ b/plugin-clock/translations/clock_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=นาฬิกาและปฏิทิน +Name[th_TH]=นาฬิกา diff --git a/plugin-clock/translations/clock_th_TH.ts b/plugin-clock/translations/clock_th_TH.ts new file mode 100644 index 0000000..0f7da89 --- /dev/null +++ b/plugin-clock/translations/clock_th_TH.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + ค่าตั้งนาฬิกา LxQt + + + + Clock Settings + + + + + Time + เวลา + + + + &Show seconds + แ&สดงวินาที + + + + 12 &hour style + รูปแบบ 12 ชั่วโ&มง + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + แบบอั&กษร + + + Font + แบบอักษร + + + + Date + วันที่ + + + Show &date + แสดง&เวลา + + + D&ate format + รูปแ&บบวันที่ + + + Fon&t + แบบอักษ&ร + + + Show date in &new line + แสดงวันที่ในบรรทัดใ&หม่ + + + &Use theme fonts + &ใช้แบบอักษรของชุดตกแต่ง + + + Time font + แบบอักษรของเวลา + + + Date font + แบบอักษรของวันที่ + + + Ultra light + สว่างจ้า + + + Light + สว่าง + + + Ultra black + ดำมืด + + + Black + ดำ + + + Bold + ตัวหนา + + + Demi bold + ตัวกึ่งหนา + + + Italic + ตัวเอียง + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_tr.desktop b/plugin-clock/translations/clock_tr.desktop new file mode 100644 index 0000000..5069f2a --- /dev/null +++ b/plugin-clock/translations/clock_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Saat ve takvim +Name[tr]=Saat diff --git a/plugin-clock/translations/clock_tr.ts b/plugin-clock/translations/clock_tr.ts new file mode 100644 index 0000000..a41141d --- /dev/null +++ b/plugin-clock/translations/clock_tr.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt Saat Ayarları + + + + Clock Settings + + + + + Time + Zaman + + + + &Show seconds + &Saniyeyi göster + + + + 12 &hour style + 12 saatlik &gösterim biçimi + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Yazı tipi + + + Font + Yazı Tipi + + + + Date + Tarih + + + Show &date + Tarihi gö&ster + + + D&ate format + T&arih biçimi + + + Fon&t + Yazı &Tipi + + + Show date in &new line + Tarihi &yeni satırda göster + + + &Use theme fonts + &Tema yazıtipini kullan + + + Time font + Zaman yazı tipi + + + Date font + Tarih yazıtipi + + + Ultra light + Aşırı ince + + + Light + Hafif + + + Ultra black + Aşırı siyah + + + Black + Siyah + + + Bold + Koyu + + + Demi bold + Yarı koyu + + + Italic + Eğik + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_uk.desktop b/plugin-clock/translations/clock_uk.desktop new file mode 100644 index 0000000..72a0e17 --- /dev/null +++ b/plugin-clock/translations/clock_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Показує поточний час. Календар +Name[uk]=Дата і час diff --git a/plugin-clock/translations/clock_uk.ts b/plugin-clock/translations/clock_uk.ts new file mode 100644 index 0000000..531c003 --- /dev/null +++ b/plugin-clock/translations/clock_uk.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + Налаштування годинника LxQt + + + + Clock Settings + + + + + Time + Час + + + + &Show seconds + Показувати &секунди + + + + 12 &hour style + 12-&годинний стиль + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + &Шрифт + + + Font + Шрифт + + + + Date + Дата + + + Show &date + Показувати &дату + + + D&ate format + Формат д&ати + + + Fon&t + Шриф&т + + + Show date in &new line + Показувати дату в &новому рядку + + + &Use theme fonts + &Використовувати шрифти з теми + + + Time font + Шрифт часу + + + Date font + Шрифт дати + + + Ultra light + Надтонкий + + + Light + Тонкий + + + Ultra black + Дуже темний + + + Black + Темний + + + Bold + Жирний + + + Demi bold + Напівжирний + + + Italic + Нахилений + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_zh_CN.GB2312.desktop b/plugin-clock/translations/clock_zh_CN.GB2312.desktop new file mode 100644 index 0000000..525a89d --- /dev/null +++ b/plugin-clock/translations/clock_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Clock +Comment=Clock and calendar + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-clock/translations/clock_zh_CN.desktop b/plugin-clock/translations/clock_zh_CN.desktop new file mode 100644 index 0000000..ed6f3ae --- /dev/null +++ b/plugin-clock/translations/clock_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=时钟和日历 +Name[zh_CN]=时钟 diff --git a/plugin-clock/translations/clock_zh_CN.ts b/plugin-clock/translations/clock_zh_CN.ts new file mode 100644 index 0000000..eb201f9 --- /dev/null +++ b/plugin-clock/translations/clock_zh_CN.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt时钟设置 + + + + Clock Settings + + + + + Time + 时间 + + + + &Show seconds + 显示秒(&S) + + + + 12 &hour style + 12小时样式(&H) + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + 字体(&F) + + + Font + 字体 + + + + Date + 日期 + + + Show &date + 显示日期(&D) + + + D&ate format + 日期格式(&A) + + + Fon&t + 字体(&T) + + + Show date in &new line + 在新行显示日期(&N) + + + &Use theme fonts + 使用主题字体(&U) + + + Time font + 时间字体 + + + Date font + 日期字体 + + + Ultra light + 超亮 + + + Light + + + + Ultra black + 超黑 + + + Black + + + + Bold + 黑体 + + + Demi bold + 半粗体 + + + Italic + 斜体 + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-clock/translations/clock_zh_TW.desktop b/plugin-clock/translations/clock_zh_TW.desktop new file mode 100644 index 0000000..fb8312c --- /dev/null +++ b/plugin-clock/translations/clock_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Date & time +Comment=Displays the current time. Comes with a calendar. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=時鐘與日曆 +Name[zh_TW]=時鐘 diff --git a/plugin-clock/translations/clock_zh_TW.ts b/plugin-clock/translations/clock_zh_TW.ts new file mode 100644 index 0000000..d2d9c90 --- /dev/null +++ b/plugin-clock/translations/clock_zh_TW.ts @@ -0,0 +1,168 @@ + + + + + LxQtClockConfiguration + + LxQt Clock Settings + LxQt時鐘設定 + + + + Clock Settings + + + + + Time + 時間 + + + + &Show seconds + 顯示秒(&S) + + + + 12 &hour style + 十二小時制(&h) + + + + &Use UTC + + + + + Date &format + + + + + &Do not show date + + + + + Show date &before time + + + + + Show date &after time + + + + + Show date below time on new &line + + + + + Orientation + + + + + Auto&rotate when the panel is vertical + + + + &Font + 字體(&F) + + + Font + 字體 + + + + Date + 日期 + + + Show &date + 顯示日期(&d) + + + D&ate format + 日期格式(&a) + + + Fon&t + 字體(&t) + + + Show date in &new line + 日期顯示在下一行中 + + + &Use theme fonts + 使用主題預設字體(&U) + + + Time font + 時間的字體 + + + Date font + 日期的字體 + + + Ultra light + 極亮 + + + Light + + + + Ultra black + 極暗 + + + Black + + + + Bold + 粗體 + + + Demi bold + 半粗體 + + + Italic + 斜體 + + + + Input custom date format + + + + + Interpreted sequences of date format are: + +d the day as number without a leading zero (1 to 31) +dd the day as number with a leading zero (01 to 31) +ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). +dddd the long localized day name (e.g. 'Monday' to 'Sunday'). +M the month as number without a leading zero (1-12) +MM the month as number with a leading zero (01-12) +MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). +MMMM the long localized month name (e.g. 'January' to 'December'). +yy the year as two digit number (00-99) +yyyy the year as four digit number + +All other input characters will be treated as text. +Any sequence of characters that are enclosed in single quotes (') +will also be treated as text and not be used as an expression. + + +Custom date format: + + + + diff --git a/plugin-colorpicker/CMakeLists.txt b/plugin-colorpicker/CMakeLists.txt new file mode 100644 index 0000000..ae983ba --- /dev/null +++ b/plugin-colorpicker/CMakeLists.txt @@ -0,0 +1,22 @@ +set(PLUGIN "colorpicker") + +set(HEADERS + colorpicker.h +) + +set(SOURCES + colorpicker.cpp +) + +set(MOCS + colorpicker.h +) + +set(UIS "") + +set(LIBRARIES + ${LXQT_LIBRARIES} + ${QTXDG_LIBRARIES} +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-colorpicker/colorpicker.cpp b/plugin-colorpicker/colorpicker.cpp new file mode 100644 index 0000000..305cb42 --- /dev/null +++ b/plugin-colorpicker/colorpicker.cpp @@ -0,0 +1,97 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Aaron Lewis + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include + +#include "colorpicker.h" + +ColorPicker::ColorPicker(const ILxQtPanelPluginStartupInfo &startupInfo) : + QObject(), + ILxQtPanelPlugin(startupInfo) +{ + realign(); +} + +ColorPicker::~ColorPicker() +{ +} + + +void ColorPicker::realign() +{ + mWidget.button()->setFixedHeight(panel()->iconSize()); + mWidget.button()->setFixedWidth(panel()->iconSize()); + mWidget.lineEdit()->setFixedHeight(panel()->iconSize()); +} + + +ColorPickerWidget::ColorPickerWidget(QWidget *parent): + QFrame(parent) +{ + QFontMetrics fm (mLineEdit.font()); + mLineEdit.setFixedWidth ( 10*fm.width ("a") ); + + QHBoxLayout *layout = new QHBoxLayout(this); + setLayout(layout); + layout->addWidget (&mButton); + layout->addWidget (&mLineEdit); + + + mButton.setIcon(XdgIcon::fromTheme("color-picker", "kcolorchooser")); + + mCapturing = false; + connect(&mButton, SIGNAL(clicked()), this, SLOT(captureMouse())); + +} + +ColorPickerWidget::~ColorPickerWidget() +{ +} + +void ColorPickerWidget::mouseReleaseEvent(QMouseEvent *event) +{ + if (!mCapturing) + return; + + WId id = QApplication::desktop()->winId(); + QPixmap pixmap = QPixmap::grabWindow(id, event->globalX(), event->globalY(), 1, 1); + + QImage img = pixmap.toImage(); + QColor col = QColor(img.pixel(0,0)); + + mLineEdit.setText (col.name()); + + mCapturing = false; + releaseMouse(); +} + +void ColorPickerWidget::captureMouse() +{ + grabMouse(Qt::CrossCursor); + mCapturing = true; +} diff --git a/plugin-colorpicker/colorpicker.h b/plugin-colorpicker/colorpicker.h new file mode 100644 index 0000000..7d249de --- /dev/null +++ b/plugin-colorpicker/colorpicker.h @@ -0,0 +1,96 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Aaron Lewis + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQT_COLORPICKER_H +#define LXQT_COLORPICKER_H + +#include +#include +#include +#include +#include +#include + +#include "../panel/ilxqtpanelplugin.h" +#include + + +class ColorPickerWidget: public QFrame +{ + Q_OBJECT +public: + ColorPickerWidget(QWidget* parent = 0); + ~ColorPickerWidget(); + + QLineEdit *lineEdit() { return &mLineEdit; } + QToolButton *button() { return &mButton; } + + +protected: + void mouseReleaseEvent(QMouseEvent *event); + +private slots: + void captureMouse(); + +private: + QLineEdit mLineEdit; + QToolButton mButton; + bool mCapturing; +}; + + +class ColorPicker : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + ColorPicker(const ILxQtPanelPluginStartupInfo &startupInfo); + ~ColorPicker(); + + virtual QWidget *widget() { return &mWidget; } + virtual QString themeId() const { return "ColorPicker"; } + + bool isSeparate() const { return true; } + + void realign(); + +private: + ColorPickerWidget mWidget; +}; + +class ColorPickerLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new ColorPicker(startupInfo); + } +}; + +#endif diff --git a/plugin-colorpicker/resources/colorpicker.desktop.in b/plugin-colorpicker/resources/colorpicker.desktop.in new file mode 100644 index 0000000..b34ac80 --- /dev/null +++ b/plugin-colorpicker/resources/colorpicker.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. +Icon=color-picker + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-colorpicker/translations/colorpicker.ts b/plugin-colorpicker/translations/colorpicker.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker.ts @@ -0,0 +1,4 @@ + + + + diff --git a/plugin-colorpicker/translations/colorpicker_cs.desktop b/plugin-colorpicker/translations/colorpicker_cs.desktop new file mode 100644 index 0000000..b36929e --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_cs.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[cs]=Dostaňte barvu pod ukazovátkem. Pro vývojáře webu. +Name[cs]=Volič barev diff --git a/plugin-colorpicker/translations/colorpicker_cs_CZ.desktop b/plugin-colorpicker/translations/colorpicker_cs_CZ.desktop new file mode 100644 index 0000000..09c6dfb --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_cs_CZ.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[cs_CZ]=Dostaňte barvu pod ukazovátkem. Pro vývojáře webu. +Name[cs_CZ]=Volič barev diff --git a/plugin-colorpicker/translations/colorpicker_da.desktop b/plugin-colorpicker/translations/colorpicker_da.desktop new file mode 100644 index 0000000..c3b07fe --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_da.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[da]=Find farven under musemarkøren. For webudviklere. +Name[da]=Farvevælger diff --git a/plugin-colorpicker/translations/colorpicker_da_DK.desktop b/plugin-colorpicker/translations/colorpicker_da_DK.desktop new file mode 100644 index 0000000..58858be --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_da_DK.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[da_DK]=Find farven under musemarkøren. For webudviklere. +Name[da_DK]=Farvevælger diff --git a/plugin-colorpicker/translations/colorpicker_de_DE.desktop b/plugin-colorpicker/translations/colorpicker_de_DE.desktop new file mode 100644 index 0000000..17f8972 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_de_DE.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[de_DE]=Wählt Farbe unter dem Cursor. Für Webentwickler. +Name[de_DE]=Farbwähler diff --git a/plugin-colorpicker/translations/colorpicker_el_GR.desktop b/plugin-colorpicker/translations/colorpicker_el_GR.desktop new file mode 100644 index 0000000..f2ae6b5 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_el_GR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[el_GR]=Λήψη του χρώματος κάτω από τον δείκτη. Για σχεδιαστές ιστοσελίδων. +Name[el_GR]=Επιλογέας χρωμάτων diff --git a/plugin-colorpicker/translations/colorpicker_es.desktop b/plugin-colorpicker/translations/colorpicker_es.desktop new file mode 100644 index 0000000..cbfa2ab --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_es.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[es]=Obtiene el color bajo el cursor. Para desarrolladores web. +Name[es]=Selector de color diff --git a/plugin-colorpicker/translations/colorpicker_es_VE.desktop b/plugin-colorpicker/translations/colorpicker_es_VE.desktop new file mode 100644 index 0000000..9a9ed72 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_es_VE.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[es_VE]=Toma un color de la pantalla con el cursor, para desarrolladores web. +Name[es_VE]=Recoge colores diff --git a/plugin-colorpicker/translations/colorpicker_eu.desktop b/plugin-colorpicker/translations/colorpicker_eu.desktop new file mode 100644 index 0000000..75de838 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_eu.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[eu]=Eskuratu kurtsorearen azpiko kolorea. Web-garatzaileentzat. +Name[eu]=Kolore-hautatzailea diff --git a/plugin-colorpicker/translations/colorpicker_fi.desktop b/plugin-colorpicker/translations/colorpicker_fi.desktop new file mode 100644 index 0000000..9ecf4a5 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_fi.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[fi]=Näyttää hiiren osoittimen alla olevan värin. +Name[fi]=Värivalitsin diff --git a/plugin-colorpicker/translations/colorpicker_it_IT.desktop b/plugin-colorpicker/translations/colorpicker_it_IT.desktop new file mode 100644 index 0000000..2e47e9c --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_it_IT.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[it_IT]=Rileva il colore sotto il cursore. Per sviluppatori web. +Name[it_IT]=Selettore del colore diff --git a/plugin-colorpicker/translations/colorpicker_ja.desktop b/plugin-colorpicker/translations/colorpicker_ja.desktop new file mode 100644 index 0000000..28d5645 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_ja.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=カラーピッカー +Comment=カーソルの下の色を取得します。ウェブ制作者向け diff --git a/plugin-colorpicker/translations/colorpicker_pl_PL.desktop b/plugin-colorpicker/translations/colorpicker_pl_PL.desktop new file mode 100644 index 0000000..36fd463 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_pl_PL.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[pl_PL]=Otrzymaj kolor z pod kursora. Dla webdeveloperów. +Name[pl_PL]=Wybieracz kolorów diff --git a/plugin-colorpicker/translations/colorpicker_pt.desktop b/plugin-colorpicker/translations/colorpicker_pt.desktop new file mode 100644 index 0000000..883aee7 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_pt.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + +# Translations +Name[pt]=Seletor de cores +Comment[pt]=Obter a cor por baixo do cursor. Para programadores web. diff --git a/plugin-colorpicker/translations/colorpicker_pt_BR.desktop b/plugin-colorpicker/translations/colorpicker_pt_BR.desktop new file mode 100644 index 0000000..c11923a --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_pt_BR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[pt_BR]=Obter a cor sob o cursor. Para desenvolvedores web. +Name[pt_BR]=Seletor de cores diff --git a/plugin-colorpicker/translations/colorpicker_ro_RO.desktop b/plugin-colorpicker/translations/colorpicker_ro_RO.desktop new file mode 100644 index 0000000..39f7cdf --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_ro_RO.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[ro_RO]=Obține culoarea de sub cursor. Pentru dezvoltatori web. diff --git a/plugin-colorpicker/translations/colorpicker_ru.desktop b/plugin-colorpicker/translations/colorpicker_ru.desktop new file mode 100644 index 0000000..c6f49bc --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_ru.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[ru]=Получить цвет под курсором мыши. Для веб-разработчиков. +Name[ru]=Цветовая палитра \ No newline at end of file diff --git a/plugin-colorpicker/translations/colorpicker_ru_RU.desktop b/plugin-colorpicker/translations/colorpicker_ru_RU.desktop new file mode 100644 index 0000000..84caabe --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_ru_RU.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[ru_RU]=Получить цвет под курсором мыши. Для веб-разработчиков. +Name[ru_RU]=Цветовая палитра \ No newline at end of file diff --git a/plugin-colorpicker/translations/colorpicker_th_TH.desktop b/plugin-colorpicker/translations/colorpicker_th_TH.desktop new file mode 100644 index 0000000..f00ba2d --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_th_TH.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[th_TH]=นำค่าสีที่อยู่ใต้เคอร์เซอร์ขึ้นมา สำหรับนักพัฒนาเว็บ +Name[th_TH]=ตัวเลือกค่าสี diff --git a/plugin-colorpicker/translations/colorpicker_uk.desktop b/plugin-colorpicker/translations/colorpicker_uk.desktop new file mode 100644 index 0000000..807d3e2 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_uk.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[uk]=Бере колір під курсором. Для web-розробників. +Name[uk]=Селектор кольору diff --git a/plugin-colorpicker/translations/colorpicker_zh_CN.desktop b/plugin-colorpicker/translations/colorpicker_zh_CN.desktop new file mode 100644 index 0000000..6017e30 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_zh_CN.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[zh_CN]=为网络开发者获取鼠标下的颜色。 +Name[zh_CN]=颜色拾取器 diff --git a/plugin-colorpicker/translations/colorpicker_zh_TW.desktop b/plugin-colorpicker/translations/colorpicker_zh_TW.desktop new file mode 100644 index 0000000..0438cb1 --- /dev/null +++ b/plugin-colorpicker/translations/colorpicker_zh_TW.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Color picker +Comment=Get the color under the cursor. For web developers. + + +# Translations +Comment[zh_TW]=取得由標下的顏色。網頁開發者推荐使用。 +Name[zh_TW]=取得顏色 diff --git a/plugin-cpuload/CMakeLists.txt b/plugin-cpuload/CMakeLists.txt new file mode 100644 index 0000000..1a4880e --- /dev/null +++ b/plugin-cpuload/CMakeLists.txt @@ -0,0 +1,27 @@ +set(PLUGIN "cpuload") + +set(HEADERS + lxqtcpuloadplugin.h + lxqtcpuload.h + lxqtcpuloadconfiguration.h +) + +set(SOURCES + lxqtcpuloadplugin.cpp + lxqtcpuload.cpp + lxqtcpuloadconfiguration.cpp +) + +set(MOCS + lxqtcpuloadplugin.h + lxqtcpuload.h + lxqtcpuloadconfiguration.h +) + +set(UIS + lxqtcpuloadconfiguration.ui +) + +set(LIBRARIES ${STATGRAB_LIB}) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-cpuload/lxqtcpuload.cpp b/plugin-cpuload/lxqtcpuload.cpp new file mode 100644 index 0000000..97c5184 --- /dev/null +++ b/plugin-cpuload/lxqtcpuload.cpp @@ -0,0 +1,204 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtcpuload.h" +#include "../panel/ilxqtpanelplugin.h" +#include +#include +#include +#include + +extern "C" { +#include +} + +#ifdef __sg_public +// since libstatgrab 0.90 this macro is defined, so we use it for version check +#define STATGRAB_NEWER_THAN_0_90 1 +#endif + +#define BAR_ORIENT_BOTTOMUP "bottomUp" +#define BAR_ORIENT_TOPDOWN "topDown" +#define BAR_ORIENT_LEFTRIGHT "leftRight" +#define BAR_ORIENT_RIGHTLEFT "rightLeft" + + +LxQtCpuLoad::LxQtCpuLoad(ILxQtPanelPlugin* plugin, QWidget* parent): + QFrame(parent), + mPlugin(plugin), + m_showText(false), + m_barOrientation(TopDownBar), + m_timerID(-1) +{ + setObjectName("LxQtCpuLoad"); + + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(&m_stuff); + + /* Initialise statgrab */ +#ifdef STATGRAB_NEWER_THAN_0_90 + sg_init(0); +#else + sg_init(); +#endif + + /* Drop setuid/setgid privileges. */ + if (sg_drop_privileges() != 0) { + perror("Error. Failed to drop privileges"); + } + + m_font.setPointSizeF(8); + + settingsChanged(); +} + +LxQtCpuLoad::~LxQtCpuLoad() +{ +} + +void LxQtCpuLoad::resizeEvent(QResizeEvent *) +{ + if (m_barOrientation == RightToLeftBar || m_barOrientation == LeftToRightBar) + { + m_stuff.setMinimumHeight(18); + m_stuff.setMaximumHeight(18); + m_stuff.setMinimumWidth(24); + } + else + { + m_stuff.setMinimumWidth(18); + m_stuff.setMaximumWidth(18); + m_stuff.setMinimumHeight(24); + } + + update(); +} + + +double LxQtCpuLoad::getLoadCpu() const +{ + #ifdef STATGRAB_NEWER_THAN_0_90 + size_t count; + sg_cpu_percents* cur = sg_get_cpu_percents(&count); +#else + sg_cpu_percents* cur = sg_get_cpu_percents(); +#endif + return (cur->user + cur->kernel + cur->nice); +} + +void LxQtCpuLoad::timerEvent(QTimerEvent *event) +{ + double avg = getLoadCpu(); + if ( qAbs(m_avg-avg)>1 ) + { + m_avg = avg; + setToolTip(tr("CPU load %1%").arg(m_avg)); + update(); + } +} + +void LxQtCpuLoad::paintEvent ( QPaintEvent * ) +{ + QPainter p(this); + QPen pen; + pen.setWidth(2); + p.setPen(pen); + p.setRenderHint(QPainter::Antialiasing, true); + const double w = 20; + + p.setFont(m_font); + QRectF r = rect(); + + QRectF r1; + QLinearGradient shade(0,0,1,1); + if (m_barOrientation == RightToLeftBar || m_barOrientation == LeftToRightBar) + { + float vo = (r.height() - w )/2.0; + float ho = r.width()*(1-m_avg*0.01); + + if (m_barOrientation == RightToLeftBar) + { + r1.setRect(r.left()+ho, r.top()+vo, r.width()-ho, r.height()-2*vo ); + } + else // LeftToRightBar + { + r1.setRect(r.left(), r.top()+vo, r.width()-ho, r.height()-2*vo ); + } + shade.setFinalStop(0, r1.height()); + } + else // BottomUpBar || TopDownBar + { + float vo = r.height()*(1-m_avg*0.01); + float ho = (r.width() - w )/2.0; + + if (m_barOrientation == TopDownBar) + { + r1.setRect(r.left()+ho, r.top(), r.width()-2*ho, r.height()-vo ); + } + else // BottomUpBar + { + r1.setRect(r.left()+ho, r.top()+vo, r.width()-2*ho, r.height()-vo ); + } + shade.setFinalStop(r1.width(), 0); + } + + shade.setSpread(QLinearGradient::ReflectSpread); + shade.setColorAt(0, QColor(0, 196, 0, 128)); + shade.setColorAt(0.5, QColor(0, 128, 0, 255) ); + shade.setColorAt(1, QColor(0, 196, 0 , 128)); + + p.fillRect(r1, shade); + + if (m_showText) + { + p.setPen(fontColor); + p.drawText(rect(), Qt::AlignCenter, QString::number(m_avg)); + } +} + + +void LxQtCpuLoad::settingsChanged() +{ + if (m_timerID != -1) + killTimer(m_timerID); + + m_showText = mPlugin->settings()->value("showText", false).toBool(); + m_updateInterval = mPlugin->settings()->value("updateInterval", 1000).toInt(); + + QString barOrientation = mPlugin->settings()->value("barOrientation", BAR_ORIENT_BOTTOMUP).toString(); + if (barOrientation == BAR_ORIENT_RIGHTLEFT) + m_barOrientation = RightToLeftBar; + else if (barOrientation == BAR_ORIENT_LEFTRIGHT) + m_barOrientation = LeftToRightBar; + else if (barOrientation == BAR_ORIENT_TOPDOWN) + m_barOrientation = TopDownBar; + else + m_barOrientation = BottomUpBar; + + m_timerID = startTimer(m_updateInterval); + update(); +} diff --git a/plugin-cpuload/lxqtcpuload.h b/plugin-cpuload/lxqtcpuload.h new file mode 100644 index 0000000..f16c324 --- /dev/null +++ b/plugin-cpuload/lxqtcpuload.h @@ -0,0 +1,87 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTCPULOAD_H +#define LXQTCPULOAD_H +#include + +class ILxQtPanelPlugin; + +class LxQtCpuLoad: public QFrame +{ + Q_OBJECT + + Q_PROPERTY(QColor fontColor READ getFontColor WRITE setFontColor) + +public: + /** + Describes orientation of cpu load bar + **/ + enum BarOrientation { + BottomUpBar, //! Bar begins at bottom and grows up + TopDownBar, //! Bar begins at top and grows down + RightToLeftBar, //! Bar begins at right edge and grows to the left + LeftToRightBar //! Bar begins at left edge and grows to the right + }; + + LxQtCpuLoad(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~LxQtCpuLoad(); + + + void settingsChanged(); + + void setFontColor(QColor value) { fontColor = value; } + QColor getFontColor() const { return fontColor; } + +protected: + void virtual timerEvent(QTimerEvent *event); + void virtual paintEvent ( QPaintEvent * event ); + void virtual resizeEvent(QResizeEvent *); + +private: + double getLoadCpu() const; + + ILxQtPanelPlugin *mPlugin; + QWidget m_stuff; + + //! average load + int m_avg; + + bool m_showText; + BarOrientation m_barOrientation; + int m_updateInterval; + int m_timerID; + + QFont m_font; + + QColor fontColor; +}; + + +#endif // LXQTCPULOAD_H + + diff --git a/plugin-cpuload/lxqtcpuloadconfiguration.cpp b/plugin-cpuload/lxqtcpuloadconfiguration.cpp new file mode 100644 index 0000000..7f507e2 --- /dev/null +++ b/plugin-cpuload/lxqtcpuloadconfiguration.cpp @@ -0,0 +1,121 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtcpuloadconfiguration.h" +#include "ui_lxqtcpuloadconfiguration.h" + +#define BAR_ORIENT_BOTTOMUP "bottomUp" +#define BAR_ORIENT_TOPDOWN "topDown" +#define BAR_ORIENT_LEFTRIGHT "leftRight" +#define BAR_ORIENT_RIGHTLEFT "rightLeft" + +LxQtCpuLoadConfiguration::LxQtCpuLoadConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtCpuLoadConfiguration), + mSettings(settings), + mOldSettings(settings) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("CpuLoadConfigurationWindow"); + ui->setupUi(this); + + fillBarOrientations(); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), + this, SLOT(dialogButtonsAction(QAbstractButton*))); + + loadSettings(); + + connect(ui->showTextCB, SIGNAL(toggled(bool)), + this, SLOT(showTextChanged(bool))); + connect(ui->updateIntervalSpinBox, SIGNAL(valueChanged(double)), + this, SLOT(updateIntervalChanged(double))); + connect(ui->barOrientationCOB, SIGNAL(currentIndexChanged(int)), + this, SLOT(barOrientationChanged(int))); +} + +LxQtCpuLoadConfiguration::~LxQtCpuLoadConfiguration() +{ + delete ui; +} + +void LxQtCpuLoadConfiguration::fillBarOrientations() +{ + ui->barOrientationCOB->addItem(trUtf8("Bottom up"), BAR_ORIENT_BOTTOMUP); + ui->barOrientationCOB->addItem(trUtf8("Top down"), BAR_ORIENT_TOPDOWN); + ui->barOrientationCOB->addItem(trUtf8("Left to right"), BAR_ORIENT_LEFTRIGHT); + ui->barOrientationCOB->addItem(trUtf8("Right to left"), BAR_ORIENT_RIGHTLEFT); +} + +void LxQtCpuLoadConfiguration::loadSettings() +{ + ui->showTextCB->setChecked(mSettings->value("showText", false).toBool()); + ui->updateIntervalSpinBox->setValue(mSettings->value("updateInterval", 1000).toInt() / 1000.0); + + int boIndex = ui->barOrientationCOB->findData( + mSettings->value("barOrientation", BAR_ORIENT_BOTTOMUP)); + boIndex = (boIndex < 0) ? 1 : boIndex; + ui->barOrientationCOB->setCurrentIndex(boIndex); + +// QString menuFile = mSettings->value("menu_file", "").toString(); +// if (menuFile.isEmpty()) +// { +// menuFile = XdgMenu::getMenuFileName(); +// } +// ui->menuFilePathLE->setText(menuFile); +// ui->shortcutEd->setKeySequence(mSettings->value("shortcut", "Alt+F1").toString()); +} + +void LxQtCpuLoadConfiguration::showTextChanged(bool value) +{ + mSettings->setValue("showText", value); +} + + +void LxQtCpuLoadConfiguration::updateIntervalChanged(double value) +{ + mSettings->setValue("updateInterval", value*1000); +} + +void LxQtCpuLoadConfiguration::barOrientationChanged(int index) +{ + mSettings->setValue("barOrientation", ui->barOrientationCOB->itemData(index).toString()); +} + +void LxQtCpuLoadConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + mOldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + diff --git a/plugin-cpuload/lxqtcpuloadconfiguration.h b/plugin-cpuload/lxqtcpuloadconfiguration.h new file mode 100644 index 0000000..3a0116e --- /dev/null +++ b/plugin-cpuload/lxqtcpuloadconfiguration.h @@ -0,0 +1,73 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTCPULOADCONFIGURATION_H +#define LXQTCPULOADCONFIGURATION_H + +#include + +#include + +class QSettings; +class QAbstractButton; + +namespace Ui { + class LxQtCpuLoadConfiguration; +} + +class LxQtCpuLoadConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtCpuLoadConfiguration(QSettings *settings, QWidget *parent = 0); + ~LxQtCpuLoadConfiguration(); + +private: + Ui::LxQtCpuLoadConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache mOldSettings; + + /* + Fills Bar orientation combobox + */ + void fillBarOrientations(); + +private slots: + /* + Saves settings in conf file. + */ + void loadSettings(); + void dialogButtonsAction(QAbstractButton *btn); + void showTextChanged(bool value); + void updateIntervalChanged(double value); + void barOrientationChanged(int index); + +}; + +#endif // LXQTCPULOADCONFIGURATION_H diff --git a/plugin-cpuload/lxqtcpuloadconfiguration.ui b/plugin-cpuload/lxqtcpuloadconfiguration.ui new file mode 100644 index 0000000..85fbf0c --- /dev/null +++ b/plugin-cpuload/lxqtcpuloadconfiguration.ui @@ -0,0 +1,108 @@ + + + LxQtCpuLoadConfiguration + + + + 0 + 0 + 285 + 191 + + + + CPU Load Settings + + + + + + General + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + false + + + + + + Show text + + + + + + + Update interval: + + + + + + + sec + + + 1 + + + 0.500000000000000 + + + 10000.000000000000000 + + + 0.500000000000000 + + + 1.000000000000000 + + + + + + + Bar orientation: + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 41 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + diff --git a/plugin-cpuload/lxqtcpuloadplugin.cpp b/plugin-cpuload/lxqtcpuloadplugin.cpp new file mode 100644 index 0000000..1019566 --- /dev/null +++ b/plugin-cpuload/lxqtcpuloadplugin.cpp @@ -0,0 +1,66 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtcpuloadplugin.h" +#include "lxqtcpuload.h" +#include "lxqtcpuloadconfiguration.h" + +#include + +LxQtCpuLoadPlugin::LxQtCpuLoadPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo) +{ + mWidget = new QWidget(); + mContent = new LxQtCpuLoad(this, mWidget); + QVBoxLayout *layout = new QVBoxLayout(mWidget); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + layout->addWidget(mContent); + layout->setStretchFactor(mContent, 1); +} + +LxQtCpuLoadPlugin::~LxQtCpuLoadPlugin() +{ + delete mWidget; +} + +QWidget *LxQtCpuLoadPlugin::widget() +{ + return mWidget; +} + +QDialog *LxQtCpuLoadPlugin::configureDialog() +{ + return new LxQtCpuLoadConfiguration(settings(), mContent); +} + +void LxQtCpuLoadPlugin::settingsChanged() +{ + mContent->settingsChanged(); +} diff --git a/plugin-cpuload/lxqtcpuloadplugin.h b/plugin-cpuload/lxqtcpuloadplugin.h new file mode 100644 index 0000000..a205a5c --- /dev/null +++ b/plugin-cpuload/lxqtcpuloadplugin.h @@ -0,0 +1,73 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTCPULOADPLUGIN_H +#define LXQTCPULOADPLUGIN_H + + +#include "../panel/ilxqtpanelplugin.h" +#include +class LxQtCpuLoad; + +class LxQtCpuLoadPlugin: public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + explicit LxQtCpuLoadPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtCpuLoadPlugin(); + + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog; } + virtual QWidget *widget(); + virtual QString themeId() const { return "CpuLoad"; } + + bool isSeparate() const { return true; } + QDialog *configureDialog(); + +protected: + virtual void settingsChanged(); + +private: + QWidget *mWidget; + LxQtCpuLoad *mContent; +}; + + +class LxQtCpuLoadPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtCpuLoadPlugin(startupInfo); + } +}; + + +#endif // LXQTCPULOADPLUGIN_H diff --git a/plugin-cpuload/resources/cpuload.desktop.in b/plugin-cpuload/resources/cpuload.desktop.in new file mode 100644 index 0000000..fe52e0d --- /dev/null +++ b/plugin-cpuload/resources/cpuload.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=CPU monitor +Comment=Displays the current CPU load. +Icon=cpu + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-cpuload/translations/cpuload.ts b/plugin-cpuload/translations/cpuload.ts new file mode 100644 index 0000000..3c6bd00 --- /dev/null +++ b/plugin-cpuload/translations/cpuload.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + + + + + Show text + + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_ar.desktop b/plugin-cpuload/translations/cpuload_ar.desktop new file mode 100644 index 0000000..1d22bc6 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ar.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[ar]=مُراقب عبء المعالج +Name[ar]=عبء المعالج diff --git a/plugin-cpuload/translations/cpuload_ar.ts b/plugin-cpuload/translations/cpuload_ar.ts new file mode 100644 index 0000000..668e879 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ar.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + العامّ + + + + Show text + إظهار النَّصّ + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_cs.desktop b/plugin-cpuload/translations/cpuload_cs.desktop new file mode 100644 index 0000000..58b2e3e --- /dev/null +++ b/plugin-cpuload/translations/cpuload_cs.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[cs]=Sledování zatížení procesoru +Name[cs]=Zatížení procesoru diff --git a/plugin-cpuload/translations/cpuload_cs.ts b/plugin-cpuload/translations/cpuload_cs.ts new file mode 100644 index 0000000..50a1257 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_cs.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Vytížení procesoru %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Nastavení vytížení procesoru v LxQtu + + + + CPU Load Settings + + + + + General + Obecné + + + + Show text + Ukázat text + + + + Update interval: + Obnovovací interval: + + + + sec + s + + + + Bar orientation: + Směr pruhu + + + + Bottom up + Zdola nahoru + + + + Top down + Shora dolů + + + + Left to right + Zleva doprava + + + + Right to left + Zprava doleva + + + diff --git a/plugin-cpuload/translations/cpuload_cs_CZ.desktop b/plugin-cpuload/translations/cpuload_cs_CZ.desktop new file mode 100644 index 0000000..c33207b --- /dev/null +++ b/plugin-cpuload/translations/cpuload_cs_CZ.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[cs_CZ]=Sledování zatížení procesoru +Name[cs_CZ]=Zatížení procesoru diff --git a/plugin-cpuload/translations/cpuload_cs_CZ.ts b/plugin-cpuload/translations/cpuload_cs_CZ.ts new file mode 100644 index 0000000..65afbb2 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_cs_CZ.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Vytížení procesoru %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Nastavení vytížení procesoru v LxQtu + + + + CPU Load Settings + + + + + General + Obecné + + + + Show text + Ukázat text + + + + Update interval: + Obnovovací interval: + + + + sec + s + + + + Bar orientation: + Směr pruhu + + + + Bottom up + Zdola nahoru + + + + Top down + Shora dolů + + + + Left to right + Zleva doprava + + + + Right to left + Zprava doleva + + + diff --git a/plugin-cpuload/translations/cpuload_da.desktop b/plugin-cpuload/translations/cpuload_da.desktop new file mode 100644 index 0000000..2258043 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_da.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[da]=CPU Overvågning +Name[da]=CPU-belastning diff --git a/plugin-cpuload/translations/cpuload_da_DK.desktop b/plugin-cpuload/translations/cpuload_da_DK.desktop new file mode 100644 index 0000000..81e2292 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_da_DK.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[da_DK]=CPU Overvågning +Name[da_DK]=CPU Belastning + diff --git a/plugin-cpuload/translations/cpuload_da_DK.ts b/plugin-cpuload/translations/cpuload_da_DK.ts new file mode 100644 index 0000000..12bc305 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_da_DK.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + CPU belastning %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt CPU-belastning indstillinger + + + + CPU Load Settings + + + + + General + Generelt + + + + Show text + Vis tekst + + + + Update interval: + Opdateringsinterval: + + + + sec + sek + + + + Bar orientation: + Bjælkens orientering: + + + + Bottom up + Nedefra + + + + Top down + Oppefra + + + + Left to right + Venstre mod højre + + + + Right to left + Højre mod venstre + + + diff --git a/plugin-cpuload/translations/cpuload_de.desktop b/plugin-cpuload/translations/cpuload_de.desktop new file mode 100644 index 0000000..6d216d5 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_de.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[de]=Prozesslast-Monitor +Name[de]=Prozessauslastung diff --git a/plugin-cpuload/translations/cpuload_de.ts b/plugin-cpuload/translations/cpuload_de.ts new file mode 100644 index 0000000..f3c6733 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_de.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Prozessorauslastung %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt Prozessorauslastung Einstellungen + + + + CPU Load Settings + + + + + General + Allgemein + + + + Show text + Text anzeigen + + + + Update interval: + Aktualisierungsintervall: + + + + sec + Sek. + + + + Bar orientation: + Anzeigeausrichtung: + + + + Bottom up + von unten nach oben + + + + Top down + von oben nach unten + + + + Left to right + von links nach rechts + + + + Right to left + von rechts nach links + + + diff --git a/plugin-cpuload/translations/cpuload_de_DE.desktop b/plugin-cpuload/translations/cpuload_de_DE.desktop new file mode 100644 index 0000000..b6df13b --- /dev/null +++ b/plugin-cpuload/translations/cpuload_de_DE.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[de_DE]=Cpu +Name[de_DE]=CPU-Auslastung diff --git a/plugin-cpuload/translations/cpuload_de_DE.ts b/plugin-cpuload/translations/cpuload_de_DE.ts new file mode 100644 index 0000000..6001586 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_de_DE.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Cpu Last %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt Cpu Last Einstellungen + + + + CPU Load Settings + + + + + General + Allgemein + + + + Show text + Zeige Text + + + + Update interval: + Aktualisierungs Intervall: + + + + sec + Sek + + + + Bar orientation: + Balken Orientierung + + + + Bottom up + Von unten nach oben + + + + Top down + Von oben nach unten + + + + Left to right + Von Links nach Rechts + + + + Right to left + Von Rechts nach Links + + + diff --git a/plugin-cpuload/translations/cpuload_el_GR.desktop b/plugin-cpuload/translations/cpuload_el_GR.desktop new file mode 100644 index 0000000..55dd675 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_el_GR.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[el_GR]=Εμφανίζει την τρέχουσα χρήση ΚΜΕ. +Name[el_GR]=Επόπτης ΚΜΕ diff --git a/plugin-cpuload/translations/cpuload_el_GR.ts b/plugin-cpuload/translations/cpuload_el_GR.ts new file mode 100644 index 0000000..4925099 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_el_GR.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Φορτίο ΚΜΕ %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Ρυθμίσεις φορτίου ΚΜΕ + + + + CPU Load Settings + + + + + General + Γενικά + + + + Show text + Εμφάνιση κειμένου + + + + Update interval: + Διάστημα ενημέρωσης: + + + + sec + δευτ + + + + Bar orientation: + Προσανατολισμός γραμμής: + + + + Bottom up + Κάτω προς τα πάνω + + + + Top down + Πάνω προς τα κάτω + + + + Left to right + Αριστερά προς δεξιά + + + + Right to left + Δεξιά προς αριστερά + + + diff --git a/plugin-cpuload/translations/cpuload_eo.desktop b/plugin-cpuload/translations/cpuload_eo.desktop new file mode 100644 index 0000000..c9f168c --- /dev/null +++ b/plugin-cpuload/translations/cpuload_eo.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[eo]=Monitorado de CPU-ŝarĝo +Name[eo]=CPU-ŝarĝo diff --git a/plugin-cpuload/translations/cpuload_eo.ts b/plugin-cpuload/translations/cpuload_eo.ts new file mode 100644 index 0000000..9814a82 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_eo.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + Ĝenerala + + + + Show text + Montri tekston + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_es.desktop b/plugin-cpuload/translations/cpuload_es.desktop new file mode 100644 index 0000000..467dd1c --- /dev/null +++ b/plugin-cpuload/translations/cpuload_es.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[es]=Monitor de carga de CPU +Name[es]=Carga de CPU diff --git a/plugin-cpuload/translations/cpuload_es.ts b/plugin-cpuload/translations/cpuload_es.ts new file mode 100644 index 0000000..30e3363 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_es.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Carga de CPU %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Opciones de Carga de CPU LxQt + + + + CPU Load Settings + + + + + General + General + + + + Show text + Mostrar texto + + + + Update interval: + Intervalo de actualización + + + + sec + segundos + + + + Bar orientation: + Orientación de la barra: + + + + Bottom up + De Abajo hacia Arriba + + + + Top down + De Arriba hacia Abajo + + + + Left to right + De Izquierda a Derecha + + + + Right to left + De Derecha a Izquierda + + + diff --git a/plugin-cpuload/translations/cpuload_es_VE.desktop b/plugin-cpuload/translations/cpuload_es_VE.desktop new file mode 100644 index 0000000..53509af --- /dev/null +++ b/plugin-cpuload/translations/cpuload_es_VE.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[es_VE]=Monitor de carga del CPU +Name[es_VE]=Carga del CPU diff --git a/plugin-cpuload/translations/cpuload_es_VE.ts b/plugin-cpuload/translations/cpuload_es_VE.ts new file mode 100644 index 0000000..a05394b --- /dev/null +++ b/plugin-cpuload/translations/cpuload_es_VE.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Cpu al %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Configuracion de Monitor de Cpu LxQt + + + + CPU Load Settings + + + + + General + General + + + + Show text + Mostrar etiqueta + + + + Update interval: + Intervalo actualizacion + + + + sec + seg + + + + Bar orientation: + Orientacion barra + + + + Bottom up + Abajo a Arriba + + + + Top down + Arriba a abajo + + + + Left to right + Izquierda a derecha + + + + Right to left + Derecha a izquierda + + + diff --git a/plugin-cpuload/translations/cpuload_eu.desktop b/plugin-cpuload/translations/cpuload_eu.desktop new file mode 100644 index 0000000..0368098 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_eu.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[eu]=PUZaren uneko karga bistaratzen du. +Name[eu]=PUZaren monitorea diff --git a/plugin-cpuload/translations/cpuload_eu.ts b/plugin-cpuload/translations/cpuload_eu.ts new file mode 100644 index 0000000..aaca681 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_eu.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + PUZaren karga %%1 + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt PUZaren kargaren ezarpenak + + + + CPU Load Settings + + + + + General + Orokorra + + + + Show text + Erakutsi testua + + + + Update interval: + Eguneratze-tartea: + + + + sec + seg + + + + Bar orientation: + Barraren orientazioa: + + + + Bottom up + Behetik gora + + + + Top down + Goitik behera + + + + Left to right + Ezkerretik eskuinera + + + + Right to left + Eskuinetik ezkerrera + + + diff --git a/plugin-cpuload/translations/cpuload_fi.desktop b/plugin-cpuload/translations/cpuload_fi.desktop new file mode 100644 index 0000000..8d76e41 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_fi.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[fi]=Suorittimen kuormituksen seuranta +Name[fi]=Suorittimen kuormitus diff --git a/plugin-cpuload/translations/cpuload_fi.ts b/plugin-cpuload/translations/cpuload_fi.ts new file mode 100644 index 0000000..de1a719 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_fi.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Suoritinkuorma %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQtin suoritinkuorman asetukset + + + + CPU Load Settings + + + + + General + Yleiset + + + + Show text + Näytä teksti + + + + Update interval: + Päivitysväli: + + + + sec + s + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_fr_FR.ts b/plugin-cpuload/translations/cpuload_fr_FR.ts new file mode 100644 index 0000000..345f7f0 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_fr_FR.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + Généraux + + + + Show text + Montrer le texte + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_hu.desktop b/plugin-cpuload/translations/cpuload_hu.desktop new file mode 100644 index 0000000..efabda5 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_hu.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[hu]=Megjeleníti a processzorterhelést. +Name[hu]=CPU-figyelő diff --git a/plugin-cpuload/translations/cpuload_hu_HU.ts b/plugin-cpuload/translations/cpuload_hu_HU.ts new file mode 100644 index 0000000..7683cac --- /dev/null +++ b/plugin-cpuload/translations/cpuload_hu_HU.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + Általános + + + + Show text + Szöveg megjelenítése + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_it_IT.desktop b/plugin-cpuload/translations/cpuload_it_IT.desktop new file mode 100644 index 0000000..76de5a9 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_it_IT.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[it_IT]=Monitor del carico del processore +Name[it_IT]=Carico del processore diff --git a/plugin-cpuload/translations/cpuload_it_IT.ts b/plugin-cpuload/translations/cpuload_it_IT.ts new file mode 100644 index 0000000..f90b0b0 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_it_IT.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Carico del processore %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Impostazioni del carico del processore di LxQt + + + + CPU Load Settings + + + + + General + Generale + + + + Show text + Mostra testo + + + + Update interval: + Intervallo di aggiornamento: + + + + sec + sec + + + + Bar orientation: + Orientamento della barra: + + + + Bottom up + Dal basso all'alto + + + + Top down + Dall'alto al basso + + + + Left to right + Da sinistra a destra + + + + Right to left + Da destra a sinistra + + + diff --git a/plugin-cpuload/translations/cpuload_ja.desktop b/plugin-cpuload/translations/cpuload_ja.desktop new file mode 100644 index 0000000..fd254cb --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ja.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=CPU monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[ja]=現在のCPUの負荷を表示します +Name[ja]=CPUモニター diff --git a/plugin-cpuload/translations/cpuload_ja.ts b/plugin-cpuload/translations/cpuload_ja.ts new file mode 100644 index 0000000..8deb413 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ja.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + CPU負荷 %1% + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + CPUモニターの設定 + + + + General + 一般 + + + + Show text + テキストを表示 + + + + Update interval: + 更新頻度: + + + + sec + + + + + Bar orientation: + バーの向き: + + + + Bottom up + 下から上へ + + + + Top down + 上から下へ + + + + Left to right + 左から右へ + + + + Right to left + 右から左へ + + + diff --git a/plugin-cpuload/translations/cpuload_lt.desktop b/plugin-cpuload/translations/cpuload_lt.desktop new file mode 100644 index 0000000..cf6a18a --- /dev/null +++ b/plugin-cpuload/translations/cpuload_lt.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[lt]=Procesoriaus stebėtojas +Name[lt]=Procesoriaus apkrova diff --git a/plugin-cpuload/translations/cpuload_lt.ts b/plugin-cpuload/translations/cpuload_lt.ts new file mode 100644 index 0000000..acec6ae --- /dev/null +++ b/plugin-cpuload/translations/cpuload_lt.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + + + + + General + Pagrindinės + + + + Show text + Rodyti tekstą + + + + Update interval: + + + + + sec + + + + + Bar orientation: + + + + + Bottom up + + + + + Top down + + + + + Left to right + + + + + Right to left + + + + diff --git a/plugin-cpuload/translations/cpuload_nl.desktop b/plugin-cpuload/translations/cpuload_nl.desktop new file mode 100644 index 0000000..04271be --- /dev/null +++ b/plugin-cpuload/translations/cpuload_nl.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[nl]=CPU belasting monitor +Name[nl]=Cpu belasting diff --git a/plugin-cpuload/translations/cpuload_nl.ts b/plugin-cpuload/translations/cpuload_nl.ts new file mode 100644 index 0000000..08c5bfa --- /dev/null +++ b/plugin-cpuload/translations/cpuload_nl.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Cpu-belasting %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Instellingen voor CPU-belasting van LxQt + + + + CPU Load Settings + + + + + General + Algemeen + + + + Show text + Tekst weergeven + + + + Update interval: + Tussenpoze voor bijwerken: + + + + sec + sec + + + + Bar orientation: + Balkoriëntatie: + + + + Bottom up + Van beneden naar boven + + + + Top down + Van boven naar beneden + + + + Left to right + Van links naar rechts + + + + Right to left + Van rechts naar links + + + diff --git a/plugin-cpuload/translations/cpuload_pl_PL.desktop b/plugin-cpuload/translations/cpuload_pl_PL.desktop new file mode 100644 index 0000000..1d2f883 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pl_PL.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[pl_PL]=Monitor obciążenia CPU +Name[pl_PL]=Obciążenie CPU diff --git a/plugin-cpuload/translations/cpuload_pl_PL.ts b/plugin-cpuload/translations/cpuload_pl_PL.ts new file mode 100644 index 0000000..8a0c975 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pl_PL.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Obciążenie CPU %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Ustawienia LxQt CPU Load + + + + CPU Load Settings + + + + + General + Ogólne + + + + Show text + Pokaż tekst + + + + Update interval: + Odświeżanie widoku: + + + + sec + sek + + + + Bar orientation: + Orientacja paska stanu + + + + Bottom up + Z dołu do góry + + + + Top down + Z góry na dół + + + + Left to right + Lewo na prawo + + + + Right to left + Prawo na lewo + + + diff --git a/plugin-cpuload/translations/cpuload_pt.desktop b/plugin-cpuload/translations/cpuload_pt.desktop new file mode 100644 index 0000000..cabb08a --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pt.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Cpu monitor +Comment=Displays the current CPU load. + +# Translations +Name[pt]=Carga do CPU +Comment[pt]=Monitor de carga do CPU diff --git a/plugin-cpuload/translations/cpuload_pt.ts b/plugin-cpuload/translations/cpuload_pt.ts new file mode 100644 index 0000000..dc1b188 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pt.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Carga do cpu %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Definições da Carga do cpu + + + + CPU Load Settings + + + + + General + Geral + + + + Show text + Mostrar texto + + + + Update interval: + Intervalo: + + + + sec + seg. + + + + Bar orientation: + Orientação da barra: + + + + Bottom up + De baixo para cima + + + + Top down + De cima para baixo + + + + Left to right + Da esquerda para a direita + + + + Right to left + Da direita para a esquerda + + + diff --git a/plugin-cpuload/translations/cpuload_pt_BR.desktop b/plugin-cpuload/translations/cpuload_pt_BR.desktop new file mode 100644 index 0000000..5be6c9a --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pt_BR.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[pt_BR]=Monitor de carga da CPU +Name[pt_BR]=Carga da CPU diff --git a/plugin-cpuload/translations/cpuload_pt_BR.ts b/plugin-cpuload/translations/cpuload_pt_BR.ts new file mode 100644 index 0000000..00caf8a --- /dev/null +++ b/plugin-cpuload/translations/cpuload_pt_BR.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Carga da Cpu %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Configurações da Carga Da Cpu + + + + CPU Load Settings + + + + + General + Geral + + + + Show text + Exibir texto + + + + Update interval: + Intervalo de atualização: + + + + sec + seg + + + + Bar orientation: + Orientação da barra: + + + + Bottom up + De baixo para cima + + + + Top down + De cima para baixo + + + + Left to right + Da esquerda para a direita + + + + Right to left + Da direita para a esquerda + + + diff --git a/plugin-cpuload/translations/cpuload_ro_RO.desktop b/plugin-cpuload/translations/cpuload_ro_RO.desktop new file mode 100644 index 0000000..5e01855 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ro_RO.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[ro_RO]=Monitor de încărcare a procesorului +Name[ro_RO]=Grad de încărcare al procesorului diff --git a/plugin-cpuload/translations/cpuload_ro_RO.ts b/plugin-cpuload/translations/cpuload_ro_RO.ts new file mode 100644 index 0000000..2c73400 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ro_RO.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Încărcare procesor %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Setări încărcare procesor LxQt + + + + CPU Load Settings + + + + + General + General + + + + Show text + Afișează text + + + + Update interval: + Interval de actualizare + + + + sec + sec + + + + Bar orientation: + Orientare bară: + + + + Bottom up + De jos în sus + + + + Top down + De sus în jos + + + + Left to right + De la stânga la dreapta + + + + Right to left + De la dreapta la stânga + + + diff --git a/plugin-cpuload/translations/cpuload_ru.desktop b/plugin-cpuload/translations/cpuload_ru.desktop new file mode 100644 index 0000000..6a10460 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ru.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[ru]=Отображает текущую загрузку процессора. +Name[ru]=Монитор загрузки процессора + diff --git a/plugin-cpuload/translations/cpuload_ru.ts b/plugin-cpuload/translations/cpuload_ru.ts new file mode 100644 index 0000000..f2dc482 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ru.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + Загрузка процессора %1% + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + Настройки загрузки процессора + + + + General + Общие + + + + Show text + Показать текст + + + + Update interval: + Интервал обновления: + + + + sec + сек + + + + Bar orientation: + Расположение панели: + + + + Bottom up + Снизу вверх + + + + Top down + Сверху вниз + + + + Left to right + Слева направо + + + + Right to left + Справа налево + + + diff --git a/plugin-cpuload/translations/cpuload_ru_RU.desktop b/plugin-cpuload/translations/cpuload_ru_RU.desktop new file mode 100644 index 0000000..a750ca5 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ru_RU.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[ru_RU]=Отображает текущую загрузку процессора. +Name[ru_RU]=Монитор загрузки процессора diff --git a/plugin-cpuload/translations/cpuload_ru_RU.ts b/plugin-cpuload/translations/cpuload_ru_RU.ts new file mode 100644 index 0000000..14f211e --- /dev/null +++ b/plugin-cpuload/translations/cpuload_ru_RU.ts @@ -0,0 +1,65 @@ + + + + + LxQtCpuLoad + + + CPU load %1% + Загрузка процессора %1% + + + + LxQtCpuLoadConfiguration + + + CPU Load Settings + Настройки загрузки процессора + + + + General + Общие + + + + Show text + Показать текст + + + + Update interval: + Интервал обновления: + + + + sec + сек + + + + Bar orientation: + Расположение панели: + + + + Bottom up + Снизу вверх + + + + Top down + Сверху вниз + + + + Left to right + Слева направо + + + + Right to left + Справа налево + + + diff --git a/plugin-cpuload/translations/cpuload_sl.desktop b/plugin-cpuload/translations/cpuload_sl.desktop new file mode 100644 index 0000000..16f7101 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_sl.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[sl]=Nadzornik obremenitve CPE +Name[sl]=Obremenitev CPE diff --git a/plugin-cpuload/translations/cpuload_sl.ts b/plugin-cpuload/translations/cpuload_sl.ts new file mode 100644 index 0000000..6e16702 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_sl.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Uporaba CPE: %1 % + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Nastavitve prikaza uporabe CPE za LXQt + + + + CPU Load Settings + + + + + General + Splošno + + + + Show text + Pokaži besedilo + + + + Update interval: + Hitrost osveževanja: + + + + sec + s + + + + Bar orientation: + Usmerjenost vrstice: + + + + Bottom up + Od spodaj navzgor + + + + Top down + Od zgoraj navzdol + + + + Left to right + Iz leve proti desni + + + + Right to left + Iz desne proti levi + + + diff --git a/plugin-cpuload/translations/cpuload_th_TH.desktop b/plugin-cpuload/translations/cpuload_th_TH.desktop new file mode 100644 index 0000000..1a089c9 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_th_TH.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[th_TH]=เฝ้าสังเกตการทำงานซีพียู +Name[th_TH]=การทำงานซีพียู diff --git a/plugin-cpuload/translations/cpuload_th_TH.ts b/plugin-cpuload/translations/cpuload_th_TH.ts new file mode 100644 index 0000000..6ec9922 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_th_TH.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Cpu โหลด %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + ค่าตั้ง Cpu โหลด LxQt + + + + CPU Load Settings + + + + + General + ทั่วไป + + + + Show text + แสดงข้อความ + + + + Update interval: + ทิ้งระยะการปรับข้อมูล: + + + + sec + วิ + + + + Bar orientation: + การจัดเรียง: + + + + Bottom up + ล่างขึ้นบน + + + + Top down + บนลงล่าง + + + + Left to right + ซ้ายไปขวา + + + + Right to left + ขวาไปซ้าย + + + diff --git a/plugin-cpuload/translations/cpuload_tr.desktop b/plugin-cpuload/translations/cpuload_tr.desktop new file mode 100644 index 0000000..5abb7c9 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_tr.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[tr]=İşlemci Yükü izleyici +Name[tr]=İşlemci Yükü diff --git a/plugin-cpuload/translations/cpuload_tr.ts b/plugin-cpuload/translations/cpuload_tr.ts new file mode 100644 index 0000000..f5dcd03 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_tr.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + İşlemci yükü %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt İşlemci Yükü ayarları + + + + CPU Load Settings + + + + + General + Genel + + + + Show text + Metin göster + + + + Update interval: + Güncelleme aralığı: + + + + sec + sn + + + + Bar orientation: + Çubuk yönelimi: + + + + Bottom up + Aşağıdan yukarı + + + + Top down + Yukarıdan aşağı + + + + Left to right + Soldan sağa + + + + Right to left + Sağdan sola + + + diff --git a/plugin-cpuload/translations/cpuload_uk.desktop b/plugin-cpuload/translations/cpuload_uk.desktop new file mode 100644 index 0000000..d5ef8d8 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_uk.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[uk]=Показує поточне навантаження CPU. +Name[uk]=Монітор CPU diff --git a/plugin-cpuload/translations/cpuload_uk.ts b/plugin-cpuload/translations/cpuload_uk.ts new file mode 100644 index 0000000..3e13478 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_uk.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Завантаження Cpu %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + Налаштування завантаження ЦП LxQt + + + + CPU Load Settings + + + + + General + Загальне + + + + Show text + Показувати текст + + + + Update interval: + Період поновлення: + + + + sec + сек + + + + Bar orientation: + Напрямок планки: + + + + Bottom up + Знизу вверх + + + + Top down + Зверху вниз + + + + Left to right + Зліва направо + + + + Right to left + Зправа наліво + + + diff --git a/plugin-cpuload/translations/cpuload_zh_CN.desktop b/plugin-cpuload/translations/cpuload_zh_CN.desktop new file mode 100644 index 0000000..5cd9ddd --- /dev/null +++ b/plugin-cpuload/translations/cpuload_zh_CN.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[zh_CN]=CPU 负载监视器 +Name[zh_CN]=CPU 负载 diff --git a/plugin-cpuload/translations/cpuload_zh_CN.ts b/plugin-cpuload/translations/cpuload_zh_CN.ts new file mode 100644 index 0000000..9448095 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_zh_CN.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + Cpu 负载 %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQt Cpu 负载设置 + + + + CPU Load Settings + + + + + General + 常规 + + + + Show text + 显示文本 + + + + Update interval: + 更新间隔: + + + + sec + + + + + Bar orientation: + 状态栏方向: + + + + Bottom up + 自下而上 + + + + Top down + 自上而下 + + + + Left to right + 从左到右 + + + + Right to left + 从右到左 + + + diff --git a/plugin-cpuload/translations/cpuload_zh_TW.desktop b/plugin-cpuload/translations/cpuload_zh_TW.desktop new file mode 100644 index 0000000..481a589 --- /dev/null +++ b/plugin-cpuload/translations/cpuload_zh_TW.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Cpu monitor +Comment=Displays the current CPU load. + + + + +# Translations +Comment[zh_TW]=CPU使用監視器 +Name[zh_TW]=CPU使用 diff --git a/plugin-cpuload/translations/cpuload_zh_TW.ts b/plugin-cpuload/translations/cpuload_zh_TW.ts new file mode 100644 index 0000000..52054bc --- /dev/null +++ b/plugin-cpuload/translations/cpuload_zh_TW.ts @@ -0,0 +1,73 @@ + + + + + LxQtCpuLoad + + Cpu load %1% + CPU使用率 %1% + + + + CPU load %1% + + + + + LxQtCpuLoadConfiguration + + LxQt Cpu Load settings + LxQtCPU使用率提示設定 + + + + CPU Load Settings + + + + + General + 一般 + + + + Show text + 顯示文字 + + + + Update interval: + 更新間隔 + + + + sec + + + + + Bar orientation: + 進度條方向 + + + + Bottom up + 由下至上 + + + + Top down + 由上至下 + + + + Left to right + 由左至右 + + + + Right to left + 由右至左 + + + diff --git a/plugin-desktopswitch/CMakeLists.txt b/plugin-desktopswitch/CMakeLists.txt new file mode 100644 index 0000000..dbb3ae7 --- /dev/null +++ b/plugin-desktopswitch/CMakeLists.txt @@ -0,0 +1,20 @@ +set(PLUGIN "desktopswitch") + +set(HEADERS + desktopswitch.h + desktopswitchbutton.h +) + +set(SOURCES + desktopswitch.cpp + desktopswitchbutton.cpp +) + +set(MOCS + desktopswitch.h + desktopswitchbutton.h +) + +set(LIBRARIES ${LIBRARIES} ${LXQT_LIBRARIES} ${LXQT_GLOBALKEYS_LIBRARIES} ) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-desktopswitch/desktopswitch.cpp b/plugin-desktopswitch/desktopswitch.cpp new file mode 100644 index 0000000..dfe4217 --- /dev/null +++ b/plugin-desktopswitch/desktopswitch.cpp @@ -0,0 +1,169 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "desktopswitch.h" +#include "desktopswitchbutton.h" + +DesktopSwitch::DesktopSwitch(const ILxQtPanelPluginStartupInfo &startupInfo) : + QObject(), + ILxQtPanelPlugin(startupInfo), + m_pSignalMapper(new QSignalMapper(this)), + m_desktopCount(KWindowSystem::numberOfDesktops()) +{ + m_buttons = new QButtonGroup(this); + connect (m_pSignalMapper, SIGNAL(mapped(int)), this, SLOT(setDesktop(int))); + + mLayout = new LxQt::GridLayout(&mWidget); + mWidget.setLayout(mLayout); + setup(); + + connect(KWindowSystem::self(), SIGNAL(numberOfDesktopsChanged(int)), SLOT(onNumberOfDesktopsChanged(int))); + connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), SLOT(onCurrentDesktopChanged(int))); + connect(KWindowSystem::self(), SIGNAL(desktopNamesChanged()), SLOT(onDesktopNamesChanged())); +} + +void DesktopSwitch::setup() +{ + // clear current state + foreach (QAbstractButton * b, m_buttons->buttons()) + { + // TODO/FIXME: maybe it has to be removed from layout too? + m_pSignalMapper->removeMappings(b); + m_buttons->removeButton(b); +// dynamic_cast(b)->unregisterShortcut(); + delete b; + } + + // create new desktop layout + for (int i = 0; i < m_desktopCount; ++i) + { + QString path = QString("/panel/%1/desktop_%2").arg(settings()->group()).arg(i + 1); + QString shortcut = QString("Control+F%1").arg(i + 1); + + DesktopSwitchButton * m = new DesktopSwitchButton(&mWidget, i, path, shortcut, + KWindowSystem::desktopName(i + 1).isEmpty() ? + tr("Desktop %1").arg(i + 1) : + KWindowSystem::desktopName(i + 1)); + m_pSignalMapper->setMapping(m, i); + connect(m, SIGNAL(activated()), m_pSignalMapper, SLOT(map())) ; + mWidget.layout()->addWidget(m); + m_buttons->addButton(m, i); + } + + int activeDesk = KWindowSystem::currentDesktop(); + QAbstractButton * button = m_buttons->button(activeDesk - 1); + if (button) + button->setChecked(true); + + connect(m_buttons, SIGNAL(buttonClicked(int)), + this, SLOT(setDesktop(int))); + + realign(); +} + +DesktopSwitch::~DesktopSwitch() +{ +} + +void DesktopSwitch::setDesktop(int desktop) +{ + KWindowSystem::setCurrentDesktop(desktop + 1); +} + +void DesktopSwitch::onNumberOfDesktopsChanged(int count) +{ + if (m_desktopCount != count) + { + qDebug() << "Desktop count changed from" << m_desktopCount << "to" << count; + m_desktopCount = count; + onDesktopNamesChanged(); + setup(); + } +} + +void DesktopSwitch::onCurrentDesktopChanged(int current) +{ + QAbstractButton *button = m_buttons->button(current - 1); + if (button) + button->setChecked(true); +} + +void DesktopSwitch::onDesktopNamesChanged() +{ + QStringList names; + const int count = KWindowSystem::numberOfDesktops(); + for (int i = 0; i < count; ++i) + names << KWindowSystem::desktopName(i + 1); + m_desktopNames = names; + setup(); +} + +void DesktopSwitch::realign() +{ + mLayout->setEnabled(false); + + if (panel()->isHorizontal()) + { + mLayout->setRowCount(qMin(panel()->lineCount(), mLayout->count())); + mLayout->setColumnCount(0); + } + else + { + mLayout->setColumnCount(qMin(panel()->lineCount(), mLayout->count())); + mLayout->setRowCount(0); + } + mLayout->setEnabled(true); +} + +DesktopSwitchWidget::DesktopSwitchWidget(): + QFrame() +{ +} + +void DesktopSwitchWidget::wheelEvent(QWheelEvent *e) +{ + int max = KWindowSystem::currentDesktop() - 1; + int delta = e->delta() < 0 ? 1 : -1; + int current = KWindowSystem::currentDesktop() + delta; + + if (current > max) + current = 0; + else if (current < 0) + current = max; + + KWindowSystem::setCurrentDesktop(current); +} diff --git a/plugin-desktopswitch/desktopswitch.h b/plugin-desktopswitch/desktopswitch.h new file mode 100644 index 0000000..ed3ed41 --- /dev/null +++ b/plugin-desktopswitch/desktopswitch.h @@ -0,0 +1,92 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DESKTOPSWITCH_H +#define DESKTOPSWITCH_H + +#include "../panel/ilxqtpanelplugin.h" +#include + +class QSignalMapper; +class QButtonGroup; +namespace LxQt { +class GridLayout; +} + +class DesktopSwitchWidget: public QFrame +{ + Q_OBJECT +public: + DesktopSwitchWidget(); + +protected: + void wheelEvent(QWheelEvent* e); +}; + +/** + * @brief Desktop switcher. A very simple one... + */ +class DesktopSwitch : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + DesktopSwitch(const ILxQtPanelPluginStartupInfo &startupInfo); + ~DesktopSwitch(); + + QString themeId() const { return "DesktopSwitch"; } + QWidget *widget() { return &mWidget; } + bool isSeparate() const { return true; } + void realign(); + +private: + QButtonGroup * m_buttons; + QSignalMapper* m_pSignalMapper; + int m_desktopCount; + QStringList m_desktopNames; + DesktopSwitchWidget mWidget; + LxQt::GridLayout *mLayout; + + void setup(); + +private slots: + void setDesktop(int desktop); + void onNumberOfDesktopsChanged(int); + void onCurrentDesktopChanged(int); + void onDesktopNamesChanged(); +}; + +class DesktopSwitchPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) { return new DesktopSwitch(startupInfo);} +}; + +#endif diff --git a/plugin-desktopswitch/desktopswitchbutton.cpp b/plugin-desktopswitch/desktopswitchbutton.cpp new file mode 100644 index 0000000..1cf26f7 --- /dev/null +++ b/plugin-desktopswitch/desktopswitchbutton.cpp @@ -0,0 +1,69 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include +#include +#include + +#include "desktopswitchbutton.h" + +DesktopSwitchButton::DesktopSwitchButton(QWidget * parent, int index, const QString &path, const QString &shortcut, const QString &title) + : QToolButton(parent) + , m_shortcut(0) + , mIndex(index) +{ + setText(QString::number(index + 1)); + setCheckable(true); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + if (!shortcut.isEmpty()) + { + QString description = tr("Switch to desktop %1").arg(index + 1); + if (!title.isEmpty()) + { + description.append(QString(" (%1)").arg(title)); + } + m_shortcut = GlobalKeyShortcut::Client::instance()->addAction(QString(), path, description, this); + if (m_shortcut) + { + if (m_shortcut->shortcut().isEmpty()) + m_shortcut->changeShortcut(shortcut); + connect(m_shortcut, SIGNAL(activated()), this, SIGNAL(activated())); + } + } + + if (!title.isEmpty()) + { + setToolTip(title); + } +} + +void DesktopSwitchButton::unregisterShortcut() +{ + GlobalKeyShortcut::Client::instance()->removeAction(QString("/desktop_switch/desktop_%1").arg(mIndex + 1)); +} diff --git a/plugin-desktopswitch/desktopswitchbutton.h b/plugin-desktopswitch/desktopswitchbutton.h new file mode 100644 index 0000000..911dbf6 --- /dev/null +++ b/plugin-desktopswitch/desktopswitchbutton.h @@ -0,0 +1,58 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DESKTOPSWITCHBUTTON_H +#define DESKTOPSWITCHBUTTON_H + +#include + + +namespace GlobalKeyShortcut +{ +class Action; +} + +class DesktopSwitchButton : public QToolButton +{ + Q_OBJECT + +public: + DesktopSwitchButton(QWidget * parent, int index, const QString &path, const QString &shortcut, const QString &title=QString()); + +public slots: + void unregisterShortcut(); + +signals: + void activated(); + +private: + GlobalKeyShortcut::Action * m_shortcut; + int mIndex; +}; + +#endif diff --git a/plugin-desktopswitch/resources/desktopswitch.desktop.in b/plugin-desktopswitch/resources/desktopswitch.desktop.in new file mode 100644 index 0000000..36e8714 --- /dev/null +++ b/plugin-desktopswitch/resources/desktopswitch.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. +Icon=user-desktop + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-desktopswitch/translations/desktopswitch.ts b/plugin-desktopswitch/translations/desktopswitch.ts new file mode 100644 index 0000000..7084f0a --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ar.desktop b/plugin-desktopswitch/translations/desktopswitch_ar.desktop new file mode 100644 index 0000000..3336011 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=السماح بتغيير أسطح المكتب اﻻفتراضيَّة +Name[ar]=مفتاح تبديل سطح المكتب diff --git a/plugin-desktopswitch/translations/desktopswitch_ar.ts b/plugin-desktopswitch/translations/desktopswitch_ar.ts new file mode 100644 index 0000000..49bcbf1 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ar.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + سطح المكتب %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_cs.desktop b/plugin-desktopswitch/translations/desktopswitch_cs.desktop new file mode 100644 index 0000000..6ca2359 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Povolit přepínání virtuálních ploch +Name[cs]=Přepínání ploch diff --git a/plugin-desktopswitch/translations/desktopswitch_cs.ts b/plugin-desktopswitch/translations/desktopswitch_cs.ts new file mode 100644 index 0000000..c8624ed --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_cs.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Plocha %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_cs_CZ.desktop b/plugin-desktopswitch/translations/desktopswitch_cs_CZ.desktop new file mode 100644 index 0000000..a9000a5 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Povolit přepínání virtuálních pracovních ploch +Name[cs_CZ]=Přepínání pracovních ploch diff --git a/plugin-desktopswitch/translations/desktopswitch_cs_CZ.ts b/plugin-desktopswitch/translations/desktopswitch_cs_CZ.ts new file mode 100644 index 0000000..f8bb777 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_cs_CZ.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Plocha %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_da.desktop b/plugin-desktopswitch/translations/desktopswitch_da.desktop new file mode 100644 index 0000000..c06691c --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Tillader skift imellem virtuelle skriveborde +Name[da]=Skrivebordsskifter diff --git a/plugin-desktopswitch/translations/desktopswitch_da.ts b/plugin-desktopswitch/translations/desktopswitch_da.ts new file mode 100644 index 0000000..d543e50 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_da.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Skrivebord %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_da_DK.desktop b/plugin-desktopswitch/translations/desktopswitch_da_DK.desktop new file mode 100644 index 0000000..af439a1 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Skift imellem virtuelle skriveborde +Name[da_DK]=Skrivebords Skifter diff --git a/plugin-desktopswitch/translations/desktopswitch_da_DK.ts b/plugin-desktopswitch/translations/desktopswitch_da_DK.ts new file mode 100644 index 0000000..97c3f81 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_da_DK.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Skrivebord %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_de.desktop b/plugin-desktopswitch/translations/desktopswitch_de.desktop new file mode 100644 index 0000000..ffbaac2 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Erlaubt es zwichen den virtuellen Arbeitsflächen zu schalten +Name[de]=Arbeitsflächenumschalter diff --git a/plugin-desktopswitch/translations/desktopswitch_de.ts b/plugin-desktopswitch/translations/desktopswitch_de.ts new file mode 100644 index 0000000..fc29bc2 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_de.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Arbeitsfläche %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_de_DE.desktop b/plugin-desktopswitch/translations/desktopswitch_de_DE.desktop new file mode 100644 index 0000000..6ba8d0b --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Wechsel zwischen virtuellen Arbeitsflächen erlauben +Name[de_DE]=Arbeitsflächen-Umschalter diff --git a/plugin-desktopswitch/translations/desktopswitch_de_DE.ts b/plugin-desktopswitch/translations/desktopswitch_de_DE.ts new file mode 100644 index 0000000..763fc82 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_de_DE.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Arbeitsfläche %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_el_GR.desktop b/plugin-desktopswitch/translations/desktopswitch_el_GR.desktop new file mode 100644 index 0000000..f13027f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Να επιτρέπεται η εναλλαγή εικονικών επιφανειών εργασίας +Name[el_GR]=Εναλλαγή επιφάνειας εργασίας diff --git a/plugin-desktopswitch/translations/desktopswitch_el_GR.ts b/plugin-desktopswitch/translations/desktopswitch_el_GR.ts new file mode 100644 index 0000000..d1338eb --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_el_GR.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Επιφάνεια εργασίας %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_eo.desktop b/plugin-desktopswitch/translations/desktopswitch_eo.desktop new file mode 100644 index 0000000..dfe90f3 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Permesi ŝaltadon de virtualaj labortabloj +Name[eo]=Ŝalto de labortabloj diff --git a/plugin-desktopswitch/translations/desktopswitch_eo.ts b/plugin-desktopswitch/translations/desktopswitch_eo.ts new file mode 100644 index 0000000..f121479 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_eo.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Labortablo %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_es.desktop b/plugin-desktopswitch/translations/desktopswitch_es.desktop new file mode 100644 index 0000000..8866056 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Permite cambiar entre escritorios virtuales +Name[es]=Cambiador de escritorios diff --git a/plugin-desktopswitch/translations/desktopswitch_es.ts b/plugin-desktopswitch/translations/desktopswitch_es.ts new file mode 100644 index 0000000..9d91f5b --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_es.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Escritorio %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_es_UY.ts b/plugin-desktopswitch/translations/desktopswitch_es_UY.ts new file mode 100644 index 0000000..af1163f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_es_UY.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Escritorio %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_es_VE.desktop b/plugin-desktopswitch/translations/desktopswitch_es_VE.desktop new file mode 100644 index 0000000..067654d --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Permitir cambiar a escritorios virtuales +Name[es_VE]=Cambiador de Escritorios diff --git a/plugin-desktopswitch/translations/desktopswitch_es_VE.ts b/plugin-desktopswitch/translations/desktopswitch_es_VE.ts new file mode 100644 index 0000000..dac3da2 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_es_VE.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Escritorio %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_eu.desktop b/plugin-desktopswitch/translations/desktopswitch_eu.desktop new file mode 100644 index 0000000..594692e --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Mahaigain birtualen artean modu errazean aldatzeko aukera eskaintzen du. +Name[eu]=Mahaigain-aldatzailea diff --git a/plugin-desktopswitch/translations/desktopswitch_eu.ts b/plugin-desktopswitch/translations/desktopswitch_eu.ts new file mode 100644 index 0000000..3fa883d --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_eu.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + %1 mahaigaina + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_fi.desktop b/plugin-desktopswitch/translations/desktopswitch_fi.desktop new file mode 100644 index 0000000..0bb615b --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Vaihda virtuaalisten työpöytien välillä +Name[fi]=Työpöydän vaihtaja diff --git a/plugin-desktopswitch/translations/desktopswitch_fi.ts b/plugin-desktopswitch/translations/desktopswitch_fi.ts new file mode 100644 index 0000000..d495a34 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_fi.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Työpöytä %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_fr_FR.desktop b/plugin-desktopswitch/translations/desktopswitch_fr_FR.desktop new file mode 100644 index 0000000..2458f8c --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Autoriser à basculer entre les bureaux virtuels +Name[fr_FR]=Changeur de bureau diff --git a/plugin-desktopswitch/translations/desktopswitch_fr_FR.ts b/plugin-desktopswitch/translations/desktopswitch_fr_FR.ts new file mode 100644 index 0000000..06369bd --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_fr_FR.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Bureau %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_hu.desktop b/plugin-desktopswitch/translations/desktopswitch_hu.desktop new file mode 100644 index 0000000..2ed4c79 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Lehetővé teszi a virtuális asztalok közötti váltást +Name[hu]=Aszatlváltó diff --git a/plugin-desktopswitch/translations/desktopswitch_hu.ts b/plugin-desktopswitch/translations/desktopswitch_hu.ts new file mode 100644 index 0000000..b348ad3 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_hu.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_hu_HU.ts b/plugin-desktopswitch/translations/desktopswitch_hu_HU.ts new file mode 100644 index 0000000..26f5593 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_hu_HU.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + %1. asztal + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ia.desktop b/plugin-desktopswitch/translations/desktopswitch_ia.desktop new file mode 100644 index 0000000..5f9296f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktopswitch +Comment=Allow to switch virtual desktops + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-desktopswitch/translations/desktopswitch_ia.ts b/plugin-desktopswitch/translations/desktopswitch_ia.ts new file mode 100644 index 0000000..ff357dd --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ia.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_id_ID.desktop b/plugin-desktopswitch/translations/desktopswitch_id_ID.desktop new file mode 100644 index 0000000..5f9296f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktopswitch +Comment=Allow to switch virtual desktops + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-desktopswitch/translations/desktopswitch_id_ID.ts b/plugin-desktopswitch/translations/desktopswitch_id_ID.ts new file mode 100644 index 0000000..7266de9 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_id_ID.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_it_IT.desktop b/plugin-desktopswitch/translations/desktopswitch_it_IT.desktop new file mode 100644 index 0000000..f74f898 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Permette di passare ad altri desktop virtuali +Name[it_IT]=Cambia desktop diff --git a/plugin-desktopswitch/translations/desktopswitch_it_IT.ts b/plugin-desktopswitch/translations/desktopswitch_it_IT.ts new file mode 100644 index 0000000..a558746 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_it_IT.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Desktop %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ja.desktop b/plugin-desktopswitch/translations/desktopswitch_ja.desktop new file mode 100644 index 0000000..b187b22 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=仮想デスクトップの切り替えを可能にします +Name[ja]=デスクトップ切り替え diff --git a/plugin-desktopswitch/translations/desktopswitch_ja.ts b/plugin-desktopswitch/translations/desktopswitch_ja.ts new file mode 100644 index 0000000..eb256dd --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ja.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + デスクトップ %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + デスクトップ%1に切り替える + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ko.desktop b/plugin-desktopswitch/translations/desktopswitch_ko.desktop new file mode 100644 index 0000000..5f9296f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktopswitch +Comment=Allow to switch virtual desktops + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-desktopswitch/translations/desktopswitch_ko.ts b/plugin-desktopswitch/translations/desktopswitch_ko.ts new file mode 100644 index 0000000..8acf723 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ko.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_lt.desktop b/plugin-desktopswitch/translations/desktopswitch_lt.desktop new file mode 100644 index 0000000..5e83044 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Leidžia judėti tarp virtualių darbalaukių +Name[lt]=Darbalaukių perjungimas diff --git a/plugin-desktopswitch/translations/desktopswitch_lt.ts b/plugin-desktopswitch/translations/desktopswitch_lt.ts new file mode 100644 index 0000000..784eb70 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_lt.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + %1 darbalaukis + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_nl.desktop b/plugin-desktopswitch/translations/desktopswitch_nl.desktop new file mode 100644 index 0000000..21e27ca --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Wisselen tussen virtuele-bureaubladen toestaan +Name[nl]=Wissel bureaublad diff --git a/plugin-desktopswitch/translations/desktopswitch_nl.ts b/plugin-desktopswitch/translations/desktopswitch_nl.ts new file mode 100644 index 0000000..d05a346 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_nl.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Bureaublad %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_pl.desktop b/plugin-desktopswitch/translations/desktopswitch_pl.desktop new file mode 100644 index 0000000..254ffc4 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Pozwala przełączać się pomiędzy writualnymi pulpitami +Name[pl]=Obszary robocze diff --git a/plugin-desktopswitch/translations/desktopswitch_pl_PL.desktop b/plugin-desktopswitch/translations/desktopswitch_pl_PL.desktop new file mode 100644 index 0000000..2745b17 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Zezwól na przełączanie między pulpitami +Name[pl_PL]=Zmień pulpit diff --git a/plugin-desktopswitch/translations/desktopswitch_pl_PL.ts b/plugin-desktopswitch/translations/desktopswitch_pl_PL.ts new file mode 100644 index 0000000..6092fd4 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pl_PL.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Pulpit %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_pt.desktop b/plugin-desktopswitch/translations/desktopswitch_pt.desktop new file mode 100644 index 0000000..f570b8e --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Alternador de áreas de trabalho +Comment[pt]=Permite trocar entre as áreas de trabalho diff --git a/plugin-desktopswitch/translations/desktopswitch_pt.ts b/plugin-desktopswitch/translations/desktopswitch_pt.ts new file mode 100644 index 0000000..5884cf8 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pt.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Área de trabalho %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_pt_BR.desktop b/plugin-desktopswitch/translations/desktopswitch_pt_BR.desktop new file mode 100644 index 0000000..f46fa51 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Permite alternar áreas de trabalho virtuais +Name[pt_BR]=Alternador de área de trabalho diff --git a/plugin-desktopswitch/translations/desktopswitch_pt_BR.ts b/plugin-desktopswitch/translations/desktopswitch_pt_BR.ts new file mode 100644 index 0000000..83b74ea --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_pt_BR.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Área de trabalho %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ro_RO.desktop b/plugin-desktopswitch/translations/desktopswitch_ro_RO.desktop new file mode 100644 index 0000000..75f90d8 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Permite comutarea între ecranele virtuale +Name[ro_RO]=Comutare ecrane virtuale diff --git a/plugin-desktopswitch/translations/desktopswitch_ro_RO.ts b/plugin-desktopswitch/translations/desktopswitch_ro_RO.ts new file mode 100644 index 0000000..57cde84 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ro_RO.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Ecranul %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ru.desktop b/plugin-desktopswitch/translations/desktopswitch_ru.desktop new file mode 100644 index 0000000..73b960e --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Позволяет легко переключаться между виртуальными рабочими столами. +Name[ru]=Переключение рабочих столов diff --git a/plugin-desktopswitch/translations/desktopswitch_ru.ts b/plugin-desktopswitch/translations/desktopswitch_ru.ts new file mode 100644 index 0000000..e703819 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ru.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Рабочий стол %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + Переключиться на рабочий стол %1 + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_ru_RU.desktop b/plugin-desktopswitch/translations/desktopswitch_ru_RU.desktop new file mode 100644 index 0000000..8096b0b --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Позволяет легко переключаться между виртуальными рабочими столами. +Name[ru_RU]=Переключение рабочих столов diff --git a/plugin-desktopswitch/translations/desktopswitch_ru_RU.ts b/plugin-desktopswitch/translations/desktopswitch_ru_RU.ts new file mode 100644 index 0000000..4affda1 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_ru_RU.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Рабочий стол %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + Переключиться на рабочий стол %1 + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_sk.desktop b/plugin-desktopswitch/translations/desktopswitch_sk.desktop new file mode 100644 index 0000000..01cd625 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Umožňuje prepínanie medzi virtuálnymi plochami +Name[sk]=Prepínač plôch diff --git a/plugin-desktopswitch/translations/desktopswitch_sk_SK.ts b/plugin-desktopswitch/translations/desktopswitch_sk_SK.ts new file mode 100644 index 0000000..91e8d09 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sk_SK.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Plocha %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_sl.desktop b/plugin-desktopswitch/translations/desktopswitch_sl.desktop new file mode 100644 index 0000000..44456a8 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Omogoča preklop med navideznimi namizji +Name[sl]=Desktopswitch diff --git a/plugin-desktopswitch/translations/desktopswitch_sl.ts b/plugin-desktopswitch/translations/desktopswitch_sl.ts new file mode 100644 index 0000000..41032f4 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sl.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Namizje %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_sr.desktop b/plugin-desktopswitch/translations/desktopswitch_sr.desktop new file mode 100644 index 0000000..e6223e3 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Пребацујте виртуелне површи +Name[sr]=Пребацивач површи diff --git a/plugin-desktopswitch/translations/desktopswitch_sr@ijekavian.desktop b/plugin-desktopswitch/translations/desktopswitch_sr@ijekavian.desktop new file mode 100644 index 0000000..8ba6d4c --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Пребацивач површи +Comment[sr@ijekavian]=Пребацујте виртуелне површи diff --git a/plugin-desktopswitch/translations/desktopswitch_sr@ijekavianlatin.desktop b/plugin-desktopswitch/translations/desktopswitch_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..9e20fb5 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Prebacivač površi +Comment[sr@ijekavianlatin]=Prebacujte virtuelne površi diff --git a/plugin-desktopswitch/translations/desktopswitch_sr@latin.desktop b/plugin-desktopswitch/translations/desktopswitch_sr@latin.desktop new file mode 100644 index 0000000..3730920 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Prebacujte virtuelne površi +Name[sr@latin]=Prebacivač površi diff --git a/plugin-desktopswitch/translations/desktopswitch_sr@latin.ts b/plugin-desktopswitch/translations/desktopswitch_sr@latin.ts new file mode 100644 index 0000000..8bc31cc --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr@latin.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_sr_BA.ts b/plugin-desktopswitch/translations/desktopswitch_sr_BA.ts new file mode 100644 index 0000000..3b8063b --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr_BA.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Површ %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_sr_RS.ts b/plugin-desktopswitch/translations/desktopswitch_sr_RS.ts new file mode 100644 index 0000000..18874be --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_sr_RS.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Површ %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_th_TH.desktop b/plugin-desktopswitch/translations/desktopswitch_th_TH.desktop new file mode 100644 index 0000000..4ad3f83 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=อนุญาตให้ทำการสลับพื้นโต๊ะ +Name[th_TH]=สลับพื้นโต๊ะ diff --git a/plugin-desktopswitch/translations/desktopswitch_th_TH.ts b/plugin-desktopswitch/translations/desktopswitch_th_TH.ts new file mode 100644 index 0000000..275e04f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_th_TH.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + พื้นโต๊ะ %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_tr.desktop b/plugin-desktopswitch/translations/desktopswitch_tr.desktop new file mode 100644 index 0000000..9ea5b88 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Sanal masaüstleri arasında geçiş yapın +Name[tr]=Masaüstü değiştirici diff --git a/plugin-desktopswitch/translations/desktopswitch_tr.ts b/plugin-desktopswitch/translations/desktopswitch_tr.ts new file mode 100644 index 0000000..b01f535 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_tr.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Masaüstü %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_uk.desktop b/plugin-desktopswitch/translations/desktopswitch_uk.desktop new file mode 100644 index 0000000..196c656 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Дозволяє легко перемикатися між віртуальними стільницями +Name[uk]=Перемикач стільниць diff --git a/plugin-desktopswitch/translations/desktopswitch_uk.ts b/plugin-desktopswitch/translations/desktopswitch_uk.ts new file mode 100644 index 0000000..5f08b13 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_uk.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + Стільниця %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_zh_CN.GB2312.desktop b/plugin-desktopswitch/translations/desktopswitch_zh_CN.GB2312.desktop new file mode 100644 index 0000000..5f9296f --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktopswitch +Comment=Allow to switch virtual desktops + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-desktopswitch/translations/desktopswitch_zh_CN.desktop b/plugin-desktopswitch/translations/desktopswitch_zh_CN.desktop new file mode 100644 index 0000000..6b6087d --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=在虚拟桌面间切换 +Name[zh_CN]=桌面切换 diff --git a/plugin-desktopswitch/translations/desktopswitch_zh_CN.ts b/plugin-desktopswitch/translations/desktopswitch_zh_CN.ts new file mode 100644 index 0000000..9e012da --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_zh_CN.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + 桌面 %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-desktopswitch/translations/desktopswitch_zh_TW.desktop b/plugin-desktopswitch/translations/desktopswitch_zh_TW.desktop new file mode 100644 index 0000000..969102a --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Desktop switcher +Comment=Allows easy switching between virtual desktops. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=允許切換虛擬桌面 +Name[zh_TW]=桌面切換 diff --git a/plugin-desktopswitch/translations/desktopswitch_zh_TW.ts b/plugin-desktopswitch/translations/desktopswitch_zh_TW.ts new file mode 100644 index 0000000..ef6b347 --- /dev/null +++ b/plugin-desktopswitch/translations/desktopswitch_zh_TW.ts @@ -0,0 +1,20 @@ + + + + + DesktopSwitch + + + Desktop %1 + 桌面 %1 + + + + DesktopSwitchButton + + + Switch to desktop %1 + + + + diff --git a/plugin-dom/CMakeLists.txt b/plugin-dom/CMakeLists.txt new file mode 100644 index 0000000..19ea77b --- /dev/null +++ b/plugin-dom/CMakeLists.txt @@ -0,0 +1,29 @@ +set(PLUGIN "dom") + +set(HEADERS + domplugin.h + treewindow.h + domtreeitem.h +) + +set(SOURCES + domplugin.cpp + treewindow.cpp + domtreeitem.cpp +) + +set(MOCS + domplugin.h + treewindow.h + domtreeitem.h +) + +set(UIS + treewindow.ui +) + +set(RESOURCES + resources.qrc +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-dom/domplugin.cpp b/plugin-dom/domplugin.cpp new file mode 100644 index 0000000..712dd97 --- /dev/null +++ b/plugin-dom/domplugin.cpp @@ -0,0 +1,58 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "domplugin.h" +#include "treewindow.h" + +#include +#include + +DomPlugin::DomPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo) +{ + mButton.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + mButton.setIcon(XdgIcon::fromTheme("preferences-plugin")); + connect(&mButton, SIGNAL(clicked()), this, SLOT(showDialog())); +} + +void DomPlugin::showDialog() +{ + TreeWindow *dialog = mButton.findChild(); + + if (dialog == 0) + { + dialog = new TreeWindow(&mButton); + dialog->setAttribute(Qt::WA_DeleteOnClose); + } + + dialog->show(); + dialog->activateWindow(); +} + + diff --git a/plugin-dom/domplugin.h b/plugin-dom/domplugin.h new file mode 100644 index 0000000..7a9db00 --- /dev/null +++ b/plugin-dom/domplugin.h @@ -0,0 +1,65 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DOMPLUGIN_H +#define DOMPLUGIN_H + +#include "../panel/ilxqtpanelplugin.h" +#include + +class DomPlugin: public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + DomPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + + virtual QWidget *widget() { return &mButton; } + virtual QString themeId() const { return "Dom"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment; } + +private slots: + void showDialog(); + +private: + QToolButton mButton; + +}; + +class DomPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new DomPlugin(startupInfo); + } +}; + +#endif // DOMPLUGIN_H diff --git a/plugin-dom/domtreeitem.cpp b/plugin-dom/domtreeitem.cpp new file mode 100644 index 0000000..1b4d372 --- /dev/null +++ b/plugin-dom/domtreeitem.cpp @@ -0,0 +1,193 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "domtreeitem.h" + +#include +#include +#include +#include + +/************************************************ + + ************************************************/ +DomTreeItem::DomTreeItem(QTreeWidget *view, QWidget *widget): + QTreeWidgetItem(view), + mWidget(widget) +{ + init(); + mWidget->installEventFilter(this); + connect(mWidget, SIGNAL(destroyed()), this, SLOT(widgetDestroyed())); +} + + +/************************************************ + + ************************************************/ +DomTreeItem::DomTreeItem(QTreeWidgetItem *parent, QWidget *widget): + QTreeWidgetItem(parent), + mWidget(widget) +{ + init(); + mWidget->installEventFilter(this); + connect(mWidget, SIGNAL(destroyed()), this, SLOT(widgetDestroyed())); +} + + +/************************************************ + + ************************************************/ +void DomTreeItem::init() +{ + QStringList hierarcy = widgetClassHierarcy(); + + for (int i=0; iobjectName(); + setText(0, QString("%1 (%2)%3").arg( + name , + widgetClassName(), + text)); + setText(1, hierarcy.join(" :: ")); + + fill(); +} + + +/************************************************ + + ************************************************/ +void DomTreeItem::fill() +{ + QList widgets = mWidget->findChildren(); + + foreach (QWidget *w, widgets) + { + if (w->parentWidget() != mWidget) + continue; + + new DomTreeItem(this, w); + } +} + + +/************************************************ + + ************************************************/ +bool DomTreeItem::eventFilter(QObject *watched, QEvent *event) +{ + if (watched == mWidget && + event->type() == QEvent::ChildPolished) + { + QChildEvent *ce = static_cast(event); + QWidget *w = qobject_cast(ce->child()); + if (w) + { + for (int i=0; i(child(i)); + if (ci->widget() == w) + ci->deleteLater(); + } + + new DomTreeItem(this, w); + } + } + + return QObject::eventFilter(watched, event); +} + + +/************************************************ + + ************************************************/ +QString DomTreeItem::widgetObjectName() const +{ + return mWidget->objectName(); +} + + +/************************************************ + + ************************************************/ +QString DomTreeItem::widgetText() const +{ + QToolButton *toolButton = qobject_cast(mWidget); + if (toolButton) + return toolButton->text(); + + return ""; +} + + +/************************************************ + + ************************************************/ +QString DomTreeItem::widgetClassName() const +{ + return mWidget->metaObject()->className(); +} + + +/************************************************ + + ************************************************/ +QStringList DomTreeItem::widgetClassHierarcy() const +{ + QStringList hierarcy; + const QMetaObject *m = mWidget->metaObject(); + while (m) + { + hierarcy << m->className(); + m = m->superClass(); + } + return hierarcy; +} + + +/************************************************ + + ************************************************/ +void DomTreeItem::widgetDestroyed() +{ + deleteLater(); +} + diff --git a/plugin-dom/domtreeitem.h b/plugin-dom/domtreeitem.h new file mode 100644 index 0000000..84cd389 --- /dev/null +++ b/plugin-dom/domtreeitem.h @@ -0,0 +1,58 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DOMTREEITEM_H +#define DOMTREEITEM_H + +#include +#include + +class DomTreeItem: public QObject, public QTreeWidgetItem +{ + Q_OBJECT +public: + explicit DomTreeItem(QTreeWidget *view, QWidget *widget); + explicit DomTreeItem(QTreeWidgetItem *parent, QWidget *widget); + bool eventFilter(QObject *watched, QEvent *event); + + QString widgetObjectName() const; + QString widgetText() const; + QString widgetClassName() const; + QStringList widgetClassHierarcy() const; + QWidget *widget() const { return mWidget; } + +private slots: + void widgetDestroyed(); + +private: + QWidget *mWidget; + void init(); + void fill(); +}; + +#endif // DOMTREEITEM_H diff --git a/plugin-dom/images/widgets/calendarwidget.png b/plugin-dom/images/widgets/calendarwidget.png new file mode 100644 index 0000000..26737b8 Binary files /dev/null and b/plugin-dom/images/widgets/calendarwidget.png differ diff --git a/plugin-dom/images/widgets/checkbox.png b/plugin-dom/images/widgets/checkbox.png new file mode 100644 index 0000000..ab6f53e Binary files /dev/null and b/plugin-dom/images/widgets/checkbox.png differ diff --git a/plugin-dom/images/widgets/columnview.png b/plugin-dom/images/widgets/columnview.png new file mode 100644 index 0000000..4132ee6 Binary files /dev/null and b/plugin-dom/images/widgets/columnview.png differ diff --git a/plugin-dom/images/widgets/combobox.png b/plugin-dom/images/widgets/combobox.png new file mode 100644 index 0000000..bf3ed79 Binary files /dev/null and b/plugin-dom/images/widgets/combobox.png differ diff --git a/plugin-dom/images/widgets/commandlinkbutton.png b/plugin-dom/images/widgets/commandlinkbutton.png new file mode 100644 index 0000000..6bbd84a Binary files /dev/null and b/plugin-dom/images/widgets/commandlinkbutton.png differ diff --git a/plugin-dom/images/widgets/dateedit.png b/plugin-dom/images/widgets/dateedit.png new file mode 100644 index 0000000..6827fa7 Binary files /dev/null and b/plugin-dom/images/widgets/dateedit.png differ diff --git a/plugin-dom/images/widgets/datetimeedit.png b/plugin-dom/images/widgets/datetimeedit.png new file mode 100644 index 0000000..7d8e6fe Binary files /dev/null and b/plugin-dom/images/widgets/datetimeedit.png differ diff --git a/plugin-dom/images/widgets/dial.png b/plugin-dom/images/widgets/dial.png new file mode 100644 index 0000000..050d1db Binary files /dev/null and b/plugin-dom/images/widgets/dial.png differ diff --git a/plugin-dom/images/widgets/dialogbuttonbox.png b/plugin-dom/images/widgets/dialogbuttonbox.png new file mode 100644 index 0000000..b1f89fb Binary files /dev/null and b/plugin-dom/images/widgets/dialogbuttonbox.png differ diff --git a/plugin-dom/images/widgets/dockwidget.png b/plugin-dom/images/widgets/dockwidget.png new file mode 100644 index 0000000..9eee04f Binary files /dev/null and b/plugin-dom/images/widgets/dockwidget.png differ diff --git a/plugin-dom/images/widgets/doublespinbox.png b/plugin-dom/images/widgets/doublespinbox.png new file mode 100644 index 0000000..5686ac8 Binary files /dev/null and b/plugin-dom/images/widgets/doublespinbox.png differ diff --git a/plugin-dom/images/widgets/fontcombobox.png b/plugin-dom/images/widgets/fontcombobox.png new file mode 100644 index 0000000..6848f15 Binary files /dev/null and b/plugin-dom/images/widgets/fontcombobox.png differ diff --git a/plugin-dom/images/widgets/frame.png b/plugin-dom/images/widgets/frame.png new file mode 100644 index 0000000..68f5da0 Binary files /dev/null and b/plugin-dom/images/widgets/frame.png differ diff --git a/plugin-dom/images/widgets/graphicsview.png b/plugin-dom/images/widgets/graphicsview.png new file mode 100644 index 0000000..93fe760 Binary files /dev/null and b/plugin-dom/images/widgets/graphicsview.png differ diff --git a/plugin-dom/images/widgets/groupbox.png b/plugin-dom/images/widgets/groupbox.png new file mode 100644 index 0000000..4025b4d Binary files /dev/null and b/plugin-dom/images/widgets/groupbox.png differ diff --git a/plugin-dom/images/widgets/groupboxcollapsible.png b/plugin-dom/images/widgets/groupboxcollapsible.png new file mode 100644 index 0000000..62fd1ad Binary files /dev/null and b/plugin-dom/images/widgets/groupboxcollapsible.png differ diff --git a/plugin-dom/images/widgets/hscrollbar.png b/plugin-dom/images/widgets/hscrollbar.png new file mode 100644 index 0000000..466c58d Binary files /dev/null and b/plugin-dom/images/widgets/hscrollbar.png differ diff --git a/plugin-dom/images/widgets/hslider.png b/plugin-dom/images/widgets/hslider.png new file mode 100644 index 0000000..525bd1c Binary files /dev/null and b/plugin-dom/images/widgets/hslider.png differ diff --git a/plugin-dom/images/widgets/hsplit.png b/plugin-dom/images/widgets/hsplit.png new file mode 100644 index 0000000..1ea8f2a Binary files /dev/null and b/plugin-dom/images/widgets/hsplit.png differ diff --git a/plugin-dom/images/widgets/label.png b/plugin-dom/images/widgets/label.png new file mode 100644 index 0000000..5d7d7b4 Binary files /dev/null and b/plugin-dom/images/widgets/label.png differ diff --git a/plugin-dom/images/widgets/lcdnumber.png b/plugin-dom/images/widgets/lcdnumber.png new file mode 100644 index 0000000..c3cac18 Binary files /dev/null and b/plugin-dom/images/widgets/lcdnumber.png differ diff --git a/plugin-dom/images/widgets/line.png b/plugin-dom/images/widgets/line.png new file mode 100644 index 0000000..5c64dfb Binary files /dev/null and b/plugin-dom/images/widgets/line.png differ diff --git a/plugin-dom/images/widgets/lineedit.png b/plugin-dom/images/widgets/lineedit.png new file mode 100644 index 0000000..75fc890 Binary files /dev/null and b/plugin-dom/images/widgets/lineedit.png differ diff --git a/plugin-dom/images/widgets/listbox.png b/plugin-dom/images/widgets/listbox.png new file mode 100644 index 0000000..367e67f Binary files /dev/null and b/plugin-dom/images/widgets/listbox.png differ diff --git a/plugin-dom/images/widgets/listview.png b/plugin-dom/images/widgets/listview.png new file mode 100644 index 0000000..d1308d5 Binary files /dev/null and b/plugin-dom/images/widgets/listview.png differ diff --git a/plugin-dom/images/widgets/mdiarea.png b/plugin-dom/images/widgets/mdiarea.png new file mode 100644 index 0000000..7783dd5 Binary files /dev/null and b/plugin-dom/images/widgets/mdiarea.png differ diff --git a/plugin-dom/images/widgets/plaintextedit.png b/plugin-dom/images/widgets/plaintextedit.png new file mode 100644 index 0000000..077bf16 Binary files /dev/null and b/plugin-dom/images/widgets/plaintextedit.png differ diff --git a/plugin-dom/images/widgets/plugin.png b/plugin-dom/images/widgets/plugin.png new file mode 100644 index 0000000..1d23b91 Binary files /dev/null and b/plugin-dom/images/widgets/plugin.png differ diff --git a/plugin-dom/images/widgets/progress.png b/plugin-dom/images/widgets/progress.png new file mode 100644 index 0000000..44ae094 Binary files /dev/null and b/plugin-dom/images/widgets/progress.png differ diff --git a/plugin-dom/images/widgets/pushbutton.png b/plugin-dom/images/widgets/pushbutton.png new file mode 100644 index 0000000..61f779c Binary files /dev/null and b/plugin-dom/images/widgets/pushbutton.png differ diff --git a/plugin-dom/images/widgets/radiobutton.png b/plugin-dom/images/widgets/radiobutton.png new file mode 100644 index 0000000..10c1d8c Binary files /dev/null and b/plugin-dom/images/widgets/radiobutton.png differ diff --git a/plugin-dom/images/widgets/scrollarea.png b/plugin-dom/images/widgets/scrollarea.png new file mode 100644 index 0000000..651ea24 Binary files /dev/null and b/plugin-dom/images/widgets/scrollarea.png differ diff --git a/plugin-dom/images/widgets/spacer.png b/plugin-dom/images/widgets/spacer.png new file mode 100644 index 0000000..8a0931b Binary files /dev/null and b/plugin-dom/images/widgets/spacer.png differ diff --git a/plugin-dom/images/widgets/spinbox.png b/plugin-dom/images/widgets/spinbox.png new file mode 100644 index 0000000..cdd9fe1 Binary files /dev/null and b/plugin-dom/images/widgets/spinbox.png differ diff --git a/plugin-dom/images/widgets/tabbar.png b/plugin-dom/images/widgets/tabbar.png new file mode 100644 index 0000000..d5d3783 Binary files /dev/null and b/plugin-dom/images/widgets/tabbar.png differ diff --git a/plugin-dom/images/widgets/table.png b/plugin-dom/images/widgets/table.png new file mode 100644 index 0000000..4bbd9c2 Binary files /dev/null and b/plugin-dom/images/widgets/table.png differ diff --git a/plugin-dom/images/widgets/tabwidget.png b/plugin-dom/images/widgets/tabwidget.png new file mode 100644 index 0000000..1254bb6 Binary files /dev/null and b/plugin-dom/images/widgets/tabwidget.png differ diff --git a/plugin-dom/images/widgets/textedit.png b/plugin-dom/images/widgets/textedit.png new file mode 100644 index 0000000..32e897d Binary files /dev/null and b/plugin-dom/images/widgets/textedit.png differ diff --git a/plugin-dom/images/widgets/timeedit.png b/plugin-dom/images/widgets/timeedit.png new file mode 100644 index 0000000..c66d91b Binary files /dev/null and b/plugin-dom/images/widgets/timeedit.png differ diff --git a/plugin-dom/images/widgets/toolbox.png b/plugin-dom/images/widgets/toolbox.png new file mode 100644 index 0000000..2ab71dc Binary files /dev/null and b/plugin-dom/images/widgets/toolbox.png differ diff --git a/plugin-dom/images/widgets/toolbutton.png b/plugin-dom/images/widgets/toolbutton.png new file mode 100644 index 0000000..0bff069 Binary files /dev/null and b/plugin-dom/images/widgets/toolbutton.png differ diff --git a/plugin-dom/images/widgets/vline.png b/plugin-dom/images/widgets/vline.png new file mode 100644 index 0000000..35a7300 Binary files /dev/null and b/plugin-dom/images/widgets/vline.png differ diff --git a/plugin-dom/images/widgets/vscrollbar.png b/plugin-dom/images/widgets/vscrollbar.png new file mode 100644 index 0000000..28b7c40 Binary files /dev/null and b/plugin-dom/images/widgets/vscrollbar.png differ diff --git a/plugin-dom/images/widgets/vslider.png b/plugin-dom/images/widgets/vslider.png new file mode 100644 index 0000000..59f06ba Binary files /dev/null and b/plugin-dom/images/widgets/vslider.png differ diff --git a/plugin-dom/images/widgets/vspacer.png b/plugin-dom/images/widgets/vspacer.png new file mode 100644 index 0000000..ce5e8bd Binary files /dev/null and b/plugin-dom/images/widgets/vspacer.png differ diff --git a/plugin-dom/images/widgets/widget.png b/plugin-dom/images/widgets/widget.png new file mode 100644 index 0000000..1cf960e Binary files /dev/null and b/plugin-dom/images/widgets/widget.png differ diff --git a/plugin-dom/images/widgets/widgetstack.png b/plugin-dom/images/widgets/widgetstack.png new file mode 100644 index 0000000..2c6964e Binary files /dev/null and b/plugin-dom/images/widgets/widgetstack.png differ diff --git a/plugin-dom/images/widgets/wizard.png b/plugin-dom/images/widgets/wizard.png new file mode 100644 index 0000000..7c0e107 Binary files /dev/null and b/plugin-dom/images/widgets/wizard.png differ diff --git a/plugin-dom/resources.qrc b/plugin-dom/resources.qrc new file mode 100644 index 0000000..7680eb3 --- /dev/null +++ b/plugin-dom/resources.qrc @@ -0,0 +1,53 @@ + + + images/widgets/plugin.png + images/widgets/calendarwidget.png + images/widgets/checkbox.png + images/widgets/columnview.png + images/widgets/combobox.png + images/widgets/commandlinkbutton.png + images/widgets/dateedit.png + images/widgets/datetimeedit.png + images/widgets/dialogbuttonbox.png + images/widgets/dial.png + images/widgets/dockwidget.png + images/widgets/doublespinbox.png + images/widgets/fontcombobox.png + images/widgets/frame.png + images/widgets/graphicsview.png + images/widgets/groupboxcollapsible.png + images/widgets/groupbox.png + images/widgets/hscrollbar.png + images/widgets/hslider.png + images/widgets/hsplit.png + images/widgets/label.png + images/widgets/lcdnumber.png + images/widgets/lineedit.png + images/widgets/line.png + images/widgets/listbox.png + images/widgets/listview.png + images/widgets/mdiarea.png + images/widgets/plaintextedit.png + images/widgets/plugin.png + images/widgets/progress.png + images/widgets/pushbutton.png + images/widgets/radiobutton.png + images/widgets/scrollarea.png + images/widgets/spacer.png + images/widgets/spinbox.png + images/widgets/tabbar.png + images/widgets/table.png + images/widgets/tabwidget.png + images/widgets/textedit.png + images/widgets/timeedit.png + images/widgets/toolbox.png + images/widgets/toolbutton.png + images/widgets/vline.png + images/widgets/vscrollbar.png + images/widgets/vslider.png + images/widgets/vspacer.png + images/widgets/widget.png + images/widgets/widgetstack.png + images/widgets/wizard.png + + diff --git a/plugin-dom/resources/dom.desktop.in b/plugin-dom/resources/dom.desktop.in new file mode 100644 index 0000000..2146b3b --- /dev/null +++ b/plugin-dom/resources/dom.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Panel DOM tree +Comment=Show a DOM tree of the LXQt panel. +Icon=view-web-browser-dom-tree + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-dom/translations/dom.ts b/plugin-dom/translations/dom.ts new file mode 100644 index 0000000..5121128 --- /dev/null +++ b/plugin-dom/translations/dom.ts @@ -0,0 +1,22 @@ + + + + + TreeWindow + + + Panel DOM tree + + + + + Property + + + + + Value + + + + diff --git a/plugin-dom/translations/dom_ja.desktop b/plugin-dom/translations/dom_ja.desktop new file mode 100644 index 0000000..a207142 --- /dev/null +++ b/plugin-dom/translations/dom_ja.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ja]=パネルのDOMツリー +Comment[ja]=LXQtパネルのDOMツリーを表示する diff --git a/plugin-dom/translations/dom_ja.ts b/plugin-dom/translations/dom_ja.ts new file mode 100644 index 0000000..68617be --- /dev/null +++ b/plugin-dom/translations/dom_ja.ts @@ -0,0 +1,22 @@ + + + + + TreeWindow + + + Panel DOM tree + パネルのDOMツリー + + + + Property + プロパティー + + + + Value + + + + diff --git a/plugin-dom/translations/dom_pt.desktop b/plugin-dom/translations/dom_pt.desktop new file mode 100644 index 0000000..87430f9 --- /dev/null +++ b/plugin-dom/translations/dom_pt.desktop @@ -0,0 +1,3 @@ +# Translations +Name[pt]=Árvore do painel DOM +Comment[pt]=Mostra a árvore DOM do painel do LxQt. diff --git a/plugin-dom/translations/dom_pt.ts b/plugin-dom/translations/dom_pt.ts new file mode 100644 index 0000000..957f3e0 --- /dev/null +++ b/plugin-dom/translations/dom_pt.ts @@ -0,0 +1,22 @@ + + + + + TreeWindow + + + Panel DOM tree + Árvore do painel DOM + + + + Property + Propriedade + + + + Value + Valor + + + diff --git a/plugin-dom/translations/dom_ru.desktop b/plugin-dom/translations/dom_ru.desktop new file mode 100644 index 0000000..7ef95e4 --- /dev/null +++ b/plugin-dom/translations/dom_ru.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru]=Дерево DOM панели. +Comment[ru]=Показать дерево DOM панели LXDE-Qt. diff --git a/plugin-dom/translations/dom_ru.ts b/plugin-dom/translations/dom_ru.ts new file mode 100644 index 0000000..d14b34f --- /dev/null +++ b/plugin-dom/translations/dom_ru.ts @@ -0,0 +1,22 @@ + + + + + TreeWindow + + + Panel DOM tree + Дерево DOM панели + + + + Property + Свойство + + + + Value + Значение + + + diff --git a/plugin-dom/translations/dom_ru_RU.desktop b/plugin-dom/translations/dom_ru_RU.desktop new file mode 100644 index 0000000..d07ba5a --- /dev/null +++ b/plugin-dom/translations/dom_ru_RU.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru_RU]=Дерево DOM панели. +Comment[ru_RU]=Показать дерево DOM панели LXDE-Qt. diff --git a/plugin-dom/translations/dom_ru_RU.ts b/plugin-dom/translations/dom_ru_RU.ts new file mode 100644 index 0000000..d6e1a63 --- /dev/null +++ b/plugin-dom/translations/dom_ru_RU.ts @@ -0,0 +1,22 @@ + + + + + TreeWindow + + + Panel DOM tree + Дерево DOM панели + + + + Property + Свойство + + + + Value + Значение + + + diff --git a/plugin-dom/treewindow.cpp b/plugin-dom/treewindow.cpp new file mode 100644 index 0000000..e930ec8 --- /dev/null +++ b/plugin-dom/treewindow.cpp @@ -0,0 +1,160 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "treewindow.h" +#include "ui_treewindow.h" +#include "domtreeitem.h" + +#include +#include + +#define PROP_OBJECT_NAME 0 +#define PROP_CLASS_NAME 1 +#define PROP_TEXT 2 +#define PROP_CLASS_HIERARCY 3 + + +/************************************************ + + ************************************************/ +TreeWindow::TreeWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::TreeWindow) +{ + mRootWidget = this; + while (mRootWidget->parentWidget()) + mRootWidget = mRootWidget->parentWidget(); + + ui->setupUi(this); + + ui->tree->setStyleSheet( + "QTreeView::item { " + "padding: 2px;" + "}" + ); + + initPropertiesView(); + + QList widgets = mRootWidget->findChildren(); + + ui->tree->setRootIsDecorated(false); + + DomTreeItem *item = new DomTreeItem(ui->tree, mRootWidget); + ui->tree->expandItem(item); + ui->tree->resizeColumnToContents(0); + + + connect(ui->tree, SIGNAL(itemSelectionChanged()), this, SLOT(updatePropertiesView())); + item->setSelected(true); + +} + + +/************************************************ + + ************************************************/ +TreeWindow::~TreeWindow() +{ + delete ui; +} + + +/************************************************ + + ************************************************/ +void TreeWindow::initPropertiesView() +{ + ui->propertiesView->viewport()->setAutoFillBackground(false); + + ui->propertiesView->setRowCount(4); + ui->propertiesView->setColumnCount(2); + + QTableWidgetItem *item; + item = new QTableWidgetItem("Object name"); + ui->propertiesView->setItem(PROP_OBJECT_NAME, 0, item); + ui->propertiesView->setItem(PROP_OBJECT_NAME, 1, new QTableWidgetItem()); + + item = new QTableWidgetItem("Class name"); + ui->propertiesView->setItem(PROP_CLASS_NAME, 0, item); + ui->propertiesView->setItem(PROP_CLASS_NAME, 1, new QTableWidgetItem()); + + item = new QTableWidgetItem("Text"); + ui->propertiesView->setItem(PROP_TEXT, 0, item); + ui->propertiesView->setItem(PROP_TEXT, 1, new QTableWidgetItem()); + + item = new QTableWidgetItem("Class hierarcy"); + ui->propertiesView->setItem(PROP_CLASS_HIERARCY, 0, item); + ui->propertiesView->setItem(PROP_CLASS_HIERARCY, 1, new QTableWidgetItem()); + + +} + + +/************************************************ + + ************************************************/ +void TreeWindow::updatePropertiesView() +{ + if (ui->tree->selectedItems().isEmpty()) + { + clearPropertiesView(); + return; + } + + QTreeWidgetItem *item = ui->tree->selectedItems().first(); + if (!item) + { + clearPropertiesView(); + return; + } + + DomTreeItem *treeItem = static_cast(item); + + ui->propertiesView->item(PROP_OBJECT_NAME, 1)->setText(treeItem->widgetObjectName()); + ui->propertiesView->item(PROP_CLASS_NAME, 1)->setText(treeItem->widgetClassName()); + ui->propertiesView->item(PROP_TEXT, 1)->setText(treeItem->widgetText()); + ui->propertiesView->item(PROP_CLASS_HIERARCY, 1)->setText(treeItem->widgetClassHierarcy().join(" :: ")); +} + + +/************************************************ + + ************************************************/ +void TreeWindow::clearPropertiesView() +{ + for (int i=0; ipropertiesView->rowCount(); ++i) + ui->propertiesView->item(i, 1)->setText(""); +} + + + + + + + + diff --git a/plugin-dom/treewindow.h b/plugin-dom/treewindow.h new file mode 100644 index 0000000..de0e7ab --- /dev/null +++ b/plugin-dom/treewindow.h @@ -0,0 +1,64 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef TREEWINDOW_H +#define TREEWINDOW_H + +#include +#include + +class QTreeWidgetItem; +class QTreeWidget; +class QEvent; + +namespace Ui { +class TreeWindow; +} + + + +class TreeWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit TreeWindow(QWidget *parent = 0); + ~TreeWindow(); + +private slots: + void updatePropertiesView(); + void clearPropertiesView(); + +private: + Ui::TreeWindow *ui; + QWidget *mRootWidget; + + void initPropertiesView(); +}; + +#endif // TREEWINDOW_H diff --git a/plugin-dom/treewindow.ui b/plugin-dom/treewindow.ui new file mode 100644 index 0000000..d27a7b3 --- /dev/null +++ b/plugin-dom/treewindow.ui @@ -0,0 +1,75 @@ + + + TreeWindow + + + + 0 + 0 + 601 + 424 + + + + Panel DOM tree + + + + + + + Qt::Horizontal + + + + + 1 + 0 + + + + + Name + + + + + + QFrame::NoFrame + + + Qt::DotLine + + + true + + + + Property + + + + + Value + + + + + + + + + + + 0 + 0 + 601 + 21 + + + + + + + + diff --git a/plugin-kbindicator/CMakeLists.txt b/plugin-kbindicator/CMakeLists.txt new file mode 100644 index 0000000..9b8f33a --- /dev/null +++ b/plugin-kbindicator/CMakeLists.txt @@ -0,0 +1,29 @@ +set(PLUGIN "kbindicator") + +find_package(KF5GuiAddons REQUIRED) + +set(HEADERS + lxqtkbindicator.h + lxqtkbindicatorconfiguration.h +) + +set(SOURCES + lxqtkbindicator.cpp + lxqtkbindicatorconfiguration.cpp +) + +set(MOCS + lxqtkbindicator.h + lxqtkbindicatorconfiguration.h +) + +set(UIS + lxqtkbindicatorconfiguration.ui +) + +set(LIBRARIES + ${LIBRARIES} + KF5::GuiAddons +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-kbindicator/lxqtkbindicator.cpp b/plugin-kbindicator/lxqtkbindicator.cpp new file mode 100644 index 0000000..e6c6411 --- /dev/null +++ b/plugin-kbindicator/lxqtkbindicator.cpp @@ -0,0 +1,146 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtkbindicator.h" +#include +#include +#include +#include + +LxQtKbIndicator::LxQtKbIndicator(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mContent(new QWidget()) +{ + modifierInfo = new KModifierKeyInfo(this); + connect(modifierInfo, SIGNAL(keyLocked(Qt::Key, bool)), this, SLOT(modifierStateChanged(Qt::Key, bool))); + + QHBoxLayout *layout = new QHBoxLayout(mContent); + mContent->setLayout(layout); + + mCapsLock = new QLabel("C"); + mCapsLock->setObjectName("CapsLockLabel"); + mCapsLock->setAlignment(Qt::AlignCenter); + mCapsLock->installEventFilter(this); + mContent->layout()->addWidget(mCapsLock); + + mNumLock = new QLabel("N"); + mNumLock->setObjectName("NumLockLabel"); + mNumLock->setAlignment(Qt::AlignCenter); + mNumLock->installEventFilter(this); + mContent->layout()->addWidget(mNumLock); + + mScrollLock = new QLabel("S"); + mScrollLock->setObjectName("ScrollLockLabel"); + mScrollLock->setAlignment(Qt::AlignCenter); + mScrollLock->installEventFilter(this); + mContent->layout()->addWidget(mScrollLock); + + QTimer::singleShot(0, this, SLOT(delayedInit())); +} + +LxQtKbIndicator::~LxQtKbIndicator() +{ + delete mContent; +} + +void LxQtKbIndicator::delayedInit() +{ + settingsChanged(); + realign(); +} + +QWidget *LxQtKbIndicator::widget() +{ + return mContent; +} + +void LxQtKbIndicator::settingsChanged() +{ + mShowCapsLock = settings()->value("show_caps_lock", true).toBool(); + mShowNumLock = settings()->value("show_num_lock", true).toBool(); + mShowScrollLock = settings()->value("show_scroll_lock", true).toBool(); + + mCapsLock->setVisible(mShowCapsLock); + mNumLock->setVisible(mShowNumLock); + mScrollLock->setVisible(mShowScrollLock); + + mCapsLock->setEnabled(modifierInfo->isKeyLocked(Qt::Key_CapsLock)); + mNumLock->setEnabled(modifierInfo->isKeyLocked(Qt::Key_NumLock)); + mScrollLock->setEnabled(modifierInfo->isKeyLocked(Qt::Key_ScrollLock)); +} + +QDialog *LxQtKbIndicator::configureDialog() +{ + return new LxQtKbIndicatorConfiguration(settings()); +} + +void LxQtKbIndicator::realign() +{ + if (panel()->isHorizontal()) + mContent->setMinimumSize(0, panel()->iconSize()); + else + mContent->setMinimumSize(panel()->iconSize(), 0); +} + +void LxQtKbIndicator::modifierStateChanged(Qt::Key key, bool active) +{ + switch (key) + { + case Qt::Key_CapsLock: + mCapsLock->setEnabled(active); + break; + + case Qt::Key_NumLock: + mNumLock->setEnabled(active); + break; + + case Qt::Key_ScrollLock: + mScrollLock->setEnabled(active); + break; + + default: + break; + } +} + +bool LxQtKbIndicator::eventFilter(QObject *object, QEvent *event) +{ + if (event->type() == QEvent::QEvent::MouseButtonRelease) + { + if (object == mCapsLock) + modifierInfo->setKeyLocked(Qt::Key_CapsLock, !modifierInfo->isKeyLocked(Qt::Key_CapsLock)); + else if (object == mNumLock) + modifierInfo->setKeyLocked(Qt::Key_NumLock, !modifierInfo->isKeyLocked(Qt::Key_NumLock)); + else if (object == mScrollLock) + modifierInfo->setKeyLocked(Qt::Key_ScrollLock, !modifierInfo->isKeyLocked(Qt::Key_ScrollLock)); + + return true; + } + + return QObject::eventFilter(object, event); +} diff --git a/plugin-kbindicator/lxqtkbindicator.h b/plugin-kbindicator/lxqtkbindicator.h new file mode 100644 index 0000000..592e9bf --- /dev/null +++ b/plugin-kbindicator/lxqtkbindicator.h @@ -0,0 +1,83 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTPANELKBINDICATOR_H +#define LXQTPANELKBINDICATOR_H + +#include "../panel/ilxqtpanelplugin.h" +#include "lxqtkbindicatorconfiguration.h" +#include + +class QLabel; + +class LxQtKbIndicator : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtKbIndicator(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtKbIndicator(); + + virtual QWidget *widget(); + virtual QString themeId() const { return "KbIndicator"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog; } + virtual bool isSeparate() const { return false; } + + QDialog *configureDialog(); + virtual void realign(); + virtual bool eventFilter(QObject *object, QEvent *event); + +protected slots: + void delayedInit(); + virtual void settingsChanged(); + void modifierStateChanged(Qt::Key key, bool active); + +private: + KModifierKeyInfo *modifierInfo; + QWidget *mContent; + + bool mShowCapsLock; + bool mShowNumLock; + bool mShowScrollLock; + + QLabel *mCapsLock; + QLabel *mNumLock; + QLabel *mScrollLock; +}; + +class LxQtKbIndicatorLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtKbIndicator(startupInfo); + } +}; + +#endif // LXQTPANELKBINDICATOR_H diff --git a/plugin-kbindicator/lxqtkbindicatorconfiguration.cpp b/plugin-kbindicator/lxqtkbindicatorconfiguration.cpp new file mode 100644 index 0000000..7939b6a --- /dev/null +++ b/plugin-kbindicator/lxqtkbindicatorconfiguration.cpp @@ -0,0 +1,80 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtkbindicatorconfiguration.h" +#include "ui_lxqtkbindicatorconfiguration.h" + + +LxQtKbIndicatorConfiguration::LxQtKbIndicatorConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtKbIndicatorConfiguration), + mSettings(settings), + oldSettings(settings) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("KbIndicatorConfigurationWindow"); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + + connect(ui->capsLockCB, SIGNAL(clicked()), this, SLOT(saveSettings())); + connect(ui->numLockCB, SIGNAL(clicked()), this, SLOT(saveSettings())); + connect(ui->scrollLockCB, SIGNAL(clicked()), this, SLOT(saveSettings())); + + loadSettings(); +} + +LxQtKbIndicatorConfiguration::~LxQtKbIndicatorConfiguration() +{ + delete ui; +} + +void LxQtKbIndicatorConfiguration::loadSettings() +{ + ui->capsLockCB->setChecked(mSettings->value("show_caps_lock", true).toBool()); + ui->numLockCB->setChecked(mSettings->value("show_num_lock", true).toBool()); + ui->scrollLockCB->setChecked(mSettings->value("show_scroll_lock", true).toBool()); +} + +void LxQtKbIndicatorConfiguration::saveSettings() +{ + mSettings->setValue("show_caps_lock", ui->capsLockCB->isChecked()); + mSettings->setValue("show_num_lock", ui->numLockCB->isChecked()); + mSettings->setValue("show_scroll_lock", ui->scrollLockCB->isChecked()); +} + +void LxQtKbIndicatorConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + oldSettings.loadToSettings(); + loadSettings(); + } + else + close(); +} diff --git a/plugin-kbindicator/lxqtkbindicatorconfiguration.h b/plugin-kbindicator/lxqtkbindicatorconfiguration.h new file mode 100644 index 0000000..bcefc5c --- /dev/null +++ b/plugin-kbindicator/lxqtkbindicatorconfiguration.h @@ -0,0 +1,70 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTKBINDICATORCONFIGURATION_H +#define LXQTKBINDICATORCONFIGURATION_H + +#include + +#include +#include + + +namespace Ui { + class LxQtKbIndicatorConfiguration; +} + +class LxQtKbIndicatorConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtKbIndicatorConfiguration(QSettings *settings, QWidget *parent = 0); + ~LxQtKbIndicatorConfiguration(); + +public slots: + void saveSettings(); + +private: + Ui::LxQtKbIndicatorConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache oldSettings; + + /* + Read settings from conf file and put data into controls. + */ + void loadSettings(); + +private slots: + /* + Saves settings in conf file. + */ + void dialogButtonsAction(QAbstractButton *btn); +}; + +#endif // LXQTKBINDICATORCONFIGURATION_H diff --git a/plugin-kbindicator/lxqtkbindicatorconfiguration.ui b/plugin-kbindicator/lxqtkbindicatorconfiguration.ui new file mode 100644 index 0000000..b68ba35 --- /dev/null +++ b/plugin-kbindicator/lxqtkbindicatorconfiguration.ui @@ -0,0 +1,108 @@ + + + LxQtKbIndicatorConfiguration + + + + 0 + 0 + 178 + 126 + + + + Keyboard Indicator Settings + + + + + + Caps Lock + + + + + + + Num Lock + + + + + + + Scroll Lock + + + + + + + Qt::Vertical + + + + 1 + 1 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + buttons + + + + + buttons + accepted() + LxQtKbIndicatorConfiguration + accept() + + + 86 + 244 + + + 97 + 253 + + + + + buttons + rejected() + LxQtKbIndicatorConfiguration + reject() + + + 67 + 244 + + + 62 + 253 + + + + + + maximumNetSpeedChanged(QString) + on_typeCOB_currentIndexChanged(int) + on_sourceCOB_currentIndexChanged(int) + on_maximumHS_valueChanged(int) + saveSettings() + + diff --git a/plugin-kbindicator/resources/kbindicator.desktop.in b/plugin-kbindicator/resources/kbindicator.desktop.in new file mode 100644 index 0000000..fc9623a --- /dev/null +++ b/plugin-kbindicator/resources/kbindicator.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Keyboard indicator +Comment=Keyboard indicator plugin. +Icon=input-keyboard + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-kbindicator/translations/kbindicator.ts b/plugin-kbindicator/translations/kbindicator.ts new file mode 100644 index 0000000..27054fb --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator.ts @@ -0,0 +1,27 @@ + + + + + LxQtKbIndicatorConfiguration + + + Keyboard Indicator Settings + + + + + Caps Lock + + + + + Num Lock + + + + + Scroll Lock + + + + diff --git a/plugin-kbindicator/translations/kbindicator_ja.desktop b/plugin-kbindicator/translations/kbindicator_ja.desktop new file mode 100644 index 0000000..4ad41d9 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ja.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ja]=キーボードインジケーター +Comment[ja]=キーボードインジケーターのプラグイン + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-kbindicator/translations/kbindicator_ja.ts b/plugin-kbindicator/translations/kbindicator_ja.ts new file mode 100644 index 0000000..dc8363b --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ja.ts @@ -0,0 +1,27 @@ + + + + + LxQtKbIndicatorConfiguration + + + Keyboard Indicator Settings + キーボードインジケーターの設定 + + + + Caps Lock + Caps Lock + + + + Num Lock + Num Lock + + + + Scroll Lock + Scroll Lock + + + diff --git a/plugin-kbindicator/translations/kbindicator_pt.desktop b/plugin-kbindicator/translations/kbindicator_pt.desktop new file mode 100644 index 0000000..d15b8a1 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_pt.desktop @@ -0,0 +1,3 @@ +#Translations +Name[pt]=Indicador de teclado +Comment[pt]=Plugin indicador do teclado diff --git a/plugin-kbindicator/translations/kbindicator_pt.ts b/plugin-kbindicator/translations/kbindicator_pt.ts new file mode 100644 index 0000000..a6979e2 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_pt.ts @@ -0,0 +1,55 @@ + + + + + LxQtKbIndicatorConfiguration + + LxQt Keyboard Indicator Settings + Definições do indicador de teclado do LxQt + + + &Caps lock + &Caps lock + + + &Num lock + &Num lock + + + &Scroll lock + &Scroll lock + + + &Advanced control + Controlo &avançado + + + &Bit + &Bits + + + &Text + &Texto + + + + Keyboard Indicator Settings + Definições do indicador de teclado + + + + Caps Lock + Caps Lock + + + + Num Lock + Num Lock + + + + Scroll Lock + Scroll Lock + + + diff --git a/plugin-kbindicator/translations/kbindicator_ru.desktop b/plugin-kbindicator/translations/kbindicator_ru.desktop new file mode 100644 index 0000000..db61346 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ru.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru]=Индикатор раскладки +Comment[ru]=Плагин, отображающий раскладку. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-kbindicator/translations/kbindicator_ru.ts b/plugin-kbindicator/translations/kbindicator_ru.ts new file mode 100644 index 0000000..e2a08a6 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ru.ts @@ -0,0 +1,27 @@ + + + + + LxQtKbIndicatorConfiguration + + + Keyboard Indicator Settings + Настройки индикатора клавиатуры + + + + Caps Lock + + + + + Num Lock + + + + + Scroll Lock + + + + diff --git a/plugin-kbindicator/translations/kbindicator_ru_RU.desktop b/plugin-kbindicator/translations/kbindicator_ru_RU.desktop new file mode 100644 index 0000000..fecc593 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ru_RU.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru_RU]=Индикатор раскладки +Comment[ru_RU]=Плагин, отображающий раскладку. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-kbindicator/translations/kbindicator_ru_RU.ts b/plugin-kbindicator/translations/kbindicator_ru_RU.ts new file mode 100644 index 0000000..d5ac6f7 --- /dev/null +++ b/plugin-kbindicator/translations/kbindicator_ru_RU.ts @@ -0,0 +1,27 @@ + + + + + LxQtKbIndicatorConfiguration + + + Keyboard Indicator Settings + Настройки индикатора клавиатуры + + + + Caps Lock + + + + + Num Lock + + + + + Scroll Lock + + + + diff --git a/plugin-mainmenu/CMakeLists.txt b/plugin-mainmenu/CMakeLists.txt new file mode 100644 index 0000000..047e0cc --- /dev/null +++ b/plugin-mainmenu/CMakeLists.txt @@ -0,0 +1,52 @@ +set(PLUGIN "mainmenu") + +set(HEADERS + lxqtmainmenu.h + menustyle.h + lxqtmainmenuconfiguration.h +) + +set(SOURCES + lxqtmainmenu.cpp + menustyle.cpp + lxqtmainmenuconfiguration.cpp +) + +set(MOCS + lxqtmainmenu.h + menustyle.h + lxqtmainmenuconfiguration.h +) + +set(UIS + lxqtmainmenuconfiguration.ui +) + +# optionally use libmenu-cache to generate the application menu +find_package(PkgConfig) +if(NOT WITHOUT_MENU_CACHE) + pkg_check_modules(MENU_CACHE + libmenu-cache>=0.3.3 + ) +endif() + +if(MENU_CACHE_FOUND) + list(APPEND SOURCES xdgcachedmenu.cpp) + list(APPEND MOCS xdgcachedmenu.h) + + include_directories(${MENU_CACHE_INCLUDE_DIRS}) + add_definitions(-DHAVE_MENU_CACHE=1) +endif() + +set(LIBRARIES + ${LXQT_LIBRARIES} + ${QTXDG_LIBRARIES} + ${LXQT_GLOBALKEYS_LIBRARIES} + ${LXQT_GLOBALKEYS_UI_LIBRARIES} + ${MENU_CACHE_LIBRARIES} +) + +set(QT_USE_QTXML 1) +set(QT_USE_QTDBUS 1) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-mainmenu/lxqtmainmenu.cpp b/plugin-mainmenu/lxqtmainmenu.cpp new file mode 100644 index 0000000..e4805ba --- /dev/null +++ b/plugin-mainmenu/lxqtmainmenu.cpp @@ -0,0 +1,351 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtmainmenu.h" +#include "lxqtmainmenuconfiguration.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for find_if() + +#include +#include +#include + +#ifdef HAVE_MENU_CACHE +#include "xdgcachedmenu.h" +#endif + +#include +#include +#include + +#define DEFAULT_SHORTCUT "Alt+F1" + +LxQtMainMenu::LxQtMainMenu(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mMenu(0), + mShortcut(0), + mLockCascadeChanges(false) +{ +#ifdef HAVE_MENU_CACHE + mMenuCache = NULL; + mMenuCacheNotify = 0; +#endif + + mDelayedPopup.setSingleShot(true); + mDelayedPopup.setInterval(250); + connect(&mDelayedPopup, &QTimer::timeout, this, &LxQtMainMenu::showHideMenu); + + mButton.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + mButton.installEventFilter(this); + + connect(&mButton, &QToolButton::clicked, this, &LxQtMainMenu::showMenu); + + settingsChanged(); + + connect(mShortcut, SIGNAL(activated()), &mDelayedPopup, SLOT(start())); + connect(mShortcut, SIGNAL(shortcutChanged(QString,QString)), this, SLOT(shortcutChanged(QString,QString))); +} + + +/************************************************ + + ************************************************/ +LxQtMainMenu::~LxQtMainMenu() +{ + mButton.removeEventFilter(this); +#ifdef HAVE_MENU_CACHE + if(mMenuCache) + { + menu_cache_remove_reload_notify(mMenuCache, mMenuCacheNotify); + menu_cache_unref(mMenuCache); + } +#endif +} + + +/************************************************ + + ************************************************/ +void LxQtMainMenu::showHideMenu() +{ + if (mMenu && mMenu->isVisible()) + mMenu->hide(); + else + showMenu(); +} + +/************************************************ + + ************************************************/ +void LxQtMainMenu::shortcutChanged(const QString &/*oldShortcut*/, const QString &newShortcut) +{ + if (!newShortcut.isEmpty()) + { + mLockCascadeChanges = true; + + settings()->setValue("dialog/shortcut", newShortcut); + settings()->sync(); + mShortcutSeq = QKeySequence(newShortcut); + + mLockCascadeChanges = false; + } +} + + +/************************************************ + + ************************************************/ +void LxQtMainMenu::showMenu() +{ + if (!mMenu) + return; + + int x=0, y=0; + + switch (panel()->position()) + { + case ILxQtPanel::PositionTop: + x = mButton.mapToGlobal(QPoint(0, 0)).x(); + y = panel()->globalGometry().bottom(); + break; + + case ILxQtPanel::PositionBottom: + x = mButton.mapToGlobal(QPoint(0, 0)).x(); + y = panel()->globalGometry().top() - mMenu->sizeHint().height(); + break; + + case ILxQtPanel::PositionLeft: + x = panel()->globalGometry().right(); + y = mButton.mapToGlobal(QPoint(0, 0)).y(); + break; + + case ILxQtPanel::PositionRight: + x = panel()->globalGometry().left() - mMenu->sizeHint().width(); + y = mButton.mapToGlobal(QPoint(0, 0)).y(); + break; + } + + // Just using Qt`s activateWindow() won't work on some WMs like Kwin. + // Solution is to execute menu 1ms later using timer + mMenu->exec(QPoint(x, y)); +} + +#ifdef HAVE_MENU_CACHE +// static +void LxQtMainMenu::menuCacheReloadNotify(MenuCache* cache, gpointer user_data) +{ + reinterpret_cast(user_data)->buildMenu(); +} +#endif + +/************************************************ + + ************************************************/ +void LxQtMainMenu::settingsChanged() +{ + if (mLockCascadeChanges) + return; + + if (settings()->value("showText", false).toBool()) + { + mButton.setText(settings()->value("text", "Start").toString()); + mButton.setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + } + else + { + mButton.setText(""); + mButton.setToolButtonStyle(Qt::ToolButtonIconOnly); + } + + mLogDir = settings()->value("log_dir", "").toString(); + + QString mMenuFile = settings()->value("menu_file", "").toString(); + if (mMenuFile.isEmpty()) + mMenuFile = XdgMenu::getMenuFileName(); + +#ifdef HAVE_MENU_CACHE + menu_cache_init(0); + if(mMenuCache) + { + menu_cache_remove_reload_notify(mMenuCache, mMenuCacheNotify); + menu_cache_unref(mMenuCache); + } + mMenuCache = menu_cache_lookup(mMenuFile.toLocal8Bit()); + mMenuCacheNotify = menu_cache_add_reload_notify(mMenuCache, (MenuCacheReloadNotify)menuCacheReloadNotify, this); +#else + mXdgMenu.setEnvironments(QStringList() << "X-LXQT" << "LxQt"); + mXdgMenu.setLogDir(mLogDir); + + bool res = mXdgMenu.read(mMenuFile); + connect(&mXdgMenu, SIGNAL(changed()), this, SLOT(buildMenu())); + if (res) + { + QTimer::singleShot(1000, this, SLOT(buildMenu())); + } + else + { + QMessageBox::warning(0, "Parse error", mXdgMenu.errorString()); + return; + } +#endif + + QString shortcut = settings()->value("shortcut", DEFAULT_SHORTCUT).toString(); + if (shortcut.isEmpty()) + shortcut = DEFAULT_SHORTCUT; + + if (!mShortcut) + mShortcut = GlobalKeyShortcut::Client::instance()->addAction(shortcut, QString("/panel/%1/show_hide").arg(settings()->group()), tr("Show/hide main menu"), this); + else if (mShortcut->shortcut() != shortcut) + { + mShortcut->changeShortcut(shortcut); + } + mShortcutSeq = QKeySequence(shortcut); + + realign(); +} + + +/************************************************ + + ************************************************/ +void LxQtMainMenu::buildMenu() +{ +#ifdef HAVE_MENU_CACHE + XdgCachedMenu* menu = new XdgCachedMenu(mMenuCache, &mButton); +#else + XdgMenuWidget *menu = new XdgMenuWidget(mXdgMenu, "", &mButton); +#endif + menu->setObjectName("TopLevelMainMenu"); + menu->setStyle(&mTopMenuStyle); + + menu->addSeparator(); + + Q_FOREACH(QAction* action, menu->actions()) + { + if (action->menu()) + action->menu()->installEventFilter(this); + } + + menu->installEventFilter(this); + + QMenu *oldMenu = mMenu; + mMenu = menu; + if(oldMenu) + delete oldMenu; + + if(settings()->value("customFont", false).toBool()) + { + QFont menuFont = mMenu->font(); + menuFont.setPointSize(settings()->value("customFontSize").toInt()); + + mMenu->setFont(menuFont); + QList subMenuList = mMenu->findChildren(); + foreach (QMenu* subMenu, subMenuList) + { + subMenu->setFont(menuFont); + } + } +} + + +/************************************************ + + ************************************************/ +QDialog *LxQtMainMenu::configureDialog() +{ + return new LxQtMainMenuConfiguration(*settings(), DEFAULT_SHORTCUT); +} +/************************************************ + + ************************************************/ + +// functor used to match a QAction by prefix +struct MatchAction +{ + MatchAction(QString key):key_(key) {} + bool operator()(QAction* action) { return action->text().startsWith(key_, Qt::CaseInsensitive); } + QString key_; +}; + +bool LxQtMainMenu::eventFilter(QObject *obj, QEvent *event) +{ + if(obj == &mButton) + { + // the application is given a new QStyle + if(event->type() == QEvent::StyleChange) + { + // reset proxy style for the menus so they can apply the new styles + mTopMenuStyle.setBaseStyle(NULL); + mMenuStyle.setBaseStyle(NULL); + } + } + else if(QMenu* menu = qobject_cast(obj)) + { + if(event->type() == QEvent::KeyPress) + { + // if our shortcut key is pressed while the menu is open, close the menu + QKeyEvent* keyEvent = static_cast(event); + if(mShortcutSeq == QKeySequence(keyEvent->modifiers() + keyEvent->key())) + { + mMenu->hide(); // close the app menu + return true; + } + else // go to the menu item starts with the pressed key + { + QString key = keyEvent->text(); + if(key.isEmpty()) + return false; + QAction* action = menu->activeAction(); + QList actions = menu->actions(); + QList::iterator it = qFind(actions.begin(), actions.end(), action); + it = std::find_if(it + 1, actions.end(), MatchAction(key)); + if(it == actions.end()) + it = std::find_if(actions.begin(), it, MatchAction(key)); + if(it != actions.end()) + menu->setActiveAction(*it); + } + } + } + return false; +} + +#undef DEFAULT_SHORTCUT diff --git a/plugin-mainmenu/lxqtmainmenu.h b/plugin-mainmenu/lxqtmainmenu.h new file mode 100644 index 0000000..aa1e81f --- /dev/null +++ b/plugin-mainmenu/lxqtmainmenu.h @@ -0,0 +1,120 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQT_MAINMENU_H +#define LXQT_MAINMENU_H + +#include "../panel/ilxqtpanelplugin.h" +#include + +#ifdef HAVE_MENU_CACHE +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include "menustyle.h" + + +class QMenu; +class LxQtBar; + +namespace LxQt { +class PowerManager; +class ScreenSaver; +} + +namespace GlobalKeyShortcut +{ +class Action; +} + +class LxQtMainMenu : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtMainMenu(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtMainMenu(); + + QString themeId() const { return "MainMenu"; } + virtual ILxQtPanelPlugin::Flags flags() const { return HaveConfigDialog ; } + + QWidget *widget() { return &mButton; } + QDialog *configureDialog(); + + bool isSeparate() const { return true; } + +protected: + bool eventFilter(QObject *obj, QEvent *event); + +private: + QToolButton mButton; + QString mLogDir; + QMenu* mMenu; + GlobalKeyShortcut::Action *mShortcut; + MenuStyle mTopMenuStyle; + MenuStyle mMenuStyle; + +#ifdef HAVE_MENU_CACHE + MenuCache* mMenuCache; + MenuCacheNotifyId mMenuCacheNotify; + static void menuCacheReloadNotify(MenuCache* cache, gpointer user_data); +#else + XdgMenu mXdgMenu; +#endif + + bool mLockCascadeChanges; + QTimer mDelayedPopup; + QKeySequence mShortcutSeq; + +protected slots: + + virtual void settingsChanged(); + void buildMenu(); + +private slots: + void showMenu(); + void showHideMenu(); + void shortcutChanged(const QString &oldShortcut, const QString &newShortcut); +}; + +class LxQtMainMenuPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) { return new LxQtMainMenu(startupInfo);} +}; + +#endif diff --git a/plugin-mainmenu/lxqtmainmenuconfiguration.cpp b/plugin-mainmenu/lxqtmainmenuconfiguration.cpp new file mode 100644 index 0000000..00d5825 --- /dev/null +++ b/plugin-mainmenu/lxqtmainmenuconfiguration.cpp @@ -0,0 +1,140 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtmainmenuconfiguration.h" +#include "ui_lxqtmainmenuconfiguration.h" +#include + +#include + +LxQtMainMenuConfiguration::LxQtMainMenuConfiguration(QSettings &settings, const QString &defaultShortcut, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtMainMenuConfiguration), + mSettings(settings), + mOldSettings(settings), + mDefaultShortcut(defaultShortcut) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("MainMenuConfigurationWindow"); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + + loadSettings(); + + connect(ui->showTextCB, SIGNAL(toggled(bool)), this, SLOT(showTextChanged(bool))); + connect(ui->textLE, SIGNAL(textEdited(QString)), this, SLOT(textButtonChanged(QString))); + connect(ui->chooseMenuFilePB, SIGNAL(clicked()), this, SLOT(chooseMenuFile())); + + connect(ui->shortcutEd, SIGNAL(shortcutGrabbed(QString)), this, SLOT(shortcutChanged(QString))); + connect(ui->shortcutEd->addMenuAction(tr("Reset")), SIGNAL(triggered()), this, SLOT(shortcutReset())); + + connect(ui->customFontCB, SIGNAL(toggled(bool)), this, SLOT(customFontChanged(bool))); + connect(ui->customFontSizeSB, SIGNAL(valueChanged(int)), this, SLOT(customFontSizeChanged(int))); +} + +LxQtMainMenuConfiguration::~LxQtMainMenuConfiguration() +{ + delete ui; +} + +void LxQtMainMenuConfiguration::loadSettings() +{ + ui->showTextCB->setChecked(mSettings.value("showText", false).toBool()); + ui->textLE->setText(mSettings.value("text", "").toString()); + + QString menuFile = mSettings.value("menu_file", "").toString(); + if (menuFile.isEmpty()) + { + menuFile = XdgMenu::getMenuFileName(); + } + ui->menuFilePathLE->setText(menuFile); + ui->shortcutEd->setText(mSettings.value("shortcut", "Alt+F1").toString()); + + ui->customFontCB->setChecked(mSettings.value("customFont", false).toBool()); + LxQt::Settings lxqtSettings("lxqt"); //load system font size as init value + QFont systemFont; + lxqtSettings.beginGroup(QLatin1String("Qt")); + systemFont.fromString(lxqtSettings.value("font", this->font()).toString()); + lxqtSettings.endGroup(); + ui->customFontSizeSB->setValue(mSettings.value("customFontSize", systemFont.pointSize()).toInt()); +} + +void LxQtMainMenuConfiguration::textButtonChanged(const QString &value) +{ + mSettings.setValue("text", value); +} + +void LxQtMainMenuConfiguration::showTextChanged(bool value) +{ + mSettings.setValue("showText", value); +} + +void LxQtMainMenuConfiguration::chooseMenuFile() +{ + QString path = QFileDialog::getOpenFileName(this, tr("Choose menu file"), "~", tr("Menu files (*.menu)")); + if (!path.isEmpty()) + { + ui->menuFilePathLE->setText(path); + mSettings.setValue("menu_file", path); + } +} + +void LxQtMainMenuConfiguration::shortcutChanged(const QString &value) +{ + ui->shortcutEd->setText(value); + mSettings.setValue("shortcut", value); +} + +void LxQtMainMenuConfiguration::shortcutReset() +{ + shortcutChanged(mDefaultShortcut); +} + +void LxQtMainMenuConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + mOldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + +void LxQtMainMenuConfiguration::customFontChanged(bool value) +{ + mSettings.setValue("customFont", value); +} + +void LxQtMainMenuConfiguration::customFontSizeChanged(int value) +{ + mSettings.setValue("customFontSize", value); +} diff --git a/plugin-mainmenu/lxqtmainmenuconfiguration.h b/plugin-mainmenu/lxqtmainmenuconfiguration.h new file mode 100644 index 0000000..496bdbc --- /dev/null +++ b/plugin-mainmenu/lxqtmainmenuconfiguration.h @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTMAINMENUCONFIGURATION_H +#define LXQTMAINMENUCONFIGURATION_H + +#include + +#include + +class QSettings; +class QAbstractButton; + +namespace Ui { + class LxQtMainMenuConfiguration; +} + +class LxQtMainMenuConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtMainMenuConfiguration(QSettings &settings, const QString &defaultShortcut, QWidget *parent = 0); + ~LxQtMainMenuConfiguration(); + +private: + Ui::LxQtMainMenuConfiguration *ui; + QSettings &mSettings; + LxQt::SettingsCache mOldSettings; + QString mDefaultShortcut; + +private slots: + /* + Saves settings in conf file. + */ + void loadSettings(); + void dialogButtonsAction(QAbstractButton *btn); + void textButtonChanged(const QString &value); + void showTextChanged(bool value); + void chooseMenuFile(); + void shortcutChanged(const QString &value); + void shortcutReset(); + void customFontChanged(bool value); + void customFontSizeChanged(int value); +}; + +#endif // LXQTMAINMENUCONFIGURATION_H diff --git a/plugin-mainmenu/lxqtmainmenuconfiguration.ui b/plugin-mainmenu/lxqtmainmenuconfiguration.ui new file mode 100644 index 0000000..d3f4e2c --- /dev/null +++ b/plugin-mainmenu/lxqtmainmenuconfiguration.ui @@ -0,0 +1,204 @@ + + + LxQtMainMenuConfiguration + + + + 0 + 0 + 434 + 325 + + + + Main Menu settings + + + + + + General + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + false + + + + + + Button text: + + + + + + + false + + + + + + + true + + + Custom font size: + + + + + + + false + + + pt + + + 1 + + + 11 + + + + + + + + + + true + + + Menu file + + + + + + Menu file: + + + + + + + true + + + + + + + ... + + + + + + + + + + Keyboard Shortcut + + + + + + + 200 + 0 + + + + + + + + + + + Click the button to record shortcut: + + + + + + + + + + Qt::Vertical + + + + 20 + 41 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + ShortcutSelector + QToolButton +
LXQtGlobalKeysUi/ShortcutSelector
+
+
+ + + + customFontCB + toggled(bool) + customFontSizeSB + setEnabled(bool) + + + 60 + 249 + + + 280 + 277 + + + + + showTextCB + toggled(bool) + textLE + setEnabled(bool) + + + 239 + 39 + + + 313 + 68 + + + + +
diff --git a/plugin-mainmenu/menustyle.cpp b/plugin-mainmenu/menustyle.cpp new file mode 100644 index 0000000..6c660f5 --- /dev/null +++ b/plugin-mainmenu/menustyle.cpp @@ -0,0 +1,66 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "menustyle.h" +#include + + +/************************************************ + + ************************************************/ +MenuStyle::MenuStyle(): + QProxyStyle() +{ + mIconSize = 16; +} + + +/************************************************ + + ************************************************/ +int MenuStyle::pixelMetric(PixelMetric metric, const QStyleOption * option, const QWidget * widget) const +{ + if (metric == QProxyStyle::PM_SmallIconSize) + return mIconSize; + + return QProxyStyle::pixelMetric(metric, option, widget); +} + +/************************************************ + + ************************************************/ +int MenuStyle::styleHint(StyleHint hint, const QStyleOption * option, const QWidget* widget, QStyleHintReturn* returnData) const +{ + // By default, the popup menu will be closed when Alt key + // is pressed. If SH_MenuBar_AltKeyNavigation style hint returns + // false, this behavior can be supressed so let's do it. + if(hint == QStyle::SH_MenuBar_AltKeyNavigation) + return 0; + return QProxyStyle::styleHint(hint, option, widget, returnData); +} + diff --git a/plugin-mainmenu/menustyle.h b/plugin-mainmenu/menustyle.h new file mode 100644 index 0000000..116dd20 --- /dev/null +++ b/plugin-mainmenu/menustyle.h @@ -0,0 +1,48 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef MENUSTYLE_H +#define MENUSTYLE_H + +#include + +class MenuStyle : public QProxyStyle +{ + Q_OBJECT +public: + explicit MenuStyle(); + int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const; + int styleHint(StyleHint hint, const QStyleOption* option = 0, const QWidget* widget = 0, QStyleHintReturn* returnData = 0) const; + int iconSize() const { return mIconSize; } + void setIconSize(int value) { mIconSize = value; } + +private: + int mIconSize; +}; + +#endif // MENUSTYLE_H diff --git a/plugin-mainmenu/resources/mainmenu.desktop.in b/plugin-mainmenu/resources/mainmenu.desktop.in new file mode 100644 index 0000000..6cecd44 --- /dev/null +++ b/plugin-mainmenu/resources/mainmenu.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. +Icon=start-here-lxqt + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-mainmenu/translations/mainmenu.ts b/plugin-mainmenu/translations/mainmenu.ts new file mode 100644 index 0000000..1e26ea8 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + + + + + LxQtMainMenuConfiguration + + + General + + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + + + + + Menu files (*.menu) + + + + diff --git a/plugin-mainmenu/translations/mainmenu_ar.desktop b/plugin-mainmenu/translations/mainmenu_ar.desktop new file mode 100644 index 0000000..b10541f --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=بادئ التطبيقات المعتمد على قائمة +Name[ar]=قائمة التطبيقات diff --git a/plugin-mainmenu/translations/mainmenu_ar.ts b/plugin-mainmenu/translations/mainmenu_ar.ts new file mode 100644 index 0000000..0c270c9 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ar.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + مغادرة + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + إعدادات قائمة ريزر الرئيسيَّة + + + + General + العامّ + + + Show text + إظهار النَّصّ + + + Button text + نصُّ الزُّرّ + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + ملفُّ القائمة + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + اختصار المفاتيح + + + + Click the button to record shortcut: + اضغط المفتاح لتسجيل الاختصار + + + + Reset + + + + + Choose menu file + اختيار ملفِّ القائمة + + + + Menu files (*.menu) + ملفَّات القائمة (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_cs.desktop b/plugin-mainmenu/translations/mainmenu_cs.desktop new file mode 100644 index 0000000..4392af2 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Hlavní nabídka +Name[cs]=Nabídka diff --git a/plugin-mainmenu/translations/mainmenu_cs.ts b/plugin-mainmenu/translations/mainmenu_cs.ts new file mode 100644 index 0000000..aa9ba2c --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_cs.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Opustit + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Nastavení hlavní nabídky + + + + General + Obecné + + + Show text + Ukázat text + + + Button text + Text + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Soubor s nabídkou + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Klávesová zkratka + + + + Click the button to record shortcut: + Klepněte na tlačítko pro nahrání klávesové zkratky: + + + + Reset + + + + + Choose menu file + Vybrat soubor s nabídkou + + + + Menu files (*.menu) + Soubory s nabídkami (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_cs_CZ.desktop b/plugin-mainmenu/translations/mainmenu_cs_CZ.desktop new file mode 100644 index 0000000..c0a6c5b --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Spouštěč programů založený na nabídce +Name[cs_CZ]=Nabídka programů diff --git a/plugin-mainmenu/translations/mainmenu_cs_CZ.ts b/plugin-mainmenu/translations/mainmenu_cs_CZ.ts new file mode 100644 index 0000000..f1938fc --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_cs_CZ.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Opustit + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Nastavení hlavní nabídky + + + + General + Obecné + + + Show text + Ukázat text + + + Button text + Text + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Soubor s nabídkou + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Klávesová zkratka + + + + Click the button to record shortcut: + Klepněte na tlačítko pro nahrání klávesové zkratky: + + + + Reset + + + + + Choose menu file + Vybrat soubor s nabídkou + + + + Menu files (*.menu) + Soubory s nabídkami (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_da.desktop b/plugin-mainmenu/translations/mainmenu_da.desktop new file mode 100644 index 0000000..cbbdaa5 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Menubaseret programstarter +Name[da]=Programmenu diff --git a/plugin-mainmenu/translations/mainmenu_da.ts b/plugin-mainmenu/translations/mainmenu_da.ts new file mode 100644 index 0000000..61b3f69 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_da.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Forlad + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LXQt Hovedmenu Indstillinger + + + + General + Generelt + + + Show text + Vis tekst + + + Button text + Knaptekst + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menufil + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tastaturgenvej + + + + Click the button to record shortcut: + Klik på knappen for at optage genvej: + + + + Reset + + + + + Choose menu file + Vælg menufil + + + + Menu files (*.menu) + Menufiler (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_da_DK.desktop b/plugin-mainmenu/translations/mainmenu_da_DK.desktop new file mode 100644 index 0000000..4c429bc --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Menubaseret programstarter +Name[da_DK]=Program menu diff --git a/plugin-mainmenu/translations/mainmenu_da_DK.ts b/plugin-mainmenu/translations/mainmenu_da_DK.ts new file mode 100644 index 0000000..36423dd --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_da_DK.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Forlad + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt Hoved Menu Indstillinger + + + + General + Generelt + + + Show text + Vis tekst + + + Button text + Knaptekst + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menu konfigurationsfil + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tastaturgenveje + + + + Click the button to record shortcut: + Klik for at optage genvej: + + + + Reset + + + + + Choose menu file + Vælg menu konfigurationsfil + + + + Menu files (*.menu) + Menu konfigurationsfiler (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_de.desktop b/plugin-mainmenu/translations/mainmenu_de.desktop new file mode 100644 index 0000000..1402227 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Menü basierter Anwendungsstarter +Name[de]=Anwendungsmenü diff --git a/plugin-mainmenu/translations/mainmenu_de.ts b/plugin-mainmenu/translations/mainmenu_de.ts new file mode 100644 index 0000000..d090de9 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_de.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Verlassen + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt Hauptmenü-Einstellungen + + + + General + Allgemein + + + Show text + Text anzeigen + + + Button text + Knopf-Text + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menü-Datei + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tastaturkürzel + + + + Click the button to record shortcut: + Klicken Sie auf die Schaltfläche, um ein Tastaturkürzel aufzunehmen: + + + + Reset + + + + + Choose menu file + Menü-Datei auswählen + + + + Menu files (*.menu) + Menü-Dateien (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_de_DE.desktop b/plugin-mainmenu/translations/mainmenu_de_DE.desktop new file mode 100644 index 0000000..790ac37 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Menü-basierter Anwendungsstarter +Name[de_DE]=Anwendungsmenü diff --git a/plugin-mainmenu/translations/mainmenu_de_DE.ts b/plugin-mainmenu/translations/mainmenu_de_DE.ts new file mode 100644 index 0000000..d83bd7a --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_de_DE.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Verlassen + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt Hauptmenü Einstellungen + + + + General + Allgemein + + + Show text + Zeige Text + + + Button text + Schaltflächen Text + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menü Datei + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tastenkürzel + + + + Click the button to record shortcut: + Klicke um Tastenkürzel zu ändern: + + + + Reset + + + + + Choose menu file + Wähle Menü Datei + + + + Menu files (*.menu) + Menü Datei (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_el_GR.desktop b/plugin-mainmenu/translations/mainmenu_el_GR.desktop new file mode 100644 index 0000000..fde6090 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Μενού εκκίνησης εφαρμογών +Name[el_GR]=Μενού εφαρμογών diff --git a/plugin-mainmenu/translations/mainmenu_el_GR.ts b/plugin-mainmenu/translations/mainmenu_el_GR.ts new file mode 100644 index 0000000..bc87087 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_el_GR.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Έξοδος + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Ρυθμίσεις κυρίως μενού LxQt + + + + General + Γενικά + + + Show text + Εμφάνιση κειμένου + + + Button text + Κείμενου πλήκτρου + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Αρχείο μενού + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Συντόμευση πληκτρολογίου + + + + Click the button to record shortcut: + Κλικ στο πλήκτρο για εγγραφή της συντόμευσης: + + + + Reset + + + + + Choose menu file + Επιλογή αρχείου μενού + + + + Menu files (*.menu) + Αρχεία μενού (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_eo.desktop b/plugin-mainmenu/translations/mainmenu_eo.desktop new file mode 100644 index 0000000..616b575 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Lanĉilo de aplikaĵoj baziĝita sur menuo +Name[eo]=Menuo de aplikaĵoj diff --git a/plugin-mainmenu/translations/mainmenu_eo.ts b/plugin-mainmenu/translations/mainmenu_eo.ts new file mode 100644 index 0000000..ed22abe --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_eo.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Forlasi + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Agordoj de ĉefa menuo de LxQt + + + + General + Ĝenerala + + + Show text + Montri tekston + + + Button text + Teksto de butonoj + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menua dosiero + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Klavkombinoj + + + + Click the button to record shortcut: + Alklaku sur la butono por registi klavkombinon: + + + + Reset + + + + + Choose menu file + lektu menuan dosieron + + + + Menu files (*.menu) + Menuaj dosieroj (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_es.desktop b/plugin-mainmenu/translations/mainmenu_es.desktop new file mode 100644 index 0000000..85625cf --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Lanzador de aplicaciones con menú +Name[es]=Menu de Aplicaciones diff --git a/plugin-mainmenu/translations/mainmenu_es.ts b/plugin-mainmenu/translations/mainmenu_es.ts new file mode 100644 index 0000000..75dc2ad --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_es.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Salir + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Configuración del menú principal de LxQt + + + + General + General + + + Show text + Mostrar texto + + + Button text + Texto de los botones + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Archivo del menú + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Atajos del teclado + + + + Click the button to record shortcut: + Presione el botón para registrar el atajo: + + + + Reset + + + + + Choose menu file + Escoger un archivo de menú + + + + Menu files (*.menu) + Archivos de menú (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_es_UY.ts b/plugin-mainmenu/translations/mainmenu_es_UY.ts new file mode 100644 index 0000000..058119e --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_es_UY.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Salir + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Configuración del Menú Principal LxQt + + + + General + General + + + Show text + Mostrar etiqueta + + + Button text + Etiqueta del botón + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Archivo de menú + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + Seleccionar archivo de menú + + + + Menu files (*.menu) + Archivos de menú (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_es_VE.desktop b/plugin-mainmenu/translations/mainmenu_es_VE.desktop new file mode 100644 index 0000000..cb25745 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Menu para lanzar las aplicaciones instaladas graficas +Name[es_VE]=Menu de aplicaciones diff --git a/plugin-mainmenu/translations/mainmenu_es_VE.ts b/plugin-mainmenu/translations/mainmenu_es_VE.ts new file mode 100644 index 0000000..e642691 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_es_VE.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Salir + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Configuración del Menú Principal LxQt + + + + General + General + + + Show text + Mostrar etiqueta + + + Button text + Etiqueta del botón + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Archivo de menú alterno + + + + Menu file: + + + + + ... + Buscar ... + + + + Keyboard Shortcut + Tecla de acceso rapido + + + + Click the button to record shortcut: + Pulsa en el boton para grabar el acceso rapido: + + + + Reset + + + + + Choose menu file + Seleccionar archivo de menú + + + + Menu files (*.menu) + Archivos de menú (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_eu.desktop b/plugin-mainmenu/translations/mainmenu_eu.desktop new file mode 100644 index 0000000..e73f5c7 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Menu bidezko aplikazio-abiarazlea +Name[eu]=Aplikazio menua diff --git a/plugin-mainmenu/translations/mainmenu_eu.ts b/plugin-mainmenu/translations/mainmenu_eu.ts new file mode 100644 index 0000000..a4acdd2 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_eu.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Irten + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt menu nagusiaren ezarpenak + + + + General + Orokorra + + + Show text + Erakutsi testua + + + Button text + Botoi-testua + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menu fitxategia + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Teklatuko lasterbidea + + + + Click the button to record shortcut: + Klikatu botoia lasterbidea grabatzeko: + + + + Reset + + + + + Choose menu file + Aukeratu menu fitxategia + + + + Menu files (*.menu) + Menu fitxategiak (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_fi.desktop b/plugin-mainmenu/translations/mainmenu_fi.desktop new file mode 100644 index 0000000..334eeb5 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Valikkopohjainen sovelluskäynnistin +Name[fi]=Sovellusvalikko diff --git a/plugin-mainmenu/translations/mainmenu_fi.ts b/plugin-mainmenu/translations/mainmenu_fi.ts new file mode 100644 index 0000000..8b17a60 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_fi.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Poistu + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQtin päävalikon asetukset + + + + General + Yleiset + + + Show text + Näytä teksti + + + Button text + Painiketeksti + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Valikkotiedosto + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Pikanäppäin + + + + Click the button to record shortcut: + Napsauta painiketta nauhoittaaksesi pikanäppäimen: + + + + Reset + + + + + Choose menu file + Valitse valikkotiedosto + + + + Menu files (*.menu) + Valikkotiedostot (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_fr_FR.desktop b/plugin-mainmenu/translations/mainmenu_fr_FR.desktop new file mode 100644 index 0000000..00992de --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Lanceur d'application sous forme de menu +Name[fr_FR]=Menu d'application diff --git a/plugin-mainmenu/translations/mainmenu_fr_FR.ts b/plugin-mainmenu/translations/mainmenu_fr_FR.ts new file mode 100644 index 0000000..de3f00e --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_fr_FR.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Quitter + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Menu principal des paramètres de LxQt + + + + General + Généraux + + + Show text + Montrer le texte + + + Button text + Texte des boutons + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Fichier de menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Raccourcis clavier + + + + Click the button to record shortcut: + Cliquez sur le bouton pour enregistrer le raccourci : + + + + Reset + + + + + Choose menu file + Choisissez un fichier de menu + + + + Menu files (*.menu) + Fichiers de menu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_hu.desktop b/plugin-mainmenu/translations/mainmenu_hu.desktop new file mode 100644 index 0000000..b862473 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Alkalmazásindító alapú menü +Name[hu]=Alkalmazásmenü diff --git a/plugin-mainmenu/translations/mainmenu_hu.ts b/plugin-mainmenu/translations/mainmenu_hu.ts new file mode 100644 index 0000000..2c15ba8 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_hu.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Kilépés + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + A LxQt főmenü beállításai + + + + General + Általános + + + Show text + Szöveg megjelenítése + + + Button text + Gombszöveg + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menüfájl + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + Gyorsbillentyűk + + + + Click the button to record shortcut: + Kattintson a gombra a gyorsbillentyű rögzítéséhez: + + + + Reset + + + + + Choose menu file + Menüfájl kiválasztása + + + + Menu files (*.menu) + Menüfájlok (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_hu_HU.ts b/plugin-mainmenu/translations/mainmenu_hu_HU.ts new file mode 100644 index 0000000..ee38197 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_hu_HU.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Leállítás + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LXDE-Qt - A főmen beállítása + + + + General + Általános + + + Show text + Szöveg megjelenítése + + + Button text + Gombszöveg + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menüfájl + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + Menüfájl kiválasztása + + + + Menu files (*.menu) + Menüfájlok (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ia.desktop b/plugin-mainmenu/translations/mainmenu_ia.desktop new file mode 100644 index 0000000..6c4d961 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=Menu based application launcher + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mainmenu/translations/mainmenu_ia.ts b/plugin-mainmenu/translations/mainmenu_ia.ts new file mode 100644 index 0000000..16fa8cd --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ia.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + + + + + LxQtMainMenuConfiguration + + + General + + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + + + + + Menu files (*.menu) + + + + diff --git a/plugin-mainmenu/translations/mainmenu_id_ID.desktop b/plugin-mainmenu/translations/mainmenu_id_ID.desktop new file mode 100644 index 0000000..3f5234a --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_id_ID.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[id_ID]=Peluncur aplikasi berbasis menu +Name[id_ID]=Menu aplikasi diff --git a/plugin-mainmenu/translations/mainmenu_id_ID.ts b/plugin-mainmenu/translations/mainmenu_id_ID.ts new file mode 100644 index 0000000..ee9b4c9 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_id_ID.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + + + + + LxQtMainMenuConfiguration + + + General + + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + + + + + Menu files (*.menu) + + + + diff --git a/plugin-mainmenu/translations/mainmenu_it_IT.desktop b/plugin-mainmenu/translations/mainmenu_it_IT.desktop new file mode 100644 index 0000000..d87003f --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Avviatore delle applicazioni basato su menu +Name[it_IT]=Menu delle applicazioni diff --git a/plugin-mainmenu/translations/mainmenu_it_IT.ts b/plugin-mainmenu/translations/mainmenu_it_IT.ts new file mode 100644 index 0000000..7d8a59e --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_it_IT.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Esci + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Impostazioni del menu principale di LxQt + + + + General + Generale + + + Show text + Mostra testo + + + Button text + Testo del pulsante + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + File del menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Scorciatoie da tastiera + + + + Click the button to record shortcut: + Fai clic sul pulsante per registrare una scorciatoia: + + + + Reset + + + + + Choose menu file + Scegli il file del menu + + + + Menu files (*.menu) + File del menu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ja.desktop b/plugin-mainmenu/translations/mainmenu_ja.desktop new file mode 100644 index 0000000..dc18ca1 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=アプリケーションランチャーを元にしたメニューです +Name[ja]=アプリケーションメニュー diff --git a/plugin-mainmenu/translations/mainmenu_ja.ts b/plugin-mainmenu/translations/mainmenu_ja.ts new file mode 100644 index 0000000..f2cbaae --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ja.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + メインメニューを表示/隠す + + + + Leave + 終了 + + + + LxQtMainMenuConfiguration + + + General + 一般 + + + + Main Menu settings + メインメニューの設定 + + + + Button text: + ボタンの文字列: + + + + Custom font size: + フォントサイズの指定: + + + + pt + ポイント + + + + Menu file + メニューファイル + + + + Menu file: + メニューファイル: + + + + ... + ... + + + + Keyboard Shortcut + キーボードショートカット + + + + Click the button to record shortcut: + ショートカットを記録するにはボタンをクリック: + + + + Reset + リセット + + + + Choose menu file + メニューファイルを選択 + + + + Menu files (*.menu) + メニューファイル(*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ko.desktop b/plugin-mainmenu/translations/mainmenu_ko.desktop new file mode 100644 index 0000000..6c4d961 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=Menu based application launcher + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mainmenu/translations/mainmenu_ko.ts b/plugin-mainmenu/translations/mainmenu_ko.ts new file mode 100644 index 0000000..736872a --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ko.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + + + + + LxQtMainMenuConfiguration + + + General + + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + + + + + Menu files (*.menu) + + + + diff --git a/plugin-mainmenu/translations/mainmenu_lt.desktop b/plugin-mainmenu/translations/mainmenu_lt.desktop new file mode 100644 index 0000000..54decc5 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Programų paleidimo meniu +Name[lt]=Programų meniu diff --git a/plugin-mainmenu/translations/mainmenu_lt.ts b/plugin-mainmenu/translations/mainmenu_lt.ts new file mode 100644 index 0000000..67b3adc --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_lt.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Išeiti + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt pagrindinio meniu nuostatos + + + + General + Pagrindinės + + + Show text + Rodyti tekstą + + + Button text + Mygtuko tekstas + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Meniu rinkmena + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Spartusis klavišas + + + + Click the button to record shortcut: + Norėdami pakeisti klavišą, spragtelėkite + + + + Reset + + + + + Choose menu file + Pasirinkite meniu failą + + + + Menu files (*.menu) + Meniu failai (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_nl.desktop b/plugin-mainmenu/translations/mainmenu_nl.desktop new file mode 100644 index 0000000..b133bad --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Menu-gebasseerde applicatie starter +Name[nl]=Applicatie menu diff --git a/plugin-mainmenu/translations/mainmenu_nl.ts b/plugin-mainmenu/translations/mainmenu_nl.ts new file mode 100644 index 0000000..dab47c7 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_nl.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Verlaten + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Instellingen van hoofdmenu van LxQt + + + + General + Algemeen + + + Show text + Tekst weergeven + + + Button text + Knoptekst + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menubestand + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Sneltoets + + + + Click the button to record shortcut: + Klik op de knop om de sneltoets vast te leggen: + + + + Reset + + + + + Choose menu file + Kies menubestand + + + + Menu files (*.menu) + Menubestanden (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_pl.desktop b/plugin-mainmenu/translations/mainmenu_pl.desktop new file mode 100644 index 0000000..0ac249d --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Główne menu +Name[pl]=Menu diff --git a/plugin-mainmenu/translations/mainmenu_pl_PL.desktop b/plugin-mainmenu/translations/mainmenu_pl_PL.desktop new file mode 100644 index 0000000..837de4c --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Menu aplikacji +Name[pl_PL]=Menu diff --git a/plugin-mainmenu/translations/mainmenu_pl_PL.ts b/plugin-mainmenu/translations/mainmenu_pl_PL.ts new file mode 100644 index 0000000..ebb304c --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pl_PL.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Opuść + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Ustawienia menu LxQt + + + + General + Ogólne + + + Show text + Pokaż tekst + + + Button text + Tekst + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Plik menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Skrót klawiatury + + + + Click the button to record shortcut: + Wciśnij przycisk aby ustawić skrót: + + + + Reset + + + + + Choose menu file + Wybierz plik menu + + + + Menu files (*.menu) + Pliki menu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_pt.desktop b/plugin-mainmenu/translations/mainmenu_pt.desktop new file mode 100644 index 0000000..a1ec648 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Menu de aplicações +Comment[pt]=Lançador de aplicações baseado no menu diff --git a/plugin-mainmenu/translations/mainmenu_pt.ts b/plugin-mainmenu/translations/mainmenu_pt.ts new file mode 100644 index 0000000..a1f2782 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pt.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Sair + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Definições do menu principal do LxQt + + + + General + Geral + + + Show text + Mostrar texto + + + Button text + Texto do botão + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Ficheiro de menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Atalho de teclado + + + + Click the button to record shortcut: + Clique no botão para registar o atalho: + + + + Reset + + + + + Choose menu file + Escolha o ficheiro de menu + + + + Menu files (*.menu) + Ficheiros de menu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_pt_BR.desktop b/plugin-mainmenu/translations/mainmenu_pt_BR.desktop new file mode 100644 index 0000000..df9b5f6 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Lançador de aplicativos baseado em menu +Name[pt_BR]=Menu de aplicativos diff --git a/plugin-mainmenu/translations/mainmenu_pt_BR.ts b/plugin-mainmenu/translations/mainmenu_pt_BR.ts new file mode 100644 index 0000000..69d0e1b --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_pt_BR.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Sair + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Configurações do menu principal do LxQt + + + + General + Geral + + + Show text + Exibir texto + + + Button text + Texto do botão + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Arquvo do menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Atalho do teclado + + + + Click the button to record shortcut: + Clique no botão para gravar o atalho: + + + + Reset + + + + + Choose menu file + Escolher arquivo do menu + + + + Menu files (*.menu) + Arquivos do menu (*.menus) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ro_RO.desktop b/plugin-mainmenu/translations/mainmenu_ro_RO.desktop new file mode 100644 index 0000000..3bb9334 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Lansator de aplicații bazat pe meniuri +Name[ro_RO]=Meniu aplicații diff --git a/plugin-mainmenu/translations/mainmenu_ro_RO.ts b/plugin-mainmenu/translations/mainmenu_ro_RO.ts new file mode 100644 index 0000000..c080071 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ro_RO.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Părăsește + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Setări meniu principal LxQt + + + + General + General + + + Show text + Afișează text + + + Button text + Text buton + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Fișier meniu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tastă rapidă + + + + Click the button to record shortcut: + Apăsați butonul pentru a memora tasta rapidă: + + + + Reset + + + + + Choose menu file + Selectați fișierul meniu + + + + Menu files (*.menu) + Fișiere meniu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ru.desktop b/plugin-mainmenu/translations/mainmenu_ru.desktop new file mode 100644 index 0000000..25de0e2 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Меню всех ваших программ. +Name[ru]=Меню приложений diff --git a/plugin-mainmenu/translations/mainmenu_ru.ts b/plugin-mainmenu/translations/mainmenu_ru.ts new file mode 100644 index 0000000..d067af5 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ru.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + Показать/скрыть главное меню + + + + Leave + Выход + + + + LxQtMainMenuConfiguration + + + Main Menu settings + Настройки главного меню + + + + General + Общие + + + + Button text: + Текст кнопки: + + + + Custom font size: + Выбрать кегль: + + + + pt + п + + + + Menu file + Файл меню + + + + Menu file: + Файл меню: + + + + ... + + + + + Keyboard Shortcut + Сочетание клавиш + + + + Click the button to record shortcut: + Нажмите на кнопку для записи сочетания клавиш: + + + + Reset + Сбросить + + + + Choose menu file + Выбрать файл меню + + + + Menu files (*.menu) + Файл меню (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_ru_RU.desktop b/plugin-mainmenu/translations/mainmenu_ru_RU.desktop new file mode 100644 index 0000000..abeb28e --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Меню всех ваших программ. +Name[ru_RU]=Меню приложений diff --git a/plugin-mainmenu/translations/mainmenu_ru_RU.ts b/plugin-mainmenu/translations/mainmenu_ru_RU.ts new file mode 100644 index 0000000..74c0440 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_ru_RU.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + Показать/скрыть главное меню + + + + Leave + Выход + + + + LxQtMainMenuConfiguration + + + Main Menu settings + Настройки главного меню + + + + General + Общие + + + + Button text: + Текст кнопки: + + + + Custom font size: + Выбрать кегль: + + + + pt + п + + + + Menu file + Файл меню + + + + Menu file: + Файл меню: + + + + ... + + + + + Keyboard Shortcut + Сочетание клавиш + + + + Click the button to record shortcut: + Нажмите на кнопку для записи сочетания клавиш: + + + + Reset + Сбросить + + + + Choose menu file + Выбрать файл меню + + + + Menu files (*.menu) + Файл меню (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_sk.desktop b/plugin-mainmenu/translations/mainmenu_sk.desktop new file mode 100644 index 0000000..2d17def --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Spúšťanie aplikácií z menu +Name[sk]=Menu aplikácií diff --git a/plugin-mainmenu/translations/mainmenu_sk_SK.ts b/plugin-mainmenu/translations/mainmenu_sk_SK.ts new file mode 100644 index 0000000..9d943dd --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sk_SK.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Opustiť + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Nastavenia Hlavného menu prostredia LxQt + + + + General + Všeobecné + + + Show text + Zobraziť text + + + Button text + Text tlačidla + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Súbor menu + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + Vybrať súbor menu + + + + Menu files (*.menu) + Súbory menu (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_sl.desktop b/plugin-mainmenu/translations/mainmenu_sl.desktop new file mode 100644 index 0000000..0480879 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Zaganjalnik programov, temelječ na meniju +Name[sl]=Programski meni diff --git a/plugin-mainmenu/translations/mainmenu_sl.ts b/plugin-mainmenu/translations/mainmenu_sl.ts new file mode 100644 index 0000000..30123c6 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sl.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Zapusti + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Nastavitve glavnega menija + + + + General + Splošno + + + Show text + Pokaži besedilo + + + Button text + Besedilo na gumbih + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Datoteka z menijem + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Tipkovna bližnjica + + + + Click the button to record shortcut: + Kliknite gumb za nastavitev bližnjice: + + + + Reset + + + + + Choose menu file + Izberite datoteko z menijem + + + + Menu files (*.menu) + Datoteke z menijem (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_sr.desktop b/plugin-mainmenu/translations/mainmenu_sr.desktop new file mode 100644 index 0000000..487db48 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Мени покретача програма +Name[sr]=Мени програма diff --git a/plugin-mainmenu/translations/mainmenu_sr@ijekavian.desktop b/plugin-mainmenu/translations/mainmenu_sr@ijekavian.desktop new file mode 100644 index 0000000..b90d1f6 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Мени програма +Comment[sr@ijekavian]=Мени покретача програма diff --git a/plugin-mainmenu/translations/mainmenu_sr@ijekavianlatin.desktop b/plugin-mainmenu/translations/mainmenu_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..72d4aff --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Meni programa +Comment[sr@ijekavianlatin]=Meni pokretača programa diff --git a/plugin-mainmenu/translations/mainmenu_sr@latin.desktop b/plugin-mainmenu/translations/mainmenu_sr@latin.desktop new file mode 100644 index 0000000..6e7b8ea --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Meni pokretača programa +Name[sr@latin]=Meni programa diff --git a/plugin-mainmenu/translations/mainmenu_sr@latin.ts b/plugin-mainmenu/translations/mainmenu_sr@latin.ts new file mode 100644 index 0000000..74b72f5 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr@latin.ts @@ -0,0 +1,85 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + + + + + LxQtMainMenuConfiguration + + + General + + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + + + + + Menu file: + + + + + ... + + + + + Keyboard Shortcut + + + + + Click the button to record shortcut: + + + + + Reset + + + + + Choose menu file + + + + + Menu files (*.menu) + + + + diff --git a/plugin-mainmenu/translations/mainmenu_sr_BA.ts b/plugin-mainmenu/translations/mainmenu_sr_BA.ts new file mode 100644 index 0000000..da70ee6 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr_BA.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Напуштање + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Подешавања главног менија + + + + General + Опште + + + Show text + Прикажи текст + + + Button text + Текст тастера + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Фајл менија + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Пречица тастатуре + + + + Click the button to record shortcut: + Кликните на тастер да снимите пречицу: + + + + Reset + + + + + Choose menu file + Изабери фајл менија + + + + Menu files (*.menu) + Фајлови менија (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_sr_RS.ts b/plugin-mainmenu/translations/mainmenu_sr_RS.ts new file mode 100644 index 0000000..0cdf1da --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_sr_RS.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Напуштање + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Подешавања главног менија + + + + General + Опште + + + Show text + Прикажи текст + + + Button text + Текст тастера + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Фајл менија + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Пречица тастатуре + + + + Click the button to record shortcut: + Кликните на тастер да снимите пречицу: + + + + Reset + + + + + Choose menu file + Изабери фајл менија + + + + Menu files (*.menu) + Фајлови менија (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_th_TH.desktop b/plugin-mainmenu/translations/mainmenu_th_TH.desktop new file mode 100644 index 0000000..b5f327b --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=ปุ่มเรียกโปรแกรมพื้นฐานทางเมนู +Name[th_TH]=เมนูโปรแกรม diff --git a/plugin-mainmenu/translations/mainmenu_th_TH.ts b/plugin-mainmenu/translations/mainmenu_th_TH.ts new file mode 100644 index 0000000..225db27 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_th_TH.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + ออก + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + ค่าตั้งเมนูหลัก LxQt + + + + General + ทั่วไป + + + Show text + แสดงข้อความ + + + Button text + ข้อความตรงปุ่ม + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + แฟ้มเมนู + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + ปุ่มลัด + + + + Click the button to record shortcut: + กดปุ่มที่จะใช้เป็นปุ่มลัด: + + + + Reset + + + + + Choose menu file + เลือกแฟ้มเมนู + + + + Menu files (*.menu) + แฟ้มเมนู (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_tr.desktop b/plugin-mainmenu/translations/mainmenu_tr.desktop new file mode 100644 index 0000000..7156143 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Menü temelli uygulama çalıştırıcı +Name[tr]=Uygulama menüsü diff --git a/plugin-mainmenu/translations/mainmenu_tr.ts b/plugin-mainmenu/translations/mainmenu_tr.ts new file mode 100644 index 0000000..1fac717 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_tr.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Çık + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt Ana Menü ayarları + + + + General + Genel + + + Show text + Metin göster + + + Button text + Düğme metni + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Menü dosyası + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Klavye Kısayolu + + + + Click the button to record shortcut: + Kısayolu kaydetmek için düğmeye tıklayın: + + + + Reset + + + + + Choose menu file + Menü dosyası seç + + + + Menu files (*.menu) + Menü dosyaları (*.menü) + + + diff --git a/plugin-mainmenu/translations/mainmenu_uk.desktop b/plugin-mainmenu/translations/mainmenu_uk.desktop new file mode 100644 index 0000000..2a70645 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Меню з усіма програмами. +Name[uk]=Меню програм diff --git a/plugin-mainmenu/translations/mainmenu_uk.ts b/plugin-mainmenu/translations/mainmenu_uk.ts new file mode 100644 index 0000000..29a99fe --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_uk.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + Полишити + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + Налаштування головного меню LxQt + + + + General + Загальне + + + Show text + Показувати текст + + + Button text + Текст кнопки + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + Файл меню + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + Клавіатурне скорочення + + + + Click the button to record shortcut: + Натисніть кнопку, щоб змінити клавіатурне скорочення: + + + + Reset + + + + + Choose menu file + Оберіть файл меню + + + + Menu files (*.menu) + Файли меню (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_zh_CN.GB2312.desktop b/plugin-mainmenu/translations/mainmenu_zh_CN.GB2312.desktop new file mode 100644 index 0000000..6c4d961 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=Menu based application launcher + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mainmenu/translations/mainmenu_zh_CN.desktop b/plugin-mainmenu/translations/mainmenu_zh_CN.desktop new file mode 100644 index 0000000..d8b020c --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=基于菜单的程序启动器 +Name[zh_CN]=程序菜单 diff --git a/plugin-mainmenu/translations/mainmenu_zh_CN.ts b/plugin-mainmenu/translations/mainmenu_zh_CN.ts new file mode 100644 index 0000000..efac34c --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_zh_CN.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + 离开 + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt主菜单设置 + + + + General + 常规 + + + Show text + 显示文本 + + + Button text + 按钮文本 + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + 菜单文件 + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + 键盘快捷键 + + + + Click the button to record shortcut: + 点击按钮记录快捷键 + + + + Reset + + + + + Choose menu file + 选择菜单文件 + + + + Menu files (*.menu) + 菜单文件 (*.menu) + + + diff --git a/plugin-mainmenu/translations/mainmenu_zh_TW.desktop b/plugin-mainmenu/translations/mainmenu_zh_TW.desktop new file mode 100644 index 0000000..aacebcb --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Application menu +Comment=A menu of all your applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=以選單方式呈現的應用程式啟動器 +Name[zh_TW]=應用程式選單 diff --git a/plugin-mainmenu/translations/mainmenu_zh_TW.ts b/plugin-mainmenu/translations/mainmenu_zh_TW.ts new file mode 100644 index 0000000..82cd2b2 --- /dev/null +++ b/plugin-mainmenu/translations/mainmenu_zh_TW.ts @@ -0,0 +1,97 @@ + + + + + LxQtMainMenu + + + Show/hide main menu + + + + + Leave + 離開 + + + + LxQtMainMenuConfiguration + + LxQt Main Menu settings + LxQt主選單設定 + + + + General + 通用 + + + Show text + 顯示文件 + + + Button text + 按鈕文件 + + + + Main Menu settings + + + + + Button text: + + + + + Custom font size: + + + + + pt + + + + + Menu file + 選單文件 + + + + Menu file: + + + + + ... + ... + + + + Keyboard Shortcut + 快捷鍵 + + + + Click the button to record shortcut: + 按下按鈕並設定為快捷鍵: + + + + Reset + + + + + Choose menu file + 選擇選單文件 + + + + Menu files (*.menu) + 選單文件 (*.menu) + + + diff --git a/plugin-mainmenu/xdgcachedmenu.cpp b/plugin-mainmenu/xdgcachedmenu.cpp new file mode 100644 index 0000000..11ac97b --- /dev/null +++ b/plugin-mainmenu/xdgcachedmenu.cpp @@ -0,0 +1,187 @@ +/* + * + * Copyright (C) 2013 + * + * 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 "xdgcachedmenu.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +XdgCachedMenuAction::XdgCachedMenuAction(MenuCacheItem* item, QObject* parent): + QAction(parent), + item_(menu_cache_item_ref(item)) +{ + QString title = QString::fromUtf8(menu_cache_item_get_name(item)); + title = title.replace('&', QLatin1String("&&")); // & is reserved for mnemonics + setText(title); + // Only set tooltips for app items + if(menu_cache_item_get_type(item) == MENU_CACHE_TYPE_APP) + { + QString comment = QString::fromUtf8(menu_cache_item_get_comment(item)); + setToolTip(comment); + } +} + +XdgCachedMenuAction::~XdgCachedMenuAction() +{ + if(item_) + menu_cache_item_unref(item_); +} + +void XdgCachedMenuAction::updateIcon() +{ + if(icon().isNull()) + { + QIcon icon = XdgIcon::fromTheme(menu_cache_item_get_icon(item_)); + setIcon(icon); + } +} + +XdgCachedMenu::XdgCachedMenu(QWidget* parent): QMenu(parent) +{ + connect(this, SIGNAL(aboutToShow()), SLOT(onAboutToShow())); +} + +XdgCachedMenu::XdgCachedMenu(MenuCache* menuCache, QWidget* parent): QMenu(parent) +{ + // qDebug() << "CREATE MENU FROM CACHE" << menuCache; + MenuCacheDir* dir = menu_cache_get_root_dir(menuCache); + addMenuItems(this, dir); + connect(this, SIGNAL(aboutToShow()), SLOT(onAboutToShow())); +} + +XdgCachedMenu::~XdgCachedMenu() +{ +} + +void XdgCachedMenu::addMenuItems(QMenu* menu, MenuCacheDir* dir) +{ + for(GSList* l = menu_cache_dir_get_children(dir); l; l = l->next) + { + MenuCacheItem* item = (MenuCacheItem*)l->data; + MenuCacheType type = menu_cache_item_get_type(item); + + if(type == MENU_CACHE_TYPE_SEP) + { + menu->addSeparator(); + continue; + } + else + { + XdgCachedMenuAction* action = new XdgCachedMenuAction(item, menu); + menu->addAction(action); + if(type == MENU_CACHE_TYPE_APP) + connect(action, SIGNAL(triggered(bool)), SLOT(onItemTrigerred())); + else if(type == MENU_CACHE_TYPE_DIR) + { + XdgCachedMenu* submenu = new XdgCachedMenu(menu); + action->setMenu(submenu); + addMenuItems(submenu, (MenuCacheDir*)item); + } + } + } +} + +void XdgCachedMenu::onItemTrigerred() +{ + XdgCachedMenuAction* action = static_cast(sender()); + XdgDesktopFile df; + char* desktop_file = menu_cache_item_get_file_path(action->item()); + df.load(desktop_file); + g_free(desktop_file); + df.startDetached(); +} + +// taken from libqtxdg: XdgMenuWidget +bool XdgCachedMenu::event(QEvent* event) +{ + if (event->type() == QEvent::MouseButtonPress) + { + QMouseEvent *e = static_cast(event); + if (e->button() == Qt::LeftButton) + mDragStartPosition = e->pos(); + } + + else if (event->type() == QEvent::MouseMove) + { + QMouseEvent *e = static_cast(event); + handleMouseMoveEvent(e); + } + + else if(event->type() == QEvent::ToolTip) + { + QHelpEvent* helpEvent = static_cast(event); + QAction* action = actionAt(helpEvent->pos()); + if(action && action->menu() == NULL) + QToolTip::showText(helpEvent->globalPos(), action->toolTip(), this); + } + + return QMenu::event(event); +} + +// taken from libqtxdg: XdgMenuWidget +void XdgCachedMenu::handleMouseMoveEvent(QMouseEvent *event) +{ + if (!(event->buttons() & Qt::LeftButton)) + return; + + if ((event->pos() - mDragStartPosition).manhattanLength() < QApplication::startDragDistance()) + return; + + XdgCachedMenuAction *a = qobject_cast(actionAt(mDragStartPosition)); + if (!a) + return; + + QList urls; + char* desktop_file = menu_cache_item_get_file_path(a->item()); + urls << QUrl(desktop_file); + g_free(desktop_file); + + QMimeData *mimeData = new QMimeData(); + mimeData->setUrls(urls); + + QDrag *drag = new QDrag(this); + drag->setMimeData(mimeData); + drag->exec(Qt::CopyAction | Qt::LinkAction); +} + +void XdgCachedMenu::onAboutToShow() +{ + Q_FOREACH(QAction* action, actions()) + { + if(action->inherits("XdgCachedMenuAction")) + { + static_cast(action)->updateIcon(); + + // this seems to cause some incorrect menu behaviour. + // qApp->processEvents(); + } + } +} diff --git a/plugin-mainmenu/xdgcachedmenu.h b/plugin-mainmenu/xdgcachedmenu.h new file mode 100644 index 0000000..8da3da3 --- /dev/null +++ b/plugin-mainmenu/xdgcachedmenu.h @@ -0,0 +1,71 @@ +/* + * + * Copyright (C) 2013 + * + * 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 XDGCACHEDMENU_H +#define XDGCACHEDMENU_H + +#include +#include + +class QEvent; +class QMouseEvent; + +class XdgCachedMenu : public QMenu +{ + Q_OBJECT +public: + XdgCachedMenu(QWidget* parent = NULL); + XdgCachedMenu(MenuCache* menuCache, QWidget* parent); + virtual ~XdgCachedMenu(); + +protected: + bool event(QEvent* event); + +private: + void addMenuItems(QMenu* menu, MenuCacheDir* dir); + void handleMouseMoveEvent(QMouseEvent *event); + +private Q_SLOTS: + void onItemTrigerred(); + void onAboutToShow(); + +private: + QPoint mDragStartPosition; +}; + +class XdgCachedMenuAction: public QAction +{ + Q_OBJECT +public: + explicit XdgCachedMenuAction(MenuCacheItem* item, QObject* parent = 0); + virtual ~XdgCachedMenuAction(); + + MenuCacheItem* item() const { + return item_; + } + + void updateIcon(); + +private: + MenuCacheItem* item_; +}; + + +#endif // XDGCACHEDMENU_H diff --git a/plugin-mount/CMakeLists.txt b/plugin-mount/CMakeLists.txt new file mode 100644 index 0000000..9afd7ad --- /dev/null +++ b/plugin-mount/CMakeLists.txt @@ -0,0 +1,48 @@ +set(PLUGIN "mount") + +set(HEADERS + lxqtmountplugin.h + lxqtmountconfiguration.h + mountbutton.h + menudiskitem.h + popup.h + actions/deviceaction.h + actions/deviceaction_info.h + actions/deviceaction_menu.h + actions/deviceaction_nothing.h +) + +set(SOURCES + ${PROJECT_SOURCE_DIR}/panel/lxqtpanelpluginconfigdialog.cpp + lxqtmountplugin.cpp + lxqtmountconfiguration.cpp + mountbutton.cpp + menudiskitem.cpp + popup.cpp + actions/deviceaction.cpp + actions/deviceaction_info.cpp + actions/deviceaction_menu.cpp + actions/deviceaction_nothing.cpp +) + +set(MOCS + ${PROJECT_SOURCE_DIR}/panel/lxqtpanelpluginconfigdialog.h + lxqtmountplugin.h + lxqtmountconfiguration.h + mountbutton.h + menudiskitem.h + popup.h + actions/deviceaction.h + actions/deviceaction_info.h + actions/deviceaction_menu.h + actions/deviceaction_nothing.h +) + +set(UIS + lxqtmountconfiguration.ui +) + +include_directories(${LXQTMOUNT_INCLUDE_DIRS}) +set(LIBRARIES ${QTXDG_LIBRARIES} ${LXQTMOUNT_LIBRARIES}) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-mount/actions/deviceaction.cpp b/plugin-mount/actions/deviceaction.cpp new file mode 100644 index 0000000..1a21e18 --- /dev/null +++ b/plugin-mount/actions/deviceaction.cpp @@ -0,0 +1,105 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "deviceaction.h" +#include "deviceaction_info.h" +#include "deviceaction_menu.h" +#include "deviceaction_nothing.h" + +#include "../menudiskitem.h" +#include "../lxqtmountplugin.h" + +#define ACT_NOTHING "nothing" +#define ACT_INFO "showInfo" +#define ACT_MENU "showMenu" + +#define ACT_NOTHING_UPPER QString(ACT_NOTHING).toUpper() +#define ACT_INFO_UPPER QString(ACT_INFO).toUpper() +#define ACT_MENU_UPPER QString(ACT_MENU).toUpper() + +DeviceAction::DeviceAction(LxQtMountPlugin *plugin, QObject *parent): + mPlugin(plugin) +{ +} + +DeviceAction::~DeviceAction() +{ +} + +DeviceAction *DeviceAction::create(ActionId id, LxQtMountPlugin *plugin, QObject *parent) +{ + switch (id) + { + case ActionNothing: + return new DeviceActionNothing(plugin, parent); + + case ActionInfo: + return new DeviceActionInfo(plugin, parent); + + case ActionMenu: + return new DeviceActionMenu(plugin, parent); + } + + return 0; +} + +QString DeviceAction::actionIdToString(DeviceAction::ActionId id) +{ + switch (id) + { + case ActionNothing: return ACT_NOTHING; + case ActionInfo: return ACT_INFO; + case ActionMenu: return ACT_MENU; + } + + return ACT_INFO; +} + +void DeviceAction::deviceAdded(LxQt::MountDevice *device) +{ + if (MenuDiskItem::isUsableDevice(device)) + doDeviceAdded(device); +} + +void DeviceAction::deviceRemoved(LxQt::MountDevice *device) +{ + if (MenuDiskItem::isUsableDevice(device)) + doDeviceRemoved(device); +} + + +DeviceAction::ActionId DeviceAction::stringToActionId(const QString &string, ActionId defaultValue) +{ + QString s = string.toUpper(); + if (s == ACT_NOTHING_UPPER) return ActionNothing; + if (s == ACT_INFO_UPPER) return ActionInfo; + if (s == ACT_MENU_UPPER) return ActionMenu; + + return defaultValue; +} + diff --git a/plugin-mount/actions/deviceaction.h b/plugin-mount/actions/deviceaction.h new file mode 100644 index 0000000..3cadbcf --- /dev/null +++ b/plugin-mount/actions/deviceaction.h @@ -0,0 +1,71 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DEVICEACTION_H +#define DEVICEACTION_H + +#include +#include +#include + +namespace { +class MountDevice; +class MountManager; +} + +class LxQtMountPlugin; + +class DeviceAction: public QObject +{ + Q_OBJECT +public: + enum ActionId { + ActionNothing, + ActionInfo, + ActionMenu + }; + + virtual ~DeviceAction(); + + static DeviceAction *create(ActionId id, LxQtMountPlugin *plugin, QObject *parent=0); + static ActionId stringToActionId(const QString &string, ActionId defaultValue); + static QString actionIdToString(ActionId id); + +public slots: + void deviceAdded(LxQt::MountDevice *device); + void deviceRemoved(LxQt::MountDevice *device); + +protected: + explicit DeviceAction(LxQtMountPlugin *plugin, QObject *parent=0); + virtual void doDeviceAdded(LxQt::MountDevice *device) = 0; + virtual void doDeviceRemoved(LxQt::MountDevice *device) = 0; + + LxQtMountPlugin *mPlugin; +}; + +#endif // DEVICEACTION_H diff --git a/plugin-mount/actions/deviceaction_info.cpp b/plugin-mount/actions/deviceaction_info.cpp new file mode 100644 index 0000000..725b408 --- /dev/null +++ b/plugin-mount/actions/deviceaction_info.cpp @@ -0,0 +1,61 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "deviceaction_info.h" +#include "../lxqtmountplugin.h" +#include +#include + +DeviceActionInfo::DeviceActionInfo(LxQtMountPlugin *plugin, QObject *parent): + DeviceAction(plugin, parent) +{ + qDebug() << Q_FUNC_INFO; +} + + +void DeviceActionInfo::doDeviceAdded(LxQt::MountDevice *device) +{ + qDebug() << Q_FUNC_INFO; + + showMessage(tr("The device \"%1\" is connected.").arg(device->label())); +} + + +void DeviceActionInfo::doDeviceRemoved(LxQt::MountDevice *device) +{ + qDebug() << Q_FUNC_INFO; + + showMessage(tr("The device \"%1\" is removed.").arg(device->label())); +} + + +void DeviceActionInfo::showMessage(const QString &text) +{ + LxQt::Notification::notify(tr("Removable media/devices manager"), text, mPlugin->icon().name()); +} + diff --git a/plugin-mount/actions/deviceaction_info.h b/plugin-mount/actions/deviceaction_info.h new file mode 100644 index 0000000..d2ca884 --- /dev/null +++ b/plugin-mount/actions/deviceaction_info.h @@ -0,0 +1,52 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DEVICEACTION_INFO_H +#define DEVICEACTION_INFO_H + +#include +#include +#include "deviceaction.h" + +class Popup; + +class DeviceActionInfo : public DeviceAction +{ + Q_OBJECT +public: + explicit DeviceActionInfo(LxQtMountPlugin *plugin, QObject *parent=0); + +protected: + void doDeviceAdded(LxQt::MountDevice *device); + void doDeviceRemoved(LxQt::MountDevice *device); + +private: + void showMessage(const QString &text); +}; + +#endif // DEVICEACTION_INFO_H diff --git a/plugin-mount/actions/deviceaction_menu.cpp b/plugin-mount/actions/deviceaction_menu.cpp new file mode 100644 index 0000000..5b7c1cf --- /dev/null +++ b/plugin-mount/actions/deviceaction_menu.cpp @@ -0,0 +1,57 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "deviceaction_menu.h" +#include "../lxqtmountplugin.h" +#include "../popup.h" + +#include + +DeviceActionMenu::DeviceActionMenu(LxQtMountPlugin *plugin, QObject *parent): + DeviceAction(plugin, parent) +{ + mPopup = plugin->popup(); + + mHideTimer.setSingleShot(true); + mHideTimer.setInterval(5000); + connect(&mHideTimer, SIGNAL(timeout()), mPopup, SLOT(hide())); +} + + +void DeviceActionMenu::doDeviceAdded(LxQt::MountDevice *device) +{ + mHideTimer.start(); + mPopup->show(); +} + + +void DeviceActionMenu::doDeviceRemoved(LxQt::MountDevice *device) +{ + +} + diff --git a/plugin-mount/actions/deviceaction_menu.h b/plugin-mount/actions/deviceaction_menu.h new file mode 100644 index 0000000..3813cb3 --- /dev/null +++ b/plugin-mount/actions/deviceaction_menu.h @@ -0,0 +1,53 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DEVICEACTIONMENU_H +#define DEVICEACTIONMENU_H + +#include +#include +#include "deviceaction.h" + +class Popup; + +class DeviceActionMenu : public DeviceAction +{ + Q_OBJECT +public: + explicit DeviceActionMenu(LxQtMountPlugin *plugin, QObject *parent=0); + +protected: + void doDeviceAdded(LxQt::MountDevice *device); + void doDeviceRemoved(LxQt::MountDevice *device); + +private: + Popup *mPopup; + QTimer mHideTimer; +}; + +#endif // DEVICEACTIONMENU_H diff --git a/plugin-mount/actions/deviceaction_nothing.cpp b/plugin-mount/actions/deviceaction_nothing.cpp new file mode 100644 index 0000000..77b1f3f --- /dev/null +++ b/plugin-mount/actions/deviceaction_nothing.cpp @@ -0,0 +1,45 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "deviceaction_nothing.h" + +DeviceActionNothing::DeviceActionNothing(LxQtMountPlugin *plugin, QObject *parent): + DeviceAction(plugin, parent) +{ +} + + +void DeviceActionNothing::doDeviceAdded(LxQt::MountDevice *device) +{ +} + + +void DeviceActionNothing::doDeviceRemoved(LxQt::MountDevice *device) +{ +} + diff --git a/plugin-mount/actions/deviceaction_nothing.h b/plugin-mount/actions/deviceaction_nothing.h new file mode 100644 index 0000000..4227e5f --- /dev/null +++ b/plugin-mount/actions/deviceaction_nothing.h @@ -0,0 +1,46 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * 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; only version 2 of + * the License is valid for this program. + * + * 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 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef DEVICEACTIONNOTHING_H +#define DEVICEACTIONNOTHING_H + +#include +#include "deviceaction.h" + +class DeviceActionNothing : public DeviceAction +{ + Q_OBJECT +public: + explicit DeviceActionNothing(LxQtMountPlugin *plugin, QObject *parent=0); + +protected: + void doDeviceAdded(LxQt::MountDevice *device); + void doDeviceRemoved(LxQt::MountDevice *device); +}; + +#endif // DEVICEACTIONNOTHING_H diff --git a/plugin-mount/lxqtmountconfiguration.cpp b/plugin-mount/lxqtmountconfiguration.cpp new file mode 100644 index 0000000..8351b3e --- /dev/null +++ b/plugin-mount/lxqtmountconfiguration.cpp @@ -0,0 +1,69 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtmountconfiguration.h" +#include "ui_lxqtmountconfiguration.h" + +#include +#include + +#define ACT_SHOW_MENU "showMenu" +#define ACT_SHOW_INFO "showInfo" +#define ACT_NOTHING "nothing" + +LxQtMountConfiguration::LxQtMountConfiguration(QSettings &settings, QWidget *parent) : + LxQtPanelPluginConfigDialog(settings, parent), + ui(new Ui::LxQtMountConfiguration) +{ + ui->setupUi(this); + ui->devAddedCombo->addItem(tr("Popup menu"), ACT_SHOW_MENU); + ui->devAddedCombo->addItem(tr("Show info"), ACT_SHOW_INFO); + ui->devAddedCombo->addItem(tr("Do nothing"), ACT_NOTHING); + + loadSettings(); + connect(ui->devAddedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(devAddedChanged(int))); + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); +} + +LxQtMountConfiguration::~LxQtMountConfiguration() +{ + delete ui; +} + + +void LxQtMountConfiguration::loadSettings() +{ + setComboboxIndexByData(ui->devAddedCombo, settings().value("newDeviceAction", ACT_SHOW_INFO), 1); +} + + +void LxQtMountConfiguration::devAddedChanged(int index) +{ + QString s = ui->devAddedCombo->itemData(index).toString(); + settings().setValue("newDeviceAction", s); +} diff --git a/plugin-mount/lxqtmountconfiguration.h b/plugin-mount/lxqtmountconfiguration.h new file mode 100644 index 0000000..7801b87 --- /dev/null +++ b/plugin-mount/lxqtmountconfiguration.h @@ -0,0 +1,56 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + + +#ifndef LXQTMOUNTCONFIGURATION_H +#define LXQTMOUNTCONFIGURATION_H + + +#include "../panel/lxqtpanelpluginconfigdialog.h" + +namespace Ui { + class LxQtMountConfiguration; +} + +class LxQtMountConfiguration : public LxQtPanelPluginConfigDialog +{ + Q_OBJECT + +public: + explicit LxQtMountConfiguration(QSettings &settings, QWidget *parent = 0); + ~LxQtMountConfiguration(); + +protected slots: + virtual void loadSettings(); + void devAddedChanged(int index); + +private: + Ui::LxQtMountConfiguration *ui; +}; + +#endif // LXQTMOUNTCONFIGURATION_H diff --git a/plugin-mount/lxqtmountconfiguration.ui b/plugin-mount/lxqtmountconfiguration.ui new file mode 100644 index 0000000..ae6a546 --- /dev/null +++ b/plugin-mount/lxqtmountconfiguration.ui @@ -0,0 +1,96 @@ + + + LxQtMountConfiguration + + + + 0 + 0 + 313 + 144 + + + + Removable Media Settings + + + + + + Behaviour + + + + + + When a device is connected + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 41 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + buttons + accepted() + LxQtMountConfiguration + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttons + rejected() + LxQtMountConfiguration + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/plugin-mount/lxqtmountplugin.cpp b/plugin-mount/lxqtmountplugin.cpp new file mode 100644 index 0000000..379ed03 --- /dev/null +++ b/plugin-mount/lxqtmountplugin.cpp @@ -0,0 +1,116 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtmountplugin.h" +#include "lxqtmountconfiguration.h" +#include +#include "actions/deviceaction.h" +#include "popup.h" +#include "mountbutton.h" + +#include + +LxQtMountPlugin::LxQtMountPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mPopup(NULL), + mMountManager(NULL), + mDeviceAction(0) +{ + mButton = new MountButton(); + connect(mButton, SIGNAL(clicked(bool)), SLOT(buttonClicked())); +} + + +LxQtMountPlugin::~LxQtMountPlugin() +{ + delete mButton; + delete mDeviceAction; +} + + +QWidget *LxQtMountPlugin::widget() +{ + return mButton; +} + + +void LxQtMountPlugin::realign() +{ + if(mPopup) + mPopup->hide(); +} + + +QDialog *LxQtMountPlugin::configureDialog() +{ + if(mPopup) + mPopup->hide(); + LxQtMountConfiguration *configWindow = new LxQtMountConfiguration(*settings()); + configWindow->setAttribute(Qt::WA_DeleteOnClose, true); + return configWindow; +} + + +QIcon LxQtMountPlugin::icon() const +{ + return mButton->icon(); +} + + +void LxQtMountPlugin::settingsChanged() +{ + QString s = settings()->value("newDeviceAction").toString(); + DeviceAction::ActionId actionId = DeviceAction::stringToActionId(s, DeviceAction::ActionMenu); + + delete mDeviceAction; + mDeviceAction = DeviceAction::create(actionId, this); + + if(mMountManager) + { + connect(mMountManager, SIGNAL(deviceAdded(LxQt::MountDevice*)), + mDeviceAction, SLOT(deviceAdded(LxQt::MountDevice*))); + + connect(mMountManager, SIGNAL(deviceRemoved(LxQt::MountDevice*)), + mDeviceAction, SLOT(deviceRemoved(LxQt::MountDevice*))); + } +} + +void LxQtMountPlugin::buttonClicked() +{ + if(!mMountManager) + { + mMountManager = new LxQt::MountManager(this); + mPopup = new Popup(mMountManager, this, mButton); + settingsChanged(); + + connect(mPopup, SIGNAL(visibilityChanged(bool)), mButton, SLOT(setDown(bool))); + mMountManager->update(); + } + mPopup->showHide(); +} diff --git a/plugin-mount/lxqtmountplugin.h b/plugin-mount/lxqtmountplugin.h new file mode 100644 index 0000000..a2e66b5 --- /dev/null +++ b/plugin-mount/lxqtmountplugin.h @@ -0,0 +1,90 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTMOUNTPLUGIN_H +#define LXQTMOUNTPLUGIN_H + +#include "../panel/ilxqtpanelplugin.h" +#include "../panel/lxqtpanel.h" + +namespace LxQt { +class MountManager; +} + +class Popup; +class MountButton; +class DeviceAction; +class QIcon; + +/*! +\author Petr Vanek +*/ +class LxQtMountPlugin : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT + +public: + LxQtMountPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtMountPlugin(); + + virtual QWidget *widget(); + virtual QString themeId() const { return "LxQtMount"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog ; } + void realign(); + QDialog *configureDialog(); + + LxQt::MountManager *mountManager() const { return mMountManager; } + Popup *popup() { return mPopup; } + + QIcon icon() const; + +protected slots: + virtual void settingsChanged(); + void buttonClicked(); + +private: + MountButton *mButton; + Popup *mPopup; + LxQt::MountManager *mMountManager; + DeviceAction *mDeviceAction; +}; + + +class LxQtMountPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtMountPlugin(startupInfo); + } +}; + +#endif diff --git a/plugin-mount/menudiskitem.cpp b/plugin-mount/menudiskitem.cpp new file mode 100644 index 0000000..7f1de72 --- /dev/null +++ b/plugin-mount/menudiskitem.cpp @@ -0,0 +1,186 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include "menudiskitem.h" +#include +#include +#include +#include +#include +#include +#include + +/************************************************ + + ************************************************/ +MenuDiskItem::MenuDiskItem(LxQt::MountDevice *device, QWidget *parent): + QFrame(parent), + mDevice(device) +{ + mDiskButton = new QToolButton(this); + mDiskButton->setObjectName("DiskButton"); + mDiskButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + mDiskButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + connect(mDiskButton, SIGNAL(clicked()), this, SLOT(diskButtonClicked())); + + mEjectButton = new QToolButton(this); + mEjectButton->setObjectName("EjectButton"); + connect(mEjectButton, SIGNAL(clicked()), this, SLOT(ejectButtonClicked())); + + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(mDiskButton); + layout->addWidget(mEjectButton); + this->setLayout(layout); + + layout->setMargin(0); + layout->setSpacing(0); + + mEjectButton->setIcon(XdgIcon::fromTheme("media-eject")); + + connect(device, SIGNAL(destroyed()), + this, SLOT(free())); + + connect(device, SIGNAL(changed()), + this, SLOT(update())); + + connect(device, SIGNAL(mounted()), + this, SLOT(mounted())); + + connect(device, SIGNAL(unmounted()), + this, SLOT(unmounted())); + + update(); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::free() +{ + this->deleteLater(); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::update() +{ + mDiskButton->setIcon(XdgIcon::fromTheme(QStringList() + << mDevice->iconName() + << "drive-removable-media-usb" + )); + + QString label = mDevice->label(); + mDiskButton->setText(label); + + setMountStatus(mDevice->isMounted()); +} + + +/************************************************ + + ************************************************/ +bool MenuDiskItem::isUsableDevice(const LxQt::MountDevice *device) +{ + switch (device->mediaType()) + { + case LxQt::MountDevice::MediaTypeFdd: + return true; + + case LxQt::MountDevice::MediaTypeOptical: + return true; + break; + + case LxQt::MountDevice::MediaTypePartition: + case LxQt::MountDevice::MediaTypeDrive: + return device->isExternal(); + break; + + default: + return false; + } + + return false; +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::setMountStatus(bool is_mount) +{ + mEjectButton->setEnabled(is_mount); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::diskButtonClicked() +{ + if (!mDevice->isMounted()) + mDevice->mount(); + else + mounted(); + + qobject_cast(parent())->hide(); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::mounted() +{ + QDesktopServices::openUrl(QUrl(mDevice->mountPath())); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::ejectButtonClicked() +{ + mDevice->unmount(); + setMountStatus(mDevice->isMounted()); + + qobject_cast(parent())->hide(); +} + + +/************************************************ + + ************************************************/ +void MenuDiskItem::unmounted() +{ + if (mDevice->isEjectable()) + mDevice->eject(); +} + diff --git a/plugin-mount/menudiskitem.h b/plugin-mount/menudiskitem.h new file mode 100644 index 0000000..6e059ee --- /dev/null +++ b/plugin-mount/menudiskitem.h @@ -0,0 +1,67 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef MENUDISKITEM_H +#define MENUDISKITEM_H + +#include + +namespace LxQt { +class MountDevice; +} + +class QToolButton; + +class MenuDiskItem : public QFrame +{ + Q_OBJECT + +public: + explicit MenuDiskItem(LxQt::MountDevice *device, QWidget *parent); + + void setMountStatus(bool is_mount); + + static bool isUsableDevice(const LxQt::MountDevice *device); + +signals: + void error(const QString &msg); + +private slots: + void ejectButtonClicked(); + void diskButtonClicked(); + void update(); + void free(); + void mounted(); + void unmounted(); + +private: + LxQt::MountDevice *mDevice; + QToolButton *mDiskButton; + QToolButton *mEjectButton; +}; + +#endif // MENUDISKITEM_H diff --git a/plugin-mount/mountbutton.cpp b/plugin-mount/mountbutton.cpp new file mode 100644 index 0000000..fa709b6 --- /dev/null +++ b/plugin-mount/mountbutton.cpp @@ -0,0 +1,52 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include + +#include +#include "mountbutton.h" + +MountButton::MountButton(QWidget * parent) : + QToolButton(parent) +{ + setIcon(XdgIcon::fromTheme(QStringList() << "device-notifier" << "drive-removable-media-usb" << "drive-removable-media")); + + setToolTip(tr("Removable media/devices manager")); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); +} + + +MountButton::~MountButton() +{ +} + + +void MountButton::setDown(bool down) +{ + QToolButton::setDown(down); +} diff --git a/plugin-mount/mountbutton.h b/plugin-mount/mountbutton.h new file mode 100644 index 0000000..227da1b --- /dev/null +++ b/plugin-mount/mountbutton.h @@ -0,0 +1,45 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Petr Vanek + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef MOUNTBUTTON_H +#define MOUNTBUTTON_H + +#include + +class MountButton : public QToolButton +{ + Q_OBJECT +public: + MountButton(QWidget *parent = 0); + ~MountButton(); + +public slots: + void setDown(bool down); +}; + +#endif diff --git a/plugin-mount/popup.cpp b/plugin-mount/popup.cpp new file mode 100644 index 0000000..3bd7979 --- /dev/null +++ b/plugin-mount/popup.cpp @@ -0,0 +1,143 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011-2013 Razor team + * Authors: + * Petr Vanek + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include +#include "menudiskitem.h" +#include "popup.h" + + +Popup::Popup(LxQt::MountManager *manager, ILxQtPanelPlugin *plugin, QWidget* parent): + QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::Popup | Qt::X11BypassWindowManagerHint), + mManager(manager), + mPlugin(plugin), + mDisplayCount(0) +{ + + setObjectName("LxQtMountPopup"); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + setLayout(new QVBoxLayout(this)); + layout()->setMargin(0); + + setAttribute(Qt::WA_AlwaysShowToolTips); + + connect(mManager, SIGNAL(deviceAdded(LxQt::MountDevice*)), + this, SLOT(addItem(LxQt::MountDevice*))); + connect(mManager, SIGNAL(deviceRemoved(LxQt::MountDevice*)), + this, SLOT(removeItem(LxQt::MountDevice*))); + + mPlaceholder = new QLabel(tr("No devices are available"), this); + mPlaceholder->setObjectName("NoDiskLabel"); + layout()->addWidget(mPlaceholder); + mPlaceholder->hide(); + + foreach(LxQt::MountDevice *device, mManager->devices()) + { + addItem(device); + } +} + + +MenuDiskItem *Popup::addItem(LxQt::MountDevice *device) +{ + if (MenuDiskItem::isUsableDevice(device)) + { + MenuDiskItem *item = new MenuDiskItem(device, this); + layout()->addWidget(item); + item->setVisible(true); + mDisplayCount++; + if (mDisplayCount != 0) + mPlaceholder->hide(); + + if (isVisible()) + realign(); + return item; + } + else + { + return 0; + } +} + +void Popup::removeItem(LxQt::MountDevice *device) +{ + if (MenuDiskItem::isUsableDevice(device)) + { + mDisplayCount--; + if (mDisplayCount == 0) + mPlaceholder->show(); + } +} + +void Popup::resizeEvent(QResizeEvent *event) +{ + QWidget::resizeEvent(event); + realign(); +} + + +void Popup::showEvent(QShowEvent *event) +{ + if (mDisplayCount == 0) + mPlaceholder->show(); + + realign(); + + this->setFocus(); + this->activateWindow(); + QWidget::showEvent(event); + emit visibilityChanged(true); +} + + +void Popup::hideEvent(QHideEvent *event) +{ + mPlaceholder->hide(); + + QWidget::hideEvent(event); + emit visibilityChanged(false); +} + + +void Popup::realign() +{ + updateGeometry(); + adjustSize(); + + QRect rect = mPlugin->calculatePopupWindowPos(size()); + setGeometry(rect); +} + + +void Popup::showHide() +{ + setHidden(!isHidden()); +} + diff --git a/plugin-mount/popup.h b/plugin-mount/popup.h new file mode 100644 index 0000000..b6395f9 --- /dev/null +++ b/plugin-mount/popup.h @@ -0,0 +1,73 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011-2013 Razor team + * Authors: + * Petr Vanek + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef POPUP_H +#define POPUP_H + +#include +#include "../panel/ilxqtpanelplugin.h" + +namespace LxQt { +class MountManager; +class MountDevice; +} + +class MenuDiskItem; +class QLabel; + +class Popup: public QDialog +{ + Q_OBJECT +public: + explicit Popup(LxQt::MountManager *manager, ILxQtPanelPlugin *plugin, QWidget* parent = 0); + +public slots: + void showHide(); + +signals: + void visibilityChanged(bool visible); + +protected: + void resizeEvent(QResizeEvent *event); + void showEvent(QShowEvent *event); + void hideEvent(QHideEvent *event); + +private slots: + MenuDiskItem *addItem(LxQt::MountDevice *device); + void removeItem(LxQt::MountDevice *device); + +private: + void realign(); + LxQt::MountManager *mManager; + ILxQtPanelPlugin *mPlugin; + QLabel *mPlaceholder; + int mDisplayCount; +}; + +#endif // POPUP_H diff --git a/plugin-mount/resources/mount.desktop.in b/plugin-mount/resources/mount.desktop.in new file mode 100644 index 0000000..4a64eea --- /dev/null +++ b/plugin-mount/resources/mount.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. +Icon=drive-removable-media + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-mount/translations/mount.ts b/plugin-mount/translations/mount.ts new file mode 100644 index 0000000..0f667ce --- /dev/null +++ b/plugin-mount/translations/mount.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_ar.desktop b/plugin-mount/translations/mount_ar.desktop new file mode 100644 index 0000000..641c83e --- /dev/null +++ b/plugin-mount/translations/mount_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=معالج الوسائط القابلة للفصل (يو إس بي و أقراص مدمجة...) +Name[ar]=الوسائط القابلة للفصل diff --git a/plugin-mount/translations/mount_ar.ts b/plugin-mount/translations/mount_ar.ts new file mode 100644 index 0000000..51cab99 --- /dev/null +++ b/plugin-mount/translations/mount_ar.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + الجهاز <b><nobr>"%1"</b> موصول. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + الجهاز <b><nobr>"%1"</b> مفصول. + + + + Removable media/devices manager + مدير الوسائط واﻷقراص القابلة للفصل + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + إعدادات مدير ريزر للوسائط القابلة للفصل + + + + Removable Media Settings + + + + + Behaviour + السلوك + + + + When a device is connected + عند وصل الجهاز + + + + Popup menu + القائمة اﻵنيَّة + + + + Show info + إظهار المعلومات + + + + Do nothing + عدم القيام بأيِّ شيء + + + + MenuDiskItem + + Click to access this device from other applications. + اضغط للوصول إلى هذا الجهاز من تطبيقاتٍ أخرى. + + + Click to eject this disc. + اضغط ﻹخراج هذا القرص. + + + + MountButton + + + Removable media/devices manager + مدير الوسائط واﻷقراص القابلة للفصل + + + The device <b><nobr>"%1"</nobr></b> is connected. + الجهاز <b><nobr>"%1"</b> موصول. + + + The device <b><nobr>"%1"</nobr></b> is removed. + الجهاز <b><nobr>"%1"</b> مفصول. + + + No devices Available. + ﻻ توجد أجهزة. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_cs.desktop b/plugin-mount/translations/mount_cs.desktop new file mode 100644 index 0000000..c8cd61e --- /dev/null +++ b/plugin-mount/translations/mount_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Správa odstranitelných zařízení (USB, CD, DVD, ...) +Name[cs]=Správce zařízení diff --git a/plugin-mount/translations/mount_cs.ts b/plugin-mount/translations/mount_cs.ts new file mode 100644 index 0000000..a3b8abd --- /dev/null +++ b/plugin-mount/translations/mount_cs.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zařízení <b><nobr>"%1"</nobr></b> je zapojeno. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zařízení <b><nobr>"%1"</nobr></b> je odstraněno. + + + + Removable media/devices manager + Správce odstranitelných nosičů/zařízení + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Nastavení správce odstranitelných zařízení + + + + Removable Media Settings + + + + + Behaviour + Chování + + + + When a device is connected + Když je zařízení zapojeno + + + + Popup menu + Ukázat vyskakovací nabídku + + + + Show info + Ukázat informace + + + + Do nothing + Nedělat nic + + + + MenuDiskItem + + Click to access this device from other applications. + Klepněte pro přistoupení k tomuto zařízení z jiných aplikací. + + + Click to eject this disc. + Klepněte pro vysunutí tohoto disku. + + + + MountButton + + + Removable media/devices manager + Správce odstranitelných nosičů/zařízení + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zařízení <b><nobr>"%1"</nobr></b> je zapojeno. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zařízení <b><nobr>"%1"</nobr></b> je odstraněno. + + + No devices Available. + Nejsou dostupná žádná zařízení. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_cs_CZ.desktop b/plugin-mount/translations/mount_cs_CZ.desktop new file mode 100644 index 0000000..1ecdf70 --- /dev/null +++ b/plugin-mount/translations/mount_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Zacházení s odstranitelnými médii (USB, CD, DVD, ...) +Name[cs_CZ]=Odstranitelná média diff --git a/plugin-mount/translations/mount_cs_CZ.ts b/plugin-mount/translations/mount_cs_CZ.ts new file mode 100644 index 0000000..36ad87f --- /dev/null +++ b/plugin-mount/translations/mount_cs_CZ.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zařízení <b><nobr>"%1"</nobr></b> je zapojeno. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zařízení <b><nobr>"%1"</nobr></b> je odstraněno. + + + + Removable media/devices manager + Správce odstranitelných nosičů/zařízení + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Nastavení správce odstranitelných zařízení + + + + Removable Media Settings + + + + + Behaviour + Chování + + + + When a device is connected + Když je zařízení zapojeno + + + + Popup menu + Ukázat vyskakovací nabídku + + + + Show info + Ukázat informace + + + + Do nothing + Nedělat nic + + + + MenuDiskItem + + Click to access this device from other applications. + Klepněte pro přistoupení k tomuto zařízení z jiných aplikací. + + + Click to eject this disc. + Klepněte pro vysunutí tohoto disku. + + + + MountButton + + + Removable media/devices manager + Správce odstranitelných nosičů/zařízení + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zařízení <b><nobr>"%1"</nobr></b> je zapojeno. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zařízení <b><nobr>"%1"</nobr></b> je odstraněno. + + + No devices Available. + Nejsou dostupná žádná zařízení. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_da.desktop b/plugin-mount/translations/mount_da.desktop new file mode 100644 index 0000000..327c68d --- /dev/null +++ b/plugin-mount/translations/mount_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Håndtering af flytbare enheder og medier (USB, CD, DVD, ...) +Name[da]=Flytbare enheder diff --git a/plugin-mount/translations/mount_da.ts b/plugin-mount/translations/mount_da.ts new file mode 100644 index 0000000..682f84a --- /dev/null +++ b/plugin-mount/translations/mount_da.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Enheden <b><nobr>"%1"</nobr></b> er forbundet. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Enheden <b><nobr>"%1"</nobr></b> er fjernet. + + + + Removable media/devices manager + Håndtering af medier/enheder + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LXQt Indstillinger for flytbare medier + + + + Removable Media Settings + + + + + Behaviour + Opførsel + + + + When a device is connected + Når en enhed forbinder + + + + Popup menu + Pop op-menu + + + + Show info + Vis information + + + + Do nothing + Gør intet + + + + MenuDiskItem + + Click to access this device from other applications. + Klik for at tilgå denne enhed fra andre programmer. + + + Click to eject this disc. + Klik for at skubbe disken ud. + + + + MountButton + + + Removable media/devices manager + Håndtering af medier/enheder + + + The device <b><nobr>"%1"</nobr></b> is connected. + Enheden <b><nobr>"%1"</nobr></b> er forbundet. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Enheden <b><nobr>"%1"</nobr></b> er fjernet. + + + No devices Available. + Ingen tilgængelige enheder. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_da_DK.desktop b/plugin-mount/translations/mount_da_DK.desktop new file mode 100644 index 0000000..f2f2ccc --- /dev/null +++ b/plugin-mount/translations/mount_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Håndtering af flytbare enheder (USB, CD, DVD, ...) +Name[da_DK]=Flytbare enheder diff --git a/plugin-mount/translations/mount_da_DK.ts b/plugin-mount/translations/mount_da_DK.ts new file mode 100644 index 0000000..1f0ddfc --- /dev/null +++ b/plugin-mount/translations/mount_da_DK.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Enheden <b><nobr>"%1"</nobr></b> er forbundet. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Enheden <b><nobr>"%1"</nobr></b> er fjernet. + + + + Removable media/devices manager + Håndtering af flytbare medier + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Indstillinger til håndtering af flytbare enheder + + + + Removable Media Settings + + + + + Behaviour + Adfærd + + + + When a device is connected + Når en enhed tilsluttes + + + + Popup menu + Popup menu + + + + Show info + Vis info + + + + Do nothing + Gør ingenting + + + + MenuDiskItem + + Click to access this device from other applications. + Klik for at give adgang fra andre programmer. + + + Click to eject this disc. + Skub ud. + + + + MountButton + + + Removable media/devices manager + Håndtering af flytbare medier + + + The device <b><nobr>"%1"</nobr></b> is connected. + Enheden <b><nobr>"%1"</nobr></b> er forbundet. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Enheden <b><nobr>"%1"</nobr></b> er fjernet. + + + No devices Available. + Ingen enheder tilgængelige. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_de.desktop b/plugin-mount/translations/mount_de.desktop new file mode 100644 index 0000000..e187fcc --- /dev/null +++ b/plugin-mount/translations/mount_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Wechseldatenträger Verwaltung (USB, CD, DVD, ...) +Name[de]=Wechseldatenträger diff --git a/plugin-mount/translations/mount_de.ts b/plugin-mount/translations/mount_de.ts new file mode 100644 index 0000000..1ab39e9 --- /dev/null +++ b/plugin-mount/translations/mount_de.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Das Gerät <b><nobr>"%1"</nobr></b> wurde verbunden. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Das Gerät <b><nobr>"%1"</nobr></b> wurde entfernt. + + + + Removable media/devices manager + Entfernbare Medien-/Geräteverwaltung + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt entfernbare Medienverwaltung-Einstellungen + + + + Removable Media Settings + + + + + Behaviour + Verhalten + + + + When a device is connected + Wenn ein Gerät verbunden wurde + + + + Popup menu + Aufklapp-Menü + + + + Show info + Zeige Informationen + + + + Do nothing + Nichts tun + + + + MenuDiskItem + + Click to access this device from other applications. + Klicken, um auf dieses Gerät von anderen Anwendungen aus zuzugreifen. + + + Click to eject this disc. + Klicken, um diese CD auszuwerfen. + + + + MountButton + + + Removable media/devices manager + Entfernbare Medien-/Geräteverwaltung + + + The device <b><nobr>"%1"</nobr></b> is connected. + Das Gerät <b><nobr>"%1"</nobr></b> wurde verbunden. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Das Gerät <b><nobr>"%1"</nobr></b> wurde entfernt. + + + No devices Available. + Kein Gerät verfügbar. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_de_DE.desktop b/plugin-mount/translations/mount_de_DE.desktop new file mode 100644 index 0000000..26aad74 --- /dev/null +++ b/plugin-mount/translations/mount_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Wechseldatenträger (USB, CD, DVD, ...) +Name[de_DE]=Entfernbare Wechseldatenträger diff --git a/plugin-mount/translations/mount_de_DE.ts b/plugin-mount/translations/mount_de_DE.ts new file mode 100644 index 0000000..2c6c7e0 --- /dev/null +++ b/plugin-mount/translations/mount_de_DE.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Der Datenträger <br><nobr>"%1"</nobr></br> ist verbunden. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Der Datenträger <b><nobr>"%1"</nobr></br> ist entfernt. + + + + Removable media/devices manager + Wechseldatenträger Manager + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt-Wechseldatenträger-Verwalter Einstellungen + + + + Removable Media Settings + + + + + Behaviour + Verhalten + + + + When a device is connected + Wenn ein Datenträger angeschlossen ist + + + + Popup menu + Popup Menü + + + + Show info + Zeige Informationen + + + + Do nothing + Mach nichts + + + + MenuDiskItem + + Click to access this device from other applications. + Klicke um von anderen Anwendungen auf diesen Datenträger zugreifen zu können. + + + Click to eject this disc. + Klicke um den Datenträger auszuwerfen. + + + + MountButton + + + Removable media/devices manager + Wechseldatenträger Manager + + + The device <b><nobr>"%1"</nobr></b> is connected. + Der Datenträger <br><nobr>"%1"</nobr></br> ist verbunden. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Der Datenträger <b><nobr>"%1"</nobr></br> ist entfernt. + + + No devices Available. + Kein Datenträger verfügbar. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_el_GR.desktop b/plugin-mount/translations/mount_el_GR.desktop new file mode 100644 index 0000000..163cca5 --- /dev/null +++ b/plugin-mount/translations/mount_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Διαχείριση αφαιρούμενων μέσων (USB, CD, DVD, ...) +Name[el_GR]=Αφαιρούμενα μέσα diff --git a/plugin-mount/translations/mount_el_GR.ts b/plugin-mount/translations/mount_el_GR.ts new file mode 100644 index 0000000..4240eca --- /dev/null +++ b/plugin-mount/translations/mount_el_GR.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Συνδέθηκε η συσκευή <b><nobr>"%1"</nobr></b>. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Αφαιρέθηκε η συσκευή <b><nobr>"%1"</nobr></b>. + + + + Removable media/devices manager + Διαχειριστής αφαιρούμενων μέσων/συσκευών + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Ρυθμίσεις διαχειριστή αφαιρούμενων μέσων LxQt + + + + Removable Media Settings + + + + + Behaviour + Συμπεριφορά + + + + When a device is connected + Όταν μια συσκευή συνδέεται + + + + Popup menu + Αναδυόμενο μενού + + + + Show info + Εμφάνιση πληροφοριών + + + + Do nothing + Καμία ενέργεια + + + + MenuDiskItem + + Click to access this device from other applications. + Κλίκ για πρόσβαση σε αυτή τη συσκευή από άλλες εφαρμογές. + + + Click to eject this disc. + Κλίκ για εξαγωγή αυτού του δίσκου. + + + + MountButton + + + Removable media/devices manager + Διαχειριστής αφαιρούμενων μέσων/συσκευών + + + The device <b><nobr>"%1"</nobr></b> is connected. + Συνδέθηκε η συσκευή <b><nobr>"%1"</nobr></b>. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Αφαιρέθηκε η συσκευή <b><nobr>"%1"</nobr></b>. + + + No devices Available. + Καμία διαθέσιμη συσκευή. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_eo.desktop b/plugin-mount/translations/mount_eo.desktop new file mode 100644 index 0000000..b04760d --- /dev/null +++ b/plugin-mount/translations/mount_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Traktilo de demeteblaj aparatoj (USB, KD, DVD, ...) +Name[eo]=Demetebla datumportilo diff --git a/plugin-mount/translations/mount_eo.ts b/plugin-mount/translations/mount_eo.ts new file mode 100644 index 0000000..b693a41 --- /dev/null +++ b/plugin-mount/translations/mount_eo.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + La aparato <b><nobr>"%1"</nobr></b> estas konektita. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + La aparato <b><nobr>"%1"</nobr></b> estas demetita. + + + + Removable media/devices manager + Mastrumilo de demeteblaj aparatoj + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Agordoj de la mastrumilo de dementeblaj aparatoj de LxQt + + + + Removable Media Settings + + + + + Behaviour + Konduto + + + + When a device is connected + Kiam aparato estas konektita + + + + Popup menu + Ŝprucfenestra menuo + + + + Show info + Montri informojn + + + + Do nothing + Fari nenion + + + + MenuDiskItem + + Click to access this device from other applications. + Alklaku por atingi al ĉi tiu aparato el aliaj aplikaĵoj. + + + Click to eject this disc. + Alklaku por elĵeti ĉi tiun diskon. + + + + MountButton + + + Removable media/devices manager + Mastrumilo de demeteblaj aparatoj + + + The device <b><nobr>"%1"</nobr></b> is connected. + La aparato <b><nobr>"%1"</nobr></b> estas konektita. + + + The device <b><nobr>"%1"</nobr></b> is removed. + La aparato <b><nobr>"%1"</nobr></b> estas demetita. + + + No devices Available. + Neniu disponebla aparato. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_es.desktop b/plugin-mount/translations/mount_es.desktop new file mode 100644 index 0000000..e1aafaa --- /dev/null +++ b/plugin-mount/translations/mount_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Manejador de dispositivos desmontables (USB, CD, DVD, ...) +Name[es]=Dispositivos desmontables diff --git a/plugin-mount/translations/mount_es.ts b/plugin-mount/translations/mount_es.ts new file mode 100644 index 0000000..d6ecda5 --- /dev/null +++ b/plugin-mount/translations/mount_es.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Se conectó el dispositivo <b><nobr>"%1"</nobr></b>. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Se expulsó el dispositivo <b><nobr>"%1"</nobr></b>. + + + + Removable media/devices manager + Gestor de medios y dispositivos extraíbles + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Configuración del gestor de medios extraíbles de LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamiento + + + + When a device is connected + Cuando un dispositivo se conecte + + + + Popup menu + Menú contextual + + + + Show info + Mostrar información + + + + Do nothing + No hacer nada + + + + MenuDiskItem + + Click to access this device from other applications. + Haga clic para acceder a este dispositivo desde otras aplicaciones. + + + Click to eject this disc. + Haga clic para expulsar este disco. + + + + MountButton + + + Removable media/devices manager + Gestor de medios y dispositivos extraíbles + + + The device <b><nobr>"%1"</nobr></b> is connected. + Se conectó el dispositivo <b><nobr>"%1"</nobr></b>. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Se expulsó el dispositivo <b><nobr>"%1"</nobr></b>. + + + No devices Available. + No hay dispositivos disponibles. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_es_UY.ts b/plugin-mount/translations/mount_es_UY.ts new file mode 100644 index 0000000..2fb2bf5 --- /dev/null +++ b/plugin-mount/translations/mount_es_UY.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + El dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + El dispositivo <b><nobr>"%1"</nobr></b> fue quitado. + + + + Removable media/devices manager + Administrador de dispositivos desmontables + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Configuración de dispositivos desmontables LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamiento + + + + When a device is connected + Cuando un dispositivo es conectado + + + + Popup menu + Menú emergente + + + + Show info + Mostrar información + + + + Do nothing + No hacer nada + + + + MenuDiskItem + + Click to access this device from other applications. + Presione para acceder a este dispositivo desde otras aplicaciones. + + + Click to eject this disc. + Presione para expulsar este disco. + + + + MountButton + + + Removable media/devices manager + Administrador de dispositivos desmontables + + + The device <b><nobr>"%1"</nobr></b> is connected. + El dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + The device <b><nobr>"%1"</nobr></b> is removed. + El dispositivo <b><nobr>"%1"</nobr></b> fue quitado. + + + No devices Available. + No hay dispositivos disponibles. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_es_VE.desktop b/plugin-mount/translations/mount_es_VE.desktop new file mode 100644 index 0000000..bc62fb2 --- /dev/null +++ b/plugin-mount/translations/mount_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Manejador de dispositivos removibles (USB, DVD, CAM, ..) +Name[es_VE]=Dispositivos diff --git a/plugin-mount/translations/mount_es_VE.ts b/plugin-mount/translations/mount_es_VE.ts new file mode 100644 index 0000000..1f6554a --- /dev/null +++ b/plugin-mount/translations/mount_es_VE.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + El dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + El dispositivo <b><nobr>"%1"</nobr></b> fue quitado. + + + + Removable media/devices manager + Administrador de medios y dispositivos + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Configuración de manejador de dispositivos LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamiento + + + + When a device is connected + Cuando un dispositivo es conectado + + + + Popup menu + Menú emergente + + + + Show info + Mostrar información + + + + Do nothing + No hacer nada + + + + MenuDiskItem + + Click to access this device from other applications. + Presione para acceder a este dispositivo desde la palicacion por defecto. + + + Click to eject this disc. + Presione para expulsar este disco. + + + + MountButton + + + Removable media/devices manager + Administrador de medios y dispositivos + + + The device <b><nobr>"%1"</nobr></b> is connected. + El dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + The device <b><nobr>"%1"</nobr></b> is removed. + El dispositivo <b><nobr>"%1"</nobr></b> fue quitado. + + + No devices Available. + No hay dispositivos disponibles. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_eu.desktop b/plugin-mount/translations/mount_eu.desktop new file mode 100644 index 0000000..8c1bc79 --- /dev/null +++ b/plugin-mount/translations/mount_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Gailu aldagarrien maneiatzailea (USB, CD, DVD, ...) +Name[eu]=Gailu aldagarria diff --git a/plugin-mount/translations/mount_eu.ts b/plugin-mount/translations/mount_eu.ts new file mode 100644 index 0000000..6515b0e --- /dev/null +++ b/plugin-mount/translations/mount_eu.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + <b><nobr>"%1"</nobr></b>gailua konektatuta. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + <b><nobr>"%1"</nobr></b>gailua kenduta. + + + + Removable media/devices manager + Eduki/gailu aldagarrien kudeatzailea + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt gailu aldagarrien kudeatzailearen ezarpenak + + + + Removable Media Settings + + + + + Behaviour + Portaera + + + + When a device is connected + Gailu bat konektatzean + + + + Popup menu + Laster-menua + + + + Show info + Erakutsi informazioa + + + + Do nothing + Ez egin ezer + + + + MenuDiskItem + + Click to access this device from other applications. + Klikatu gailu hau beste aplikazioetatik atzitzeko. + + + Click to eject this disc. + Klikatu diskoa egozteko. + + + + MountButton + + + Removable media/devices manager + Eduki/gailu aldagarrien kudeatzailea + + + The device <b><nobr>"%1"</nobr></b> is connected. + <b><nobr>"%1"</nobr></b>gailua konektatuta. + + + The device <b><nobr>"%1"</nobr></b> is removed. + <b><nobr>"%1"</nobr></b>gailua kenduta. + + + No devices Available. + Gailurik ez erabilgarri. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_fi.desktop b/plugin-mount/translations/mount_fi.desktop new file mode 100644 index 0000000..6b253df --- /dev/null +++ b/plugin-mount/translations/mount_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Irrotettavien laitteiden ja medioiden käsittelijä (USB, CD, DVD...) +Name[fi]=Irrotettavat laitteet ja mediat diff --git a/plugin-mount/translations/mount_fi.ts b/plugin-mount/translations/mount_fi.ts new file mode 100644 index 0000000..22fe06d --- /dev/null +++ b/plugin-mount/translations/mount_fi.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Laite <b><nobr>"%1"</nobr></b> on liitetty. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Laite <b><nobr>"%1"</nobr></b> on irrotettu. + + + + Removable media/devices manager + Irrotettavien laitteiden ja levyjen hallinta + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQtin irrotettavien laitteiden asetukset + + + + Removable Media Settings + + + + + Behaviour + Toiminta + + + + When a device is connected + Kun laite liitetään + + + + Popup menu + Näytä valikko + + + + Show info + Näytä tiedot + + + + Do nothing + Älä tee mitään + + + + MenuDiskItem + + Click to access this device from other applications. + Napsauta käyttääksesi tätä laitetta muilla sovelluksilla. + + + Click to eject this disc. + Napsauta poistaaksesi tämän levyn. + + + + MountButton + + + Removable media/devices manager + Irrotettavien laitteiden ja levyjen hallinta + + + The device <b><nobr>"%1"</nobr></b> is connected. + Laite <b><nobr>"%1"</nobr></b> on liitetty. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Laite <b><nobr>"%1"</nobr></b> on irrotettu. + + + No devices Available. + Ei laitteita saatavilla. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_fr_FR.desktop b/plugin-mount/translations/mount_fr_FR.desktop new file mode 100644 index 0000000..f2de564 --- /dev/null +++ b/plugin-mount/translations/mount_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Gestionnaire de médias amovibles (USB, CD, DVD, ...) +Name[fr_FR]=Média amovible diff --git a/plugin-mount/translations/mount_fr_FR.ts b/plugin-mount/translations/mount_fr_FR.ts new file mode 100644 index 0000000..5706bbf --- /dev/null +++ b/plugin-mount/translations/mount_fr_FR.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Le périphérique <b><nobr>"%1"</nobr></b>est connecté. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Le périphérique <b><nobr>"%1"</nobr></b> a été retiré. + + + + Removable media/devices manager + Gestionnaire de médias/périphériques amovibles + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Paramètres du gestionnaire de médias amovibles + + + + Removable Media Settings + + + + + Behaviour + Comportement + + + + When a device is connected + Quand un périphérique est connecté + + + + Popup menu + Menu pop-up + + + + Show info + Montrer les informations + + + + Do nothing + Ne rien faire + + + + MenuDiskItem + + Click to access this device from other applications. + Cliquez pour accéder à ce périphérique depuis d'autres applications. + + + Click to eject this disc. + Cliquez pour éjecter ce disque. + + + + MountButton + + + Removable media/devices manager + Gestionnaire de médias/périphériques amovibles + + + The device <b><nobr>"%1"</nobr></b> is connected. + Le périphérique <b><nobr>"%1"</nobr></b>est connecté. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Le périphérique <b><nobr>"%1"</nobr></b> a été retiré. + + + No devices Available. + Aucun périphérique disponible. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_hu.desktop b/plugin-mount/translations/mount_hu.desktop new file mode 100644 index 0000000..877d885 --- /dev/null +++ b/plugin-mount/translations/mount_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Cserélhetőeszköz-kezelő (USB, CD, DVD, …) +Name[hu]=Cserélhető eszköz diff --git a/plugin-mount/translations/mount_hu.ts b/plugin-mount/translations/mount_hu.ts new file mode 100644 index 0000000..52d99b0 --- /dev/null +++ b/plugin-mount/translations/mount_hu.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_hu_HU.ts b/plugin-mount/translations/mount_hu_HU.ts new file mode 100644 index 0000000..84c8f3d --- /dev/null +++ b/plugin-mount/translations/mount_hu_HU.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + A(z) <b><nobr>„%1”</nobr></b> eszköz csatlakoztatva. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + A(z) <b><nobr>„%1”</nobr></b> eszköz eltávolítva. + + + + Removable media/devices manager + Cserélhetőeszköz-kezelő + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + A LxQt cserélhetőeszköz-kezelő beállításai + + + + Removable Media Settings + + + + + Behaviour + Működés + + + + When a device is connected + Ha az eszköz csatlakoztatva van + + + + Popup menu + Felugró menü + + + + Show info + Információ megjelenítése + + + + Do nothing + Ne tegyen semmit + + + + MenuDiskItem + + Click to access this device from other applications. + Kattintson az eszköz más alkalmazásokból való eléréséhez. + + + Click to eject this disc. + Kattintson a lemez kiadásához. + + + + MountButton + + + Removable media/devices manager + Cserélhetőeszköz-kezelő + + + The device <b><nobr>"%1"</nobr></b> is connected. + A(z) <b><nobr>„%1”</nobr></b> eszköz csatlakoztatva. + + + The device <b><nobr>"%1"</nobr></b> is removed. + A(z) <b><nobr>„%1”</nobr></b> eszköz eltávolítva. + + + No devices Available. + Nem érhetők el eszközök. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_ia.desktop b/plugin-mount/translations/mount_ia.desktop new file mode 100644 index 0000000..15f0263 --- /dev/null +++ b/plugin-mount/translations/mount_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Removable media handler (USB, CD, DVD, ...) + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mount/translations/mount_ia.ts b/plugin-mount/translations/mount_ia.ts new file mode 100644 index 0000000..1f569ee --- /dev/null +++ b/plugin-mount/translations/mount_ia.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_id_ID.desktop b/plugin-mount/translations/mount_id_ID.desktop new file mode 100644 index 0000000..15f0263 --- /dev/null +++ b/plugin-mount/translations/mount_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Removable media handler (USB, CD, DVD, ...) + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mount/translations/mount_id_ID.ts b/plugin-mount/translations/mount_id_ID.ts new file mode 100644 index 0000000..ea71dc0 --- /dev/null +++ b/plugin-mount/translations/mount_id_ID.ts @@ -0,0 +1,82 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MenuDiskItem + + Click to access this device from other applications. + Klik untuk mengakses device ini dari aplikasi lain. + + + Click to eject this disc. + Klik untuk mengeluarkan disk ini. + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_it_IT.desktop b/plugin-mount/translations/mount_it_IT.desktop new file mode 100644 index 0000000..5b1a514 --- /dev/null +++ b/plugin-mount/translations/mount_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Gestore dei dispositivi rimovibili (USB, CD, DVD, ...) +Name[it_IT]=Dispositivi rimovibili diff --git a/plugin-mount/translations/mount_it_IT.ts b/plugin-mount/translations/mount_it_IT.ts new file mode 100644 index 0000000..50ec821 --- /dev/null +++ b/plugin-mount/translations/mount_it_IT.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Il dispositivo <b><nobr>"%1"</nobr></b> è connesso. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Il dispositivo <b><nobr>"%1"</nobr></b> è stato rimosso. + + + + Removable media/devices manager + Gestore dei dispositivi rimovibili + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Impostazioni del gestore dei dispositivi rimovibili di LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamento + + + + When a device is connected + Quando un dispositivo è connesso + + + + Popup menu + Menu a comparsa + + + + Show info + Mostra informazioni + + + + Do nothing + Non fare nulla + + + + MenuDiskItem + + Click to access this device from other applications. + Fai clic per accedere al dispositivo da altre applicazioni. + + + Click to eject this disc. + Fai clic per espellere il disco. + + + + MountButton + + + Removable media/devices manager + Gestore dei dispositivi rimovibili + + + The device <b><nobr>"%1"</nobr></b> is connected. + Il dispositivo <b><nobr>"%1"</nobr></b> è connesso. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Il dispositivo <b><nobr>"%1"</nobr></b> è stato rimosso. + + + No devices Available. + Nessun dispositivo disponibile. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_ja.desktop b/plugin-mount/translations/mount_ja.desktop new file mode 100644 index 0000000..213cd62 --- /dev/null +++ b/plugin-mount/translations/mount_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=USBや光学ドライブのマウントやアンマウントを容易にします +Name[ja]=リムーバルメディア diff --git a/plugin-mount/translations/mount_ja.ts b/plugin-mount/translations/mount_ja.ts new file mode 100644 index 0000000..4ceebac --- /dev/null +++ b/plugin-mount/translations/mount_ja.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + デバイス <b><nobr>"%1"</nobr></b> は接続されました + + + + The device <b><nobr>"%1"</nobr></b> is removed. + デバイス <b><nobr>"%1"</nobr></b> は接続解除されました + + + + Removable media/devices manager + リムーバルメディア/デバイスの管理 + + + + LxQtMountConfiguration + + + Removable Media Settings + リムーバブルメディアの設定 + + + + Behaviour + 挙動 + + + + When a device is connected + デバイスが接続されたとき + + + + Popup menu + メニューをポップアップ + + + + Show info + 情報を表示 + + + + Do nothing + 何もしない + + + + MountButton + + + Removable media/devices manager + リムーバルメディア/デバイスの管理 + + + + Popup + + + No devices are available + 接続可能なデバイスはありません + + + diff --git a/plugin-mount/translations/mount_ko.desktop b/plugin-mount/translations/mount_ko.desktop new file mode 100644 index 0000000..15f0263 --- /dev/null +++ b/plugin-mount/translations/mount_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Removable media handler (USB, CD, DVD, ...) + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mount/translations/mount_ko.ts b/plugin-mount/translations/mount_ko.ts new file mode 100644 index 0000000..016e1d2 --- /dev/null +++ b/plugin-mount/translations/mount_ko.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_lt.desktop b/plugin-mount/translations/mount_lt.desktop new file mode 100644 index 0000000..03fbaf8 --- /dev/null +++ b/plugin-mount/translations/mount_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Pašalinimų įrenginių tvarkymas (USB, CD, DVD, ...) +Name[lt]=Pašalinami įrenginiai diff --git a/plugin-mount/translations/mount_lt.ts b/plugin-mount/translations/mount_lt.ts new file mode 100644 index 0000000..20b705a --- /dev/null +++ b/plugin-mount/translations/mount_lt.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Įrenginys <b><nobr>"%1"</nobr></b> prijungtas. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Įrenginys <b><nobr>"%1"</nobr></b> pašalintas + + + + Removable media/devices manager + Pašalinamų įrenginių tvarkytuvė + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt pašalinamų įrenginių tvarkytuvės nuostatos + + + + Removable Media Settings + + + + + Behaviour + Elgsena + + + + When a device is connected + Prijungus įrenginį + + + + Popup menu + Iškylantis meniu + + + + Show info + Rodyti informaciją + + + + Do nothing + Nieko nedaryti + + + + MenuDiskItem + + Click to access this device from other applications. + Norėdami šį įrenginį pasiekti kitomis programomis, spragtelėkite. + + + Click to eject this disc. + Norėdami išstumti diską, spragtelėkite. + + + + MountButton + + + Removable media/devices manager + Pašalinamų įrenginių tvarkytuvė + + + The device <b><nobr>"%1"</nobr></b> is connected. + Įrenginys <b><nobr>"%1"</nobr></b> prijungtas. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Įrenginys <b><nobr>"%1"</nobr></b> pašalintas + + + No devices Available. + Įrenginių nėra + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_nl.desktop b/plugin-mount/translations/mount_nl.desktop new file mode 100644 index 0000000..8bc1779 --- /dev/null +++ b/plugin-mount/translations/mount_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Verwijderbare media beheerder (USB, CD, DVD, ...) +Name[nl]=Verwijderbare media diff --git a/plugin-mount/translations/mount_nl.ts b/plugin-mount/translations/mount_nl.ts new file mode 100644 index 0000000..3fed200 --- /dev/null +++ b/plugin-mount/translations/mount_nl.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Het apparaat <b><nobr>"%1"</nobr></b> is verbonden. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Het apparaat <b><nobr>"%1"</nobr></b> is verwijderd. + + + + Removable media/devices manager + Beheerder van verwijderbare media/apparaten + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Instellingen voor beheerder van verwijderbare media in LxQt + + + + Removable Media Settings + + + + + Behaviour + Gedrag + + + + When a device is connected + Wanneer een apparaat wordt verbonden + + + + Popup menu + Opduikmenu + + + + Show info + Toon informatie + + + + Do nothing + Niets doen + + + + MenuDiskItem + + Click to access this device from other applications. + Klik om dit apparaat te benaderen vanuit andere toepassingen. + + + Click to eject this disc. + Klik om deze schijf uit te werpen. + + + + MountButton + + + Removable media/devices manager + Beheerder van verwijderbare media/apparaten + + + The device <b><nobr>"%1"</nobr></b> is connected. + Het apparaat <b><nobr>"%1"</nobr></b> is verbonden. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Het apparaat <b><nobr>"%1"</nobr></b> is verwijderd. + + + No devices Available. + Geen apparaten beschikbaar. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_pl.desktop b/plugin-mount/translations/mount_pl.desktop new file mode 100644 index 0000000..4b55fab --- /dev/null +++ b/plugin-mount/translations/mount_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Menedżer urządzeń (USB, CD, DVD, ...) +Name[pl]=Menedżer urządzeń diff --git a/plugin-mount/translations/mount_pl_PL.desktop b/plugin-mount/translations/mount_pl_PL.desktop new file mode 100644 index 0000000..a2f14a9 --- /dev/null +++ b/plugin-mount/translations/mount_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Nośniki wymienne (USB, CD, DVD, ...) +Name[pl_PL]=Nośniki wymienne diff --git a/plugin-mount/translations/mount_pl_PL.ts b/plugin-mount/translations/mount_pl_PL.ts new file mode 100644 index 0000000..8119b92 --- /dev/null +++ b/plugin-mount/translations/mount_pl_PL.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Nośnik <b><nobr>"%1"</nobr></b> jest podłączony. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Nośnik <b><nobr>"%1"</nobr></b> jest odłączony. + + + + Removable media/devices manager + Menedżer nośników wymiennych + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Ustawienia menedżera nośników wymiennych + + + + Removable Media Settings + + + + + Behaviour + Zachowanie + + + + When a device is connected + Kiedy nośnik jest podłączony + + + + Popup menu + Pokaż listę + + + + Show info + Pokaż informacje + + + + Do nothing + Nic nierób + + + + MenuDiskItem + + Click to access this device from other applications. + Kliknij aby uzyskać dostęp do tego nośnika z innych aplikacji. + + + Click to eject this disc. + Kliknij aby wysunąć ten dysk. + + + + MountButton + + + Removable media/devices manager + Menedżer nośników wymiennych + + + The device <b><nobr>"%1"</nobr></b> is connected. + Nośnik <b><nobr>"%1"</nobr></b> jest podłączony. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Nośnik <b><nobr>"%1"</nobr></b> jest odłączony. + + + No devices Available. + Brak nośników. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_pt.desktop b/plugin-mount/translations/mount_pt.desktop new file mode 100644 index 0000000..a6ba0de --- /dev/null +++ b/plugin-mount/translations/mount_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Discos amovíveis +Comment[pt]=Montar e desmontar discos óticos e unidades USB. diff --git a/plugin-mount/translations/mount_pt.ts b/plugin-mount/translations/mount_pt.ts new file mode 100644 index 0000000..6c2ef05 --- /dev/null +++ b/plugin-mount/translations/mount_pt.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + O dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + O dispositivo <b><nobr>"%1"</nobr></b> foi removido. + + + + Removable media/devices manager + Gestor de discos e unidades amovíveis + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Definições do gestor de unidades e discos amovíveis do LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamento + + + + When a device is connected + Ao conectar um dispositivo + + + + Popup menu + Menu + + + + Show info + Mostrar informações + + + + Do nothing + Nada fazer + + + + MenuDiskItem + + Click to access this device from other applications. + Clique para aceder a este dispositivo a partir de outras aplicações. + + + Click to eject this disc. + Clique para ejetar este disco. + + + + MountButton + + + Removable media/devices manager + Gestor de discos e unidades amovíveis + + + The device <b><nobr>"%1"</nobr></b> is connected. + O dispositivo <b><nobr>"%1"</nobr></b> está conectado. + + + The device <b><nobr>"%1"</nobr></b> is removed. + O dispositivo <b><nobr>"%1"</nobr></b> foi removido. + + + No devices Available. + Nenhum dispositivo. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_pt_BR.desktop b/plugin-mount/translations/mount_pt_BR.desktop new file mode 100644 index 0000000..cfb8564 --- /dev/null +++ b/plugin-mount/translations/mount_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Manipulador de mídia removível (USB, CD, DVD, ...) +Name[pt_BR]=Mídia removível diff --git a/plugin-mount/translations/mount_pt_BR.ts b/plugin-mount/translations/mount_pt_BR.ts new file mode 100644 index 0000000..ca1cb04 --- /dev/null +++ b/plugin-mount/translations/mount_pt_BR.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + O dispositivo <b><nobr>"%1"</nobr></br> está conectado. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + O dispositivo <b><nobr>"%1"</nobr></br> foi removido. + + + + Removable media/devices manager + Gerenciador de dispositivos/mídias removíveis + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Configurações do gerenciador de mídia removível do LxQt + + + + Removable Media Settings + + + + + Behaviour + Comportamento + + + + When a device is connected + Quando o dispositivo for conectado + + + + Popup menu + Menu de contexto + + + + Show info + Exibir informações + + + + Do nothing + Não fazer nada + + + + MenuDiskItem + + Click to access this device from other applications. + Clique para acessar este dispositivo a partir de outros aplicativos. + + + Click to eject this disc. + Clique para ejetar este disco. + + + + MountButton + + + Removable media/devices manager + Gerenciador de dispositivos/mídias removíveis + + + The device <b><nobr>"%1"</nobr></b> is connected. + O dispositivo <b><nobr>"%1"</nobr></br> está conectado. + + + The device <b><nobr>"%1"</nobr></b> is removed. + O dispositivo <b><nobr>"%1"</nobr></br> foi removido. + + + No devices Available. + Nenhum dispositivo disponível. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_ro_RO.desktop b/plugin-mount/translations/mount_ro_RO.desktop new file mode 100644 index 0000000..73da7c6 --- /dev/null +++ b/plugin-mount/translations/mount_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Administrator de dispozitive detașabile (USB, CD, DVD, ...) +Name[ro_RO]=Dispozitive detașabile diff --git a/plugin-mount/translations/mount_ro_RO.ts b/plugin-mount/translations/mount_ro_RO.ts new file mode 100644 index 0000000..dc7e5b7 --- /dev/null +++ b/plugin-mount/translations/mount_ro_RO.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Dispozitivul <b><nobr>"%1"</nobr></b> a fost conectat. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Dispozitivul <b><nobr>"%1"</nobr></b> a fost eliminat. + + + + Removable media/devices manager + Administrator medii/dispozitive detașabile + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Configurație Administrator medii detașabile + + + + Removable Media Settings + + + + + Behaviour + Comportament + + + + When a device is connected + Când este conectat un dispozitiv + + + + Popup menu + Meniu popup + + + + Show info + Afișează informații + + + + Do nothing + Nicio acțiune + + + + MenuDiskItem + + Click to access this device from other applications. + Apăsați pentru a accesa acest dispozitiv din alte aplicații. + + + Click to eject this disc. + Clic pentru a scoate acest disc. + + + + MountButton + + + Removable media/devices manager + Administrator medii/dispozitive detașabile + + + The device <b><nobr>"%1"</nobr></b> is connected. + Dispozitivul <b><nobr>"%1"</nobr></b> a fost conectat. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Dispozitivul <b><nobr>"%1"</nobr></b> a fost eliminat. + + + No devices Available. + Nu este disponibil nici un dispozitiv. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_ru.desktop b/plugin-mount/translations/mount_ru.desktop new file mode 100644 index 0000000..562dbb3 --- /dev/null +++ b/plugin-mount/translations/mount_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Простое подключение и отключение USB и оптических приводов. +Name[ru_RU]=Съёмные устройства diff --git a/plugin-mount/translations/mount_ru.ts b/plugin-mount/translations/mount_ru.ts new file mode 100644 index 0000000..6ef7a60 --- /dev/null +++ b/plugin-mount/translations/mount_ru.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Устройство <b><nobr>«%1»</nobr></b> подключено. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Устройство <b><nobr>«%1»</nobr></b> отключено. + + + + Removable media/devices manager + Диспетчер отключаемых медиа/устройств + + + + LxQtMountConfiguration + + + Removable Media Settings + Настройки съёмных устройств + + + + Behaviour + Поведение + + + + When a device is connected + Когда устройство подключено + + + + Popup menu + Всплывающее меню + + + + Show info + Показать информацию + + + + Do nothing + Ничего не делать + + + + MountButton + + + Removable media/devices manager + Диспетчер съёмных медиа/устройств + + + + Popup + + + No devices are available + Нет доступных устройств + + + diff --git a/plugin-mount/translations/mount_ru_RU.desktop b/plugin-mount/translations/mount_ru_RU.desktop new file mode 100644 index 0000000..562dbb3 --- /dev/null +++ b/plugin-mount/translations/mount_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Простое подключение и отключение USB и оптических приводов. +Name[ru_RU]=Съёмные устройства diff --git a/plugin-mount/translations/mount_ru_RU.ts b/plugin-mount/translations/mount_ru_RU.ts new file mode 100644 index 0000000..d7b461b --- /dev/null +++ b/plugin-mount/translations/mount_ru_RU.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Устройство <b><nobr>«%1»</nobr></b> подключено. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Устройство <b><nobr>«%1»</nobr></b> отключено. + + + + Removable media/devices manager + Диспетчер отключаемых медиа/устройств + + + + LxQtMountConfiguration + + + Removable Media Settings + Настройки съёмных устройств + + + + Behaviour + Поведение + + + + When a device is connected + Когда устройство подключено + + + + Popup menu + Всплывающее меню + + + + Show info + Показать информацию + + + + Do nothing + Ничего не делать + + + + MountButton + + + Removable media/devices manager + Диспетчер съёмных медиа/устройств + + + + Popup + + + No devices are available + Нет доступных устройств + + + diff --git a/plugin-mount/translations/mount_sk.desktop b/plugin-mount/translations/mount_sk.desktop new file mode 100644 index 0000000..f01d1de --- /dev/null +++ b/plugin-mount/translations/mount_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Práca s prenosnými médiami (USB, CD, DVD, ...) +Name[sk]=Prenosné médiá diff --git a/plugin-mount/translations/mount_sk_SK.ts b/plugin-mount/translations/mount_sk_SK.ts new file mode 100644 index 0000000..16dfee4 --- /dev/null +++ b/plugin-mount/translations/mount_sk_SK.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zariadenie <b><nobr>„%1“</nobr></b> je zapojené. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zariadenie <b><nobr>„%1“</nobr></b> je odstránené. + + + + Removable media/devices manager + Správca prenosných médií a zariadení + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Nastavenia správcu prenosných médií prostredia LxQt + + + + Removable Media Settings + + + + + Behaviour + Správanie + + + + When a device is connected + Pri pripojení zariadenia + + + + Popup menu + Zobraziť menu + + + + Show info + Zobraziť informácie + + + + Do nothing + Nerobiť nič + + + + MenuDiskItem + + Click to access this device from other applications. + Kliknutím môžete pristupovať na toto zariadenie z iných aplikácií. + + + Click to eject this disc. + Kliknutím vysuniete tento disk. + + + + MountButton + + + Removable media/devices manager + Správca prenosných médií a zariadení + + + The device <b><nobr>"%1"</nobr></b> is connected. + Zariadenie <b><nobr>„%1“</nobr></b> je zapojené. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Zariadenie <b><nobr>„%1“</nobr></b> je odstránené. + + + No devices Available. + Žiadne zariadenia nie sú dostupné. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_sl.desktop b/plugin-mount/translations/mount_sl.desktop new file mode 100644 index 0000000..1f8f23c --- /dev/null +++ b/plugin-mount/translations/mount_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Upravljalnik odstranljivih nosilcev (USB, CD, DVD, ...) +Name[sl]=Odstranljivi nosilci diff --git a/plugin-mount/translations/mount_sl.ts b/plugin-mount/translations/mount_sl.ts new file mode 100644 index 0000000..411d01b --- /dev/null +++ b/plugin-mount/translations/mount_sl.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Naprava <b><nobr>%1</nobr></b> je priključena. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Naprava <b><nobr>%1</nobr></b> je odstranjena. + + + + Removable media/devices manager + Upravljalnik odstranljivih nosilcev/naprav + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Nastavitve upravljalnika odstranljivih nosilcev + + + + Removable Media Settings + + + + + Behaviour + Obnašanje + + + + When a device is connected + Ko se naprava priključi + + + + Popup menu + Prikaži meni + + + + Show info + Prikaži podatke + + + + Do nothing + Ne naredi nič + + + + MenuDiskItem + + Click to access this device from other applications. + Kliknite, da omogočite dostop do naprave iz programov. + + + Click to eject this disc. + Kliknite za izmet diska. + + + + MountButton + + + Removable media/devices manager + Upravljalnik odstranljivih nosilcev/naprav + + + The device <b><nobr>"%1"</nobr></b> is connected. + Naprava <b><nobr>%1</nobr></b> je priključena. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Naprava <b><nobr>%1</nobr></b> je odstranjena. + + + No devices Available. + Na voljo ni nobene naprave + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_sr.desktop b/plugin-mount/translations/mount_sr.desktop new file mode 100644 index 0000000..048f5a0 --- /dev/null +++ b/plugin-mount/translations/mount_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Руковаоц уклоњивим медијима (УСБ, ЦД, ДВД...) +Name[sr]=Уклоњиви медији diff --git a/plugin-mount/translations/mount_sr@ijekavian.desktop b/plugin-mount/translations/mount_sr@ijekavian.desktop new file mode 100644 index 0000000..93c2944 --- /dev/null +++ b/plugin-mount/translations/mount_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Уклоњиви медији +Comment[sr@ijekavian]=Руковаоц уклоњивим медијима (УСБ, ЦД, ДВД...) diff --git a/plugin-mount/translations/mount_sr@ijekavianlatin.desktop b/plugin-mount/translations/mount_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..8fa702c --- /dev/null +++ b/plugin-mount/translations/mount_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Uklonjivi mediji +Comment[sr@ijekavianlatin]=Rukovaoc uklonjivim medijima (USB, CD, DVD...) diff --git a/plugin-mount/translations/mount_sr@latin.desktop b/plugin-mount/translations/mount_sr@latin.desktop new file mode 100644 index 0000000..39ba4ca --- /dev/null +++ b/plugin-mount/translations/mount_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Rukovaoc uklonjivim medijima (USB, CD, DVD...) +Name[sr@latin]=Uklonjivi mediji diff --git a/plugin-mount/translations/mount_sr@latin.ts b/plugin-mount/translations/mount_sr@latin.ts new file mode 100644 index 0000000..7d26182 --- /dev/null +++ b/plugin-mount/translations/mount_sr@latin.ts @@ -0,0 +1,71 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + + + + + The device <b><nobr>"%1"</nobr></b> is removed. + + + + + Removable media/devices manager + + + + + LxQtMountConfiguration + + + Removable Media Settings + + + + + Behaviour + + + + + When a device is connected + + + + + Popup menu + + + + + Show info + + + + + Do nothing + + + + + MountButton + + + Removable media/devices manager + + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_sr_BA.ts b/plugin-mount/translations/mount_sr_BA.ts new file mode 100644 index 0000000..5398c9b --- /dev/null +++ b/plugin-mount/translations/mount_sr_BA.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Уређај <b><nobr>„%1“</nobr></b> је прикључен. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Уређај <b><nobr>„%1“</nobr></b> је уклоњен. + + + + Removable media/devices manager + Менаџер уклоњивих медија/уређаја + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Подешавање менаџера уклоњивих медија + + + + Removable Media Settings + + + + + Behaviour + Понашање + + + + When a device is connected + Кад је уређај прикључен + + + + Popup menu + прикажи мени + + + + Show info + прикажи инфо + + + + Do nothing + не ради ништа + + + + MenuDiskItem + + Click to access this device from other applications. + Кликните да приступате овом уређају из других програма. + + + Click to eject this disc. + Кликните да избаците диск. + + + + MountButton + + + Removable media/devices manager + Менаџер уклоњивих медија/уређаја + + + The device <b><nobr>"%1"</nobr></b> is connected. + Уређај <b><nobr>„%1“</nobr></b> је прикључен. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Уређај <b><nobr>„%1“</nobr></b> је уклоњен. + + + No devices Available. + Нема доступних уређаја. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_sr_RS.ts b/plugin-mount/translations/mount_sr_RS.ts new file mode 100644 index 0000000..5398c9b --- /dev/null +++ b/plugin-mount/translations/mount_sr_RS.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Уређај <b><nobr>„%1“</nobr></b> је прикључен. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Уређај <b><nobr>„%1“</nobr></b> је уклоњен. + + + + Removable media/devices manager + Менаџер уклоњивих медија/уређаја + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Подешавање менаџера уклоњивих медија + + + + Removable Media Settings + + + + + Behaviour + Понашање + + + + When a device is connected + Кад је уређај прикључен + + + + Popup menu + прикажи мени + + + + Show info + прикажи инфо + + + + Do nothing + не ради ништа + + + + MenuDiskItem + + Click to access this device from other applications. + Кликните да приступате овом уређају из других програма. + + + Click to eject this disc. + Кликните да избаците диск. + + + + MountButton + + + Removable media/devices manager + Менаџер уклоњивих медија/уређаја + + + The device <b><nobr>"%1"</nobr></b> is connected. + Уређај <b><nobr>„%1“</nobr></b> је прикључен. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Уређај <b><nobr>„%1“</nobr></b> је уклоњен. + + + No devices Available. + Нема доступних уређаја. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_th_TH.desktop b/plugin-mount/translations/mount_th_TH.desktop new file mode 100644 index 0000000..72220dd --- /dev/null +++ b/plugin-mount/translations/mount_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=ตัวจัดการสื่อที่สามารถถอดเสียบได้ (USB, CD, DVD, ...) +Name[th_TH]=สื่อที่สามารถถอดเสียบได้ diff --git a/plugin-mount/translations/mount_th_TH.ts b/plugin-mount/translations/mount_th_TH.ts new file mode 100644 index 0000000..0b728a3 --- /dev/null +++ b/plugin-mount/translations/mount_th_TH.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + อุปกรณ์ <b><nobr>"%1"</nobr></b> ถูกเชื่อมต่อแล้ว + + + + The device <b><nobr>"%1"</nobr></b> is removed. + อุปกรณ์ <b><nobr>"%1"</nobr></b> ถูกถอดออกแล้ว + + + + Removable media/devices manager + ตัดจัดการสื่อ/อุปกรณ์แบบถอดเสียบ + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + ค่าตั้งตัวจัดการสื่อแบบถอดเสียบได้ LxQt + + + + Removable Media Settings + + + + + Behaviour + พฤติกรรม + + + + When a device is connected + เมื่ออุปกรณ์ถูกเชื่อมต่อ + + + + Popup menu + เมนูผุดขึ้น + + + + Show info + แสดงข้อมูล + + + + Do nothing + ไม่ต้องทำอะไร + + + + MenuDiskItem + + Click to access this device from other applications. + คลิกเพื่อเข้าใช้อุปกรณ์จากโปรแกรมต่างๆ + + + Click to eject this disc. + คลิกเพื่อดันแผ่นดิสก์ออก + + + + MountButton + + + Removable media/devices manager + ตัดจัดการสื่อ/อุปกรณ์แบบถอดเสียบ + + + The device <b><nobr>"%1"</nobr></b> is connected. + อุปกรณ์ <b><nobr>"%1"</nobr></b> ถูกเชื่อมต่อแล้ว + + + The device <b><nobr>"%1"</nobr></b> is removed. + อุปกรณ์ <b><nobr>"%1"</nobr></b> ถูกถอดออกแล้ว + + + No devices Available. + ไม่มีอุปกรณ์ที่ใช้งานได้ + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_tr.desktop b/plugin-mount/translations/mount_tr.desktop new file mode 100644 index 0000000..4018fbe --- /dev/null +++ b/plugin-mount/translations/mount_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Çıkarılabilir aygıt yöneticisi (USB, CD, DVD, ...) +Name[tr]=Çıkarılabilir aygıt diff --git a/plugin-mount/translations/mount_tr.ts b/plugin-mount/translations/mount_tr.ts new file mode 100644 index 0000000..ba10fde --- /dev/null +++ b/plugin-mount/translations/mount_tr.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + <b><nobr>"%1"</nobr></b> aygıtı bağlı. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + <b><nobr>"%1"</nobr></b> aygıtı çıkarıldı. + + + + Removable media/devices manager + Çıkarılabilir ortam/aygıt yönetici + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt Çıkarılabilir ortam yönetici ayarları + + + + Removable Media Settings + + + + + Behaviour + Davranış + + + + When a device is connected + Bir aygıt bağlandığında + + + + Popup menu + Açılır menü + + + + Show info + Bilgi görüntüle + + + + Do nothing + Hiç bir şey yapma + + + + MenuDiskItem + + Click to access this device from other applications. + Diğer uygulamalardan bu aygıta erişmek için tıklayın + + + Click to eject this disc. + Bu diski çıkartmak için tıklayın. + + + + MountButton + + + Removable media/devices manager + Çıkarılabilir ortam/aygıt yönetici + + + The device <b><nobr>"%1"</nobr></b> is connected. + <b><nobr>"%1"</nobr></b> aygıtı bağlı. + + + The device <b><nobr>"%1"</nobr></b> is removed. + <b><nobr>"%1"</nobr></b> aygıtı çıkarıldı. + + + No devices Available. + Erişilebilir aygıt yok. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_uk.desktop b/plugin-mount/translations/mount_uk.desktop new file mode 100644 index 0000000..112063f --- /dev/null +++ b/plugin-mount/translations/mount_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Легке керування знімними носіями (USB, CD, DVD тощо) +Name[uk]=Знімні носії diff --git a/plugin-mount/translations/mount_uk.ts b/plugin-mount/translations/mount_uk.ts new file mode 100644 index 0000000..bd50448 --- /dev/null +++ b/plugin-mount/translations/mount_uk.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + Пристрій <b><nobr>"%1"</nobr></b> приєднано. + + + + The device <b><nobr>"%1"</nobr></b> is removed. + Пристрій <b><nobr>"%1"</nobr></b> від’єднано. + + + + Removable media/devices manager + Керування знімними носіями + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + Налаштування знімних носіїв LxQt + + + + Removable Media Settings + + + + + Behaviour + Поведінка + + + + When a device is connected + Коли пристрій приєднано: + + + + Popup menu + показати спливне меню + + + + Show info + показати інформацію + + + + Do nothing + нічого не робити + + + + MenuDiskItem + + Click to access this device from other applications. + Натисніть, щоб надати доступ до цього пристрою іншим програмам. + + + Click to eject this disc. + Натисніть, щоб витягти диск. + + + + MountButton + + + Removable media/devices manager + Керування знімними носіями + + + The device <b><nobr>"%1"</nobr></b> is connected. + Пристрій <b><nobr>"%1"</nobr></b> приєднано. + + + The device <b><nobr>"%1"</nobr></b> is removed. + Пристрій <b><nobr>"%1"</nobr></b> від’єднано. + + + No devices Available. + Пристрої відсутні. + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_zh_CN.GB2312.desktop b/plugin-mount/translations/mount_zh_CN.GB2312.desktop new file mode 100644 index 0000000..15f0263 --- /dev/null +++ b/plugin-mount/translations/mount_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Removable media handler (USB, CD, DVD, ...) + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-mount/translations/mount_zh_CN.desktop b/plugin-mount/translations/mount_zh_CN.desktop new file mode 100644 index 0000000..2558918 --- /dev/null +++ b/plugin-mount/translations/mount_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=移动存储处理(USB, CD, DVD, ...) +Name[zh_CN]=移动存储 diff --git a/plugin-mount/translations/mount_zh_CN.ts b/plugin-mount/translations/mount_zh_CN.ts new file mode 100644 index 0000000..d5ccd0b --- /dev/null +++ b/plugin-mount/translations/mount_zh_CN.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + 设备 <b><nobr>"%1"</nobr></b> 已连接。 + + + + The device <b><nobr>"%1"</nobr></b> is removed. + 设备 <b><nobr>"%1"</nobr></b> 已移除。 + + + + Removable media/devices manager + 可移动存储设备管理器 + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt可移动媒体管理器设置 + + + + Removable Media Settings + + + + + Behaviour + 行为 + + + + When a device is connected + 当一个设备连接时 + + + + Popup menu + 弹出菜单 + + + + Show info + 显示信息 + + + + Do nothing + 什么都不做 + + + + MenuDiskItem + + Click to access this device from other applications. + 点击以从其它应用程序访问此设备。 + + + Click to eject this disc. + 点击以弹出该存储卷。 + + + + MountButton + + + Removable media/devices manager + 可移动存储设备管理器 + + + The device <b><nobr>"%1"</nobr></b> is connected. + 设备 <b><nobr>"%1"</nobr></b> 已连接。 + + + The device <b><nobr>"%1"</nobr></b> is removed. + 设备 <b><nobr>"%1"</nobr></b> 已移除。 + + + No devices Available. + 没有可用设备。 + + + + Popup + + + No devices are available + + + + diff --git a/plugin-mount/translations/mount_zh_TW.desktop b/plugin-mount/translations/mount_zh_TW.desktop new file mode 100644 index 0000000..bd69a9d --- /dev/null +++ b/plugin-mount/translations/mount_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Removable media +Comment=Easy mounting and unmounting of USB and optical drives. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=可卸除式裝置管理(USB、光碟...) +Name[zh_TW]=可卸除式裝置 diff --git a/plugin-mount/translations/mount_zh_TW.ts b/plugin-mount/translations/mount_zh_TW.ts new file mode 100644 index 0000000..0fa80bd --- /dev/null +++ b/plugin-mount/translations/mount_zh_TW.ts @@ -0,0 +1,98 @@ + + + + + DeviceActionInfo + + + The device <b><nobr>"%1"</nobr></b> is connected. + 裝置 <b><nobr>"%1"</nobr></b> 已連接。 + + + + The device <b><nobr>"%1"</nobr></b> is removed. + 裝置 <b><nobr>"%1"</nobr></b> 已卸除。 + + + + Removable media/devices manager + 可卸除式裝置管理員 + + + + LxQtMountConfiguration + + LxQt Removable media manager settings + LxQt可卸除式裝置管理員設定 + + + + Removable Media Settings + + + + + Behaviour + 行為 + + + + When a device is connected + 當一個裝置連接時 + + + + Popup menu + 彈出選單 + + + + Show info + 顯示訊息 + + + + Do nothing + 什麼都不做 + + + + MenuDiskItem + + Click to access this device from other applications. + 點擊以從其他應用程式讀取此裝置。 + + + Click to eject this disc. + 點擊以退出此磁片。 + + + + MountButton + + + Removable media/devices manager + 可卸除式裝置管理員 + + + The device <b><nobr>"%1"</nobr></b> is connected. + 裝置 <b><nobr>"%1"</nobr></b> 已連接。 + + + The device <b><nobr>"%1"</nobr></b> is removed. + 裝置 <b><nobr>"%1"</nobr></b> 已卸除。 + + + No devices Available. + 無可用裝置。 + + + + Popup + + + No devices are available + + + + diff --git a/plugin-networkmonitor/CMakeLists.txt b/plugin-networkmonitor/CMakeLists.txt new file mode 100644 index 0000000..6357384 --- /dev/null +++ b/plugin-networkmonitor/CMakeLists.txt @@ -0,0 +1,31 @@ +set(PLUGIN "networkmonitor") + +set(HEADERS + lxqtnetworkmonitorplugin.h + lxqtnetworkmonitor.h + lxqtnetworkmonitorconfiguration.h +) + +set(SOURCES + lxqtnetworkmonitorplugin.cpp + lxqtnetworkmonitor.cpp + lxqtnetworkmonitorconfiguration.cpp +) + +set(MOCS + lxqtnetworkmonitorplugin.h + lxqtnetworkmonitor.h + lxqtnetworkmonitorconfiguration.h +) + +set(UIS + lxqtnetworkmonitorconfiguration.ui +) + +set(RESOURCES + resources.qrc +) + +set(LIBRARIES ${STATGRAB_LIB}) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-networkmonitor/images/knemo-modem-error.png b/plugin-networkmonitor/images/knemo-modem-error.png new file mode 100644 index 0000000..8d49723 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-error.png differ diff --git a/plugin-networkmonitor/images/knemo-modem-idle.png b/plugin-networkmonitor/images/knemo-modem-idle.png new file mode 100644 index 0000000..0287aef Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-idle.png differ diff --git a/plugin-networkmonitor/images/knemo-modem-offline.png b/plugin-networkmonitor/images/knemo-modem-offline.png new file mode 100644 index 0000000..f93afc3 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-offline.png differ diff --git a/plugin-networkmonitor/images/knemo-modem-receive.png b/plugin-networkmonitor/images/knemo-modem-receive.png new file mode 100644 index 0000000..cc3bcc6 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-modem-transmit-receive.png b/plugin-networkmonitor/images/knemo-modem-transmit-receive.png new file mode 100644 index 0000000..40a1480 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-transmit-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-modem-transmit.png b/plugin-networkmonitor/images/knemo-modem-transmit.png new file mode 100644 index 0000000..92752fa Binary files /dev/null and b/plugin-networkmonitor/images/knemo-modem-transmit.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-error.png b/plugin-networkmonitor/images/knemo-monitor-error.png new file mode 100644 index 0000000..926cd9c Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-error.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-idle.png b/plugin-networkmonitor/images/knemo-monitor-idle.png new file mode 100644 index 0000000..aabf851 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-idle.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-offline.png b/plugin-networkmonitor/images/knemo-monitor-offline.png new file mode 100644 index 0000000..ec0d60f Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-offline.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-receive.png b/plugin-networkmonitor/images/knemo-monitor-receive.png new file mode 100644 index 0000000..391f9ee Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-transmit-receive.png b/plugin-networkmonitor/images/knemo-monitor-transmit-receive.png new file mode 100644 index 0000000..221cbe5 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-transmit-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-monitor-transmit.png b/plugin-networkmonitor/images/knemo-monitor-transmit.png new file mode 100644 index 0000000..b23ea99 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-monitor-transmit.png differ diff --git a/plugin-networkmonitor/images/knemo-network-error.png b/plugin-networkmonitor/images/knemo-network-error.png new file mode 100644 index 0000000..4135687 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-error.png differ diff --git a/plugin-networkmonitor/images/knemo-network-idle.png b/plugin-networkmonitor/images/knemo-network-idle.png new file mode 100644 index 0000000..6fb9882 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-idle.png differ diff --git a/plugin-networkmonitor/images/knemo-network-offline.png b/plugin-networkmonitor/images/knemo-network-offline.png new file mode 100644 index 0000000..90a2d69 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-offline.png differ diff --git a/plugin-networkmonitor/images/knemo-network-receive.png b/plugin-networkmonitor/images/knemo-network-receive.png new file mode 100644 index 0000000..013199d Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-network-transmit-receive.png b/plugin-networkmonitor/images/knemo-network-transmit-receive.png new file mode 100644 index 0000000..3b3c4d2 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-transmit-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-network-transmit.png b/plugin-networkmonitor/images/knemo-network-transmit.png new file mode 100644 index 0000000..cf991f3 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-network-transmit.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-error.png b/plugin-networkmonitor/images/knemo-wireless-error.png new file mode 100644 index 0000000..98f1c4b Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-error.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-idle.png b/plugin-networkmonitor/images/knemo-wireless-idle.png new file mode 100644 index 0000000..bc1d79a Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-idle.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-offline.png b/plugin-networkmonitor/images/knemo-wireless-offline.png new file mode 100644 index 0000000..6791d49 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-offline.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-receive.png b/plugin-networkmonitor/images/knemo-wireless-receive.png new file mode 100644 index 0000000..ff0f2d6 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-transmit-receive.png b/plugin-networkmonitor/images/knemo-wireless-transmit-receive.png new file mode 100644 index 0000000..eedd9dd Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-transmit-receive.png differ diff --git a/plugin-networkmonitor/images/knemo-wireless-transmit.png b/plugin-networkmonitor/images/knemo-wireless-transmit.png new file mode 100644 index 0000000..864ec59 Binary files /dev/null and b/plugin-networkmonitor/images/knemo-wireless-transmit.png differ diff --git a/plugin-networkmonitor/lxqtnetworkmonitor.cpp b/plugin-networkmonitor/lxqtnetworkmonitor.cpp new file mode 100644 index 0000000..7df0e0a --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitor.cpp @@ -0,0 +1,216 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtnetworkmonitor.h" +#include "lxqtnetworkmonitorconfiguration.h" +#include "../panel/ilxqtpanelplugin.h" + +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +#ifdef __sg_public +// since libstatgrab 0.90 this macro is defined, so we use it for version check +#define STATGRAB_NEWER_THAN_0_90 1 +#endif + +LxQtNetworkMonitor::LxQtNetworkMonitor(ILxQtPanelPlugin *plugin, QWidget* parent): + QFrame(parent), + mPlugin(plugin) +{ + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(&m_stuff); + setLayout(layout); + /* Initialise statgrab */ +#ifdef STATGRAB_NEWER_THAN_0_90 + sg_init(0); +#else + sg_init(); +#endif + + m_iconList << "modem" << "monitor" + << "network" << "wireless"; + + startTimer(800); + + settingsChanged(); +} + +LxQtNetworkMonitor::~LxQtNetworkMonitor() +{ +} + +void LxQtNetworkMonitor::resizeEvent(QResizeEvent *) +{ + m_stuff.setMinimumWidth(m_pic.width() + 2); + m_stuff.setMinimumHeight(m_pic.height() + 2); + + update(); +} + + +void LxQtNetworkMonitor::timerEvent(QTimerEvent *event) +{ + bool matched = false; + +#ifdef STATGRAB_NEWER_THAN_0_90 + size_t num_network_stats; + size_t x; +#else + int num_network_stats; + int x; +#endif + sg_network_io_stats *network_stats = sg_get_network_io_stats_diff(&num_network_stats); + + for (x = 0; x < num_network_stats; x++) + { + if (m_interface == QString::fromLocal8Bit(network_stats->interface_name)) + { + if (network_stats->rx != 0 && network_stats->tx != 0) + { + m_pic.load(iconName("transmit-receive")); + } + else if (network_stats->rx != 0 && network_stats->tx == 0) + { + m_pic.load(iconName("receive")); + } + else if (network_stats->rx == 0 && network_stats->tx != 0) + { + m_pic.load(iconName("transmit")); + } + else + { + m_pic.load(iconName("idle")); + } + + matched = true; + + break; + } + + network_stats++; + } + + if (!matched) + { + m_pic.load(iconName("error")); + } + + update(); +} + +void LxQtNetworkMonitor::paintEvent(QPaintEvent *) +{ + QPainter p(this); + + QRectF r = rect(); + + int leftOffset = (r.width() - m_pic.width() + 2) / 2; + int topOffset = (r.height() - m_pic.height() + 2) / 2; + + p.drawPixmap(leftOffset, topOffset, m_pic); +} + +bool LxQtNetworkMonitor::event(QEvent *event) +{ + if (event->type() == QEvent::ToolTip) + { +#ifdef STATGRAB_NEWER_THAN_0_90 + size_t num_network_stats; + size_t x; +#else + int num_network_stats; + int x; +#endif + sg_network_io_stats *network_stats = sg_get_network_io_stats(&num_network_stats); + + for (x = 0; x < num_network_stats; x++) + { + if (m_interface == QString::fromLocal8Bit(network_stats->interface_name)) + { + setToolTip(tr("Network interface %1").arg(m_interface) + "
" + + tr("Transmitted %1").arg(convertUnits(network_stats->tx)) + "
" + + tr("Received %1").arg(convertUnits(network_stats->rx)) + ); + } + network_stats++; + } + } + return QFrame::event(event); +} + +//void LxQtNetworkMonitor::showConfigureDialog() +//{ +// LxQtNetworkMonitorConfiguration *confWindow = +// this->findChild("LxQtNetworkMonitorConfigurationWindow"); + +// if (!confWindow) +// { +// confWindow = new LxQtNetworkMonitorConfiguration(settings(), this); +// } + +// confWindow->show(); +// confWindow->raise(); +// confWindow->activateWindow(); +//} + +void LxQtNetworkMonitor::settingsChanged() +{ + m_iconIndex = mPlugin->settings()->value("icon", 1).toInt(); + m_interface = mPlugin->settings()->value("interface").toString(); + if (m_interface.isEmpty()) + { +#ifdef STATGRAB_NEWER_THAN_0_90 + size_t count; +#else + int count; +#endif + sg_network_iface_stats* stats = sg_get_network_iface_stats(&count); + if (count > 0) + m_interface = QString(stats[0].interface_name); + } + + m_pic.load(iconName("error")); +} + +QString LxQtNetworkMonitor::convertUnits(double num) +{ + QString unit = tr("B"); + QStringList units = QStringList(tr("KiB")) << tr("MiB") << tr("GiB") << tr("TiB") << tr("PiB"); + for (QStringListIterator iter(units); num >= 1024 && iter.hasNext();) + { + num /= 1024; + unit = iter.next(); + } + return QString::number(num, 'f', 2) + " " + unit; +} diff --git a/plugin-networkmonitor/lxqtnetworkmonitor.h b/plugin-networkmonitor/lxqtnetworkmonitor.h new file mode 100644 index 0000000..e34c50f --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitor.h @@ -0,0 +1,74 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTNETWORKMONITOR_H +#define LXQTNETWORKMONITOR_H +#include + +class ILxQtPanelPlugin; + +/*! + TODO: How to define cable is not connected? + */ +class LxQtNetworkMonitor: public QFrame +{ + Q_OBJECT +public: + LxQtNetworkMonitor(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~LxQtNetworkMonitor(); + virtual void settingsChanged(); + +protected: + void virtual timerEvent(QTimerEvent *event); + void virtual paintEvent(QPaintEvent * event); + void virtual resizeEvent(QResizeEvent *); + bool virtual event(QEvent *event); + + +private: + static QString convertUnits(double num); + QString iconName(const QString& state) const + { + return QString(":/images/knemo-%1-%2.png") + .arg(m_iconList[m_iconIndex], state); + } + + QWidget m_stuff; + + QStringList m_iconList; + + int m_iconIndex; + + QString m_interface; + QPixmap m_pic; + ILxQtPanelPlugin *mPlugin; +}; + + +#endif // LXQTNETWORKMONITOR_H + + diff --git a/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.cpp b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.cpp new file mode 100644 index 0000000..a9c83df --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.cpp @@ -0,0 +1,100 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtnetworkmonitorconfiguration.h" +#include "ui_lxqtnetworkmonitorconfiguration.h" + +extern "C" { +#include +} + +#ifdef __sg_public +// since libstatgrab 0.90 this macro is defined, so we use it for version check +#define STATGRAB_NEWER_THAN_0_90 1 +#endif + +LxQtNetworkMonitorConfiguration::LxQtNetworkMonitorConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtNetworkMonitorConfiguration), + mSettings(settings), + mOldSettings(settings) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("NetworkMonitorConfigurationWindow"); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + connect(ui->iconCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->interfaceCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + + loadSettings(); +} + +LxQtNetworkMonitorConfiguration::~LxQtNetworkMonitorConfiguration() +{ + delete ui; +} + +void LxQtNetworkMonitorConfiguration::saveSettings() +{ + mSettings->setValue("icon", ui->iconCB->currentIndex()); + mSettings->setValue("interface", ui->interfaceCB->currentText()); +} + +void LxQtNetworkMonitorConfiguration::loadSettings() +{ + ui->iconCB->setCurrentIndex(mSettings->value("icon", 1).toInt()); + + int count; +#ifdef STATGRAB_NEWER_THAN_0_90 + size_t ret_count; + sg_network_iface_stats* stats = sg_get_network_iface_stats(&ret_count); + count = (int)ret_count; +#else + sg_network_iface_stats* stats = sg_get_network_iface_stats(&count); +#endif + for (int ix = 0; ix < count; ix++) + ui->interfaceCB->addItem(stats[ix].interface_name); + + QString interface = mSettings->value("interface").toString(); + ui->interfaceCB->setCurrentIndex(qMax(qMin(0, count - 1), ui->interfaceCB->findText(interface))); +} + +void LxQtNetworkMonitorConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + mOldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + diff --git a/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.h b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.h new file mode 100644 index 0000000..cc33359 --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.h @@ -0,0 +1,66 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTNETWORKMONITORCONFIGURATION_H +#define LXQTNETWORKMONITORCONFIGURATION_H + +#include + +#include + +class QSettings; +class QAbstractButton; + +namespace Ui +{ +class LxQtNetworkMonitorConfiguration; +} + +class LxQtNetworkMonitorConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtNetworkMonitorConfiguration(QSettings *settings, QWidget *parent = 0); + ~LxQtNetworkMonitorConfiguration(); + +private: + Ui::LxQtNetworkMonitorConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache mOldSettings; + +private slots: + /* + Saves settings in conf file. + */ + void saveSettings(); + void loadSettings(); + void dialogButtonsAction(QAbstractButton *btn); +}; + +#endif // LXQTNETWORKMONITORCONFIGURATION_H diff --git a/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.ui b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.ui new file mode 100644 index 0000000..a8099a9 --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitorconfiguration.ui @@ -0,0 +1,131 @@ + + + LxQtNetworkMonitorConfiguration + + + + 0 + 0 + 285 + 191 + + + + Network Monitor settings + + + + + + General + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + false + + + + + + Interface + + + + + + + + 0 + 0 + + + + true + + + + + + + + Modem + + + + :/images/knemo-modem-idle.png:/images/knemo-modem-idle.png + + + + + Monitor + + + + :/images/knemo-monitor-idle.png:/images/knemo-monitor-idle.png + + + + + Network + + + + :/images/knemo-network-idle.png:/images/knemo-network-idle.png + + + + + Wireless + + + + :/images/knemo-wireless-idle.png:/images/knemo-wireless-idle.png + + + + + + + + Icon + + + + + + + + + + Qt::Vertical + + + + 20 + 41 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + + diff --git a/plugin-networkmonitor/lxqtnetworkmonitorplugin.cpp b/plugin-networkmonitor/lxqtnetworkmonitorplugin.cpp new file mode 100644 index 0000000..77c2d00 --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitorplugin.cpp @@ -0,0 +1,58 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtnetworkmonitorplugin.h" +#include "lxqtnetworkmonitor.h" +#include "lxqtnetworkmonitorconfiguration.h" + +LxQtNetworkMonitorPlugin::LxQtNetworkMonitorPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mWidget(new LxQtNetworkMonitor(this)) +{ +} + +LxQtNetworkMonitorPlugin::~LxQtNetworkMonitorPlugin() +{ + delete mWidget; +} + +QWidget *LxQtNetworkMonitorPlugin::widget() +{ + return mWidget; +} + +QDialog *LxQtNetworkMonitorPlugin::configureDialog() +{ + return new LxQtNetworkMonitorConfiguration(settings(), mWidget); +} + +void LxQtNetworkMonitorPlugin::settingsChanged() +{ + mWidget->settingsChanged(); +} diff --git a/plugin-networkmonitor/lxqtnetworkmonitorplugin.h b/plugin-networkmonitor/lxqtnetworkmonitorplugin.h new file mode 100644 index 0000000..ff61eab --- /dev/null +++ b/plugin-networkmonitor/lxqtnetworkmonitorplugin.h @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTNETWORKMONITORPLUGIN_H +#define LXQTNETWORKMONITORPLUGIN_H + + +#include "../panel/ilxqtpanelplugin.h" +#include +class LxQtNetworkMonitor; + +class LxQtNetworkMonitorPlugin: public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + explicit LxQtNetworkMonitorPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtNetworkMonitorPlugin(); + + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog; } + virtual QWidget *widget(); + virtual QString themeId() const { return "NetworkMonitor"; } + + bool isSeparate() const { return false; } + QDialog *configureDialog(); + +protected: + virtual void settingsChanged(); + +private: + LxQtNetworkMonitor *mWidget; +}; + + +class LxQtNetworkMonitorPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtNetworkMonitorPlugin(startupInfo); + } +}; + + +#endif // LXQTNETWORKMONITORPLUGIN_H diff --git a/plugin-networkmonitor/resources.qrc b/plugin-networkmonitor/resources.qrc new file mode 100644 index 0000000..4d19407 --- /dev/null +++ b/plugin-networkmonitor/resources.qrc @@ -0,0 +1,28 @@ + + + images/knemo-modem-error.png + images/knemo-modem-idle.png + images/knemo-modem-offline.png + images/knemo-modem-receive.png + images/knemo-modem-transmit-receive.png + images/knemo-modem-transmit.png + images/knemo-monitor-error.png + images/knemo-monitor-idle.png + images/knemo-monitor-offline.png + images/knemo-monitor-receive.png + images/knemo-monitor-transmit-receive.png + images/knemo-monitor-transmit.png + images/knemo-network-error.png + images/knemo-network-idle.png + images/knemo-network-offline.png + images/knemo-network-receive.png + images/knemo-network-transmit-receive.png + images/knemo-network-transmit.png + images/knemo-wireless-error.png + images/knemo-wireless-idle.png + images/knemo-wireless-offline.png + images/knemo-wireless-receive.png + images/knemo-wireless-transmit-receive.png + images/knemo-wireless-transmit.png + + diff --git a/plugin-networkmonitor/resources/networkmonitor.desktop.in b/plugin-networkmonitor/resources/networkmonitor.desktop.in new file mode 100644 index 0000000..c7c66b8 --- /dev/null +++ b/plugin-networkmonitor/resources/networkmonitor.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Network monitor +Comment=Displays network status and activity. +#Icon=network-transmit-receive +Icon=network-wired + diff --git a/plugin-networkmonitor/translations/networkmonitor.ts b/plugin-networkmonitor/translations/networkmonitor.ts new file mode 100644 index 0000000..887671c --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_ar.desktop b/plugin-networkmonitor/translations/networkmonitor_ar.desktop new file mode 100644 index 0000000..a601163 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ar.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[ar]=قائمة التطبيقات +Name[ar]=تهيئة وحدة جلسة ريزركيوت diff --git a/plugin-networkmonitor/translations/networkmonitor_ar.ts b/plugin-networkmonitor/translations/networkmonitor_ar.ts new file mode 100644 index 0000000..89c67af --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ar.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + العامّ + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_cs.desktop b/plugin-networkmonitor/translations/networkmonitor_cs.desktop new file mode 100644 index 0000000..12596b2 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_cs.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[cs]=Nabídka +Name[cs]=Hlavní nabídka diff --git a/plugin-networkmonitor/translations/networkmonitor_cs.ts b/plugin-networkmonitor/translations/networkmonitor_cs.ts new file mode 100644 index 0000000..5ae0a10 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_cs.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Síťové rozhraní <b>%1</b> + + + + Transmitted %1 + Přeneseno %1 + + + + Received %1 + Přijato %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Nastavení sledování sítě + + + + Network Monitor settings + + + + + General + Obecné + + + + Interface + Rozhraní + + + + Modem + Modem + + + + Monitor + Sledování + + + + Network + Síť + + + + Wireless + Bezdrátové + + + + Icon + Ikona + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_cs_CZ.desktop b/plugin-networkmonitor/translations/networkmonitor_cs_CZ.desktop new file mode 100644 index 0000000..f07fba7 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_cs_CZ.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[cs_CZ]=Nastavení LxQtu +Name[cs_CZ]=Nastavit moduly LXDE-Qt diff --git a/plugin-networkmonitor/translations/networkmonitor_cs_CZ.ts b/plugin-networkmonitor/translations/networkmonitor_cs_CZ.ts new file mode 100644 index 0000000..a5213ba --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_cs_CZ.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Síťové rozhraní <b>%1</b> + + + + Transmitted %1 + Přeneseno %1 + + + + Received %1 + Přijato %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Nastavení sledování sítě + + + + Network Monitor settings + + + + + General + Obecné + + + + Interface + Rozhraní + + + + Modem + Modem + + + + Monitor + Sledování + + + + Network + Síť + + + + Wireless + Bezdrátové + + + + Icon + Ikona + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_da.desktop b/plugin-networkmonitor/translations/networkmonitor_da.desktop new file mode 100644 index 0000000..2df29fe --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_da.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[da]=Netværksovervågning +Name[da]=Netværksovervågning diff --git a/plugin-networkmonitor/translations/networkmonitor_da_DK.desktop b/plugin-networkmonitor/translations/networkmonitor_da_DK.desktop new file mode 100644 index 0000000..0ccac82 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_da_DK.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[da_DK]=Netværksovervågning +Name[da_DK]=Netværksovervågning diff --git a/plugin-networkmonitor/translations/networkmonitor_da_DK.ts b/plugin-networkmonitor/translations/networkmonitor_da_DK.ts new file mode 100644 index 0000000..f29aa53 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_da_DK.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Netværksinterface <b>%1</b> + + + + Transmitted %1 + Sendt %1 + + + + Received %1 + Modtaget %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Indstillinger for LxQt Netværksmonitor + + + + Network Monitor settings + + + + + General + Generelt + + + + Interface + Grænseflade + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Netværk + + + + Wireless + Trådløs + + + + Icon + Ikon + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_de.desktop b/plugin-networkmonitor/translations/networkmonitor_de.desktop new file mode 100644 index 0000000..d9dc91a --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_de.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + +# Translations +Name[de]=Netzwerk Monitor +Comment[de]=Informationen zu Status und Aktivität des Netzwerks diff --git a/plugin-networkmonitor/translations/networkmonitor_de.ts b/plugin-networkmonitor/translations/networkmonitor_de.ts new file mode 100644 index 0000000..9b69205 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_de.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Netzwerkschnittstelle <b>%1</b> + + + + Transmitted %1 + Gesendet %1 + + + + Received %1 + Empfangen %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt Netzwerkmonitor Einstellungen + + + + Network Monitor settings + + + + + General + Allgemein + + + + Interface + Schnittstelle + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Netzwerk + + + + Wireless + drahtlos + + + + Icon + Symbol + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_de_DE.desktop b/plugin-networkmonitor/translations/networkmonitor_de_DE.desktop new file mode 100644 index 0000000..d9dc91a --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_de_DE.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + +# Translations +Name[de]=Netzwerk Monitor +Comment[de]=Informationen zu Status und Aktivität des Netzwerks diff --git a/plugin-networkmonitor/translations/networkmonitor_de_DE.ts b/plugin-networkmonitor/translations/networkmonitor_de_DE.ts new file mode 100644 index 0000000..602c7b3 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_de_DE.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Netzwerk Schnittstelle <b>%1</b> + + + + Transmitted %1 + Gesendet %1 + + + + Received %1 + Empfangen %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt Netzwerk Monitor Einstellungen + + + + Network Monitor settings + + + + + General + Allgemein + + + + Interface + Schnittstelle + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Netzwerk + + + + Wireless + Drahtlos + + + + Icon + Icon + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_el_GR.desktop b/plugin-networkmonitor/translations/networkmonitor_el_GR.desktop new file mode 100644 index 0000000..c068ef0 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_el_GR.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[el_GR]=Εμφάνιση της κατάστασης δικτύου και δραστηριότητας. +Name[el_GR]=Επόπτης δικτύου diff --git a/plugin-networkmonitor/translations/networkmonitor_el_GR.ts b/plugin-networkmonitor/translations/networkmonitor_el_GR.ts new file mode 100644 index 0000000..5dc42bb --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_el_GR.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Διεπαφή δικτύου <b>%1</b> + + + + Transmitted %1 + Στάλθηκαν %1 + + + + Received %1 + Λήφθηκαν %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Ρυθμίσεις επίβλεψης δικτύου LxQt + + + + Network Monitor settings + + + + + General + Γενικά + + + + Interface + Διεπαφή + + + + Modem + Μόντεμ + + + + Monitor + Εποπτεία + + + + Network + Δίκτυο + + + + Wireless + Ασύρματο + + + + Icon + Εικονίδιο + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_eo.desktop b/plugin-networkmonitor/translations/networkmonitor_eo.desktop new file mode 100644 index 0000000..fe7f8d8 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_eo.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[eo]=Agordoj de muso por LxQto +Name[eo]=Agordi X11-muson diff --git a/plugin-networkmonitor/translations/networkmonitor_eo.ts b/plugin-networkmonitor/translations/networkmonitor_eo.ts new file mode 100644 index 0000000..2713b62 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_eo.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + Ĝenerala + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_es.desktop b/plugin-networkmonitor/translations/networkmonitor_es.desktop new file mode 100644 index 0000000..bbc4755 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_es.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[es]=Administrador de tareas +Name[es]=Entorno de escritorio Qt4 diff --git a/plugin-networkmonitor/translations/networkmonitor_es.ts b/plugin-networkmonitor/translations/networkmonitor_es.ts new file mode 100644 index 0000000..034b630 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_es.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interfaz de red <b>%1</b> + + + + Transmitted %1 + Transmitidos %1 + + + + Received %1 + Recibidos %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Opciones del Monitor de Redes de LxQt + + + + Network Monitor settings + + + + + General + General + + + + Interface + Interfaz + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Red + + + + Wireless + Inalámbrico + + + + Icon + Icono + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_es_VE.desktop b/plugin-networkmonitor/translations/networkmonitor_es_VE.desktop new file mode 100644 index 0000000..7fe4c8e --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_es_VE.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[es_VE]=Monitor de red +Name[es_VE]=Monitor de red diff --git a/plugin-networkmonitor/translations/networkmonitor_es_VE.ts b/plugin-networkmonitor/translations/networkmonitor_es_VE.ts new file mode 100644 index 0000000..072a71a --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_es_VE.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + interfaz de red <b>%1</b> + + + + Transmitted %1 + Transmitido %1 + + + + Received %1 + Recivido %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Preferencias de LxQt Monitores de red + + + + Network Monitor settings + + + + + General + General + + + + Interface + Interface + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Red + + + + Wireless + Wireless + + + + Icon + Icono + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_eu.desktop b/plugin-networkmonitor/translations/networkmonitor_eu.desktop new file mode 100644 index 0000000..d608863 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_eu.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[eu]=Bistaratu sarearen egoera eta aktibitatea +Name[eu]=Sarearen monitorea diff --git a/plugin-networkmonitor/translations/networkmonitor_eu.ts b/plugin-networkmonitor/translations/networkmonitor_eu.ts new file mode 100644 index 0000000..2782b44 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_eu.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + <b>%1</b> sareko interfazea + + + + Transmitted %1 + %1 transmitituta + + + + Received %1 + %1 jasota + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt sarearen monitorearen ezarpenak + + + + Network Monitor settings + + + + + General + Orokorra + + + + Interface + Interfazea + + + + Modem + Modema + + + + Monitor + Monitorea + + + + Network + Sarea + + + + Wireless + Hari gabekoa + + + + Icon + Ikonoa + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_fi.desktop b/plugin-networkmonitor/translations/networkmonitor_fi.desktop new file mode 100644 index 0000000..4d98c3a --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_fi.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[fi]=Verkkoseuranta +Name[fi]=Verkkoseuranta diff --git a/plugin-networkmonitor/translations/networkmonitor_fi.ts b/plugin-networkmonitor/translations/networkmonitor_fi.ts new file mode 100644 index 0000000..4ac5f01 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_fi.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Verkkoliitäntä <b>%1</b> + + + + Transmitted %1 + Siirretty %1 + + + + Received %1 + Vastaanotettu %1 + + + + B + t + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQtin verkonhallinnan asetukset + + + + Network Monitor settings + + + + + General + Yleiset + + + + Interface + Liitäntä + + + + Modem + Modeemi + + + + Monitor + + + + + Network + Verkko + + + + Wireless + Langaton + + + + Icon + Kuvake + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_fr_FR.desktop b/plugin-networkmonitor/translations/networkmonitor_fr_FR.desktop new file mode 100644 index 0000000..984118b --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_fr_FR.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[fr_FR]=Bloc-notes +Name[fr_FR]=Bloc-notes de l'écran diff --git a/plugin-networkmonitor/translations/networkmonitor_fr_FR.ts b/plugin-networkmonitor/translations/networkmonitor_fr_FR.ts new file mode 100644 index 0000000..6df90db --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_fr_FR.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + Généraux + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_hu.desktop b/plugin-networkmonitor/translations/networkmonitor_hu.desktop new file mode 100644 index 0000000..06bf911 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_hu.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[hu]=Alkalmazásmenü +Name[hu]=Alkalmazásindító alapú menü diff --git a/plugin-networkmonitor/translations/networkmonitor_hu_HU.ts b/plugin-networkmonitor/translations/networkmonitor_hu_HU.ts new file mode 100644 index 0000000..5573391 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_hu_HU.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + Általános + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_id_ID.desktop b/plugin-networkmonitor/translations/networkmonitor_id_ID.desktop new file mode 100644 index 0000000..9674b64 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_id_ID.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[id_ID]=Hell World +Name[id_ID]=Sebuah Plugin "hello world". diff --git a/plugin-networkmonitor/translations/networkmonitor_it.desktop b/plugin-networkmonitor/translations/networkmonitor_it.desktop new file mode 100644 index 0000000..51106c2 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_it.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[it]=Centro di Configurazione LxQt +Name[it]=Configura moduli di LXDE-Qt diff --git a/plugin-networkmonitor/translations/networkmonitor_it_IT.desktop b/plugin-networkmonitor/translations/networkmonitor_it_IT.desktop new file mode 100644 index 0000000..b41c335 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_it_IT.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[it_IT]=Esci +Name[it_IT]=Permette di passare ad altri desktop virtuali diff --git a/plugin-networkmonitor/translations/networkmonitor_it_IT.ts b/plugin-networkmonitor/translations/networkmonitor_it_IT.ts new file mode 100644 index 0000000..c4e7ee6 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_it_IT.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interfaccia di rete <b>%1</b> + + + + Transmitted %1 + Trasmesso %1 + + + + Received %1 + Ricevuto %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Impostazioni del monitor di rete di LxQt + + + + Network Monitor settings + + + + + General + Generale + + + + Interface + Interfaccia + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Rete + + + + Wireless + Wireless + + + + Icon + Icona + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_ja.desktop b/plugin-networkmonitor/translations/networkmonitor_ja.desktop new file mode 100644 index 0000000..014ab5f --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ja.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[ja]=ネットワークの状態や動作状況を表示します +Name[ja]=ネットワークモニター diff --git a/plugin-networkmonitor/translations/networkmonitor_ja.ts b/plugin-networkmonitor/translations/networkmonitor_ja.ts new file mode 100644 index 0000000..1321b80 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ja.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + ネットワークインターフェース <b>%1</b> + + + + Transmitted %1 + 送信 %1 + + + + Received %1 + 受信 %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + ネットワークモニターの設定 + + + + General + 一般 + + + + Interface + インターフェース + + + + Modem + モデム + + + + Monitor + モニター + + + + Network + ネットワーク + + + + Wireless + 無線 + + + + Icon + アイコン + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_lt.desktop b/plugin-networkmonitor/translations/networkmonitor_lt.desktop new file mode 100644 index 0000000..c04f905 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_lt.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[lt]=Qlipper +Name[lt]="Sveikas pasauli" priedas diff --git a/plugin-networkmonitor/translations/networkmonitor_lt.ts b/plugin-networkmonitor/translations/networkmonitor_lt.ts new file mode 100644 index 0000000..482d885 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_lt.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + + + + + Transmitted %1 + + + + + Received %1 + + + + + B + + + + + KiB + + + + + MiB + + + + + GiB + + + + + TiB + + + + + PiB + + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + + + + + General + Pagrindinės + + + + Interface + + + + + Modem + + + + + Monitor + + + + + Network + + + + + Wireless + + + + + Icon + + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_nl.desktop b/plugin-networkmonitor/translations/networkmonitor_nl.desktop new file mode 100644 index 0000000..19787ef --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_nl.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[nl]=Notepad +Name[nl]=Scherm notepad diff --git a/plugin-networkmonitor/translations/networkmonitor_nl.ts b/plugin-networkmonitor/translations/networkmonitor_nl.ts new file mode 100644 index 0000000..243ae1b --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_nl.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Netwerkkaart <b>%1</b> + + + + Transmitted %1 + Verstuurd %1 + + + + Received %1 + Ontvangen %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Instellingen voor Netwerkbewaker van LxQt + + + + Network Monitor settings + + + + + General + Algemeen + + + + Interface + Netwerkkaart + + + + Modem + Modem + + + + Monitor + Bewaker + + + + Network + Netwerk + + + + Wireless + Draadloos + + + + Icon + Pictogram + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_pl.desktop b/plugin-networkmonitor/translations/networkmonitor_pl.desktop new file mode 100644 index 0000000..c49b4e0 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pl.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[pl]=Menu +Name[pl]=Główne menu diff --git a/plugin-networkmonitor/translations/networkmonitor_pl_PL.desktop b/plugin-networkmonitor/translations/networkmonitor_pl_PL.desktop new file mode 100644 index 0000000..69163be --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pl_PL.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[pl_PL]=Konfiguracja wyglądu LxQt +Name[pl_PL]=Środowisko graficzne Qt4 diff --git a/plugin-networkmonitor/translations/networkmonitor_pl_PL.ts b/plugin-networkmonitor/translations/networkmonitor_pl_PL.ts new file mode 100644 index 0000000..073b64d --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pl_PL.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interfejs sieci <b>%1</b> + + + + Transmitted %1 + Przesłano %1 + + + + Received %1 + Otrzymano %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Ustawienia LxQt Network Monitor + + + + Network Monitor settings + + + + + General + Ogólne + + + + Interface + Interfejs + + + + Modem + Modem + + + + Monitor + Monitor + + + + Network + Sieć + + + + Wireless + Bezprzewodowe + + + + Icon + Ikona + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_pt.desktop b/plugin-networkmonitor/translations/networkmonitor_pt.desktop new file mode 100644 index 0000000..be90c44 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pt.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Network monitor +Comment=Displays network status and activity. + +# Translations +Name[pt]=Monitor de rede +Comment[pt]=Mostrar estado e atividade da rede diff --git a/plugin-networkmonitor/translations/networkmonitor_pt.ts b/plugin-networkmonitor/translations/networkmonitor_pt.ts new file mode 100644 index 0000000..36ad1dd --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pt.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interface de rede <b>%1</b> + + + + Transmitted %1 + Enviados %1 + + + + Received %1 + Recebidos %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Definições do monitor de rede do LxQt + + + + Network Monitor settings + + + + + General + Geral + + + + Interface + Interface + + + + Modem + Modem + + + + Monitor + Monitorizar + + + + Network + Rede + + + + Wireless + Rede sem fios + + + + Icon + Ícone + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_pt_BR.desktop b/plugin-networkmonitor/translations/networkmonitor_pt_BR.desktop new file mode 100644 index 0000000..8b6016a --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pt_BR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + +# Translations +Name[pt_BR]=Monitor de Rede +Comment[pt_BR]=Mostra atividade e estado da rede diff --git a/plugin-networkmonitor/translations/networkmonitor_pt_BR.ts b/plugin-networkmonitor/translations/networkmonitor_pt_BR.ts new file mode 100644 index 0000000..973dabd --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_pt_BR.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interface de rede <b>%1</b> + + + + Transmitted %1 + Transmitido %1 + + + + Received %1 + Recebido %1 + + + + B + Byte + + + + KiB + KByte + + + + MiB + MByte + + + + GiB + GByte + + + + TiB + TByte + + + + PiB + PByte + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Configurações de Monitoramento de Rede + + + + Network Monitor settings + + + + + General + Geral + + + + Interface + Interface + + + + Modem + Modem + + + + Monitor + Monitoramento + + + + Network + Rede + + + + Wireless + Sem fio + + + + Icon + Ícone + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_ro_RO.desktop b/plugin-networkmonitor/translations/networkmonitor_ro_RO.desktop new file mode 100644 index 0000000..88e7a69 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ro_RO.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[ro_RO]=Părăsește +Name[ro_RO]=Lansează aplicațiile favorite diff --git a/plugin-networkmonitor/translations/networkmonitor_ro_RO.ts b/plugin-networkmonitor/translations/networkmonitor_ro_RO.ts new file mode 100644 index 0000000..b333af7 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ro_RO.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Interfață rețea <b>%1</b> + + + + Transmitted %1 + Transmis %1 + + + + Received %1 + Recepționat %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Setări monitorizare rețea LxQt + + + + Network Monitor settings + + + + + General + General + + + + Interface + Interfață + + + + Modem + Modem + + + + Monitor + Monitorizare + + + + Network + Rețea + + + + Wireless + Wireless + + + + Icon + Pictogramă + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_ru.desktop b/plugin-networkmonitor/translations/networkmonitor_ru.desktop new file mode 100644 index 0000000..d37c566 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ru.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[ru]=Отображает сетевой статус и активность. +Name[ru]=Сетевой Монитор \ No newline at end of file diff --git a/plugin-networkmonitor/translations/networkmonitor_ru.ts b/plugin-networkmonitor/translations/networkmonitor_ru.ts new file mode 100644 index 0000000..3afc49d --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ru.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Сетевой интерфейс <b>%1</b> + + + + Transmitted %1 + Передано %1 + + + + Received %1 + Получено %1 + + + + B + Б + + + + KiB + Кб + + + + MiB + Мб + + + + GiB + Гб + + + + TiB + Тб + + + + PiB + Пб + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + Настройки сетевого монитора + + + + General + Общие + + + + Interface + Интерфейс + + + + Modem + Модем + + + + Monitor + Монитор + + + + Network + Сеть + + + + Wireless + Беспроводная сеть + + + + Icon + Значок + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_ru_RU.desktop b/plugin-networkmonitor/translations/networkmonitor_ru_RU.desktop new file mode 100644 index 0000000..5e052b9 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ru_RU.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[ru_RU]=Отображает сетевой статус и активность. +Name[ru_RU]=Сетевой Монитор \ No newline at end of file diff --git a/plugin-networkmonitor/translations/networkmonitor_ru_RU.ts b/plugin-networkmonitor/translations/networkmonitor_ru_RU.ts new file mode 100644 index 0000000..070c0d0 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_ru_RU.ts @@ -0,0 +1,95 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Сетевой интерфейс <b>%1</b> + + + + Transmitted %1 + Передано %1 + + + + Received %1 + Получено %1 + + + + B + Б + + + + KiB + Кб + + + + MiB + Мб + + + + GiB + Гб + + + + TiB + Тб + + + + PiB + Пб + + + + LxQtNetworkMonitorConfiguration + + + Network Monitor settings + Настройки сетевого монитора + + + + General + Общие + + + + Interface + Интерфейс + + + + Modem + Модем + + + + Monitor + Монитор + + + + Network + Сеть + + + + Wireless + Беспроводная сеть + + + + Icon + Значок + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_sl.desktop b/plugin-networkmonitor/translations/networkmonitor_sl.desktop new file mode 100644 index 0000000..510b1b9 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_sl.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[sl]=Nadzornik omrežja +Name[sl]=Nadzornik omrežja diff --git a/plugin-networkmonitor/translations/networkmonitor_sl.ts b/plugin-networkmonitor/translations/networkmonitor_sl.ts new file mode 100644 index 0000000..53a37e1 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_sl.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Omrežni vmesnik <b>%1</b> + + + + Transmitted %1 + Poslano: %1 + + + + Received %1 + Prejeto: %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Nastavitve nadzornika omrežja LXQt + + + + Network Monitor settings + + + + + General + Splošno + + + + Interface + Vmesnik + + + + Modem + Modem + + + + Monitor + Zaslon + + + + Network + Omrežje + + + + Wireless + Brezžično + + + + Icon + Ikona + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_sr@latin.desktop b/plugin-networkmonitor/translations/networkmonitor_sr@latin.desktop new file mode 100644 index 0000000..e0573b1 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_sr@latin.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[sr@latin]=Automatsko suspendovanje +Name[sr@latin]=Meni pokretača programa diff --git a/plugin-networkmonitor/translations/networkmonitor_th_TH.desktop b/plugin-networkmonitor/translations/networkmonitor_th_TH.desktop new file mode 100644 index 0000000..84ef080 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_th_TH.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[th_TH]=เฝ้าสังเกตเครือข่าย +Name[th_TH]=เฝ้าสังเกตเครือข่าย diff --git a/plugin-networkmonitor/translations/networkmonitor_th_TH.ts b/plugin-networkmonitor/translations/networkmonitor_th_TH.ts new file mode 100644 index 0000000..303ed5e --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_th_TH.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + ส่วนติดต่อเครือข่าย <b>%1</b> + + + + Transmitted %1 + ส่ง %1 + + + + Received %1 + รับ %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + ค่าตั้งการเฝ้าสังเกตเครือข่าย LxQt + + + + Network Monitor settings + + + + + General + ทั่วไป + + + + Interface + ส่วนติดต่อ + + + + Modem + โมเด็ม + + + + Monitor + เฝ้าสังเกต + + + + Network + เครือข่าย + + + + Wireless + ไรัสาย + + + + Icon + ไอคอน + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_tr.desktop b/plugin-networkmonitor/translations/networkmonitor_tr.desktop new file mode 100644 index 0000000..66e7f8e --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_tr.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[tr]=Not Defteri +Name[tr]=Ekran not defteri diff --git a/plugin-networkmonitor/translations/networkmonitor_tr.ts b/plugin-networkmonitor/translations/networkmonitor_tr.ts new file mode 100644 index 0000000..758a3ab --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_tr.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Ağ arayüzü <b>%1</b> + + + + Transmitted %1 + Gönderilen %1 + + + + Received %1 + Alınan %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + PiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt Ağ İzleme ayarları + + + + Network Monitor settings + + + + + General + Genel + + + + Interface + Arayüz + + + + Modem + Modem + + + + Monitor + Ekran + + + + Network + + + + + Wireless + Kablosuz + + + + Icon + Simge + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_uk.desktop b/plugin-networkmonitor/translations/networkmonitor_uk.desktop new file mode 100644 index 0000000..d6c29ea --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_uk.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[uk]=Показує стан та активність мережі. +Name[uk]=Монітор мережі diff --git a/plugin-networkmonitor/translations/networkmonitor_uk.ts b/plugin-networkmonitor/translations/networkmonitor_uk.ts new file mode 100644 index 0000000..ba0ddb1 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_uk.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + Мережевий адаптер <b>%1</b> + + + + Transmitted %1 + Передано %1 + + + + Received %1 + Прийнято %1 + + + + B + Б + + + + KiB + КіБ + + + + MiB + МіБ + + + + GiB + ГіБ + + + + TiB + ТіБ + + + + PiB + ПіБ + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + Налаштування монітору мережі LxQt + + + + Network Monitor settings + + + + + General + Загальне + + + + Interface + Адаптер + + + + Modem + Модем + + + + Monitor + Монітор + + + + Network + Мережевий + + + + Wireless + Бездротовий + + + + Icon + Значок + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_zh_CN.desktop b/plugin-networkmonitor/translations/networkmonitor_zh_CN.desktop new file mode 100644 index 0000000..02fa825 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_zh_CN.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + + + +# Translations +Comment[zh_CN]=qxkb +Name[zh_CN]=屏幕记事本 diff --git a/plugin-networkmonitor/translations/networkmonitor_zh_CN.ts b/plugin-networkmonitor/translations/networkmonitor_zh_CN.ts new file mode 100644 index 0000000..5d06789 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_zh_CN.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + 网络接口 <b>%1</b> + + + + Transmitted %1 + 已传输 %1 + + + + Received %1 + 已接收 %1 + + + + B + B + + + + KiB + KiB + + + + MiB + MiB + + + + GiB + GiB + + + + TiB + TiB + + + + PiB + TiB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt 网络监测器设置 + + + + Network Monitor settings + + + + + General + 常规 + + + + Interface + 接口 + + + + Modem + 调制解调器 + + + + Monitor + 监测器 + + + + Network + 网络 + + + + Wireless + 无线 + + + + Icon + 图标 + + + diff --git a/plugin-networkmonitor/translations/networkmonitor_zh_TW.desktop b/plugin-networkmonitor/translations/networkmonitor_zh_TW.desktop new file mode 100644 index 0000000..a15014c --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_zh_TW.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin + +Name=Network monitor +Comment=Displays network status and activity. + + +# Translations +Comment[zh_TW]=網路監視器 +Name[zh_TW]=顯示網路狀態和活動 diff --git a/plugin-networkmonitor/translations/networkmonitor_zh_TW.ts b/plugin-networkmonitor/translations/networkmonitor_zh_TW.ts new file mode 100644 index 0000000..4fbb505 --- /dev/null +++ b/plugin-networkmonitor/translations/networkmonitor_zh_TW.ts @@ -0,0 +1,99 @@ + + + + + LxQtNetworkMonitor + + + Network interface <b>%1</b> + 網路介面 <b>%1</b> + + + + Transmitted %1 + 傳送 %1 + + + + Received %1 + 接收 %1 + + + + B + B + + + + KiB + KB + + + + MiB + MB + + + + GiB + GB + + + + TiB + TB + + + + PiB + PB + + + + LxQtNetworkMonitorConfiguration + + LxQt Network Monitor settings + LxQt網路監視器設定 + + + + Network Monitor settings + + + + + General + 一般 + + + + Interface + 介面 + + + + Modem + 數據機 + + + + Monitor + 監視器 + + + + Network + 網路 + + + + Wireless + 無線 + + + + Icon + 圖示 + + + diff --git a/plugin-quicklaunch/CMakeLists.txt b/plugin-quicklaunch/CMakeLists.txt new file mode 100644 index 0000000..624c9b5 --- /dev/null +++ b/plugin-quicklaunch/CMakeLists.txt @@ -0,0 +1,33 @@ +set(PLUGIN "quicklaunch") + +set(HEADERS + lxqtquicklaunchplugin.h + lxqtquicklaunch.h + quicklaunchbutton.h + quicklaunchaction.h +) + +set(SOURCES + lxqtquicklaunchplugin.cpp + lxqtquicklaunch.cpp + quicklaunchbutton.cpp + quicklaunchaction.cpp +) + +set(MOCS + lxqtquicklaunchplugin.h + lxqtquicklaunch.h + quicklaunchbutton.h + quicklaunchaction.h +) + +set(LIBRARIES + ${QTXDG_LIBRARIES} +) + +include_directories( + ${LXQT_INCLUDE_DIRS} + "${CMAKE_CURRENT_SOURCE_DIR}/../panel" +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-quicklaunch/lxqtquicklaunch.cpp b/plugin-quicklaunch/lxqtquicklaunch.cpp new file mode 100644 index 0000000..03f4edd --- /dev/null +++ b/plugin-quicklaunch/lxqtquicklaunch.cpp @@ -0,0 +1,323 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2012 Razor team + * Authors: + * Petr Vanek + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtquicklaunch.h" +#include "quicklaunchbutton.h" +#include +#include "quicklaunchaction.h" +#include "../panel/ilxqtpanelplugin.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +LxQtQuickLaunch::LxQtQuickLaunch(ILxQtPanelPlugin *plugin, QWidget* parent) : + QFrame(parent), + mPlugin(plugin), + mPlaceHolder(0) +{ + setAcceptDrops(true); + + mLayout = new LxQt::GridLayout(this); + setLayout(mLayout); + + QSettings *settings = mPlugin->settings(); + int count = settings->beginReadArray("apps"); + + QString desktop; + QString file; + QString execname; + QString exec; + QString icon; + for (int i = 0; i < count; ++i) + { + settings->setArrayIndex(i); + desktop = settings->value("desktop", "").toString(); + file = settings->value("file", "").toString(); + if (! desktop.isEmpty()) + { + XdgDesktopFile xdg; + if (!xdg.load(desktop)) + { + qDebug() << "XdgDesktopFile" << desktop << "is not valid"; + continue; + } + if (!xdg.isSuitable()) + { + qDebug() << "XdgDesktopFile" << desktop << "is not applicable"; + continue; + } + + addButton(new QuickLaunchAction(&xdg, this)); + } + else if (! file.isEmpty()) + { + addButton(new QuickLaunchAction(file, this)); + } + else + { + execname = settings->value("name", "").toString(); + exec = settings->value("exec", "").toString(); + icon = settings->value("icon", "").toString(); + if (icon.isNull()) + { + qDebug() << "Icon" << icon << "is not valid (isNull). Skipped."; + continue; + } + addButton(new QuickLaunchAction(execname, exec, icon, this)); + } + } // for + + settings->endArray(); + + if (mLayout->isEmpty()) + showPlaceHolder(); + + realign(); +} + +LxQtQuickLaunch::~LxQtQuickLaunch() +{ +} + +int LxQtQuickLaunch::indexOfButton(QuickLaunchButton* button) const +{ + return mLayout->indexOf(button); +} + +int LxQtQuickLaunch::countOfButtons() const +{ + return mLayout->count(); +} + +void LxQtQuickLaunch::realign() +{ + mLayout->setEnabled(false); + ILxQtPanel *panel = mPlugin->panel(); + + if (mPlaceHolder) + { + mLayout->setColumnCount(1); + mLayout->setRowCount(1); + } + else + { + if (panel->isHorizontal()) + { + mLayout->setRowCount(panel->lineCount()); + mLayout->setColumnCount(0); + } + else + { + mLayout->setColumnCount(panel->lineCount()); + mLayout->setRowCount(0); + } + } + mLayout->setEnabled(true); +} + +void LxQtQuickLaunch::addButton(QuickLaunchAction* action) +{ + mLayout->setEnabled(false); + QuickLaunchButton* btn = new QuickLaunchButton(action, this); + mLayout->addWidget(btn); + + connect(btn, SIGNAL(switchButtons(QuickLaunchButton*,QuickLaunchButton*)), this, SLOT(switchButtons(QuickLaunchButton*,QuickLaunchButton*))); + connect(btn, SIGNAL(buttonDeleted()), this, SLOT(buttonDeleted())); + connect(btn, SIGNAL(movedLeft()), this, SLOT(buttonMoveLeft())); + connect(btn, SIGNAL(movedRight()), this, SLOT(buttonMoveRight())); + + mLayout->removeWidget(mPlaceHolder); + delete mPlaceHolder; + mPlaceHolder = 0; + mLayout->setEnabled(true); + realign(); +} + +void LxQtQuickLaunch::dragEnterEvent(QDragEnterEvent *e) +{ + // Getting URL from mainmenu... + if (e->mimeData()->hasUrls()) + { + e->acceptProposedAction(); + return; + } + + if (e->source() && e->source()->parent() == this) + { + e->acceptProposedAction(); + } +} + +void LxQtQuickLaunch::dropEvent(QDropEvent *e) +{ + const QMimeData *mime = e->mimeData(); + + foreach (QUrl url, mime->urls().toSet()) + { + QString fileName(url.isLocalFile() ? url.toLocalFile() : url.url()); + QFileInfo fi(fileName); + XdgDesktopFile xdg; + + if (xdg.load(fileName)) + { + if (xdg.isSuitable()) + addButton(new QuickLaunchAction(&xdg, this)); + } + else if (fi.exists() && fi.isExecutable() && !fi.isDir()) + { + addButton(new QuickLaunchAction(fileName, fileName, "", this)); + } + else if (fi.exists()) + { + addButton(new QuickLaunchAction(fileName, this)); + } + else + { + qWarning() << "XdgDesktopFile" << fileName << "is not valid"; + QMessageBox::information(this, tr("Drop Error"), + tr("File/URL '%1' cannot be embedded into QuickLaunch for now").arg(fileName) + ); + } + } + saveSettings(); +} + +void LxQtQuickLaunch::switchButtons(QuickLaunchButton *button1, QuickLaunchButton *button2) +{ + if (button1 == button2) + return; + + int n1 = mLayout->indexOf(button1); + int n2 = mLayout->indexOf(button2); + + int l = qMin(n1, n2); + int m = qMax(n1, n2); + + mLayout->moveItem(l, m); + mLayout->moveItem(m-1, l); + saveSettings(); +} + +void LxQtQuickLaunch::buttonDeleted() +{ + QuickLaunchButton *btn = qobject_cast(sender()); + if (!btn) + return; + + mLayout->removeWidget(btn); + btn->deleteLater(); + saveSettings(); + + if (mLayout->isEmpty()) + showPlaceHolder(); + + realign(); +} + +void LxQtQuickLaunch::buttonMoveLeft() +{ + QuickLaunchButton *btn = qobject_cast(sender()); + if (!btn) + return; + + int index = indexOfButton(btn); + if (index > 0) + { + mLayout->moveItem(index, index - 1); + saveSettings(); + } +} + + +void LxQtQuickLaunch::buttonMoveRight() +{ + QuickLaunchButton *btn1 = qobject_cast(sender()); + if (!btn1) + return; + + int index = indexOfButton(btn1); + if (index < countOfButtons() - 1) + { + mLayout->moveItem(index, index + 1); + saveSettings(); + } +} + + +void LxQtQuickLaunch::saveSettings() +{ + QSettings *settings = mPlugin->settings(); + settings->remove("apps"); + settings->beginWriteArray("apps"); + int i = 0; + + for(int j=0; jcount(); ++j) + { + QuickLaunchButton *b = qobject_cast(mLayout->itemAt(j)->widget()); + if(!b) + continue; + + settings->setArrayIndex(i); + + QHashIterator it(b->settingsMap()); + while (it.hasNext()) + { + it.next(); + settings->setValue(it.key(), it.value()); + } + + ++i; + } + + settings->endArray(); +} + +void LxQtQuickLaunch::showPlaceHolder() +{ + if (!mPlaceHolder) + { + mPlaceHolder = new QLabel(this); + mPlaceHolder->setAlignment(Qt::AlignCenter); + mPlaceHolder->setObjectName("QuickLaunchPlaceHolder"); + mPlaceHolder->setText(tr("Drop application\nicons here")); + } + + mLayout->addWidget(mPlaceHolder); +} diff --git a/plugin-quicklaunch/lxqtquicklaunch.h b/plugin-quicklaunch/lxqtquicklaunch.h new file mode 100644 index 0000000..4e11c24 --- /dev/null +++ b/plugin-quicklaunch/lxqtquicklaunch.h @@ -0,0 +1,84 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2012 Razor team + * Authors: + * Petr Vanek + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTQUICKLAUNCH_H +#define LXQTQUICKLAUNCH_H + +#include "../panel/lxqtpanel.h" +#include +#include + +class XdgDesktopFile; +class QuickLaunchAction; +class QDragEnterEvent; +class QuickLaunchButton; +class QSettings; +class QLabel; + +namespace LxQt { +class GridLayout; +} + +/*! \brief Loader for "quick launcher" icons in the panel. +\author Petr Vanek +*/ +class LxQtQuickLaunch : public QFrame +{ + Q_OBJECT + +public: + LxQtQuickLaunch(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~LxQtQuickLaunch(); + + int indexOfButton(QuickLaunchButton* button) const; + int countOfButtons() const; + + void realign(); + +private: + LxQt::GridLayout *mLayout; + ILxQtPanelPlugin *mPlugin; + QLabel *mPlaceHolder; + + void dragEnterEvent(QDragEnterEvent *e); + void dropEvent(QDropEvent *e); + + void saveSettings(); + void showPlaceHolder(); + +private slots: + void addButton(QuickLaunchAction* action); + void switchButtons(QuickLaunchButton *button1, QuickLaunchButton *button2); + void buttonDeleted(); + void buttonMoveLeft(); + void buttonMoveRight(); +}; + + +#endif diff --git a/plugin-quicklaunch/lxqtquicklaunchplugin.cpp b/plugin-quicklaunch/lxqtquicklaunchplugin.cpp new file mode 100644 index 0000000..bbc1f21 --- /dev/null +++ b/plugin-quicklaunch/lxqtquicklaunchplugin.cpp @@ -0,0 +1,52 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtquicklaunchplugin.h" +#include "lxqtquicklaunch.h" + +LxQtQuickLaunchPlugin::LxQtQuickLaunchPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mWidget(new LxQtQuickLaunch(this)) +{ +} + +LxQtQuickLaunchPlugin::~LxQtQuickLaunchPlugin() +{ + delete mWidget; +} + +QWidget *LxQtQuickLaunchPlugin::widget() +{ + return mWidget; +} + +void LxQtQuickLaunchPlugin::realign() +{ + mWidget->realign(); +} diff --git a/plugin-quicklaunch/lxqtquicklaunchplugin.h b/plugin-quicklaunch/lxqtquicklaunchplugin.h new file mode 100644 index 0000000..bbb2c17 --- /dev/null +++ b/plugin-quicklaunch/lxqtquicklaunchplugin.h @@ -0,0 +1,66 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTQUICKLAUNCHPLUGIN_H +#define LXQTQUICKLAUNCHPLUGIN_H + +#include "../panel/ilxqtpanelplugin.h" +#include +class LxQtQuickLaunch; + +class LxQtQuickLaunchPlugin: public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + explicit LxQtQuickLaunchPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtQuickLaunchPlugin(); + + virtual QWidget *widget(); + virtual QString themeId() const { return "QuickLaunch"; } + + void realign(); + + bool isSeparate() const { return true; } + +private: + LxQtQuickLaunch *mWidget; +}; + + +class LxQtQuickLaunchPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtQuickLaunchPlugin(startupInfo); + } +}; +#endif // LXQTQUICKLAUNCHPLUGIN_H diff --git a/plugin-quicklaunch/quicklaunchaction.cpp b/plugin-quicklaunch/quicklaunchaction.cpp new file mode 100644 index 0000000..0d282a0 --- /dev/null +++ b/plugin-quicklaunch/quicklaunchaction.cpp @@ -0,0 +1,132 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "quicklaunchaction.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +QuickLaunchAction::QuickLaunchAction(const QString & name, + const QString & exec, + const QString & icon, + QWidget * parent) + : QAction(name, parent), + m_valid(true) +{ + m_type = ActionLegacy; + + m_settingsMap["name"] = name; + m_settingsMap["exec"] = exec; + m_settingsMap["icon"] = icon; + + if (icon == "" || icon.isNull()) + setIcon(XdgIcon::defaultApplicationIcon()); + else + setIcon(QIcon(icon)); + + setData(exec); + connect(this, SIGNAL(triggered()), this, SLOT(execAction())); +} + +QuickLaunchAction::QuickLaunchAction(const XdgDesktopFile * xdg, + QWidget * parent) + : QAction(parent), + m_valid(true) +{ + m_type = ActionXdg; + + m_settingsMap["desktop"] = xdg->fileName(); + + QString title(xdg->localizedValue("Name").toString()); + QString gn(xdg->localizedValue("GenericName").toString()); + if (!gn.isEmpty()) + title += " (" + gn + ")"; + setText(title); + + setIcon(xdg->icon(XdgIcon::defaultApplicationIcon())); + + setData(xdg->fileName()); + connect(this, SIGNAL(triggered()), this, SLOT(execAction())); +} + +QuickLaunchAction::QuickLaunchAction(const QString & fileName, QWidget * parent) + : QAction(parent), + m_valid(true) +{ + m_type = ActionFile; + setText(fileName); + setData(fileName); + + m_settingsMap["file"] = fileName; + + QFileInfo fi(fileName); + if (fi.isDir()) + { + QFileIconProvider ip; + setIcon(ip.icon(fi)); + } + else + { + QMimeDatabase db; + XdgMimeType mi(db.mimeTypeForFile(fi)); + setIcon(mi.icon()); + } + + connect(this, SIGNAL(triggered()), this, SLOT(execAction())); +} + +void QuickLaunchAction::execAction() +{ + QString exec(data().toString()); + qDebug() << "execAction" << exec; + switch (m_type) + { + case ActionLegacy: + QProcess::startDetached(exec); + break; + case ActionXdg: + { + XdgDesktopFile xdg; + if(xdg.load(exec)) + xdg.startDetached(); + break; + } + case ActionFile: + QDesktopServices::openUrl(QUrl(exec)); + break; + } +} diff --git a/plugin-quicklaunch/quicklaunchaction.h b/plugin-quicklaunch/quicklaunchaction.h new file mode 100644 index 0000000..61d4793 --- /dev/null +++ b/plugin-quicklaunch/quicklaunchaction.h @@ -0,0 +1,80 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef QUICKLAUNCHACTION_H +#define QUICKLAUNCHACTION_H + +#include + +class XdgDesktopFile; + + +/*! \brief Special action representation for LxQtQuickLaunch plugin. +It supports XDG desktop files or "legacy" launching of specified apps. +All process management is handled internally. +\author Petr Vanek +*/ +class QuickLaunchAction : public QAction +{ + Q_OBJECT + +public: + /*! Constructor for "legacy" launchers. + \warning The XDG way is preferred this is only for older or non-standard apps + \param name a name to display in tooltip + \param exec a executable with path + \param icon a valid QIcon + */ + QuickLaunchAction(const QString & name, + const QString & exec, + const QString & icon, + QWidget * parent); + /*! Constructor for XDG desktop handlers. + */ + QuickLaunchAction(const XdgDesktopFile * xdg, QWidget * parent); + /*! Constructor for regular files + */ + QuickLaunchAction(const QString & fileName, QWidget * parent); + + //! Returns true if the action is valid (contains all required properties). + bool isValid() { return m_valid; } + + QHash settingsMap() { return m_settingsMap; } + +public slots: + void execAction(); + +private: + enum ActionType { ActionLegacy, ActionXdg, ActionFile }; + ActionType m_type; + QString m_data; + bool m_valid; + QHash m_settingsMap; +}; + +#endif diff --git a/plugin-quicklaunch/quicklaunchbutton.cpp b/plugin-quicklaunch/quicklaunchbutton.cpp new file mode 100644 index 0000000..59fdd79 --- /dev/null +++ b/plugin-quicklaunch/quicklaunchbutton.cpp @@ -0,0 +1,171 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "quicklaunchbutton.h" +#include "lxqtquicklaunch.h" + +#define MIMETYPE "x-lxqt/quicklaunch-button" + + +QuickLaunchButton::QuickLaunchButton(QuickLaunchAction * act, QWidget * parent) + : QToolButton(parent), + mAct(act) +{ + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + setAcceptDrops(true); + + setDefaultAction(mAct); + mAct->setParent(this); + + mMoveLeftAct = new QAction(XdgIcon::fromTheme("go-previous"), tr("Move left"), this); + connect(mMoveLeftAct, SIGNAL(triggered()), this, SIGNAL(movedLeft())); + + mMoveRightAct = new QAction(XdgIcon::fromTheme("go-next"), tr("Move right"), this); + connect(mMoveRightAct, SIGNAL(triggered()), this, SIGNAL(movedRight())); + + + mDeleteAct = new QAction(XdgIcon::fromTheme("dialog-close"), tr("Remove from quicklaunch"), this); + connect(mDeleteAct, SIGNAL(triggered()), this, SLOT(selfRemove())); + addAction(mDeleteAct); + mMenu = new QMenu(this); + mMenu->addAction(mAct); + mMenu->addSeparator(); + mMenu->addAction(mMoveLeftAct); + mMenu->addAction(mMoveRightAct); + mMenu->addSeparator(); + mMenu->addAction(mDeleteAct); + + + setContextMenuPolicy(Qt::CustomContextMenu); + connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), + this, SLOT(this_customContextMenuRequested(const QPoint&))); +} + +QuickLaunchButton::~QuickLaunchButton() +{ + //m_act->deleteLater(); +} + +QHash QuickLaunchButton::settingsMap() +{ + Q_ASSERT(mAct); + return mAct->settingsMap(); +} + + +void QuickLaunchButton::this_customContextMenuRequested(const QPoint & pos) +{ + LxQtQuickLaunch *panel = qobject_cast(parent()); + + mMoveLeftAct->setEnabled( panel && panel->indexOfButton(this) > 0); + mMoveRightAct->setEnabled(panel && panel->indexOfButton(this) < panel->countOfButtons() - 1); + mMenu->popup(mapToGlobal(pos)); +} + +void QuickLaunchButton::selfRemove() +{ + emit buttonDeleted(); +} + +void QuickLaunchButton::paintEvent(QPaintEvent *) +{ + // Do not paint that ugly "has menu" arrow + QStylePainter p(this); + QStyleOptionToolButton opt; + initStyleOption(&opt); + opt.features &= (~ QStyleOptionToolButton::HasMenu); + p.drawComplexControl(QStyle::CC_ToolButton, opt); +} + +void QuickLaunchButton::mousePressEvent(QMouseEvent *e) +{ + if (e->button() == Qt::LeftButton && e->modifiers() == Qt::ControlModifier) + { + mDragStart = e->pos(); + return; + } + + QToolButton::mousePressEvent(e); +} + +void QuickLaunchButton::mouseMoveEvent(QMouseEvent *e) +{ + if (!(e->buttons() & Qt::LeftButton)) + { + return; + } + + if ((e->pos() - mDragStart).manhattanLength() < QApplication::startDragDistance()) + { + return; + } + + if (e->modifiers() != Qt::ControlModifier) + { + return; + } + + QDrag *drag = new QDrag(this); + ButtonMimeData *mimeData = new ButtonMimeData(); + mimeData->setButton(this); + drag->setMimeData(mimeData); + + drag->exec(Qt::MoveAction); + + // Icon was droped outside the panel, remove button + if (!drag->target()) + { + selfRemove(); + } +} + +void QuickLaunchButton::dragMoveEvent(QDragMoveEvent * e) +{ + if (e->mimeData()->hasFormat(MIMETYPE)) + e->acceptProposedAction(); + else + e->ignore(); +} + +void QuickLaunchButton::dragEnterEvent(QDragEnterEvent *e) +{ + const ButtonMimeData *mimeData = qobject_cast(e->mimeData()); + if (mimeData && mimeData->button()) + { + emit switchButtons(mimeData->button(), this); + } +} + diff --git a/plugin-quicklaunch/quicklaunchbutton.h b/plugin-quicklaunch/quicklaunchbutton.h new file mode 100644 index 0000000..57f8136 --- /dev/null +++ b/plugin-quicklaunch/quicklaunchbutton.h @@ -0,0 +1,92 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2012 Razor team + * Authors: + * Petr Vanek + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTQUICKLAUNCHBUTTON_H +#define LXQTQUICKLAUNCHBUTTON_H + +#include +#include +#include "quicklaunchaction.h" + + +class QuickLaunchButton : public QToolButton +{ + Q_OBJECT + +public: + QuickLaunchButton(QuickLaunchAction * act, QWidget* parent = 0); + ~QuickLaunchButton(); + + QHash settingsMap(); + +signals: + void buttonDeleted(); + void switchButtons(QuickLaunchButton *from, QuickLaunchButton *to); + void movedLeft(); + void movedRight(); + +protected: + //! Disable that annoying small arrow when there is a menu + virtual void paintEvent(QPaintEvent *); + void mousePressEvent(QMouseEvent *e); + void mouseMoveEvent(QMouseEvent *e); + void dragEnterEvent(QDragEnterEvent *e); + void dragMoveEvent(QDragMoveEvent * e); + +private: + QuickLaunchAction *mAct; + QAction *mDeleteAct; + QAction *mMoveLeftAct; + QAction *mMoveRightAct; + QMenu *mMenu; + QPoint mDragStart; + +private slots: + void this_customContextMenuRequested(const QPoint & pos); + void selfRemove(); +}; + + +class ButtonMimeData: public QMimeData +{ + Q_OBJECT +public: + ButtonMimeData(): + QMimeData(), + mButton(0) + { + } + + QuickLaunchButton *button() const { return mButton; } + void setButton(QuickLaunchButton *button) { mButton = button; } +private: + QuickLaunchButton *mButton; +}; + +#endif diff --git a/plugin-quicklaunch/resources/quicklaunch.desktop.in b/plugin-quicklaunch/resources/quicklaunch.desktop.in new file mode 100644 index 0000000..f673143 --- /dev/null +++ b/plugin-quicklaunch/resources/quicklaunch.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. +Icon=quickopen + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-quicklaunch/translations/quicklaunch.ts b/plugin-quicklaunch/translations/quicklaunch.ts new file mode 100644 index 0000000..e48df72 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ar.desktop b/plugin-quicklaunch/translations/quicklaunch_ar.desktop new file mode 100644 index 0000000..367b8d2 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=إطلاق تطبيقاتك المفضَّلة +Name[ar]=البدء السريع diff --git a/plugin-quicklaunch/translations/quicklaunch_ar.ts b/plugin-quicklaunch/translations/quicklaunch_ar.ts new file mode 100644 index 0000000..e460928 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ar.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + خطاٌ في النَّقل + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + ﻻ يمكن تضمين الملف أو الرَّابط %1 في لوحة البدء السَّريع حاليَّاً + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + إلى اليسار + + + + Move right + إلى اليمين + + + + Remove from quicklaunch + إزالة من لوحة البدء السَّريع + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_cs.desktop b/plugin-quicklaunch/translations/quicklaunch_cs.desktop new file mode 100644 index 0000000..9534ad1 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Spouštěte své oblíbené programy +Name[cs]=Rychlé spouštění diff --git a/plugin-quicklaunch/translations/quicklaunch_cs.ts b/plugin-quicklaunch/translations/quicklaunch_cs.ts new file mode 100644 index 0000000..8a458bc --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_cs.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Problém s upuštěním + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Soubor/URL '%1' nyní nelze vložit do rychlého spuštění + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Přesunout vlevo + + + + Move right + Přesunout vpravo + + + + Remove from quicklaunch + Odstranit z rychlého spuštění + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_cs_CZ.desktop b/plugin-quicklaunch/translations/quicklaunch_cs_CZ.desktop new file mode 100644 index 0000000..242038f --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Spusťte své oblíbené programy +Name[cs_CZ]=Rychlé spuštění diff --git a/plugin-quicklaunch/translations/quicklaunch_cs_CZ.ts b/plugin-quicklaunch/translations/quicklaunch_cs_CZ.ts new file mode 100644 index 0000000..9c9451d --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_cs_CZ.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Problém s upuštěním + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Soubor/URL '%1' nyní nelze vložit do rychlého spuštění + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Přesunout vlevo + + + + Move right + Přesunout vpravo + + + + Remove from quicklaunch + Odstranit z rychlého spuštění + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_da.desktop b/plugin-quicklaunch/translations/quicklaunch_da.desktop new file mode 100644 index 0000000..e20a452 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Start dine favoritprogrammer +Name[da]=Quicklaunch diff --git a/plugin-quicklaunch/translations/quicklaunch_da.ts b/plugin-quicklaunch/translations/quicklaunch_da.ts new file mode 100644 index 0000000..1ef231f --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_da.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Slipfejl + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Fil/URL '%1' kan ikke indlejres i HurtigStart lige nu + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Flyt mod venstre + + + + Move right + Flyt mod højre + + + + Remove from quicklaunch + Fjern fra Hurtigstart + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_da_DK.desktop b/plugin-quicklaunch/translations/quicklaunch_da_DK.desktop new file mode 100644 index 0000000..4bd52af --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Start dine ynglingsprogrammer +Name[da_DK]=Hurtigstart diff --git a/plugin-quicklaunch/translations/quicklaunch_da_DK.ts b/plugin-quicklaunch/translations/quicklaunch_da_DK.ts new file mode 100644 index 0000000..2dafd69 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_da_DK.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Træk og slip fejl + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Fil/URL '%1' kan ikke blive indlejret i QuickLaunch lige nu + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Flyt mod venstre + + + + Move right + Flyt mod højre + + + + Remove from quicklaunch + Fjern fra quicklaunch + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_de.desktop b/plugin-quicklaunch/translations/quicklaunch_de.desktop new file mode 100644 index 0000000..796f7af --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Starten Sie Ihre lieblings Anwendungen +Name[de]=Schnellstarter diff --git a/plugin-quicklaunch/translations/quicklaunch_de.ts b/plugin-quicklaunch/translations/quicklaunch_de.ts new file mode 100644 index 0000000..2e006b1 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_de.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Fehler fallen lassen + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Datei/URL »%1« kann momentan nicht in die Schnellstartleiste eingebettet werden. + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Nach links verschieben + + + + Move right + Nach rechts verschieben + + + + Remove from quicklaunch + Aus der Schnellstartleiste entfernen + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_de_DE.desktop b/plugin-quicklaunch/translations/quicklaunch_de_DE.desktop new file mode 100644 index 0000000..ea06f5e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Starte deine Lieblingsanwendungen +Name[de_DE]=Schnellstarter diff --git a/plugin-quicklaunch/translations/quicklaunch_de_DE.ts b/plugin-quicklaunch/translations/quicklaunch_de_DE.ts new file mode 100644 index 0000000..74e8ad6 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_de_DE.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Drop Error + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Datei/Pfad '%1' kann im moment nicht in den Schnellstarter integriert werden + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Nach links bewegen + + + + Move right + Nach rechts bewegen + + + + Remove from quicklaunch + Aus dem Schnellstarter löschen + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_el_GR.desktop b/plugin-quicklaunch/translations/quicklaunch_el_GR.desktop new file mode 100644 index 0000000..5efea66 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Εκκίνηση των αγαπημένων σας εφαρμογών +Name[el_GR]=Γρήγορη εκκίνηση diff --git a/plugin-quicklaunch/translations/quicklaunch_el_GR.ts b/plugin-quicklaunch/translations/quicklaunch_el_GR.ts new file mode 100644 index 0000000..e2fb17b --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_el_GR.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Σφάλμα εναπόθεσης + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Το αρχείο/η διεύθυνση "%1" δεν μπορεί να ενσωματωθεί για την ώρα στη γρήγορη εκκίνηση + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Μετακίνηση αριστερά + + + + Move right + Μετακίνηση δεξιά + + + + Remove from quicklaunch + Αφαίρεση από τη γρήγορη εκκίνηση + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_eo.desktop b/plugin-quicklaunch/translations/quicklaunch_eo.desktop new file mode 100644 index 0000000..8bdd345 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Lanĉu viajn preferatajn aplikaĵojn +Name[eo]=Rapidlanĉo diff --git a/plugin-quicklaunch/translations/quicklaunch_eo.ts b/plugin-quicklaunch/translations/quicklaunch_eo.ts new file mode 100644 index 0000000..c212b88 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_eo.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Eraro dum forigado + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Dosiero/URL '%1' ne povas esti enkorpigita en rapidlanĉilo nun + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Movi maldekstren + + + + Move right + Movi dekstren + + + + Remove from quicklaunch + Forigi el rapidlanĉilo + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_es.desktop b/plugin-quicklaunch/translations/quicklaunch_es.desktop new file mode 100644 index 0000000..05f859b --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Lanze sus aplicaciones favoritas +Name[es]=Lanzador rápido diff --git a/plugin-quicklaunch/translations/quicklaunch_es.ts b/plugin-quicklaunch/translations/quicklaunch_es.ts new file mode 100644 index 0000000..24a0f0e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_es.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Error al soltar + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + El archivo/URL '%1' por el momento no puede incrustarse en QuickLaunch + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mover a la izquierda + + + + Move right + Mover a la derecha + + + + Remove from quicklaunch + Quitar de quicklaunch + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_es_VE.desktop b/plugin-quicklaunch/translations/quicklaunch_es_VE.desktop new file mode 100644 index 0000000..f3f0553 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Iconos lanzadores de tus aplicaciones favoritas +Name[es_VE]=Lanzadores diff --git a/plugin-quicklaunch/translations/quicklaunch_es_VE.ts b/plugin-quicklaunch/translations/quicklaunch_es_VE.ts new file mode 100644 index 0000000..6ee4af4 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_es_VE.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Error al remover + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Archivo/URL '%1' no puede ser empotrado en la barra de lanzadores por ahora + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mover a la izquierda + + + + Move right + Mover a la derecha + + + + Remove from quicklaunch + Remover de la barra de lanzadores + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_eu.desktop b/plugin-quicklaunch/translations/quicklaunch_eu.desktop new file mode 100644 index 0000000..7462431 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Zure gogoko aplikazioetarako sarbide erraza +Name[eu]=Abio azkarra diff --git a/plugin-quicklaunch/translations/quicklaunch_eu.ts b/plugin-quicklaunch/translations/quicklaunch_eu.ts new file mode 100644 index 0000000..4d25e4f --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_eu.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Errorea jaregitean + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + '%1' fitxategia/URLa ezin da QuickLaunch-en txertatu oraingoz + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mugitu ezkerrera + + + + Move right + Mugitu eskuinera + + + + Remove from quicklaunch + Kendu abio azkarretik + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_fi.desktop b/plugin-quicklaunch/translations/quicklaunch_fi.desktop new file mode 100644 index 0000000..1f778d6 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Käynnistä suosikkisovelluksesi +Name[fi]=Pikakäynnistys diff --git a/plugin-quicklaunch/translations/quicklaunch_fi.ts b/plugin-quicklaunch/translations/quicklaunch_fi.ts new file mode 100644 index 0000000..5c6c769 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_fi.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Poistovirhe + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Tiedostoa/osoitetta '%1' ei toistaiseksi voi asettaa pikakäynnistykseen + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Siirrä vasemmalle + + + + Move right + Siirrä oikealle + + + + Remove from quicklaunch + Poista pikakäynnistyksestä + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_fr_FR.desktop b/plugin-quicklaunch/translations/quicklaunch_fr_FR.desktop new file mode 100644 index 0000000..9550f25 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Lancer votre application favorite +Name[fr_FR]=Lancement rapide diff --git a/plugin-quicklaunch/translations/quicklaunch_fr_FR.ts b/plugin-quicklaunch/translations/quicklaunch_fr_FR.ts new file mode 100644 index 0000000..d1849d5 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_fr_FR.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Ne pas tenir compte de l'erreur + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Le fichier/l'URL '%1' ne peut pas être inclus dans le lancement rapide pour l'instant + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Déplacer vers la gauche + + + + Move right + Déplacer vers la droite + + + + Remove from quicklaunch + Enlever du lancement rapide + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_hu.desktop b/plugin-quicklaunch/translations/quicklaunch_hu.desktop new file mode 100644 index 0000000..4ca808c --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=A kedvenc alkalmazásainak indítása +Name[hu]=Gyorsindító diff --git a/plugin-quicklaunch/translations/quicklaunch_hu.ts b/plugin-quicklaunch/translations/quicklaunch_hu.ts new file mode 100644 index 0000000..43ece95 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_hu.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_hu_HU.ts b/plugin-quicklaunch/translations/quicklaunch_hu_HU.ts new file mode 100644 index 0000000..cd74faf --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_hu_HU.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Ejtési hiba + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + A(z) „%1” fájl vagy URL nem ágyazható be a Gyorsindítóba + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Balra + + + + Move right + Jobbra + + + + Remove from quicklaunch + Eltávolítás a gyorsindítóról + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ia.desktop b/plugin-quicklaunch/translations/quicklaunch_ia.desktop new file mode 100644 index 0000000..a88914a --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quicklaunch +Comment=Launch your favorite Applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-quicklaunch/translations/quicklaunch_ia.ts b/plugin-quicklaunch/translations/quicklaunch_ia.ts new file mode 100644 index 0000000..5787b3e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ia.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_id_ID.desktop b/plugin-quicklaunch/translations/quicklaunch_id_ID.desktop new file mode 100644 index 0000000..2058fc6 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_id_ID.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[id_ID]=Luncurkan aplikasi favorit anda +Name[id_ID]=Quicklaunch diff --git a/plugin-quicklaunch/translations/quicklaunch_id_ID.ts b/plugin-quicklaunch/translations/quicklaunch_id_ID.ts new file mode 100644 index 0000000..2033904 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_id_ID.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_it_IT.desktop b/plugin-quicklaunch/translations/quicklaunch_it_IT.desktop new file mode 100644 index 0000000..4be775f --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Avvia le tue applicazioni preferite +Name[it_IT]=Avvio rapido diff --git a/plugin-quicklaunch/translations/quicklaunch_it_IT.ts b/plugin-quicklaunch/translations/quicklaunch_it_IT.ts new file mode 100644 index 0000000..61d89ed --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_it_IT.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Errore di spostamento + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Il file/URL '%1' in questo momento non può essere inserito in Avvio rapido + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Sposta a sinistra + + + + Move right + Sposta a destra + + + + Remove from quicklaunch + Rimuovi da Avvio rapido + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ja.desktop b/plugin-quicklaunch/translations/quicklaunch_ja.desktop new file mode 100644 index 0000000..92a5201 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=お気に入りのアプリケーションの起動を容易にします +Name[ja]=クイック起動 diff --git a/plugin-quicklaunch/translations/quicklaunch_ja.ts b/plugin-quicklaunch/translations/quicklaunch_ja.ts new file mode 100644 index 0000000..f45f58e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ja.ts @@ -0,0 +1,42 @@ + + + + + LxQtQuickLaunch + + + Drop Error + ドロップエラー + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + ファイル/URL '%1' は現在、クイック起動に埋め込むことができません + + + + Drop application +icons here + アプリケーションアイコンを +ここへドロップ + + + + QuickLaunchButton + + + Move left + 左に移動 + + + + Move right + 右に移動 + + + + Remove from quicklaunch + クイック起動から削除 + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ko.desktop b/plugin-quicklaunch/translations/quicklaunch_ko.desktop new file mode 100644 index 0000000..a88914a --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quicklaunch +Comment=Launch your favorite Applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-quicklaunch/translations/quicklaunch_ko.ts b/plugin-quicklaunch/translations/quicklaunch_ko.ts new file mode 100644 index 0000000..e9f0a73 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ko.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_lt.desktop b/plugin-quicklaunch/translations/quicklaunch_lt.desktop new file mode 100644 index 0000000..ae53d39 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Paleiskite savo mėgstamas programas +Name[lt]=Greitasis paleidimas diff --git a/plugin-quicklaunch/translations/quicklaunch_lt.ts b/plugin-quicklaunch/translations/quicklaunch_lt.ts new file mode 100644 index 0000000..1f724eb --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_lt.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Tempimo klaida + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Failo/URL „%1“ šiuo metu negalima patalpinti greitajame paleidime + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Perkelti į kairę + + + + Move right + Perkelti į dešinę + + + + Remove from quicklaunch + Pašalinti + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_nl.desktop b/plugin-quicklaunch/translations/quicklaunch_nl.desktop new file mode 100644 index 0000000..3530c59 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Uw favoriete programma's starten +Name[nl]=Snelstarter diff --git a/plugin-quicklaunch/translations/quicklaunch_nl.ts b/plugin-quicklaunch/translations/quicklaunch_nl.ts new file mode 100644 index 0000000..efa2742 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_nl.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Neerzetfout + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Bestand/URL '%1' kan vooralsnog niet worden ingebed in de snelstartbalk + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Verplaats naar links + + + + Move right + Verplaats naar rechts + + + + Remove from quicklaunch + Verwijder uit snelstartbalk + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_pl.desktop b/plugin-quicklaunch/translations/quicklaunch_pl.desktop new file mode 100644 index 0000000..21f4d07 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Uruchamiaj Twoje ulubione aplikacje +Name[pl]=Szybkie uruchamianie diff --git a/plugin-quicklaunch/translations/quicklaunch_pl.ts b/plugin-quicklaunch/translations/quicklaunch_pl.ts new file mode 100644 index 0000000..4d27521 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pl.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Przesuń w lewo + + + + Move right + Przesuń w prawo + + + + Remove from quicklaunch + Usuń z szybkiego uruchamiania + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_pl_PL.desktop b/plugin-quicklaunch/translations/quicklaunch_pl_PL.desktop new file mode 100644 index 0000000..661010c --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Uruchom swoje ulubione aplikacje. +Name[pl_PL]=Szybkie uruchamianie diff --git a/plugin-quicklaunch/translations/quicklaunch_pl_PL.ts b/plugin-quicklaunch/translations/quicklaunch_pl_PL.ts new file mode 100644 index 0000000..2868ec3 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pl_PL.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Problem dodawania + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Plik/URL '%1' nie może zostać umiesczony na pasku szybkiego uruchamiania + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Przesuń w lewo + + + + Move right + Przesuń w prawo + + + + Remove from quicklaunch + Usuń z paska szybkiego uruchamiania + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_pt.desktop b/plugin-quicklaunch/translations/quicklaunch_pt.desktop new file mode 100644 index 0000000..8e438ff --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Inicio rápido +Comment[pt]=Acesso rápido as suas aplicações preferidas. diff --git a/plugin-quicklaunch/translations/quicklaunch_pt.ts b/plugin-quicklaunch/translations/quicklaunch_pt.ts new file mode 100644 index 0000000..edbfdc2 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pt.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Erro ao largar + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Neste momento, não pode incluir o ficheiro/url '%1' no inicio rápido. + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mover para a esquerda + + + + Move right + Mover para a direita + + + + Remove from quicklaunch + Remover do inicio rápido + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_pt_BR.desktop b/plugin-quicklaunch/translations/quicklaunch_pt_BR.desktop new file mode 100644 index 0000000..d764348 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Lance seus aplicativos favoritos +Name[pt_BR]=Lançador rápido diff --git a/plugin-quicklaunch/translations/quicklaunch_pt_BR.ts b/plugin-quicklaunch/translations/quicklaunch_pt_BR.ts new file mode 100644 index 0000000..a811b90 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_pt_BR.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Erro de queda + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + O arquivo/URL '%1' não pôde ser incorporado ao lançador rápido + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mover para a esquerda + + + + Move right + Mover para a direita + + + + Remove from quicklaunch + Remover do lançador rápido + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ro_RO.desktop b/plugin-quicklaunch/translations/quicklaunch_ro_RO.desktop new file mode 100644 index 0000000..5737f73 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ro_RO.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Lansează aplicațiile favorite diff --git a/plugin-quicklaunch/translations/quicklaunch_ro_RO.ts b/plugin-quicklaunch/translations/quicklaunch_ro_RO.ts new file mode 100644 index 0000000..bda08e1 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ro_RO.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Fișierul/URL-ul '%1' nu poate fi inclus în lista de lansare rapidă momentan + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Mută spre stânga + + + + Move right + Mută spre dreapta + + + + Remove from quicklaunch + Îndepărtează din lista pentru lansare rapidă + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ru.desktop b/plugin-quicklaunch/translations/quicklaunch_ru.desktop new file mode 100644 index 0000000..57feb59 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Простой доступ к вашим любимым приложениям. +Name[ru]=Быстрый запуск \ No newline at end of file diff --git a/plugin-quicklaunch/translations/quicklaunch_ru.ts b/plugin-quicklaunch/translations/quicklaunch_ru.ts new file mode 100644 index 0000000..23c324d --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ru.ts @@ -0,0 +1,42 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Ошибка бросания + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Файл/URL-адрес '%1' не может быть встроен в быстрый запуск сейчас + + + + Drop application +icons here + Бросьте значки +приложений сюда + + + + QuickLaunchButton + + + Move left + Сдвинуть влево + + + + Move right + Сдвинуть вправо + + + + Remove from quicklaunch + Удалить из быстрого запуска + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_ru_RU.desktop b/plugin-quicklaunch/translations/quicklaunch_ru_RU.desktop new file mode 100644 index 0000000..c2b5628 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Простой доступ к вашим любимым приложениям. +Name[ru_RU]=Быстрый запуск \ No newline at end of file diff --git a/plugin-quicklaunch/translations/quicklaunch_ru_RU.ts b/plugin-quicklaunch/translations/quicklaunch_ru_RU.ts new file mode 100644 index 0000000..9ad9f6a --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_ru_RU.ts @@ -0,0 +1,42 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Ошибка бросания + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Файл/URL-адрес '%1' не может быть встроен в быстрый запуск сейчас + + + + Drop application +icons here + Бросьте значки +приложений сюда + + + + QuickLaunchButton + + + Move left + Сдвинуть влево + + + + Move right + Сдвинуть вправо + + + + Remove from quicklaunch + Удалить из быстрого запуска + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_sk.desktop b/plugin-quicklaunch/translations/quicklaunch_sk.desktop new file mode 100644 index 0000000..1a1ca98 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Spúšťanie vašich obľúbených aplikácií +Name[sk]=Rýchle spustenie diff --git a/plugin-quicklaunch/translations/quicklaunch_sk_SK.ts b/plugin-quicklaunch/translations/quicklaunch_sk_SK.ts new file mode 100644 index 0000000..f984c15 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sk_SK.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + CHyba pri pustení + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Súbor/URL „%1“ nateraz nemožno vložiť do rýchleho spustenia + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Presunúť vľavo + + + + Move right + Presunúť vpravo + + + + Remove from quicklaunch + Odstrániť z rýchleho spustenia + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_sl.desktop b/plugin-quicklaunch/translations/quicklaunch_sl.desktop new file mode 100644 index 0000000..fca8a6e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Zaženite svoje priljubljene programe +Name[sl]=Hitri zagon diff --git a/plugin-quicklaunch/translations/quicklaunch_sl.ts b/plugin-quicklaunch/translations/quicklaunch_sl.ts new file mode 100644 index 0000000..39e689b --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sl.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Napaka spusta + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Datoteke/lokacije »%1« trenutno ni bilo moč vstaviti v Hitri zagon + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Premakni levo + + + + Move right + Premakni desno + + + + Remove from quicklaunch + Odstrani iz hitrega zagona + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_sr.desktop b/plugin-quicklaunch/translations/quicklaunch_sr.desktop new file mode 100644 index 0000000..328cd4c --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Покреће ваше омиљене програме +Name[sr]=Брзо покретање diff --git a/plugin-quicklaunch/translations/quicklaunch_sr@ijekavian.desktop b/plugin-quicklaunch/translations/quicklaunch_sr@ijekavian.desktop new file mode 100644 index 0000000..b3965db --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Брзо покретање +Comment[sr@ijekavian]=Покреће ваше омиљене програме diff --git a/plugin-quicklaunch/translations/quicklaunch_sr@ijekavianlatin.desktop b/plugin-quicklaunch/translations/quicklaunch_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..ec3f6f9 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Brzo pokretanje +Comment[sr@ijekavianlatin]=Pokreće vaše omiljene programe diff --git a/plugin-quicklaunch/translations/quicklaunch_sr@latin.desktop b/plugin-quicklaunch/translations/quicklaunch_sr@latin.desktop new file mode 100644 index 0000000..87df58e --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Pokreće vaše omiljene programe +Name[sr@latin]=Brzo pokretanje diff --git a/plugin-quicklaunch/translations/quicklaunch_sr@latin.ts b/plugin-quicklaunch/translations/quicklaunch_sr@latin.ts new file mode 100644 index 0000000..b5a2b3a --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr@latin.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + + + + + Move right + + + + + Remove from quicklaunch + + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_sr_BA.ts b/plugin-quicklaunch/translations/quicklaunch_sr_BA.ts new file mode 100644 index 0000000..f015968 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr_BA.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Грешка испуштања + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Фајл/УРЛ „%1“ не може бити уграђен у Брзо Покретање за сада + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Помјери лијево + + + + Move right + Помјери десно + + + + Remove from quicklaunch + Уклони са брзог покретања + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_sr_RS.ts b/plugin-quicklaunch/translations/quicklaunch_sr_RS.ts new file mode 100644 index 0000000..ae63a16 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_sr_RS.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Грешка испуштања + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Фајл/УРЛ „%1“ не може бити уграђен у Брзо Покретање за сада + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Помери лево + + + + Move right + Помери десно + + + + Remove from quicklaunch + Уклони са брзог покретања + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_th_TH.desktop b/plugin-quicklaunch/translations/quicklaunch_th_TH.desktop new file mode 100644 index 0000000..7e48f96 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=เรียกใช้งานโปรแกรมที่ชื่นชอบของคุณ +Name[th_TH]=ตัวเรียกโปรแกรมด่วน diff --git a/plugin-quicklaunch/translations/quicklaunch_th_TH.ts b/plugin-quicklaunch/translations/quicklaunch_th_TH.ts new file mode 100644 index 0000000..ed51400 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_th_TH.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + การหย่อนขัดข้อง + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + แฟ้ม/URL '%1' ไม่สามารถฝังตัวไปยังตัวเรียกโปรแกรมด่วนได้ในตอนนี้ + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + ย้ายไปทางซ้าย + + + + Move right + ย้ายไปทางขวา + + + + Remove from quicklaunch + ลบออกจากตัวเรียกโปรแกรมด่วน + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_tr.desktop b/plugin-quicklaunch/translations/quicklaunch_tr.desktop new file mode 100644 index 0000000..d890a48 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Sık kullanılan uygulamalarınızı çalıştırın +Name[tr]=Hızlı çalıştırıcı diff --git a/plugin-quicklaunch/translations/quicklaunch_tr.ts b/plugin-quicklaunch/translations/quicklaunch_tr.ts new file mode 100644 index 0000000..9e8e501 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_tr.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Bırakma Hatası + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Şimdilik '%1' dosyası/bağlantısı Hızlı Başlatıcı' ya eklenemiyor + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Sola kaydır + + + + Move right + Sağa kaydır + + + + Remove from quicklaunch + Hızlı başlatıcıdan kaldır + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_uk.desktop b/plugin-quicklaunch/translations/quicklaunch_uk.desktop new file mode 100644 index 0000000..fe14d3c --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Простіше запускайте улюблені програми +Name[uk]=Швидкий запуск diff --git a/plugin-quicklaunch/translations/quicklaunch_uk.ts b/plugin-quicklaunch/translations/quicklaunch_uk.ts new file mode 100644 index 0000000..f66ff98 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_uk.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + Збій при розміщенні + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + Не вдається додати "%1" до швидкого запуску + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + Посунути ліворуч + + + + Move right + Посунути враворуч + + + + Remove from quicklaunch + Вилучити зі швидкого запуску + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_zh_CN.GB2312.desktop b/plugin-quicklaunch/translations/quicklaunch_zh_CN.GB2312.desktop new file mode 100644 index 0000000..a88914a --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quicklaunch +Comment=Launch your favorite Applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-quicklaunch/translations/quicklaunch_zh_CN.desktop b/plugin-quicklaunch/translations/quicklaunch_zh_CN.desktop new file mode 100644 index 0000000..06aa195 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=启动常用程序 +Name[zh_CN]=快速启动 diff --git a/plugin-quicklaunch/translations/quicklaunch_zh_CN.ts b/plugin-quicklaunch/translations/quicklaunch_zh_CN.ts new file mode 100644 index 0000000..4cd8ee0 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_zh_CN.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + 出现错误 + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + 文件/URL '%1' 暂时无法被嵌入到快速启动 + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + 左移 + + + + Move right + 右移 + + + + Remove from quicklaunch + 从快速启动删除 + + + diff --git a/plugin-quicklaunch/translations/quicklaunch_zh_TW.desktop b/plugin-quicklaunch/translations/quicklaunch_zh_TW.desktop new file mode 100644 index 0000000..284b6b8 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Quick launch +Comment=Easy access to your favourite applications. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=啟動您最愛的應用程式 +Name[zh_TW]=快速啟動 diff --git a/plugin-quicklaunch/translations/quicklaunch_zh_TW.ts b/plugin-quicklaunch/translations/quicklaunch_zh_TW.ts new file mode 100644 index 0000000..09fe3b0 --- /dev/null +++ b/plugin-quicklaunch/translations/quicklaunch_zh_TW.ts @@ -0,0 +1,41 @@ + + + + + LxQtQuickLaunch + + + Drop Error + 移入錯誤 + + + + File/URL '%1' cannot be embedded into QuickLaunch for now + 檔案位址'%1'現在無法嵌入至快速啟動 + + + + Drop application +icons here + + + + + QuickLaunchButton + + + Move left + 往左移 + + + + Move right + 往右移 + + + + Remove from quicklaunch + 從快速啟動中移除 + + + diff --git a/plugin-screensaver/CMakeLists.txt b/plugin-screensaver/CMakeLists.txt new file mode 100644 index 0000000..2412b03 --- /dev/null +++ b/plugin-screensaver/CMakeLists.txt @@ -0,0 +1,20 @@ +set(PLUGIN "screensaver") + +set(HEADERS + panelscreensaver.h +) + +set(SOURCES + panelscreensaver.cpp +) + +set(MOCS + panelscreensaver.h +) + +set(LIBRARIES + ${LIBRARIES} + ${LXQT_GLOBALKEYS_LIBRARIES} +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-screensaver/panelscreensaver.cpp b/plugin-screensaver/panelscreensaver.cpp new file mode 100644 index 0000000..260dc7d --- /dev/null +++ b/plugin-screensaver/panelscreensaver.cpp @@ -0,0 +1,68 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include +#include +#include + +#include "panelscreensaver.h" + +#define DEFAULT_SHORTCUT "Control+Alt+L" + + +PanelScreenSaver::PanelScreenSaver(const ILxQtPanelPluginStartupInfo &startupInfo) : + QObject(), + ILxQtPanelPlugin(startupInfo) +{ + mSaver = new LxQt::ScreenSaver(this); + + QList actions = mSaver->availableActions(); + if (!actions.empty()) + mButton.setDefaultAction(actions.first()); + //mButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + + mShortcutKey = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/lock").arg(settings()->group()), tr("Lock Screen"), this); + if (mShortcutKey) + { + connect(mShortcutKey, SIGNAL(activated()), mSaver, SLOT(lockScreen())); + + if (mShortcutKey->shortcut().isEmpty()) + { + mShortcutKey->changeShortcut(DEFAULT_SHORTCUT); + if (mShortcutKey->shortcut().isEmpty()) + { + LxQt::Notification::notify(tr("Panel Screensaver: Global shortcut '%1' cannot be registered").arg(DEFAULT_SHORTCUT)); + } + } + } +} + +#undef DEFAULT_SHORTCUT diff --git a/plugin-screensaver/panelscreensaver.h b/plugin-screensaver/panelscreensaver.h new file mode 100644 index 0000000..a34d661 --- /dev/null +++ b/plugin-screensaver/panelscreensaver.h @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef PANELSCREENSAVER_H +#define PANELSCREENSAVER_H + +#include "../panel/ilxqtpanelplugin.h" +#include + +namespace LxQt { +class ScreenSaver; +} +namespace GlobalKeyShortcut +{ +class Action; +} + +class PanelScreenSaver : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT + +public: + PanelScreenSaver(const ILxQtPanelPluginStartupInfo &startupInfo); + + virtual QWidget *widget() { return &mButton; } + virtual QString themeId() const { return "PanelScreenSaver"; } + +private: + QToolButton mButton; + LxQt::ScreenSaver * mSaver; + GlobalKeyShortcut::Action * mShortcutKey; +}; + +class PanelScreenSaverLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new PanelScreenSaver(startupInfo); + } +}; + +#endif + diff --git a/plugin-screensaver/resources/screensaver.desktop.in b/plugin-screensaver/resources/screensaver.desktop.in new file mode 100644 index 0000000..94e2f74 --- /dev/null +++ b/plugin-screensaver/resources/screensaver.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen +Icon=system-lock-screen + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-screensaver/translations/screensaver.ts b/plugin-screensaver/translations/screensaver.ts new file mode 100644 index 0000000..f6ec551 --- /dev/null +++ b/plugin-screensaver/translations/screensaver.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_ar.desktop b/plugin-screensaver/translations/screensaver_ar.desktop new file mode 100644 index 0000000..fd9e6e0 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=تفعيل حافظ الشَّاشة و/أو قفل الشَّاشة +Name[ar]=حافظ الشَّاشة diff --git a/plugin-screensaver/translations/screensaver_ar.ts b/plugin-screensaver/translations/screensaver_ar.ts new file mode 100644 index 0000000..29e2f80 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ar.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + ﻻ يمكن تسجيل الاختصار الشَّامل %1 لحافظ الشَّاشة! + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_cs.desktop b/plugin-screensaver/translations/screensaver_cs.desktop new file mode 100644 index 0000000..093eec3 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Zapne šetřič obrazovky a/nebo zamkne obrazovku +Name[cs]=Šetřič obrazovky diff --git a/plugin-screensaver/translations/screensaver_cs.ts b/plugin-screensaver/translations/screensaver_cs.ts new file mode 100644 index 0000000..4b73521 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_cs.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Klávesovou zkratku pro modul Šetřič obrazovky '%1' nelze zapsat + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_cs_CZ.desktop b/plugin-screensaver/translations/screensaver_cs_CZ.desktop new file mode 100644 index 0000000..166ae4b --- /dev/null +++ b/plugin-screensaver/translations/screensaver_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Zapnout šetřič obrazovky a/nebo zamknout obrazovku +Name[cs_CZ]=Šetřič obrazovky diff --git a/plugin-screensaver/translations/screensaver_cs_CZ.ts b/plugin-screensaver/translations/screensaver_cs_CZ.ts new file mode 100644 index 0000000..f9257ea --- /dev/null +++ b/plugin-screensaver/translations/screensaver_cs_CZ.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Klávesovou zkratku pro modul "Šetřič obrazovky" '%1' nelze zapsat + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_da.desktop b/plugin-screensaver/translations/screensaver_da.desktop new file mode 100644 index 0000000..b35194e --- /dev/null +++ b/plugin-screensaver/translations/screensaver_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Aktiverer en pauseskærm og/eller låser skærmen +Name[da]=Pauseskærm diff --git a/plugin-screensaver/translations/screensaver_da.ts b/plugin-screensaver/translations/screensaver_da.ts new file mode 100644 index 0000000..4622ac2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_da.ts @@ -0,0 +1,25 @@ + + + + + PanelScreenSaver + + Global keyboard shortcut + Globale tastaturgenveje + + + Panel Screensaver Global shortcut: '%1' cannot be registered + Global genvej for skærmskåner : '%1' kan ikke registreres + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_da_DK.desktop b/plugin-screensaver/translations/screensaver_da_DK.desktop new file mode 100644 index 0000000..19d8704 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Aktiverer pauseskærm og/eller låser skærmen +Name[da_DK]=Pauseskærm diff --git a/plugin-screensaver/translations/screensaver_da_DK.ts b/plugin-screensaver/translations/screensaver_da_DK.ts new file mode 100644 index 0000000..2cfdde2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_da_DK.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Panel Pauseskærm Global genvej: '%1' kan ikke registreres + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_de.desktop b/plugin-screensaver/translations/screensaver_de.desktop new file mode 100644 index 0000000..2e3ce17 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Aktiviere einen Bildschirmschoner und/oder sperre den Bildschirm +Name[de]=Bildschirmschoner diff --git a/plugin-screensaver/translations/screensaver_de.ts b/plugin-screensaver/translations/screensaver_de.ts new file mode 100644 index 0000000..88a309b --- /dev/null +++ b/plugin-screensaver/translations/screensaver_de.ts @@ -0,0 +1,25 @@ + + + + + PanelScreenSaver + + Global keyboard shortcut + Globales Tastaturkürzel + + + Panel Screensaver Global shortcut: '%1' cannot be registered + Globales Tastenkürzel für Bildschirmschoner: »%1« kann nicht registriert werden + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_de_DE.desktop b/plugin-screensaver/translations/screensaver_de_DE.desktop new file mode 100644 index 0000000..dd6fd0e --- /dev/null +++ b/plugin-screensaver/translations/screensaver_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Bildschirmschoner aktivieren und/oder Bildschirm sperren +Name[de_DE]=Bildschirmschoner starten diff --git a/plugin-screensaver/translations/screensaver_de_DE.ts b/plugin-screensaver/translations/screensaver_de_DE.ts new file mode 100644 index 0000000..195e5b6 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_de_DE.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Panel Bildschirmschoner globaler Tastenkürzel: '%1' kann nicht registriert wrden + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_el_GR.desktop b/plugin-screensaver/translations/screensaver_el_GR.desktop new file mode 100644 index 0000000..78719a2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Ενεργοποίηση προφύλαξης οθόνης και/ή κλειδώματος οθόνης +Name[el_GR]=Προφύλαξη οθόνης diff --git a/plugin-screensaver/translations/screensaver_el_GR.ts b/plugin-screensaver/translations/screensaver_el_GR.ts new file mode 100644 index 0000000..95c0230 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_el_GR.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Καθολική συντόμευση προφύλαξης οθόνης πίνακα: Η '%1' δεν μπορεί να εγγραφεί + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_eo.desktop b/plugin-screensaver/translations/screensaver_eo.desktop new file mode 100644 index 0000000..2bd5fb2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Enŝalti ekrankurtenon kaj/aŭ ŝlosi la ekranon +Name[eo]=Ekrankurteno diff --git a/plugin-screensaver/translations/screensaver_eo.ts b/plugin-screensaver/translations/screensaver_eo.ts new file mode 100644 index 0000000..8b8b322 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_eo.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Ĉiea klavkombino por ekrankurteno de panelo: '%1' ne registreblas + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_es.desktop b/plugin-screensaver/translations/screensaver_es.desktop new file mode 100644 index 0000000..b06cdc2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Activa el salvapantallas y/o bloquea la pantalla +Name[es]=Salvapantallas diff --git a/plugin-screensaver/translations/screensaver_es.ts b/plugin-screensaver/translations/screensaver_es.ts new file mode 100644 index 0000000..3ea4795 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_es.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Atajo global del panel del protector de pantalla: imposible registrar '%1' + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_es_VE.desktop b/plugin-screensaver/translations/screensaver_es_VE.desktop new file mode 100644 index 0000000..986dad5 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Activar el salvapantallas y/o bloquear la pantalla +Name[es_VE]=SalvaPantallas diff --git a/plugin-screensaver/translations/screensaver_es_VE.ts b/plugin-screensaver/translations/screensaver_es_VE.ts new file mode 100644 index 0000000..6eee89d --- /dev/null +++ b/plugin-screensaver/translations/screensaver_es_VE.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + El acceso de tecla global '%1' del salva pantallas del panel no pudo registrarse + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_eu.desktop b/plugin-screensaver/translations/screensaver_eu.desktop new file mode 100644 index 0000000..cf078ab --- /dev/null +++ b/plugin-screensaver/translations/screensaver_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Aktibatu pantaila-babeslea eta/edo blokeatu pantaila +Name[eu]=Pantaila-babeslea diff --git a/plugin-screensaver/translations/screensaver_eu.ts b/plugin-screensaver/translations/screensaver_eu.ts new file mode 100644 index 0000000..78f8e43 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_eu.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Pantaila-babesle panelaren lasterbide globala: ezin da '%1' erregistratu + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_fi.desktop b/plugin-screensaver/translations/screensaver_fi.desktop new file mode 100644 index 0000000..d8783a4 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Aktivoi näytönsäästäjä ja/tai lukitse näyttö +Name[fi]=Näytönsäästäjä diff --git a/plugin-screensaver/translations/screensaver_fi.ts b/plugin-screensaver/translations/screensaver_fi.ts new file mode 100644 index 0000000..3ce87bc --- /dev/null +++ b/plugin-screensaver/translations/screensaver_fi.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Paneelin näytönsäästäjän pikanäppäintä '%1' ei voi rekisteröidä + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_fr_FR.desktop b/plugin-screensaver/translations/screensaver_fr_FR.desktop new file mode 100644 index 0000000..c5a211e --- /dev/null +++ b/plugin-screensaver/translations/screensaver_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Activer un économiseur d'écran et/ou verrouiller l'écran +Name[fr_FR]=Économiseur d'écran diff --git a/plugin-screensaver/translations/screensaver_fr_FR.ts b/plugin-screensaver/translations/screensaver_fr_FR.ts new file mode 100644 index 0000000..193e360 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_fr_FR.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Le raccourci clavier global de l'écran de veille : '%1' n'a pas pu être enregistré + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_hu.desktop b/plugin-screensaver/translations/screensaver_hu.desktop new file mode 100644 index 0000000..1034321 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=A képernyővédő aktiválása és/vagy a képernyő zárolása +Name[hu]=Képernyővédő diff --git a/plugin-screensaver/translations/screensaver_hu.ts b/plugin-screensaver/translations/screensaver_hu.ts new file mode 100644 index 0000000..0082b40 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_hu.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_hu_HU.ts b/plugin-screensaver/translations/screensaver_hu_HU.ts new file mode 100644 index 0000000..1157bb8 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_hu_HU.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + A(z) „%1” gyorsbillentyű a panel képernyővédőjének megjelenítéséhez nem regisztrálható + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_ia.desktop b/plugin-screensaver/translations/screensaver_ia.desktop new file mode 100644 index 0000000..79caaeb --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-screensaver/translations/screensaver_ia.ts b/plugin-screensaver/translations/screensaver_ia.ts new file mode 100644 index 0000000..8455534 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ia.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_id_ID.desktop b/plugin-screensaver/translations/screensaver_id_ID.desktop new file mode 100644 index 0000000..79caaeb --- /dev/null +++ b/plugin-screensaver/translations/screensaver_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-screensaver/translations/screensaver_id_ID.ts b/plugin-screensaver/translations/screensaver_id_ID.ts new file mode 100644 index 0000000..8a1b8ce --- /dev/null +++ b/plugin-screensaver/translations/screensaver_id_ID.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Shortcut global Panel Screensaver: '%1' tidak dapat didaftarkan + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_it_IT.desktop b/plugin-screensaver/translations/screensaver_it_IT.desktop new file mode 100644 index 0000000..4bd63cd --- /dev/null +++ b/plugin-screensaver/translations/screensaver_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Attiva un salvaschermo e/o blocca lo schermo +Name[it_IT]=Salvaschermo diff --git a/plugin-screensaver/translations/screensaver_it_IT.ts b/plugin-screensaver/translations/screensaver_it_IT.ts new file mode 100644 index 0000000..16d0b37 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_it_IT.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + La scorciatoia globale per lo screensaver: '%1' non può essere registrata + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_ja.desktop b/plugin-screensaver/translations/screensaver_ja.desktop new file mode 100644 index 0000000..cd239be --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=スクリーンセーバーを起動したり、スクリーンをロックしたりします +Name[ja]=スクリーンセーバーの起動 diff --git a/plugin-screensaver/translations/screensaver_ja.ts b/plugin-screensaver/translations/screensaver_ja.ts new file mode 100644 index 0000000..206f11d --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ja.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + スクリーンをロック + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + スクリーンセーバー: グローバルショートカット '%1' を登録することができません + + + diff --git a/plugin-screensaver/translations/screensaver_ko.desktop b/plugin-screensaver/translations/screensaver_ko.desktop new file mode 100644 index 0000000..79caaeb --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-screensaver/translations/screensaver_ko.ts b/plugin-screensaver/translations/screensaver_ko.ts new file mode 100644 index 0000000..ea6e114 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ko.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_lt.desktop b/plugin-screensaver/translations/screensaver_lt.desktop new file mode 100644 index 0000000..edc82c1 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Aktyvuoja ekrano užsklandą ir/arba užrakina ekraną +Name[lt]=Ekrano užsklanda diff --git a/plugin-screensaver/translations/screensaver_lt.ts b/plugin-screensaver/translations/screensaver_lt.ts new file mode 100644 index 0000000..c757c9c --- /dev/null +++ b/plugin-screensaver/translations/screensaver_lt.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Ekrano užsklandos klavišas: „%1“ negali būti registruojamas + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_nl.desktop b/plugin-screensaver/translations/screensaver_nl.desktop new file mode 100644 index 0000000..481e536 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Activeer de schermbeveiliging en/of vergrendel het scherm +Name[nl]=Schermbeveiliging diff --git a/plugin-screensaver/translations/screensaver_nl.ts b/plugin-screensaver/translations/screensaver_nl.ts new file mode 100644 index 0000000..24831f3 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_nl.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Schermbeveiliging van paneel: systeembrede sneltoets '%1' kan niet worden geregistreerd + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_pl.desktop b/plugin-screensaver/translations/screensaver_pl.desktop new file mode 100644 index 0000000..5e347c4 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Aktywuje wygaszacz ekranu oraz/albo blokuje ekran +Name[pl]=Wygaszacz ekranu diff --git a/plugin-screensaver/translations/screensaver_pl.ts b/plugin-screensaver/translations/screensaver_pl.ts new file mode 100644 index 0000000..faa2b39 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pl.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Ogólny skrót panelu wygaszacza ekranu: „%1” nie może zostać zarejestrowany + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_pl_PL.desktop b/plugin-screensaver/translations/screensaver_pl_PL.desktop new file mode 100644 index 0000000..42de2df --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Włącz wygaszacz ekranu i / lub zablokuj ekran. +Name[pl_PL]=Uruchom wygaszacz ekranu diff --git a/plugin-screensaver/translations/screensaver_pl_PL.ts b/plugin-screensaver/translations/screensaver_pl_PL.ts new file mode 100644 index 0000000..936a1ce --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pl_PL.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Plugin "Wygaszacz ekranu": globalny skrót '%1' nie może zostać zarejestrowany + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_pt.desktop b/plugin-screensaver/translations/screensaver_pt.desktop new file mode 100644 index 0000000..d1d0a64 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Proteção de ecrã +Comment[pt]=Ativar uma proteção de ecrã e/ou bloquear o ecrã diff --git a/plugin-screensaver/translations/screensaver_pt.ts b/plugin-screensaver/translations/screensaver_pt.ts new file mode 100644 index 0000000..dff3e84 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pt.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Tecla de atalho global: '%1' não pode ser registada + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_pt_BR.desktop b/plugin-screensaver/translations/screensaver_pt_BR.desktop new file mode 100644 index 0000000..f8443f0 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Ativar o protetor de tela e/ou bloquear a tela +Name[pt_BR]=Protetor De Tela diff --git a/plugin-screensaver/translations/screensaver_pt_BR.ts b/plugin-screensaver/translations/screensaver_pt_BR.ts new file mode 100644 index 0000000..1d34988 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_pt_BR.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Atalho global do painel do protetor de tela: '%1' não pôde ser registrado + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_ro_RO.desktop b/plugin-screensaver/translations/screensaver_ro_RO.desktop new file mode 100644 index 0000000..c99a318 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Activează protecția de ecran și/sau blochează ecranul +Name[ro_RO]=Protecție ecran diff --git a/plugin-screensaver/translations/screensaver_ro_RO.ts b/plugin-screensaver/translations/screensaver_ro_RO.ts new file mode 100644 index 0000000..e55d8e5 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ro_RO.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Global keyboard shortcut + Tastă rapidă globală + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_ru.desktop b/plugin-screensaver/translations/screensaver_ru.desktop new file mode 100644 index 0000000..1fd6a69 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Включить хранитель экрана и/или блокировать экран +Name[ru]=Запустить хранитель экрана \ No newline at end of file diff --git a/plugin-screensaver/translations/screensaver_ru.ts b/plugin-screensaver/translations/screensaver_ru.ts new file mode 100644 index 0000000..248ffbd --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ru.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + Блокировать экран + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + Хранитель экрана панели: глобальное сочетание клавиш '%1' не может быть зарегистрировано + + + diff --git a/plugin-screensaver/translations/screensaver_ru_RU.desktop b/plugin-screensaver/translations/screensaver_ru_RU.desktop new file mode 100644 index 0000000..7ad644a --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Включить хранитель экрана и/или блокировать экран +Name[ru_RU]=Запустить хранитель экрана diff --git a/plugin-screensaver/translations/screensaver_ru_RU.ts b/plugin-screensaver/translations/screensaver_ru_RU.ts new file mode 100644 index 0000000..b46dd45 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_ru_RU.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + Блокировать экран + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + Хранитель экрана панели: глобальное сочетание клавиш '%1' не может быть зарегистрировано + + + diff --git a/plugin-screensaver/translations/screensaver_sk.desktop b/plugin-screensaver/translations/screensaver_sk.desktop new file mode 100644 index 0000000..908a564 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Aktivovanie šetriča obrazovky alebo zamknutia obrazovky +Name[sk]=Šetrič obrazovky diff --git a/plugin-screensaver/translations/screensaver_sk_SK.ts b/plugin-screensaver/translations/screensaver_sk_SK.ts new file mode 100644 index 0000000..48c02b0 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sk_SK.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Globálna klávesová skratka Panelu šetriča: „%1“ nemožno zaregistrovať + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_sl.desktop b/plugin-screensaver/translations/screensaver_sl.desktop new file mode 100644 index 0000000..2f7d450 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Vklopite ohranjevalnik zaslona ali pa zaklenite zaslon. +Name[sl]=Ohranjevalnik zaslona diff --git a/plugin-screensaver/translations/screensaver_sl.ts b/plugin-screensaver/translations/screensaver_sl.ts new file mode 100644 index 0000000..6d5b03c --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sl.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Globalna bližnjica za ohranjevalnik zaslona: »%1« ni moč registrirati + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_sr.desktop b/plugin-screensaver/translations/screensaver_sr.desktop new file mode 100644 index 0000000..ebd89e8 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Активирајте чувара екрана и/или закључајте екран +Name[sr]=Чувар екрана diff --git a/plugin-screensaver/translations/screensaver_sr@ijekavian.desktop b/plugin-screensaver/translations/screensaver_sr@ijekavian.desktop new file mode 100644 index 0000000..c149dd1 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Чувар екрана +Comment[sr@ijekavian]=Активирајте чувара екрана и/или закључајте екран diff --git a/plugin-screensaver/translations/screensaver_sr@ijekavianlatin.desktop b/plugin-screensaver/translations/screensaver_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..c78c65f --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Čuvar ekrana +Comment[sr@ijekavianlatin]=Aktivirajte čuvara ekrana i/ili zaključajte ekran diff --git a/plugin-screensaver/translations/screensaver_sr@latin.desktop b/plugin-screensaver/translations/screensaver_sr@latin.desktop new file mode 100644 index 0000000..adccd4a --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Aktivirajte čuvara ekrana i/ili zaključajte ekran +Name[sr@latin]=Čuvar ekrana diff --git a/plugin-screensaver/translations/screensaver_sr@latin.ts b/plugin-screensaver/translations/screensaver_sr@latin.ts new file mode 100644 index 0000000..4ca5aa5 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr@latin.ts @@ -0,0 +1,17 @@ + + + + + PanelScreenSaver + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_sr_BA.ts b/plugin-screensaver/translations/screensaver_sr_BA.ts new file mode 100644 index 0000000..2c54c35 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr_BA.ts @@ -0,0 +1,25 @@ + + + + + PanelScreenSaver + + Global keyboard shortcut + Глобална пречица тастатуре + + + Panel Screensaver Global shortcut: '%1' cannot be registered + Глобална пречица чувара екрана за панел: „%1“ не може бити регистрована + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_sr_RS.ts b/plugin-screensaver/translations/screensaver_sr_RS.ts new file mode 100644 index 0000000..91df10e --- /dev/null +++ b/plugin-screensaver/translations/screensaver_sr_RS.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Глобална пречица чувара екрана за панел: „%1“ не може бити регистрована + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_th_TH.desktop b/plugin-screensaver/translations/screensaver_th_TH.desktop new file mode 100644 index 0000000..69255e2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=เริ่มงานโปรแกรมรักษาหน้าจอ และ/หรือ ล็อคหน้าจอ +Name[th_TH]=โปรแกรมรักษาหน้าจอ diff --git a/plugin-screensaver/translations/screensaver_th_TH.ts b/plugin-screensaver/translations/screensaver_th_TH.ts new file mode 100644 index 0000000..14d3316 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_th_TH.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + โปรแกรมรักษาหน้าจอ: ไม่สารมารถตั้ง '%1' เป็นปุ่มลัดส่วนกลางได้ + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_tr.desktop b/plugin-screensaver/translations/screensaver_tr.desktop new file mode 100644 index 0000000..6bb67d2 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Bir ekran koruyucu etkinleştir ve/veya ekranı kilitle +Name[tr]=Ekran koruyucu diff --git a/plugin-screensaver/translations/screensaver_tr.ts b/plugin-screensaver/translations/screensaver_tr.ts new file mode 100644 index 0000000..7d2b0f3 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_tr.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Panel Ekran Koruyucu Genel kısayolu: '%1' kaydedilemiyor + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_uk.desktop b/plugin-screensaver/translations/screensaver_uk.desktop new file mode 100644 index 0000000..ef1e102 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Активувати зберігач екрану та/чи заблокувати екран +Name[uk]=Зберігач екрану diff --git a/plugin-screensaver/translations/screensaver_uk.ts b/plugin-screensaver/translations/screensaver_uk.ts new file mode 100644 index 0000000..d7ed6dd --- /dev/null +++ b/plugin-screensaver/translations/screensaver_uk.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + Не вдається встановити '%1' глобальним скороченням зберігача екрану + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_zh_CN.GB2312.desktop b/plugin-screensaver/translations/screensaver_zh_CN.GB2312.desktop new file mode 100644 index 0000000..79caaeb --- /dev/null +++ b/plugin-screensaver/translations/screensaver_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-screensaver/translations/screensaver_zh_CN.desktop b/plugin-screensaver/translations/screensaver_zh_CN.desktop new file mode 100644 index 0000000..a0e44b3 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=启用屏幕保护并锁定屏幕 +Name[zh_CN]=屏幕保护 diff --git a/plugin-screensaver/translations/screensaver_zh_CN.ts b/plugin-screensaver/translations/screensaver_zh_CN.ts new file mode 100644 index 0000000..84f1b8b --- /dev/null +++ b/plugin-screensaver/translations/screensaver_zh_CN.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + 面板 屏幕保护程序 全局快捷键 '%1' 无法被注册 + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-screensaver/translations/screensaver_zh_TW.desktop b/plugin-screensaver/translations/screensaver_zh_TW.desktop new file mode 100644 index 0000000..43a8dd7 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Launch screensaver +Comment=Activate a screensaver and/or lock the screen + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=啟動螢幕保護程式並/或鎖上螢幕 +Name[zh_TW]=螢幕保護程式 diff --git a/plugin-screensaver/translations/screensaver_zh_TW.ts b/plugin-screensaver/translations/screensaver_zh_TW.ts new file mode 100644 index 0000000..d0e5939 --- /dev/null +++ b/plugin-screensaver/translations/screensaver_zh_TW.ts @@ -0,0 +1,21 @@ + + + + + PanelScreenSaver + + Panel Screensaver Global shortcut: '%1' cannot be registered + 螢幕保護程式面板全域快捷鍵:'%1'無法被寫入 + + + + Lock Screen + + + + + Panel Screensaver: Global shortcut '%1' cannot be registered + + + + diff --git a/plugin-sensors/CMakeLists.txt b/plugin-sensors/CMakeLists.txt new file mode 100644 index 0000000..5e5a262 --- /dev/null +++ b/plugin-sensors/CMakeLists.txt @@ -0,0 +1,33 @@ +set(PLUGIN "sensors") + +set(HEADERS + lxqtsensorsplugin.h + chip.h + feature.h + lxqtsensors.h + lxqtsensorsconfiguration.h + sensors.h +) + +set(SOURCES + lxqtsensorsplugin.cpp + chip.cpp + feature.cpp + lxqtsensors.cpp + lxqtsensorsconfiguration.cpp + sensors.cpp +) + +set(MOCS + lxqtsensorsplugin.h + lxqtsensors.h + lxqtsensorsconfiguration.h +) + +set(UIS + lxqtsensorsconfiguration.ui +) + +set(LIBRARIES ${SENSORS_LIB}) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-sensors/chip.cpp b/plugin-sensors/chip.cpp new file mode 100644 index 0000000..03e7c7c --- /dev/null +++ b/plugin-sensors/chip.cpp @@ -0,0 +1,60 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "chip.h" +#include + +Chip::Chip(const sensors_chip_name* sensorsChipName) + : mSensorsChipName(sensorsChipName) +{ + const int BUF_SIZE = 256; + char buf[BUF_SIZE]; + if (sensors_snprintf_chip_name(buf, BUF_SIZE, mSensorsChipName) > 0) + { + mName = QString::fromLatin1(buf); + } + + qDebug() << "Detected chip:" << mName; + + const sensors_feature* feature; + int featureNr = 0; + + while ((feature = sensors_get_features(mSensorsChipName, &featureNr))) + { + mFeatures.push_back(Feature(mSensorsChipName, feature)); + } +} + +const QString& Chip::getName() const +{ + return mName; +} + +const QList& Chip::getFeatures() const +{ + return mFeatures; +} diff --git a/plugin-sensors/chip.h b/plugin-sensors/chip.h new file mode 100644 index 0000000..d5fc896 --- /dev/null +++ b/plugin-sensors/chip.h @@ -0,0 +1,57 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef CHIP_H +#define CHIP_H + +#include "feature.h" +#include +#include +#include + +/** + * @brief Chip class is providing RAII-style for lm_sensors library + */ + +class Chip +{ +public: + Chip(const sensors_chip_name*); + const QString& getName() const; + const QList& getFeatures() const; + +private: + // Do not try to change these chip names, as they point to internal structures of lm_sensors! + const sensors_chip_name* mSensorsChipName; + + // "Printable" chip name + QString mName; + + QList mFeatures; +}; + +#endif // CHIP_H diff --git a/plugin-sensors/feature.cpp b/plugin-sensors/feature.cpp new file mode 100644 index 0000000..7267f46 --- /dev/null +++ b/plugin-sensors/feature.cpp @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "feature.h" +#include + +Feature::Feature(const sensors_chip_name* sensorsChipName, const sensors_feature* sensorsFeature) + : mSensorsChipName(sensorsChipName), + mSensorsFeature(sensorsFeature) +{ + char *featureLabel = NULL; + + if ((featureLabel = sensors_get_label(mSensorsChipName, mSensorsFeature))) + { + mLabel = featureLabel; + free(featureLabel); + } + + qDebug() << "Detected feature:" << QString::fromLatin1(sensorsFeature->name) + << "(" << mLabel << ")"; +} + +const QString& Feature::getLabel() const +{ + return mLabel; +} + +double Feature::getValue(sensors_subfeature_type subfeature_type) const +{ + double result = 0; + + const sensors_subfeature *subfeature; + + // Find feature + subfeature = sensors_get_subfeature(mSensorsChipName, mSensorsFeature, subfeature_type); + + if (subfeature) + { + sensors_get_value(mSensorsChipName, subfeature->number, &result); + } + + return result; +} + +sensors_feature_type Feature::getType() const +{ + return mSensorsFeature->type; +} diff --git a/plugin-sensors/feature.h b/plugin-sensors/feature.h new file mode 100644 index 0000000..5b9cc62 --- /dev/null +++ b/plugin-sensors/feature.h @@ -0,0 +1,59 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef FEATURE_H +#define FEATURE_H + +#include +#include +#include + +/** + * @brief Feature class is providing RAII-style for lm_sensors library + */ + +class Feature +{ +public: + Feature(const sensors_chip_name*, const sensors_feature*); + const QString& getName() const; + const QString& getLabel() const; + double getValue(sensors_subfeature_type) const; + sensors_feature_type getType() const; +private: + // Do not try to change these chip names, as they point to internal structures of lm_sensors! + const sensors_chip_name* mSensorsChipName; + + const sensors_feature* mSensorsFeature; + + // "Printable" feature label + QString mLabel; + + QList mSubFeatures; +}; + +#endif // CHIP_H diff --git a/plugin-sensors/lxqtsensors.cpp b/plugin-sensors/lxqtsensors.cpp new file mode 100644 index 0000000..162e212 --- /dev/null +++ b/plugin-sensors/lxqtsensors.cpp @@ -0,0 +1,446 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtsensors.h" +#include "lxqtsensorsconfiguration.h" +#include "../panel/ilxqtpanelplugin.h" +#include "../panel/ilxqtpanel.h" +#include +#include +#include +#include + + +LxQtSensors::LxQtSensors(ILxQtPanelPlugin *plugin, QWidget* parent): + QFrame(parent), + mPlugin(plugin), + mSettings(plugin->settings()) +{ + + mDetectedChips = mSensors.getDetectedChips(); + + /** + * We have all needed data to initialize default settings, we have to do it here as later + * we are using them. + */ + initDefaultSettings(); + + // Add GUI elements + ProgressBar* pg = NULL; + + mLayout = new QBoxLayout(QBoxLayout::LeftToRight, this); + mLayout->setSpacing(0); + mLayout->setContentsMargins(0, 0, 0, 0); + + QString chipFeatureLabel; + + mSettings->beginGroup("chips"); + + for (int i = 0; i < mDetectedChips.size(); ++i) + { + mSettings->beginGroup(mDetectedChips[i].getName()); + const QList& features = mDetectedChips[i].getFeatures(); + + for (int j = 0; j < features.size(); ++j) + { + if (features[j].getType() == SENSORS_FEATURE_TEMP) + { + chipFeatureLabel = features[j].getLabel(); + mSettings->beginGroup(chipFeatureLabel); + + pg = new ProgressBar(this); + pg->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + // Hide progress bar if it is not enabled + if (!mSettings->value("enabled").toBool()) + { + pg->hide(); + } + + pg->setToolTip(chipFeatureLabel); + pg->setTextVisible(false); + + QPalette pal = pg->palette(); + QColor color(mSettings->value("color").toString()); + pal.setColor(QPalette::Active, QPalette::Highlight, color); + pal.setColor(QPalette::Inactive, QPalette::Highlight, color); + pg->setPalette(pal); + + mTemperatureProgressBars.push_back(pg); + mLayout->addWidget(pg); + + mSettings->endGroup(); + } + } + mSettings->endGroup(); + } + + mSettings->endGroup(); + + // Fit plugin to current panel + realign(); + + // Updated sensors readings to display actual values at start + updateSensorReadings(); + + // Run timer that will be updating sensor readings + mUpdateSensorReadingsTimer.setParent(this); + connect(&mUpdateSensorReadingsTimer, SIGNAL(timeout()), this, SLOT(updateSensorReadings())); + mUpdateSensorReadingsTimer.start(mSettings->value("updateInterval").toInt() * 1000); + + // Run timer that will be showin warning + mWarningAboutHighTemperatureTimer.setParent(this); + connect(&mWarningAboutHighTemperatureTimer, SIGNAL(timeout()), this, + SLOT(warningAboutHighTemperature())); + if (mSettings->value("warningAboutHighTemperature").toBool()) + { + mWarningAboutHighTemperatureTimer.start(mWarningAboutHighTemperatureTimerFreq); + } +} + +LxQtSensors::~LxQtSensors() +{ +} + +void LxQtSensors::updateSensorReadings() +{ + QString tooltip; + + double critTemp = 0; + double maxTemp = 0; + double minTemp = 0; + double curTemp = 0; + bool highTemperature = false; + + // Iterator for temperature progress bars + QList::iterator temperatureProgressBarsIt = + mTemperatureProgressBars.begin(); + + for (int i = 0; i < mDetectedChips.size(); ++i) + { + const QList& features = mDetectedChips[i].getFeatures(); + + for (int j = 0; j < features.size(); ++j) + { + if (features[j].getType() == SENSORS_FEATURE_TEMP) + { + tooltip = features[j].getLabel() + " (" + QChar(0x00B0); + + if (mSettings->value("useFahrenheitScale").toBool()) + { + critTemp = celsiusToFahrenheit( + features[j].getValue(SENSORS_SUBFEATURE_TEMP_CRIT)); + maxTemp = celsiusToFahrenheit( + features[j].getValue(SENSORS_SUBFEATURE_TEMP_MAX)); + minTemp = celsiusToFahrenheit( + features[j].getValue(SENSORS_SUBFEATURE_TEMP_MIN)); + curTemp = celsiusToFahrenheit( + features[j].getValue(SENSORS_SUBFEATURE_TEMP_INPUT)); + + tooltip += "F)"; + } + else + { + critTemp = features[j].getValue(SENSORS_SUBFEATURE_TEMP_CRIT); + maxTemp = features[j].getValue(SENSORS_SUBFEATURE_TEMP_MAX); + minTemp = features[j].getValue(SENSORS_SUBFEATURE_TEMP_MIN); + curTemp = features[j].getValue(SENSORS_SUBFEATURE_TEMP_INPUT); + + tooltip += "C)"; + } + + + // Check if temperature is too high + if (curTemp >= maxTemp) + { + if (mSettings->value("warningAboutHighTemperature").toBool()) + { + // Add current progress bar to the "warning container" + mHighTemperatureProgressBars.insert(*temperatureProgressBarsIt); + } + + highTemperature = true; + } + else + { + mHighTemperatureProgressBars.remove(*temperatureProgressBarsIt); + + highTemperature = false; + } + + // Set maximum temperature + (*temperatureProgressBarsIt)->setMaximum(critTemp); + // Set minimum temperature + (*temperatureProgressBarsIt)->setMinimum(minTemp); + // Set current temperature + (*temperatureProgressBarsIt)->setValue(curTemp); + + tooltip += "

Crit: "; + tooltip += QString::number((*temperatureProgressBarsIt)->maximum()); + tooltip += "
Max: "; + tooltip += QString::number(int(maxTemp)); + tooltip += "
Cur: "; + + // Mark high temperature in the tooltip + if (highTemperature) + { + tooltip += ""; + tooltip += QString::number((*temperatureProgressBarsIt)->value()); + tooltip += " !"; + } + else + { + tooltip += QString::number((*temperatureProgressBarsIt)->value()); + } + + tooltip += "
Min: "; + tooltip += QString::number((*temperatureProgressBarsIt)->minimum()); + (*temperatureProgressBarsIt)->setToolTip(tooltip); + + // Go to the next temperature progress bar + ++temperatureProgressBarsIt; + } + } + } + + update(); +} + +void LxQtSensors::warningAboutHighTemperature() +{ + // Iterator for temperature progress bars + QSet::iterator temperatureProgressBarsIt = + mHighTemperatureProgressBars.begin(); + + int curValue; + int maxValue; + + for (; temperatureProgressBarsIt != mHighTemperatureProgressBars.end(); + ++temperatureProgressBarsIt) + { + curValue = (*temperatureProgressBarsIt)->value(); + maxValue = (*temperatureProgressBarsIt)->maximum(); + + if (maxValue > curValue) + { + (*temperatureProgressBarsIt)->setValue(maxValue); + } + else + { + (*temperatureProgressBarsIt)->setValue((*temperatureProgressBarsIt)->minimum()); + } + + } + update(); +} + + +void LxQtSensors::settingsChanged() +{ + mUpdateSensorReadingsTimer.setInterval(mSettings->value("updateInterval").toInt() * 1000); + + // Iterator for temperature progress bars + QList::iterator temperatureProgressBarsIt = + mTemperatureProgressBars.begin(); + + mSettings->beginGroup("chips"); + + for (int i = 0; i < mDetectedChips.size(); ++i) + { + mSettings->beginGroup(mDetectedChips[i].getName()); + const QList& features = mDetectedChips[i].getFeatures(); + + for (int j = 0; j < features.size(); ++j) + { + if (features[j].getType() == SENSORS_FEATURE_TEMP) + { + mSettings->beginGroup(features[j].getLabel()); + + if (mSettings->value("enabled").toBool()) + { + (*temperatureProgressBarsIt)->show(); + } + else + { + (*temperatureProgressBarsIt)->hide(); + } + + QPalette pal = (*temperatureProgressBarsIt)->palette(); + QColor color(mSettings->value("color").toString()); + pal.setColor(QPalette::Active, QPalette::Highlight, color); + pal.setColor(QPalette::Inactive, QPalette::Highlight, color); + (*temperatureProgressBarsIt)->setPalette(pal); + + mSettings->endGroup(); + + // Go to the next temperature progress bar + ++temperatureProgressBarsIt; + } + } + + mSettings->endGroup(); + } + + mSettings->endGroup(); + + + if (mSettings->value("warningAboutHighTemperature").toBool()) + { + // Update sensors readings to get the list of high temperature progress bars + updateSensorReadings(); + + mWarningAboutHighTemperatureTimer.start(mWarningAboutHighTemperatureTimerFreq); + } + else if (mWarningAboutHighTemperatureTimer.isActive()) + { + mWarningAboutHighTemperatureTimer.stop(); + + // Update sensors readings to set progress bar values to "normal" height + updateSensorReadings(); + } + + realign(); + update(); +} + +void LxQtSensors::realign() +{ + // Default values for LxQtPanel::PositionBottom or LxQtPanel::PositionTop + Qt::Orientation cur_orient = Qt::Vertical; + Qt::LayoutDirection cur_layout_dir = Qt::LeftToRight; + + if (mPlugin->panel()->isHorizontal()) + { + mLayout->setDirection(QBoxLayout::LeftToRight); + } + else + { + mLayout->setDirection(QBoxLayout::TopToBottom); + } + + switch (mPlugin->panel()->position()) + { + case ILxQtPanel::PositionLeft: + cur_orient = Qt::Horizontal; + break; + + case ILxQtPanel::PositionRight: + cur_orient = Qt::Horizontal; + cur_layout_dir = Qt::RightToLeft; + break; + + default: + break; + } + + for (int i = 0; i < mTemperatureProgressBars.size(); ++i) + { + mTemperatureProgressBars[i]->setOrientation(cur_orient); + mTemperatureProgressBars[i]->setLayoutDirection(cur_layout_dir); + + if (mPlugin->panel()->isHorizontal()) + { + mTemperatureProgressBars[i]->setFixedWidth(mPlugin->settings()->value("tempBarWidth").toInt()); + mTemperatureProgressBars[i]->setFixedHeight(QWIDGETSIZE_MAX); + } + else + { + mTemperatureProgressBars[i]->setFixedHeight(mPlugin->settings()->value("tempBarWidth").toInt()); + mTemperatureProgressBars[i]->setFixedWidth(QWIDGETSIZE_MAX); + } + } +} + +double LxQtSensors::celsiusToFahrenheit(double celsius) +{ + // Fahrenheit = 32 * (9/5) * Celsius + return 32 + 1.8 * celsius; +} + +void LxQtSensors::initDefaultSettings() +{ + if (!mSettings->contains("updateInterval")) + { + mSettings->setValue("updateInterval", 1); + } + + if (!mSettings->contains("tempBarWidth")) + { + mSettings->setValue("tempBarWidth", 8); + } + + if (!mSettings->contains("useFahrenheitScale")) + { + mSettings->setValue("useFahrenheitScale", false); + } + + mSettings->beginGroup("chips"); + + // Initialize default sensors settings + for (int i = 0; i < mDetectedChips.size(); ++i) + { + mSettings->beginGroup(mDetectedChips[i].getName()); + const QList& features = mDetectedChips[i].getFeatures(); + + for (int j = 0; j < features.size(); ++j) + { + if (features[j].getType() == SENSORS_FEATURE_TEMP) + { + mSettings->beginGroup(features[j].getLabel()); + if (!mSettings->contains("enabled")) + { + mSettings->setValue("enabled", true); + } + + if (!mSettings->contains("color")) + { + // This is the default from QtDesigner + mSettings->setValue("color", QColor(qRgb(98, 140, 178)).name()); + } + mSettings->endGroup(); + } + } + mSettings->endGroup(); + } + + mSettings->endGroup(); + + if (!mSettings->contains("warningAboutHighTemperature")) + { + mSettings->setValue("warningAboutHighTemperature", true); + } +} + +ProgressBar::ProgressBar(QWidget *parent): + QProgressBar(parent) +{ +} + +QSize ProgressBar::sizeHint() const +{ + return QSize(20, 20); +} diff --git a/plugin-sensors/lxqtsensors.h b/plugin-sensors/lxqtsensors.h new file mode 100644 index 0000000..45f6b7d --- /dev/null +++ b/plugin-sensors/lxqtsensors.h @@ -0,0 +1,83 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTSENSORS_H +#define LXQTSENSORS_H + +#include "sensors.h" +#include +#include +#include +#include +#include + +class ProgressBar: public QProgressBar +{ + Q_OBJECT +public: + ProgressBar(QWidget *parent = 0); + + QSize sizeHint() const; +}; + + +class QSettings; +class ILxQtPanelPlugin; +class QBoxLayout; + +class LxQtSensors : public QFrame +{ + Q_OBJECT +public: + LxQtSensors(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~LxQtSensors(); + + void settingsChanged(); + void realign(); +public slots: + void updateSensorReadings(); + void warningAboutHighTemperature(); + +private: + ILxQtPanelPlugin *mPlugin; + QBoxLayout *mLayout; + QTimer mUpdateSensorReadingsTimer; + QTimer mWarningAboutHighTemperatureTimer; + // How often warning time should fire in ms + int mWarningAboutHighTemperatureTimerFreq; + Sensors mSensors; + QList mDetectedChips; + QList mTemperatureProgressBars; + // With set we can handle updates in very easy way :) + QSet mHighTemperatureProgressBars; + double celsiusToFahrenheit(double celsius); + void initDefaultSettings(); + QSettings *mSettings; +}; + + +#endif // LXQTSENSORS_H diff --git a/plugin-sensors/lxqtsensorsconfiguration.cpp b/plugin-sensors/lxqtsensorsconfiguration.cpp new file mode 100644 index 0000000..efb7d34 --- /dev/null +++ b/plugin-sensors/lxqtsensorsconfiguration.cpp @@ -0,0 +1,247 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtsensorsconfiguration.h" +#include "ui_lxqtsensorsconfiguration.h" +#include +#include +#include +#include +#include + +LxQtSensorsConfiguration::LxQtSensorsConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtSensorsConfiguration), + mSettings(settings), + oldSettings(settings) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("SensorsConfigurationWindow"); + ui->setupUi(this); + + // We load settings here cause we have to set up dynamic widgets + loadSettings(); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + connect(ui->updateIntervalSB, SIGNAL(valueChanged(int)), this, SLOT(saveSettings())); + connect(ui->tempBarWidthSB, SIGNAL(valueChanged(int)), this, SLOT(saveSettings())); + connect(ui->detectedChipsCB, SIGNAL(activated(int)), this, SLOT(detectedChipSelected(int))); + connect(ui->celsiusTempScaleRB, SIGNAL(toggled(bool)), this, SLOT(saveSettings())); + // We don't need signal from the other radio box as celsiusTempScaleRB will send one + //connect(ui->fahrenheitTempScaleRB, SIGNAL(toggled(bool)), this, SLOT(saveSettings())); + connect(ui->warningAboutHighTemperatureChB, SIGNAL(toggled(bool)), this, SLOT(saveSettings())); + + /** + * Signals for enable/disable and bar color change are set in the loadSettings method because + * we are creating them dynamically. + */ +} + +LxQtSensorsConfiguration::~LxQtSensorsConfiguration() +{ + delete ui; +} + +void LxQtSensorsConfiguration::loadSettings() +{ + ui->updateIntervalSB->setValue(mSettings->value("updateInterval").toInt()); + ui->tempBarWidthSB->setValue(mSettings->value("tempBarWidth").toInt()); + + if (mSettings->value("useFahrenheitScale").toBool()) + { + ui->fahrenheitTempScaleRB->setChecked(true); + } + + // In case of reloading settings we have to clear GUI elements + ui->detectedChipsCB->clear(); + + mSettings->beginGroup("chips"); + QStringList chipNames = mSettings->childGroups(); + + for (int i = 0; i < chipNames.size(); ++i) + { + ui->detectedChipsCB->addItem(chipNames[i]); + } + mSettings->endGroup(); + + // Load feature for the first chip if exist + if (chipNames.size() > 0) + { + detectedChipSelected(0); + } + + ui->warningAboutHighTemperatureChB->setChecked( + mSettings->value("warningAboutHighTemperature").toBool()); +} + +void LxQtSensorsConfiguration::saveSettings() +{ + mSettings->setValue("updateInterval", ui->updateIntervalSB->value()); + mSettings->setValue("tempBarWidth", ui->tempBarWidthSB->value()); + + if (ui->fahrenheitTempScaleRB->isChecked()) + { + mSettings->setValue("useFahrenheitScale", true); + } + else + { + mSettings->setValue("useFahrenheitScale", false); + } + + mSettings->beginGroup("chips"); + QStringList chipNames = mSettings->childGroups(); + + if (chipNames.size()) + { + QStringList chipFeatureLabels; + QPushButton* colorButton = NULL; + QCheckBox* enabledCheckbox = NULL; + + mSettings->beginGroup(chipNames[ui->detectedChipsCB->currentIndex()]); + + chipFeatureLabels = mSettings->childGroups(); + for (int j = 0; j < chipFeatureLabels.size(); ++j) + { + mSettings->beginGroup(chipFeatureLabels[j]); + + enabledCheckbox = qobject_cast(ui->chipFeaturesT->cellWidget(j, 0)); + // We know what we are doing so we don't have to check if enabledCheckbox == 0 + mSettings->setValue("enabled", enabledCheckbox->isChecked()); + + colorButton = qobject_cast(ui->chipFeaturesT->cellWidget(j, 2)); + // We know what we are doing so we don't have to check if colorButton == 0 + mSettings->setValue( + "color", + colorButton->palette().color(QPalette::Normal, QPalette::Button).name()); + + mSettings->endGroup(); + } + mSettings->endGroup(); + + } + mSettings->endGroup(); + + mSettings->setValue("warningAboutHighTemperature", + ui->warningAboutHighTemperatureChB->isChecked()); +} + +void LxQtSensorsConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + oldSettings.loadToSettings(); + loadSettings(); + } + else + { + close(); + } +} + +void LxQtSensorsConfiguration::changeProgressBarColor() +{ + QAbstractButton* btn = qobject_cast(sender()); + + if (btn) + { + QPalette pal = btn->palette(); + QColor color = QColorDialog::getColor(pal.color(QPalette::Normal, QPalette::Button), this); + + if (color.isValid()) + { + pal.setColor(QPalette::Normal, QPalette::Button, color); + btn->setPalette(pal); + saveSettings(); + } + } + else + { + qDebug() << "LxQtSensorsConfiguration::changeProgressBarColor():" << "invalid button cast"; + } +} + +void LxQtSensorsConfiguration::detectedChipSelected(int index) +{ + mSettings->beginGroup("chips"); + QStringList chipNames = mSettings->childGroups(); + QStringList chipFeatureLabels; + QPushButton* colorButton = NULL; + QCheckBox* enabledCheckbox = NULL; + QTableWidgetItem *chipFeatureLabel = NULL; + + if (index < chipNames.size()) + { + qDebug() << "Selected chip: " << ui->detectedChipsCB->currentText(); + + // In case of reloading settings we have to clear GUI elements + ui->chipFeaturesT->setRowCount(0); + + // Add detected chips and features + QStringList chipFeaturesLabels; + chipFeaturesLabels << tr("Enabled") << tr("Label") << tr("Color"); + ui->chipFeaturesT->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); + ui->chipFeaturesT->setHorizontalHeaderLabels(chipFeaturesLabels); + + mSettings->beginGroup(chipNames[index]); + chipFeatureLabels = mSettings->childGroups(); + for (int j = 0; j < chipFeatureLabels.size(); ++j) + { + mSettings->beginGroup(chipFeatureLabels[j]); + + ui->chipFeaturesT->insertRow(j); + + enabledCheckbox = new QCheckBox(ui->chipFeaturesT); + enabledCheckbox->setChecked(mSettings->value("enabled").toBool()); + // Connect here after the setChecked call because we don't want to send signal + connect(enabledCheckbox, SIGNAL(stateChanged(int)), this, SLOT(saveSettings())); + ui->chipFeaturesT->setCellWidget(j, 0, enabledCheckbox); + + chipFeatureLabel = new QTableWidgetItem(chipFeatureLabels[j]); + chipFeatureLabel->setFlags(Qt::ItemIsEnabled); + ui->chipFeaturesT->setItem(j, 1, chipFeatureLabel); + + colorButton = new QPushButton(ui->chipFeaturesT); + connect(colorButton, SIGNAL(clicked()), this, SLOT(changeProgressBarColor())); + QPalette pal = colorButton->palette(); + pal.setColor(QPalette::Normal, QPalette::Button, + QColor(mSettings->value("color").toString())); + colorButton->setPalette(pal); + ui->chipFeaturesT->setCellWidget(j, 2, colorButton); + + mSettings->endGroup(); + } + mSettings->endGroup(); + } + else + { + qDebug() << "Invalid chip index: " << index; + } + + mSettings->endGroup(); +} + diff --git a/plugin-sensors/lxqtsensorsconfiguration.h b/plugin-sensors/lxqtsensorsconfiguration.h new file mode 100644 index 0000000..0601e2d --- /dev/null +++ b/plugin-sensors/lxqtsensorsconfiguration.h @@ -0,0 +1,72 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTSENSORSCONFIGURATION_H +#define LXQTSENSORSCONFIGURATION_H + +#include +#include +#include +#include +#include + +#include + +namespace Ui { + class LxQtSensorsConfiguration; +} + +class LxQtSensorsConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtSensorsConfiguration(QSettings *settings, QWidget *parent = 0); + ~LxQtSensorsConfiguration(); + +private: + Ui::LxQtSensorsConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache oldSettings; + + /* + Read settings from conf file and put data into controls. + */ + void loadSettings(); + +private slots: + /* + Saves settings in conf file. + */ + void saveSettings(); + void dialogButtonsAction(QAbstractButton *btn); + void changeProgressBarColor(); + void detectedChipSelected(int index); +}; + +#endif // LXQTSENSORSCONFIGURATION_H diff --git a/plugin-sensors/lxqtsensorsconfiguration.ui b/plugin-sensors/lxqtsensorsconfiguration.ui new file mode 100644 index 0000000..2e9f3c7 --- /dev/null +++ b/plugin-sensors/lxqtsensorsconfiguration.ui @@ -0,0 +1,240 @@ + + + LxQtSensorsConfiguration + + + + 0 + 0 + 271 + 284 + + + + Sensors Settings + + + + + + QTabWidget::Rounded + + + 0 + + + true + + + + Common + + + + + + + 0 + 0 + + + + Update interval (seconds) + + + + + + + Temperature bar width + + + + + + + true + + + + + + + + + + + + + + + 1 + + + 300 + + + + + + + 1 + + + 8 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Temperature scale + + + + + + Celsius + + + true + + + + + + + Fahrenheit + + + + + fahrenheitTempScaleRB + celsiusTempScaleRB + + + + + + Blink progress bars when the temperature is too high + + + Qt::LeftToRight + + + Warning about high temperature + + + true + + + false + + + + + + + + Sensors + + + + + + -1 + + + true + + + + + + + Detected chips: + + + + + + + Chip features: + + + + + + + 3 + + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + buttons + accepted() + LxQtSensorsConfiguration + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttons + rejected() + LxQtSensorsConfiguration + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/plugin-sensors/lxqtsensorsplugin.cpp b/plugin-sensors/lxqtsensorsplugin.cpp new file mode 100644 index 0000000..aa1e67a --- /dev/null +++ b/plugin-sensors/lxqtsensorsplugin.cpp @@ -0,0 +1,63 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtsensorsplugin.h" +#include "lxqtsensors.h" +#include "lxqtsensorsconfiguration.h" + +LxQtSensorsPlugin::LxQtSensorsPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mWidget(new LxQtSensors(this)) +{ +} + +LxQtSensorsPlugin::~LxQtSensorsPlugin() +{ + delete mWidget; +} + +QWidget *LxQtSensorsPlugin::widget() +{ + return mWidget; +} + +QDialog *LxQtSensorsPlugin::configureDialog() +{ + return new LxQtSensorsConfiguration(settings(), mWidget); +} + +void LxQtSensorsPlugin::realign() +{ + mWidget->realign(); +} + +void LxQtSensorsPlugin::settingsChanged() +{ + mWidget->settingsChanged(); +} diff --git a/plugin-sensors/lxqtsensorsplugin.h b/plugin-sensors/lxqtsensorsplugin.h new file mode 100644 index 0000000..749c32b --- /dev/null +++ b/plugin-sensors/lxqtsensorsplugin.h @@ -0,0 +1,74 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTSENSORSPLUGIN_H +#define LXQTSENSORSPLUGIN_H + + +#include "../panel/ilxqtpanelplugin.h" +#include +class LxQtSensors; + +class LxQtSensorsPlugin: public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + explicit LxQtSensorsPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtSensorsPlugin(); + + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog; } + virtual QWidget *widget(); + virtual QString themeId() const { return "Sensors"; } + + bool isSeparate() const { return true; } + QDialog *configureDialog(); + + void realign(); + +protected: + virtual void settingsChanged(); + +private: + LxQtSensors *mWidget; +}; + + +class LxQtSensorsPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtSensorsPlugin(startupInfo); + } +}; + + +#endif // LXQTSENSORSPLUGIN_H diff --git a/plugin-sensors/resources/sensors.desktop.in b/plugin-sensors/resources/sensors.desktop.in new file mode 100644 index 0000000..8d8e43e --- /dev/null +++ b/plugin-sensors/resources/sensors.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. diff --git a/plugin-sensors/sensors.cpp b/plugin-sensors/sensors.cpp new file mode 100644 index 0000000..6f486d8 --- /dev/null +++ b/plugin-sensors/sensors.cpp @@ -0,0 +1,75 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "sensors.h" +#include + +QList Sensors::mDetectedChips = QList(); +int Sensors::mInstanceCounter = 0; +bool Sensors::mSensorsInitialized = false; + +Sensors::Sensors() +{ + // Increase instance counter + ++mInstanceCounter; + + if (!mSensorsInitialized && sensors_init(NULL) == 0) + { + // Sensors initialized + mSensorsInitialized = true; + + sensors_chip_name const * chipName; + int chipNr = 0; + while ((chipName = sensors_get_detected_chips(NULL, &chipNr)) != NULL) + { + mDetectedChips.push_back(chipName); + } + + qDebug() << "lm_sensors library initialized"; + } +} + +Sensors::~Sensors() +{ + // Decrease instance counter + --mInstanceCounter; + + if (mInstanceCounter == 0 && mSensorsInitialized) + { + mDetectedChips.clear(); + mSensorsInitialized = false; + sensors_cleanup(); + + qDebug() << "lm_sensors library cleanup"; + } +} + +const QList& Sensors::getDetectedChips() const +{ + return mDetectedChips; +} + diff --git a/plugin-sensors/sensors.h b/plugin-sensors/sensors.h new file mode 100644 index 0000000..190fe38 --- /dev/null +++ b/plugin-sensors/sensors.h @@ -0,0 +1,57 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Łukasz Twarduś + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef SENSORS_H +#define SENSORS_H + +#include "chip.h" +#include +#include + +/** + * @brief Sensors class is providing RAII-style for lm_sensors library + */ + +class Sensors +{ +public: + Sensors(); + ~Sensors(); + const QList& getDetectedChips() const; + +private: + static QList mDetectedChips; + + /** + * lm_sensors library can be initialized only once so this will tell us when to init + * and when to clean up. + */ + static int mInstanceCounter; + static bool mSensorsInitialized; +}; + +#endif // SENSORS_H diff --git a/plugin-sensors/translations/sensors.ts b/plugin-sensors/translations/sensors.ts new file mode 100644 index 0000000..c2ea741 --- /dev/null +++ b/plugin-sensors/translations/sensors.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + + + + + Common + + + + + Update interval (seconds) + + + + + Temperature bar width + + + + + Temperature scale + + + + + Celsius + + + + + Fahrenheit + + + + + Blink progress bars when the temperature is too high + + + + + Warning about high temperature + + + + + Sensors + + + + + Detected chips: + + + + + Chip features: + + + + + Enabled + + + + + Label + + + + + Color + + + + diff --git a/plugin-sensors/translations/sensors_ar.desktop b/plugin-sensors/translations/sensors_ar.desktop new file mode 100644 index 0000000..53317de --- /dev/null +++ b/plugin-sensors/translations/sensors_ar.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ar]=إستشعار +Comment[ar]=عرض قراءة من إستشعار لأجهزة (حاليا lm_sensors) diff --git a/plugin-sensors/translations/sensors_ca.desktop b/plugin-sensors/translations/sensors_ca.desktop new file mode 100644 index 0000000..3a5aa64 --- /dev/null +++ b/plugin-sensors/translations/sensors_ca.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ca]=Sensors +Comment[ca]=Veure dades provinents dels sensors (actualment lm_sensors) diff --git a/plugin-sensors/translations/sensors_ca.ts b/plugin-sensors/translations/sensors_ca.ts new file mode 100644 index 0000000..b0aa48d --- /dev/null +++ b/plugin-sensors/translations/sensors_ca.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + + + + + Common + + + + + Update interval (seconds) + + + + + Temperature bar width + + + + + Temperature scale + + + + + Celsius + + + + + Fahrenheit + + + + + Blink progress bars when the temperature is too high + + + + + Warning about high temperature + + + + + Sensors + Sensors + + + + Detected chips: + + + + + Chip features: + + + + + Enabled + + + + + Label + + + + + Color + + + + diff --git a/plugin-sensors/translations/sensors_cs.desktop b/plugin-sensors/translations/sensors_cs.desktop new file mode 100644 index 0000000..8a4e3b1 --- /dev/null +++ b/plugin-sensors/translations/sensors_cs.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[cs]=Čidla +Comment[cs]=Zobrazit odečty z hardwarových čidel (nyní lm_sensors) diff --git a/plugin-sensors/translations/sensors_cs.ts b/plugin-sensors/translations/sensors_cs.ts new file mode 100644 index 0000000..f7bc3bc --- /dev/null +++ b/plugin-sensors/translations/sensors_cs.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Nastavení čidel + + + + Sensors Settings + + + + + Common + Běžné + + + + Update interval (seconds) + Obnovovací interval (v sekundách) + + + + Temperature bar width + Šířka proužku s teplotou + + + + Temperature scale + Teplotní stupnice + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Blikat proužky ukazujícími nárůst teploty, když je teplota příliš vysoká + + + + Warning about high temperature + Varování při vysoké teplotě + + + + Sensors + Čidla + + + + Detected chips: + Zjištěné čipy: + + + + Chip features: + Vlastnosti čipů: + + + + Enabled + Povoleno + + + + Label + Štítek + + + + Color + Barva + + + diff --git a/plugin-sensors/translations/sensors_cs_CZ.desktop b/plugin-sensors/translations/sensors_cs_CZ.desktop new file mode 100644 index 0000000..0a99921 --- /dev/null +++ b/plugin-sensors/translations/sensors_cs_CZ.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[cs_CZ]=Čidla +Comment[cs_CZ]=Zobrazit odečty z hardwarových čidel (nyní lm_sensors) diff --git a/plugin-sensors/translations/sensors_cs_CZ.ts b/plugin-sensors/translations/sensors_cs_CZ.ts new file mode 100644 index 0000000..a3b8685 --- /dev/null +++ b/plugin-sensors/translations/sensors_cs_CZ.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Nastavení čidel + + + + Sensors Settings + + + + + Common + Běžné + + + + Update interval (seconds) + Obnovovací interval (v sekundách) + + + + Temperature bar width + Šířka proužku s teplotou + + + + Temperature scale + Teplotní stupnice + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Blikat proužky ukazujícími nárůst teploty, když je teplota příliš vysoká + + + + Warning about high temperature + Varování při vysoké teplotě + + + + Sensors + Čidla + + + + Detected chips: + Zjištěné čipy: + + + + Chip features: + Vlastnosti čipů: + + + + Enabled + Povoleno + + + + Label + Štítek + + + + Color + Barva + + + diff --git a/plugin-sensors/translations/sensors_da.desktop b/plugin-sensors/translations/sensors_da.desktop new file mode 100644 index 0000000..c478888 --- /dev/null +++ b/plugin-sensors/translations/sensors_da.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[da]=Sensorer +Comment[da]=Vis målinger fra hardware-sensorer (I øjeblikket lm_sensors) diff --git a/plugin-sensors/translations/sensors_da_DK.desktop b/plugin-sensors/translations/sensors_da_DK.desktop new file mode 100644 index 0000000..d7f1d6c --- /dev/null +++ b/plugin-sensors/translations/sensors_da_DK.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[da_DK]=Sensorer +Comment[da_DK]=Vis målinger fra hardware-sensorer (I øjeblikket lm_sensors) diff --git a/plugin-sensors/translations/sensors_da_DK.ts b/plugin-sensors/translations/sensors_da_DK.ts new file mode 100644 index 0000000..203eb1a --- /dev/null +++ b/plugin-sensors/translations/sensors_da_DK.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Indstillinger for LxQt Sensorer + + + + Sensors Settings + + + + + Common + Fælles + + + + Update interval (seconds) + Opdateringsinterval (sekunder) + + + + Temperature bar width + Temperaturbjælke bredde + + + + Temperature scale + Temperaturskala + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Blink statuslinjer når temperaturen er for høj + + + + Warning about high temperature + Advarsel om høj temperatur + + + + Sensors + Sensorer + + + + Detected chips: + Fundne chipsæt: + + + + Chip features: + Chipsæt funktioner: + + + + Enabled + Aktiveret + + + + Label + Identifikation + + + + Color + Farve + + + diff --git a/plugin-sensors/translations/sensors_de_DE.desktop b/plugin-sensors/translations/sensors_de_DE.desktop new file mode 100644 index 0000000..34012ef --- /dev/null +++ b/plugin-sensors/translations/sensors_de_DE.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[de_DE]=Sensoren +Comment[de_DE]=Zeige die Sensorwerte der Hardware-Sensoren (momentan lm_sensors) diff --git a/plugin-sensors/translations/sensors_de_DE.ts b/plugin-sensors/translations/sensors_de_DE.ts new file mode 100644 index 0000000..1a94761 --- /dev/null +++ b/plugin-sensors/translations/sensors_de_DE.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + LxQt Sensor Einstellungen + + + + Sensors Settings + + + + + Common + Allgemein + + + + Update interval (seconds) + Aktualisierungs Intervall (Sekunden) + + + + Temperature bar width + Temperaturbalken Breite + + + + Temperature scale + Temperaturskala + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Blinken der Verlaufsbalken bei zu hoher Temperatur + + + + Warning about high temperature + Warnung über zu hohe Temperaturen + + + + Sensors + Sensoren + + + + Detected chips: + Erkannte Chips: + + + + Chip features: + Chip Eigenschaften: + + + + Enabled + Aktiviert + + + + Label + Bezeichnung + + + + Color + Farbe + + + diff --git a/plugin-sensors/translations/sensors_el_GR.desktop b/plugin-sensors/translations/sensors_el_GR.desktop new file mode 100644 index 0000000..974d432 --- /dev/null +++ b/plugin-sensors/translations/sensors_el_GR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[el_GR]=Αισθητήρες +Comment[el_GR]=Προβολή ενδείξεων αισθητήρων υλικού (τρέχον lm_sensors) diff --git a/plugin-sensors/translations/sensors_el_GR.ts b/plugin-sensors/translations/sensors_el_GR.ts new file mode 100644 index 0000000..2a86807 --- /dev/null +++ b/plugin-sensors/translations/sensors_el_GR.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Ρυθμίσεις αισθητήρων LxQt + + + + Sensors Settings + + + + + Common + Κοινές επιλογές + + + + Update interval (seconds) + Διάστημα ανανέωσης (δευτερόλεπτα) + + + + Temperature bar width + Πλάτος γραμμής θερμοκρασίας + + + + Temperature scale + Κλίμακα θερμοκρασίας + + + + Celsius + Κελσίου + + + + Fahrenheit + Φαρενάιτ + + + + Blink progress bars when the temperature is too high + Αναβόσβημα γραμμών προόδου, ​​όταν η θερμοκρασία είναι πολύ υψηλή + + + + Warning about high temperature + Προειδοποίηση υψηλής θερμοκρασίας + + + + Sensors + Αισθητήρες + + + + Detected chips: + Ανιχνευμένα + + + + Chip features: + Χαρακτηριστικά κυκλώματος + + + + Enabled + Ενεργοποιημένο + + + + Label + Ετικέτα + + + + Color + Χρώμα + + + diff --git a/plugin-sensors/translations/sensors_eo.desktop b/plugin-sensors/translations/sensors_eo.desktop new file mode 100644 index 0000000..03c33d9 --- /dev/null +++ b/plugin-sensors/translations/sensors_eo.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[eo]=Sentiloj +Comment[eo]=Vidi legojn de sentiloj (aktuale lm_sensors) diff --git a/plugin-sensors/translations/sensors_es.desktop b/plugin-sensors/translations/sensors_es.desktop new file mode 100644 index 0000000..e584923 --- /dev/null +++ b/plugin-sensors/translations/sensors_es.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[es]=Sensores +Comment[es]=Ver las lecturas de los sensores de harware (Actualmente lm_sensors) diff --git a/plugin-sensors/translations/sensors_es.ts b/plugin-sensors/translations/sensors_es.ts new file mode 100644 index 0000000..2106827 --- /dev/null +++ b/plugin-sensors/translations/sensors_es.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Opciones de Sensores de LxQt + + + + Sensors Settings + + + + + Common + Común + + + + Update interval (seconds) + Intervalo de actualización (segundos) + + + + Temperature bar width + Ancho de la barra de temperatura + + + + Temperature scale + Escala de temperatura + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Parpadeo en las barras de progreso cuando la temperatura es demasiado alta + + + + Warning about high temperature + Advertencia cuando la temperatura sea alta + + + + Sensors + Sensores + + + + Detected chips: + Chips detectado: + + + + Chip features: + Características del chip: + + + + Enabled + Habilitado + + + + Label + Etiqueta + + + + Color + Color + + + diff --git a/plugin-sensors/translations/sensors_es_VE.desktop b/plugin-sensors/translations/sensors_es_VE.desktop new file mode 100644 index 0000000..6eef263 --- /dev/null +++ b/plugin-sensors/translations/sensors_es_VE.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[es_VE]=Sensores +Comment[es_VE]=Ver las lecturas desde los sensores (actualmente lm_sensors) diff --git a/plugin-sensors/translations/sensors_es_VE.ts b/plugin-sensors/translations/sensors_es_VE.ts new file mode 100644 index 0000000..5003fea --- /dev/null +++ b/plugin-sensors/translations/sensors_es_VE.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + preferencias de sensor LxQt + + + + Sensors Settings + + + + + Common + Comunes + + + + Update interval (seconds) + Intervalo de actualizacion (segundos) + + + + Temperature bar width + Ancho de la barra indicadora + + + + Temperature scale + Escala de temperatura + + + + Celsius + Celcios + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + parpadear la barra de indicacion cuando la temperatura es alta + + + + Warning about high temperature + Advertir acerca de altas temperaturas + + + + Sensors + Sensores + + + + Detected chips: + Chips detectados + + + + Chip features: + Chips caracteristicas: + + + + Enabled + Habilitado + + + + Label + Etiqueta + + + + Color + Color + + + diff --git a/plugin-sensors/translations/sensors_eu.desktop b/plugin-sensors/translations/sensors_eu.desktop new file mode 100644 index 0000000..ff100cd --- /dev/null +++ b/plugin-sensors/translations/sensors_eu.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[eu]=Sentsoreak +Comment[eu]=Ikusi hardware-sentsoreen irakurketak (unean lm_sensors) diff --git a/plugin-sensors/translations/sensors_eu.ts b/plugin-sensors/translations/sensors_eu.ts new file mode 100644 index 0000000..4529507 --- /dev/null +++ b/plugin-sensors/translations/sensors_eu.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + LxQt sentsoreen ezarpenak + + + + Sensors Settings + + + + + Common + Komuna + + + + Update interval (seconds) + Eguneraketa tartea (segundoak) + + + + Temperature bar width + Tenperatura-barraren zabalera + + + + Temperature scale + Tenperaturaren eskala + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Kliskatu aurrerapen-barrak tenperatura altuegia denean + + + + Warning about high temperature + Tenperatura altuari buruzko abisua + + + + Sensors + Sentsoreak + + + + Detected chips: + Detektatutako txipak + + + + Chip features: + Txiparen ezaugarriak: + + + + Enabled + Gaituta + + + + Label + Etiketa + + + + Color + Kolorea + + + diff --git a/plugin-sensors/translations/sensors_fi.desktop b/plugin-sensors/translations/sensors_fi.desktop new file mode 100644 index 0000000..f71dad5 --- /dev/null +++ b/plugin-sensors/translations/sensors_fi.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[fi]=Sensorit +Comment[fi]=Katso laitteistosensorien tuottamia lukuja (tällä hetkellä lm_sensors) diff --git a/plugin-sensors/translations/sensors_fi.ts b/plugin-sensors/translations/sensors_fi.ts new file mode 100644 index 0000000..52fe6ae --- /dev/null +++ b/plugin-sensors/translations/sensors_fi.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + + + + + Common + + + + + Update interval (seconds) + Päivitysväli (sekunneissa) + + + + Temperature bar width + + + + + Temperature scale + + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + + + + + Warning about high temperature + Varoitus korkeasta lämpötilasta + + + + Sensors + + + + + Detected chips: + + + + + Chip features: + + + + + Enabled + Käytössä + + + + Label + Nimike + + + + Color + Väri + + + diff --git a/plugin-sensors/translations/sensors_fr_FR.desktop b/plugin-sensors/translations/sensors_fr_FR.desktop new file mode 100644 index 0000000..8c8bb4a --- /dev/null +++ b/plugin-sensors/translations/sensors_fr_FR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[fr_FR]=Capteurs +Comment[fr_FR]=Voir les mesures effectuées par les capteurs (actuellement lm_sensors) diff --git a/plugin-sensors/translations/sensors_fr_FR.ts b/plugin-sensors/translations/sensors_fr_FR.ts new file mode 100644 index 0000000..08edd39 --- /dev/null +++ b/plugin-sensors/translations/sensors_fr_FR.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + + + + + Common + + + + + Update interval (seconds) + + + + + Temperature bar width + + + + + Temperature scale + + + + + Celsius + + + + + Fahrenheit + + + + + Blink progress bars when the temperature is too high + + + + + Warning about high temperature + + + + + Sensors + Capteurs + + + + Detected chips: + + + + + Chip features: + + + + + Enabled + + + + + Label + + + + + Color + + + + diff --git a/plugin-sensors/translations/sensors_hu.desktop b/plugin-sensors/translations/sensors_hu.desktop new file mode 100644 index 0000000..fb4fb3f --- /dev/null +++ b/plugin-sensors/translations/sensors_hu.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[hu]=Szenzorok +Comment[hu]=Megjeleníti a hardver szenzorjainak értékeit. diff --git a/plugin-sensors/translations/sensors_it_IT.desktop b/plugin-sensors/translations/sensors_it_IT.desktop new file mode 100644 index 0000000..928c30a --- /dev/null +++ b/plugin-sensors/translations/sensors_it_IT.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[it_IT]=Sensori +Comment[it_IT]=Visualizza i valori rilevati dai sensori hardware (attualmente lm_sensors) diff --git a/plugin-sensors/translations/sensors_it_IT.ts b/plugin-sensors/translations/sensors_it_IT.ts new file mode 100644 index 0000000..35562ef --- /dev/null +++ b/plugin-sensors/translations/sensors_it_IT.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Impostazioni dei sensori di LxQt + + + + Sensors Settings + + + + + Common + Comune + + + + Update interval (seconds) + Intervallo di aggiornamento (secondi) + + + + Temperature bar width + Larghezza della barra della temperatura + + + + Temperature scale + Scala della temperatura + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Barre di avanzamento lampeggianti quando la temperatura è troppo elevata + + + + Warning about high temperature + Avvertimento per la temperatura elevata + + + + Sensors + Sensori + + + + Detected chips: + Chip rilevati: + + + + Chip features: + Caratteristiche del chip: + + + + Enabled + Attivato + + + + Label + Etichetta + + + + Color + Colore + + + diff --git a/plugin-sensors/translations/sensors_ja.desktop b/plugin-sensors/translations/sensors_ja.desktop new file mode 100644 index 0000000..f9471f6 --- /dev/null +++ b/plugin-sensors/translations/sensors_ja.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ja]=センサー +Comment[ja]=ハードウェアセンサからの測定値を表示します diff --git a/plugin-sensors/translations/sensors_ja.ts b/plugin-sensors/translations/sensors_ja.ts new file mode 100644 index 0000000..deb64a8 --- /dev/null +++ b/plugin-sensors/translations/sensors_ja.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + センサーウィジェットの設定 + + + + Common + 共通 + + + + Update interval (seconds) + 更新頻度(秒) + + + + Temperature bar width + 温度バーの幅 + + + + Temperature scale + 温度の単位 + + + + Celsius + 摂氏 + + + + Fahrenheit + 華氏 + + + + Blink progress bars when the temperature is too high + 高温時にバーを点滅 + + + + Warning about high temperature + 高温時に警告 + + + + Sensors + センサー + + + + Detected chips: + 検出されたチップ + + + + Chip features: + チップの機能: + + + + Enabled + 有効 + + + + Label + ラベル + + + + Color + + + + diff --git a/plugin-sensors/translations/sensors_lt.desktop b/plugin-sensors/translations/sensors_lt.desktop new file mode 100644 index 0000000..87d5565 --- /dev/null +++ b/plugin-sensors/translations/sensors_lt.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[lt]=Jutikliai +Comment[lt]=Rodo nuskaitymus iš jutiklių (lm_sensors) diff --git a/plugin-sensors/translations/sensors_nl.desktop b/plugin-sensors/translations/sensors_nl.desktop new file mode 100644 index 0000000..dd33760 --- /dev/null +++ b/plugin-sensors/translations/sensors_nl.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[nl]=Sensoren +Comment[nl]=Bekijk metingen van hardware sensoren (op dit moment lm_sensors) diff --git a/plugin-sensors/translations/sensors_pl_PL.desktop b/plugin-sensors/translations/sensors_pl_PL.desktop new file mode 100644 index 0000000..42bf567 --- /dev/null +++ b/plugin-sensors/translations/sensors_pl_PL.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[pl_PL]=Czujniki +Comment[pl_PL]=Pokaż wskazania z czujników (aktualnie lm_sensors) diff --git a/plugin-sensors/translations/sensors_pl_PL.ts b/plugin-sensors/translations/sensors_pl_PL.ts new file mode 100644 index 0000000..10a9450 --- /dev/null +++ b/plugin-sensors/translations/sensors_pl_PL.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Ustawienia LxQt Sensors + + + + Sensors Settings + + + + + Common + Ogólne + + + + Update interval (seconds) + Częstotliwość odświeżania (sekundy) + + + + Temperature bar width + Szerokość paska stanu temperatury + + + + Temperature scale + Skala temperatury + + + + Celsius + Celsjusz + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Mruganie pasków stanu kiedy temperatura jest za wysoka + + + + Warning about high temperature + Ostrzeżenie o wysokiej temperaturze + + + + Sensors + Sensory + + + + Detected chips: + Wykryte chipy: + + + + Chip features: + Cechy chipu: + + + + Enabled + Włączone + + + + Label + Etykieta + + + + Color + Kolor + + + diff --git a/plugin-sensors/translations/sensors_pt.desktop b/plugin-sensors/translations/sensors_pt.desktop new file mode 100644 index 0000000..88a4ae2 --- /dev/null +++ b/plugin-sensors/translations/sensors_pt.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + +# Translations +Name[pt]=Sensores +Comment[pt]=Consultar as leituras dos sensores. diff --git a/plugin-sensors/translations/sensors_pt.ts b/plugin-sensors/translations/sensors_pt.ts new file mode 100644 index 0000000..687b1d3 --- /dev/null +++ b/plugin-sensors/translations/sensors_pt.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Definições dos sensores do LxQt + + + + Sensors Settings + + + + + Common + Geral + + + + Update interval (seconds) + Intervalo de atualização (segundos) + + + + Temperature bar width + Largura da barra de temperatura + + + + Temperature scale + Unidade de medida + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Barras de evolução intermitentes se a temperatura for elevada + + + + Warning about high temperature + Avisar sobre a temperatura elevada + + + + Sensors + Sensores + + + + Detected chips: + Circuitos detetados: + + + + Chip features: + Funcionalidades do circuito: + + + + Enabled + Ativo + + + + Label + Texto + + + + Color + Cor + + + diff --git a/plugin-sensors/translations/sensors_pt_BR.desktop b/plugin-sensors/translations/sensors_pt_BR.desktop new file mode 100644 index 0000000..7e68f5d --- /dev/null +++ b/plugin-sensors/translations/sensors_pt_BR.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[pt_BR]=Sensores +Comment[pt_BR]=Visualizar as leituras dos sensores de hardware (atualmente do lm_sensors) diff --git a/plugin-sensors/translations/sensors_pt_BR.ts b/plugin-sensors/translations/sensors_pt_BR.ts new file mode 100644 index 0000000..69da076 --- /dev/null +++ b/plugin-sensors/translations/sensors_pt_BR.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Configuraçoes Dos Sensores + + + + Sensors Settings + + + + + Common + Comum + + + + Update interval (seconds) + Intervalo de atualização (segundos) + + + + Temperature bar width + Temperatura em barra com + + + + Temperature scale + Temperatura em escala + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + Piscar a barra de progresso quando a temperatura está muito alta + + + + Warning about high temperature + Alertar sobre a alta temperatura + + + + Sensors + Sensores + + + + Detected chips: + Chips detectados: + + + + Chip features: + Características do chips: + + + + Enabled + Habilitado + + + + Label + Rótulo + + + + Color + Cor + + + diff --git a/plugin-sensors/translations/sensors_ro_RO.desktop b/plugin-sensors/translations/sensors_ro_RO.desktop new file mode 100644 index 0000000..e2338d9 --- /dev/null +++ b/plugin-sensors/translations/sensors_ro_RO.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ro_RO]=Senzori +Comment[ro_RO]=Vizualizează citirile senzorilor hardware (momentan lm_sensors) diff --git a/plugin-sensors/translations/sensors_ro_RO.ts b/plugin-sensors/translations/sensors_ro_RO.ts new file mode 100644 index 0000000..76c438c --- /dev/null +++ b/plugin-sensors/translations/sensors_ro_RO.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + + + + + Common + + + + + Update interval (seconds) + Interval de actualizare (secunde) + + + + Temperature bar width + + + + + Temperature scale + + + + + Celsius + Celsius + + + + Fahrenheit + Fahrenheit + + + + Blink progress bars when the temperature is too high + + + + + Warning about high temperature + + + + + Sensors + Senzori + + + + Detected chips: + + + + + Chip features: + + + + + Enabled + + + + + Label + Etichetă + + + + Color + Culoare + + + diff --git a/plugin-sensors/translations/sensors_ru.desktop b/plugin-sensors/translations/sensors_ru.desktop new file mode 100644 index 0000000..7318586 --- /dev/null +++ b/plugin-sensors/translations/sensors_ru.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ru]=Сенсоры +Comment[ru]=Посмотреть данные с аппаратных сенсоров. \ No newline at end of file diff --git a/plugin-sensors/translations/sensors_ru.ts b/plugin-sensors/translations/sensors_ru.ts new file mode 100644 index 0000000..c613473 --- /dev/null +++ b/plugin-sensors/translations/sensors_ru.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + Настройки сенсоров + + + + Common + Общие + + + + Update interval (seconds) + Интервал обновления (секунды) + + + + Temperature bar width + Ширина температурной шкалы + + + + Temperature scale + Температурная шкала + + + + Celsius + По Цельсию + + + + Fahrenheit + По Фаренгейту + + + + Blink progress bars when the temperature is too high + Мигать индикатором состояния когда температура слишком высока + + + + Warning about high temperature + Предупреждать о высокой температуре + + + + Sensors + Сенсоры + + + + Detected chips: + Обнаруженые чипы: + + + + Chip features: + Возможности чипов: + + + + Enabled + Включён + + + + Label + Метка + + + + Color + Цвет + + + diff --git a/plugin-sensors/translations/sensors_ru_RU.desktop b/plugin-sensors/translations/sensors_ru_RU.desktop new file mode 100644 index 0000000..d87797a --- /dev/null +++ b/plugin-sensors/translations/sensors_ru_RU.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[ru_RU]=Сенсоры +Comment[ru_RU]=Посмотреть данные с аппаратных сенсоров. \ No newline at end of file diff --git a/plugin-sensors/translations/sensors_ru_RU.ts b/plugin-sensors/translations/sensors_ru_RU.ts new file mode 100644 index 0000000..86ee6b8 --- /dev/null +++ b/plugin-sensors/translations/sensors_ru_RU.ts @@ -0,0 +1,82 @@ + + + + + LxQtSensorsConfiguration + + + Sensors Settings + Настройки сенсоров + + + + Common + Общие + + + + Update interval (seconds) + Интервал обновления (секунды) + + + + Temperature bar width + Ширина температурной шкалы + + + + Temperature scale + Температурная шкала + + + + Celsius + По Цельсию + + + + Fahrenheit + По Фаренгейту + + + + Blink progress bars when the temperature is too high + Мигать индикатором состояния когда температура слишком высока + + + + Warning about high temperature + Предупреждать о высокой температуре + + + + Sensors + Сенсоры + + + + Detected chips: + Обнаруженые чипы: + + + + Chip features: + Возможности чипов: + + + + Enabled + Включён + + + + Label + Метка + + + + Color + Цвет + + + diff --git a/plugin-sensors/translations/sensors_sl.desktop b/plugin-sensors/translations/sensors_sl.desktop new file mode 100644 index 0000000..8f19cd7 --- /dev/null +++ b/plugin-sensors/translations/sensors_sl.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[sl]=Senzorji +Comment[sl]=Oglejte si meritve senzorjev za strojno opremo (trenutno lm_sensors) diff --git a/plugin-sensors/translations/sensors_th_TH.desktop b/plugin-sensors/translations/sensors_th_TH.desktop new file mode 100644 index 0000000..08619d6 --- /dev/null +++ b/plugin-sensors/translations/sensors_th_TH.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[th_TH]=ตัวตรวจจับ +Comment[th_TH]=ดูข้อมูลที่ตัวตรวจจับฮาร์ดแวร์อ่านได้ (lm_sensors โดยปัจจุบัน) diff --git a/plugin-sensors/translations/sensors_th_TH.ts b/plugin-sensors/translations/sensors_th_TH.ts new file mode 100644 index 0000000..ec200bc --- /dev/null +++ b/plugin-sensors/translations/sensors_th_TH.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + ค่าตั้งตัวตรวจจับ LxQt + + + + Sensors Settings + + + + + Common + ทั่วไป + + + + Update interval (seconds) + ทิ้งระยะการปรับข้อมูล (วินาที) + + + + Temperature bar width + ความกว้างแถบแสดงอุณหภูมิ + + + + Temperature scale + หน่วยของอุณหภูมิ + + + + Celsius + เซลเซียส + + + + Fahrenheit + ฟาห์เรนไฮต์ + + + + Blink progress bars when the temperature is too high + กระพริบตรงแถบเมื่ออุณหภูมิสูงเกินไป + + + + Warning about high temperature + การเตือนเกี่ยวกับอุณภูมิที่สูงเกินไป + + + + Sensors + ตัวตรวจจับ + + + + Detected chips: + ชิปที่พบ: + + + + Chip features: + คุณสมบัติชิป: + + + + Enabled + เปิดใช้ + + + + Label + ป้าย + + + + Color + สี + + + diff --git a/plugin-sensors/translations/sensors_tr.desktop b/plugin-sensors/translations/sensors_tr.desktop new file mode 100644 index 0000000..1a7aad7 --- /dev/null +++ b/plugin-sensors/translations/sensors_tr.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[tr]=Algılayıcılar +Comment[tr]=Donanım algılayıcılarının okudukları değerleri görüntüleyin (şimdilik lm_sensors) diff --git a/plugin-sensors/translations/sensors_uk.desktop b/plugin-sensors/translations/sensors_uk.desktop new file mode 100644 index 0000000..761bef9 --- /dev/null +++ b/plugin-sensors/translations/sensors_uk.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[uk]=Сенсори +Comment[uk]=Показати дані апаратних сенсорів (lm_sensors) diff --git a/plugin-sensors/translations/sensors_uk.ts b/plugin-sensors/translations/sensors_uk.ts new file mode 100644 index 0000000..e75ea85 --- /dev/null +++ b/plugin-sensors/translations/sensors_uk.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + Налаштування сенсорів LxQt + + + + Sensors Settings + + + + + Common + Загальне + + + + Update interval (seconds) + Період поновлення (в секундах) + + + + Temperature bar width + Ширина планки температури + + + + Temperature scale + Шкала температури + + + + Celsius + Цельсія + + + + Fahrenheit + Фаренгейта + + + + Blink progress bars when the temperature is too high + Блимати планками прогресу при занадто високій температурі + + + + Warning about high temperature + Попереджати про високу температуру + + + + Sensors + Сенсори + + + + Detected chips: + Виявлені мікросхеми: + + + + Chip features: + Особливості мікросхеми: + + + + Enabled + Включено + + + + Label + Позначка + + + + Color + Колір + + + diff --git a/plugin-sensors/translations/sensors_zh_CN.desktop b/plugin-sensors/translations/sensors_zh_CN.desktop new file mode 100644 index 0000000..4c5edfc --- /dev/null +++ b/plugin-sensors/translations/sensors_zh_CN.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[zh_CN]=传感器 +Comment[zh_CN]=查看硬件传感器数据(当前是 lm_sensors) diff --git a/plugin-sensors/translations/sensors_zh_CN.ts b/plugin-sensors/translations/sensors_zh_CN.ts new file mode 100644 index 0000000..a44cfb8 --- /dev/null +++ b/plugin-sensors/translations/sensors_zh_CN.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + LxQt 监测器设置 + + + + Sensors Settings + + + + + Common + 常规 + + + + Update interval (seconds) + 更新间隔(秒) + + + + Temperature bar width + 温度条宽度 + + + + Temperature scale + 温标 + + + + Celsius + 摄氏度 + + + + Fahrenheit + 华氏度 + + + + Blink progress bars when the temperature is too high + 温度过高时闪动进度条 + + + + Warning about high temperature + 高温警告 + + + + Sensors + 监测器 + + + + Detected chips: + 已测芯片: + + + + Chip features: + 芯片功能: + + + + Enabled + 已启用 + + + + Label + 标注 + + + + Color + 颜色 + + + diff --git a/plugin-sensors/translations/sensors_zh_TW.desktop b/plugin-sensors/translations/sensors_zh_TW.desktop new file mode 100644 index 0000000..d132394 --- /dev/null +++ b/plugin-sensors/translations/sensors_zh_TW.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Sensors +Comment=View readings from hardware sensors. + + +# Translations +Name[zh_TW]=感應器 +Comment[zh_TW]=從硬體感應器中檢視(現在為 lm_sensors) diff --git a/plugin-sensors/translations/sensors_zh_TW.ts b/plugin-sensors/translations/sensors_zh_TW.ts new file mode 100644 index 0000000..0f41acd --- /dev/null +++ b/plugin-sensors/translations/sensors_zh_TW.ts @@ -0,0 +1,86 @@ + + + + + LxQtSensorsConfiguration + + LxQt Sensors Settings + LxQt溫度感應設定 + + + + Sensors Settings + + + + + Common + 一般 + + + + Update interval (seconds) + 更新間隔(秒) + + + + Temperature bar width + 溫度計寬度 + + + + Temperature scale + 溫標 + + + + Celsius + 攝氏 + + + + Fahrenheit + 華式 + + + + Blink progress bars when the temperature is too high + 當溫度太高時溫度計閃爍 + + + + Warning about high temperature + 高溫警告 + + + + Sensors + 感應器 + + + + Detected chips: + 偵測晶片: + + + + Chip features: + 晶片資訊 + + + + Enabled + 允許 + + + + Label + 標籤 + + + + Color + 顏色 + + + diff --git a/plugin-showdesktop/CMakeLists.txt b/plugin-showdesktop/CMakeLists.txt new file mode 100644 index 0000000..e621065 --- /dev/null +++ b/plugin-showdesktop/CMakeLists.txt @@ -0,0 +1,21 @@ +set(PLUGIN "showdesktop") + +set(HEADERS + showdesktop.h +) + +set(SOURCES + showdesktop.cpp +) + +set(MOCS + showdesktop.h +) + +set(LIBRARIES + ${LIBRARIES} + ${LXQT_GLOBALKEYS_LIBRARIES} + ${QTXDG_LIBRARIES} +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-showdesktop/resources/showdesktop.desktop.in b/plugin-showdesktop/resources/showdesktop.desktop.in new file mode 100644 index 0000000..3c69e51 --- /dev/null +++ b/plugin-showdesktop/resources/showdesktop.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop +Icon=user-desktop + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-showdesktop/showdesktop.cpp b/plugin-showdesktop/showdesktop.cpp new file mode 100644 index 0000000..2daa9cd --- /dev/null +++ b/plugin-showdesktop/showdesktop.cpp @@ -0,0 +1,101 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "showdesktop.h" + +// Still needed for lxde/lxqt#338 +#include +#include + +#define DEFAULT_SHORTCUT "Control+Alt+D" + +ShowDesktop::ShowDesktop(const ILxQtPanelPluginStartupInfo &startupInfo) : + QObject(), + ILxQtPanelPlugin(startupInfo) +{ + m_key = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/show_hide").arg(settings()->group()), tr("Show desktop"), this); + if (m_key) + { + connect(m_key, SIGNAL(activated()), this, SLOT(toggleShowingDesktop())); + + if (m_key->shortcut().isEmpty()) + { + m_key->changeShortcut(DEFAULT_SHORTCUT); + if (m_key->shortcut().isEmpty()) + { + LxQt::Notification::notify(tr("Show Desktop: Global shortcut '%1' cannot be registered").arg(DEFAULT_SHORTCUT)); + } + } + } + + QAction * act = new QAction(XdgIcon::fromTheme("user-desktop"), tr("Show Desktop"), this); + connect(act, SIGNAL(triggered()), this, SLOT(toggleShowingDesktop())); + + mButton.setDefaultAction(act); + mButton.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); +} + +void ShowDesktop::toggleShowingDesktop() +{ + // Paulo: KWindowSystem is not working for Openbox here, see lxde/lxqt#338 + // KWindowSystem fix: https://git.reviewboard.kde.org/r/121667 + // NETRootInfo info(QX11Info::connection(), NET::WMDesktop); + // info.setShowingDesktop(!KWindowSystem::showingDesktop()); + + const char *atomStr = "_NET_SHOWING_DESKTOP"; + xcb_intern_atom_cookie_t cookie = xcb_intern_atom(QX11Info::connection(), false, strlen(atomStr), atomStr); + xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(QX11Info::connection(), cookie, 0); + xcb_atom_t showing_desktop_atom = reply->atom; + free(reply); + + uint32_t data[5] = { + uint32_t(KWindowSystem::showingDesktop() ? 0 : 1), 0, 0, 0, 0 + }; + + xcb_client_message_event_t event; + event.response_type = XCB_CLIENT_MESSAGE; + event.format = 32; + event.sequence = 0; + event.window = QX11Info::appRootWindow(); + event.type = showing_desktop_atom; + for (int i = 0; i < 5; i++) + event.data.data32[i] = data[i]; + + xcb_send_event(QX11Info::connection(), false, QX11Info::appRootWindow(), + (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), + (const char *) &event); +} + +#undef DEFAULT_SHORTCUT diff --git a/plugin-showdesktop/showdesktop.h b/plugin-showdesktop/showdesktop.h new file mode 100644 index 0000000..f7f73ef --- /dev/null +++ b/plugin-showdesktop/showdesktop.h @@ -0,0 +1,74 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Petr Vanek + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef SHOWDESKTOP_H +#define SHOWDESKTOP_H + +#include "../panel/ilxqtpanelplugin.h" +#include + + +namespace GlobalKeyShortcut +{ +class Action; +} + +class ShowDesktop : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT + +public: + ShowDesktop(const ILxQtPanelPluginStartupInfo &startupInfo); + + virtual QWidget *widget() { return &mButton; } + virtual QString themeId() const { return "ShowDesktop"; } +private: + GlobalKeyShortcut::Action * m_key; + +private slots: + void toggleShowingDesktop(); + +private: + QToolButton mButton; +}; + +class ShowDesktopLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new ShowDesktop(startupInfo); + } +}; + + +#endif + diff --git a/plugin-showdesktop/translations/showdesktop.ts b/plugin-showdesktop/translations/showdesktop.ts new file mode 100644 index 0000000..8273cb2 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + + + + diff --git a/plugin-showdesktop/translations/showdesktop_ar.desktop b/plugin-showdesktop/translations/showdesktop_ar.desktop new file mode 100644 index 0000000..a69d729 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=تصغير كافَّة النَّوافذ وإظهار سطح المكتب +Name[ar]=إظهار سطح المكتب diff --git a/plugin-showdesktop/translations/showdesktop_ar.ts b/plugin-showdesktop/translations/showdesktop_ar.ts new file mode 100644 index 0000000..f6cce6f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ar.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + إظهار سطح المكتب: ﻻ يمكن تسجيل اختصار لوحة المفاتيح العامُّ `%1` + + + + Show Desktop + إظهار سطح المكتب + + + diff --git a/plugin-showdesktop/translations/showdesktop_cs.desktop b/plugin-showdesktop/translations/showdesktop_cs.desktop new file mode 100644 index 0000000..0293bb5 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Zmenšit všechna okna a ukázat plochu +Name[cs]=Ukázat plochu diff --git a/plugin-showdesktop/translations/showdesktop_cs.ts b/plugin-showdesktop/translations/showdesktop_cs.ts new file mode 100644 index 0000000..9b074ca --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_cs.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Ukázat plochu: Celkovou zkratku '%1' nelze zapsat + + + + Show Desktop + Ukázat pracovní plochu + + + diff --git a/plugin-showdesktop/translations/showdesktop_cs_CZ.desktop b/plugin-showdesktop/translations/showdesktop_cs_CZ.desktop new file mode 100644 index 0000000..5bd303e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Zmenšit všechna okna a ukázat pracovní plochu +Name[cs_CZ]=Ukázat pracovní plochu diff --git a/plugin-showdesktop/translations/showdesktop_cs_CZ.ts b/plugin-showdesktop/translations/showdesktop_cs_CZ.ts new file mode 100644 index 0000000..fc755f0 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_cs_CZ.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Ukázat plochu: Celkovou zkratku '%1' nelze zapsat + + + + Show Desktop + Ukázat pracovní plochu + + + diff --git a/plugin-showdesktop/translations/showdesktop_da.desktop b/plugin-showdesktop/translations/showdesktop_da.desktop new file mode 100644 index 0000000..20cfdf6 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Minimerer alle programmer og viser skrivebord +Name[da]=Vis Skrivebord diff --git a/plugin-showdesktop/translations/showdesktop_da.ts b/plugin-showdesktop/translations/showdesktop_da.ts new file mode 100644 index 0000000..53343be --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_da.ts @@ -0,0 +1,30 @@ + + + + + ShowDesktop + + Global keyboard shortcut + Global tastaturgenvej + + + Panel Show Desktop Global shortcut: '%1' cannot be registered + Global genvej for Vis Skrivebord : '%1' kan ikke registreres + + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Vis skrivebord + + + diff --git a/plugin-showdesktop/translations/showdesktop_da_DK.desktop b/plugin-showdesktop/translations/showdesktop_da_DK.desktop new file mode 100644 index 0000000..a344476 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Minimer alle vinduer og vis skrivebord +Name[da_DK]=Vis Skrivebord diff --git a/plugin-showdesktop/translations/showdesktop_da_DK.ts b/plugin-showdesktop/translations/showdesktop_da_DK.ts new file mode 100644 index 0000000..ef1f519 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_da_DK.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Vis Skrivebord: Global genvej '%1' kan ikke registreres + + + + Show Desktop + Vis Skrivebord + + + diff --git a/plugin-showdesktop/translations/showdesktop_de.desktop b/plugin-showdesktop/translations/showdesktop_de.desktop new file mode 100644 index 0000000..83fc665 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Minimiere alle Fenster und zeige den Desktop +Name[de]=Zeige Desktop diff --git a/plugin-showdesktop/translations/showdesktop_de.ts b/plugin-showdesktop/translations/showdesktop_de.ts new file mode 100644 index 0000000..50f630b --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_de.ts @@ -0,0 +1,30 @@ + + + + + ShowDesktop + + Global keyboard shortcut + Globales Tastaturkürzel + + + Panel Show Desktop Global shortcut: '%1' cannot be registered + Globales Tastenkürzel für Arbeitsfläche anzeigen: »%1« kann nicht registriert werden + + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Zeige Arbeitsoberfläche + + + diff --git a/plugin-showdesktop/translations/showdesktop_de_DE.desktop b/plugin-showdesktop/translations/showdesktop_de_DE.desktop new file mode 100644 index 0000000..dbcc5c5 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Alle Fenster minimieren und Desktop anzeigen +Name[de_DE]=Desktop anzeigen diff --git a/plugin-showdesktop/translations/showdesktop_de_DE.ts b/plugin-showdesktop/translations/showdesktop_de_DE.ts new file mode 100644 index 0000000..19ac187 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_de_DE.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Zeige Desktop: Globales Tastenkürzel '%1' kann nicht vergeben werden + + + + Show Desktop + Zeige Desktop + + + diff --git a/plugin-showdesktop/translations/showdesktop_el_GR.desktop b/plugin-showdesktop/translations/showdesktop_el_GR.desktop new file mode 100644 index 0000000..d0db21b --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Ελαχιστοποίηση όλων των παραθύρων και εμφάνιση της επιφάνειας εργασίας +Name[el_GR]=Εμφάνιση επιφάνειας εργασίας diff --git a/plugin-showdesktop/translations/showdesktop_el_GR.ts b/plugin-showdesktop/translations/showdesktop_el_GR.ts new file mode 100644 index 0000000..577e184 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_el_GR.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Εμφάνιση επιφάνειας εργασίας: Δεν είναι δυνατή η καταχώριση της καθολικής συντόμευσης "%1" + + + + Show Desktop + Εμφάνιση επιφάνειας εργασίας + + + diff --git a/plugin-showdesktop/translations/showdesktop_eo.desktop b/plugin-showdesktop/translations/showdesktop_eo.desktop new file mode 100644 index 0000000..6e5cccd --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Malmaksimigi ĉiujn fenestrojn kaj montri la labortablon +Name[eo]=Montri labortablon diff --git a/plugin-showdesktop/translations/showdesktop_eo.ts b/plugin-showdesktop/translations/showdesktop_eo.ts new file mode 100644 index 0000000..bbe2112 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_eo.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Montri labortablon: ĉiea klavkombino '%1' ne registreblas + + + + Show Desktop + Montri labortablon + + + diff --git a/plugin-showdesktop/translations/showdesktop_es.desktop b/plugin-showdesktop/translations/showdesktop_es.desktop new file mode 100644 index 0000000..69340c4 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Minimiza todas las ventanas y muestra el escritorio +Name[es]=Mostrar escritorio diff --git a/plugin-showdesktop/translations/showdesktop_es.ts b/plugin-showdesktop/translations/showdesktop_es.ts new file mode 100644 index 0000000..ca96ae1 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_es.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar Escritorio: Atajo global '%1' no puede ser registrado + + + + Show Desktop + Mostrar Escritorio + + + diff --git a/plugin-showdesktop/translations/showdesktop_es_VE.desktop b/plugin-showdesktop/translations/showdesktop_es_VE.desktop new file mode 100644 index 0000000..431d545 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Minimiza todas las ventanas de todos los escritorios +Name[es_VE]=Mostrar Escritorio diff --git a/plugin-showdesktop/translations/showdesktop_es_VE.ts b/plugin-showdesktop/translations/showdesktop_es_VE.ts new file mode 100644 index 0000000..4e8b7ce --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_es_VE.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar escritorio: Acceso de teclado global '%1' no puede registrarse + + + + Show Desktop + Mostrar Escritorio + + + diff --git a/plugin-showdesktop/translations/showdesktop_eu.desktop b/plugin-showdesktop/translations/showdesktop_eu.desktop new file mode 100644 index 0000000..5cd784d --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Minimizatu leiho guztiak eta erakutsi mahaigaina +Name[eu]=Erakutsi mahaigaina diff --git a/plugin-showdesktop/translations/showdesktop_eu.ts b/plugin-showdesktop/translations/showdesktop_eu.ts new file mode 100644 index 0000000..e2e5ba8 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_eu.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Erakutsi mahaigaina: Ezin da '%1' lasterbide globala erregistratu + + + + Show Desktop + Erakutsi mahaigaina + + + diff --git a/plugin-showdesktop/translations/showdesktop_fi.desktop b/plugin-showdesktop/translations/showdesktop_fi.desktop new file mode 100644 index 0000000..7aea315 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Pienennä kaikki ikkunat ja näytä työpöytä +Name[fi]=Näytä työpöytä diff --git a/plugin-showdesktop/translations/showdesktop_fi.ts b/plugin-showdesktop/translations/showdesktop_fi.ts new file mode 100644 index 0000000..0ffbe54 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_fi.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Näytä työpöytä: globaalia pikanäppäintä '%1' ei voi rekisteröidä + + + + Show Desktop + Näytä työpöytä + + + diff --git a/plugin-showdesktop/translations/showdesktop_fr_FR.desktop b/plugin-showdesktop/translations/showdesktop_fr_FR.desktop new file mode 100644 index 0000000..83710dd --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Minimiser toutes les fenêtres et montrer le bureau +Name[fr_FR]=Montrer le bureau diff --git a/plugin-showdesktop/translations/showdesktop_fr_FR.ts b/plugin-showdesktop/translations/showdesktop_fr_FR.ts new file mode 100644 index 0000000..51d92a9 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_fr_FR.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Montrer le bureau : le raccourci global '%1' ne peut pas être défini + + + + Show Desktop + Montrer le bureau + + + diff --git a/plugin-showdesktop/translations/showdesktop_hu.desktop b/plugin-showdesktop/translations/showdesktop_hu.desktop new file mode 100644 index 0000000..c52c3ff --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Minimalizálja az összes ablakot és megjeleníti az asztalt +Name[hu]=Az asztal megjelenítése diff --git a/plugin-showdesktop/translations/showdesktop_hu.ts b/plugin-showdesktop/translations/showdesktop_hu.ts new file mode 100644 index 0000000..332cc7e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_hu.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + + + + diff --git a/plugin-showdesktop/translations/showdesktop_hu_HU.ts b/plugin-showdesktop/translations/showdesktop_hu_HU.ts new file mode 100644 index 0000000..139f771 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_hu_HU.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Az asztal megjelenítése + + + diff --git a/plugin-showdesktop/translations/showdesktop_ia.desktop b/plugin-showdesktop/translations/showdesktop_ia.desktop new file mode 100644 index 0000000..6b0d1ac --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show Desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-showdesktop/translations/showdesktop_ia.ts b/plugin-showdesktop/translations/showdesktop_ia.ts new file mode 100644 index 0000000..b5e08da --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ia.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + + + + diff --git a/plugin-showdesktop/translations/showdesktop_id_ID.desktop b/plugin-showdesktop/translations/showdesktop_id_ID.desktop new file mode 100644 index 0000000..9287947 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_id_ID.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[id_ID]=Kecilkan seluruh jendela dan tampilkan desktop +Name[id_ID]=Tampilkan Desktop diff --git a/plugin-showdesktop/translations/showdesktop_id_ID.ts b/plugin-showdesktop/translations/showdesktop_id_ID.ts new file mode 100644 index 0000000..716c8ab --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_id_ID.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Tampilkan Desktop + + + diff --git a/plugin-showdesktop/translations/showdesktop_it_IT.desktop b/plugin-showdesktop/translations/showdesktop_it_IT.desktop new file mode 100644 index 0000000..1b6bd6e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Minimizza tutte le finestre e mostra il desktop +Name[it_IT]=Mostra desktop diff --git a/plugin-showdesktop/translations/showdesktop_it_IT.ts b/plugin-showdesktop/translations/showdesktop_it_IT.ts new file mode 100644 index 0000000..3d47876 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_it_IT.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Mostra desktop: la scorciatoia globale '%1' non può essere registrata + + + + Show Desktop + Mostra desktop + + + diff --git a/plugin-showdesktop/translations/showdesktop_ja.desktop b/plugin-showdesktop/translations/showdesktop_ja.desktop new file mode 100644 index 0000000..04c5c2f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=全ウィンドウ最小化やデスクトップ表示を可能にします +Name[ja]=デスクトップ表示 diff --git a/plugin-showdesktop/translations/showdesktop_ja.ts b/plugin-showdesktop/translations/showdesktop_ja.ts new file mode 100644 index 0000000..4ca0e2f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ja.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + デスクトップの表示: グローバルなショートカット '%1' は登録できません + + + + Show Desktop + デスクトップを表示 + + + diff --git a/plugin-showdesktop/translations/showdesktop_ko.desktop b/plugin-showdesktop/translations/showdesktop_ko.desktop new file mode 100644 index 0000000..6b0d1ac --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show Desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-showdesktop/translations/showdesktop_ko.ts b/plugin-showdesktop/translations/showdesktop_ko.ts new file mode 100644 index 0000000..42a6b5c --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ko.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + + + + diff --git a/plugin-showdesktop/translations/showdesktop_lt.desktop b/plugin-showdesktop/translations/showdesktop_lt.desktop new file mode 100644 index 0000000..aab7a00 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Sumažina visus langus ir rodo darbalaukį +Name[lt]=Darbalaukio rodymas diff --git a/plugin-showdesktop/translations/showdesktop_lt.ts b/plugin-showdesktop/translations/showdesktop_lt.ts new file mode 100644 index 0000000..12181ad --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_lt.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Rodyti darbalaukį: globalusis klavišas „%1“ negali būti registruojamas + + + + Show Desktop + Rodyti darbalaukį + + + diff --git a/plugin-showdesktop/translations/showdesktop_nl.desktop b/plugin-showdesktop/translations/showdesktop_nl.desktop new file mode 100644 index 0000000..d6e909f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Minimaliseer alle vensters en toon het bureaublad +Name[nl]=Toon Bureaublad diff --git a/plugin-showdesktop/translations/showdesktop_nl.ts b/plugin-showdesktop/translations/showdesktop_nl.ts new file mode 100644 index 0000000..92a8190 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_nl.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Bureaublad weergeven: systeembrede sneltoets '%1' kan niet worden geregistreerd + + + + Show Desktop + Toon bureaublad + + + diff --git a/plugin-showdesktop/translations/showdesktop_pl.desktop b/plugin-showdesktop/translations/showdesktop_pl.desktop new file mode 100644 index 0000000..ac0fbc9 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Minimalizuje wszystkie okna i pokazuje pulpit +Name[pl]=Pokaż pulpit diff --git a/plugin-showdesktop/translations/showdesktop_pl_PL.desktop b/plugin-showdesktop/translations/showdesktop_pl_PL.desktop new file mode 100644 index 0000000..c99a9b3 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Minimalizuj wszystkie okna i pokaż pulpit +Name[pl_PL]=Pokaż pulpit diff --git a/plugin-showdesktop/translations/showdesktop_pl_PL.ts b/plugin-showdesktop/translations/showdesktop_pl_PL.ts new file mode 100644 index 0000000..4d592c0 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pl_PL.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Pokaż Pulpit: Globalny skrót '%1' nie może zostać zarejestrowany + + + + Show Desktop + Pokaż pulpit + + + diff --git a/plugin-showdesktop/translations/showdesktop_pt.desktop b/plugin-showdesktop/translations/showdesktop_pt.desktop new file mode 100644 index 0000000..accd4e7 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Mostrar área de trabalho +Comment[pt]=Minimizar janelas e mostrar a área de trabalho diff --git a/plugin-showdesktop/translations/showdesktop_pt.ts b/plugin-showdesktop/translations/showdesktop_pt.ts new file mode 100644 index 0000000..7413c63 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pt.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Tecla de atalho global: '%1' não pode ser registada + + + + Show Desktop + Mostrar área de trabalho + + + diff --git a/plugin-showdesktop/translations/showdesktop_pt_BR.desktop b/plugin-showdesktop/translations/showdesktop_pt_BR.desktop new file mode 100644 index 0000000..6026f06 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Minimizar todas as janelas e exibir a área de trabalho +Name[pt_BR]=Exibir a área de trabalho diff --git a/plugin-showdesktop/translations/showdesktop_pt_BR.ts b/plugin-showdesktop/translations/showdesktop_pt_BR.ts new file mode 100644 index 0000000..40c910a --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_pt_BR.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar Área De Trabalho: Atalho Global '%1'não pode se registrado + + + + Show Desktop + Exibir a área de trabalho + + + diff --git a/plugin-showdesktop/translations/showdesktop_ro_RO.desktop b/plugin-showdesktop/translations/showdesktop_ro_RO.desktop new file mode 100644 index 0000000..233de18 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Minimizează toate ferestrele și arată desktopul +Name[ro_RO]=Arată desktopul diff --git a/plugin-showdesktop/translations/showdesktop_ro_RO.ts b/plugin-showdesktop/translations/showdesktop_ro_RO.ts new file mode 100644 index 0000000..b75723e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ro_RO.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Afișează desktopul + + + diff --git a/plugin-showdesktop/translations/showdesktop_ru.desktop b/plugin-showdesktop/translations/showdesktop_ru.desktop new file mode 100644 index 0000000..531038e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Свернуть все окна и показать рабочий стол. +Name[ru]=Показать рабочий стол \ No newline at end of file diff --git a/plugin-showdesktop/translations/showdesktop_ru.ts b/plugin-showdesktop/translations/showdesktop_ru.ts new file mode 100644 index 0000000..20f4b52 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ru.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + Показать рабочий стол + + + + Show Desktop: Global shortcut '%1' cannot be registered + Показать рабочий стол: глобальное сочетание клавиш '%1' не может быть зарегистрировано + + + + Show Desktop + Показать рабочий стол + + + diff --git a/plugin-showdesktop/translations/showdesktop_ru_RU.desktop b/plugin-showdesktop/translations/showdesktop_ru_RU.desktop new file mode 100644 index 0000000..1568456 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Свернуть все окна и показать рабочий стол. +Name[ru_RU]=Показать рабочий стол diff --git a/plugin-showdesktop/translations/showdesktop_ru_RU.ts b/plugin-showdesktop/translations/showdesktop_ru_RU.ts new file mode 100644 index 0000000..ceaedf8 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_ru_RU.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + Показать рабочий стол + + + + Show Desktop: Global shortcut '%1' cannot be registered + Показать рабочий стол: глобальное сочетание клавиш '%1' не может быть зарегистрировано + + + + Show Desktop + Показать рабочий стол + + + diff --git a/plugin-showdesktop/translations/showdesktop_sk.desktop b/plugin-showdesktop/translations/showdesktop_sk.desktop new file mode 100644 index 0000000..8ca0f81 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Minimalizuje všetky okná a zobrazí plochu +Name[sk]=Zobraziť plochu diff --git a/plugin-showdesktop/translations/showdesktop_sk_SK.ts b/plugin-showdesktop/translations/showdesktop_sk_SK.ts new file mode 100644 index 0000000..5b81bc1 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sk_SK.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Zobraziť plochu + + + diff --git a/plugin-showdesktop/translations/showdesktop_sl.desktop b/plugin-showdesktop/translations/showdesktop_sl.desktop new file mode 100644 index 0000000..3c81888 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Pomanjšajte vsa okna, da se pokaže namizje +Name[sl]=Pokaži namizje diff --git a/plugin-showdesktop/translations/showdesktop_sl.ts b/plugin-showdesktop/translations/showdesktop_sl.ts new file mode 100644 index 0000000..07c6e23 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sl.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Prikaz namizja: globalne bližnjice »%1« ni moč registrirati + + + + Show Desktop + Pokaži namizje + + + diff --git a/plugin-showdesktop/translations/showdesktop_sr.desktop b/plugin-showdesktop/translations/showdesktop_sr.desktop new file mode 100644 index 0000000..78f7d5a --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Минимизуј све прозоре и прикажи радну површ +Name[sr]=Приказ површи diff --git a/plugin-showdesktop/translations/showdesktop_sr@ijekavian.desktop b/plugin-showdesktop/translations/showdesktop_sr@ijekavian.desktop new file mode 100644 index 0000000..d54cd34 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Приказ површи +Comment[sr@ijekavian]=Минимизуј све прозоре и прикажи радну површ diff --git a/plugin-showdesktop/translations/showdesktop_sr@ijekavianlatin.desktop b/plugin-showdesktop/translations/showdesktop_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..35b79e0 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Prikaz površi +Comment[sr@ijekavianlatin]=Minimizuj sve prozore i prikaži radnu površ diff --git a/plugin-showdesktop/translations/showdesktop_sr@latin.desktop b/plugin-showdesktop/translations/showdesktop_sr@latin.desktop new file mode 100644 index 0000000..3a76132 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Minimizuj sve prozore i prikaži radnu površ +Name[sr@latin]=Prikaz površi diff --git a/plugin-showdesktop/translations/showdesktop_sr@latin.ts b/plugin-showdesktop/translations/showdesktop_sr@latin.ts new file mode 100644 index 0000000..d9077f5 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr@latin.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + + + + diff --git a/plugin-showdesktop/translations/showdesktop_sr_BA.ts b/plugin-showdesktop/translations/showdesktop_sr_BA.ts new file mode 100644 index 0000000..7cc7548 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr_BA.ts @@ -0,0 +1,30 @@ + + + + + ShowDesktop + + Global keyboard shortcut + Глобална пречица тастатуре + + + Panel Show Desktop Global shortcut: '%1' cannot be registered + Глобална пречица приказа површи за панел: „%1“ не може бити регистрована + + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Прикажи радну површ + + + diff --git a/plugin-showdesktop/translations/showdesktop_sr_RS.ts b/plugin-showdesktop/translations/showdesktop_sr_RS.ts new file mode 100644 index 0000000..e5f6a5f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_sr_RS.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + + + + + Show Desktop + Прикажи радну површ + + + diff --git a/plugin-showdesktop/translations/showdesktop_th_TH.desktop b/plugin-showdesktop/translations/showdesktop_th_TH.desktop new file mode 100644 index 0000000..6a6a97d --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=ย่อเก็บหน้าต่างทั้งหมดและแสดงพื้นโต๊ะ +Name[th_TH]=แสดงพื้นโต๊ะ diff --git a/plugin-showdesktop/translations/showdesktop_th_TH.ts b/plugin-showdesktop/translations/showdesktop_th_TH.ts new file mode 100644 index 0000000..228eec3 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_th_TH.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + แสดงพื้นโต๊ะ: ไม่สามารถตั้ง '%1' เป็นปุ่มลัดส่วนกลางได้ + + + + Show Desktop + แสดงพื้นโต๊ะ + + + diff --git a/plugin-showdesktop/translations/showdesktop_tr.desktop b/plugin-showdesktop/translations/showdesktop_tr.desktop new file mode 100644 index 0000000..e54558f --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Tüm pencereleri küçült ve masaüstünü göster +Name[tr]=Masaüstünü Göster diff --git a/plugin-showdesktop/translations/showdesktop_tr.ts b/plugin-showdesktop/translations/showdesktop_tr.ts new file mode 100644 index 0000000..6b18a87 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_tr.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Masaüstünü Göster: '%1' genel kısayolu kaydedilemiyor + + + + Show Desktop + Masaüstünü Göster + + + diff --git a/plugin-showdesktop/translations/showdesktop_uk.desktop b/plugin-showdesktop/translations/showdesktop_uk.desktop new file mode 100644 index 0000000..dbe032e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Згорнути всі вікна та показати стільницю +Name[uk]=Показати стільницю diff --git a/plugin-showdesktop/translations/showdesktop_uk.ts b/plugin-showdesktop/translations/showdesktop_uk.ts new file mode 100644 index 0000000..1e05001 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_uk.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + Показати стільницю: Не вдалося зареєструвати глобальне скорочення '%1' + + + + Show Desktop + Показати стільницю + + + diff --git a/plugin-showdesktop/translations/showdesktop_zh_CN.GB2312.desktop b/plugin-showdesktop/translations/showdesktop_zh_CN.GB2312.desktop new file mode 100644 index 0000000..6b0d1ac --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show Desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-showdesktop/translations/showdesktop_zh_CN.desktop b/plugin-showdesktop/translations/showdesktop_zh_CN.desktop new file mode 100644 index 0000000..405e95e --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=最小化所有窗口并显示桌面 +Name[zh_CN]=显示桌面 diff --git a/plugin-showdesktop/translations/showdesktop_zh_CN.ts b/plugin-showdesktop/translations/showdesktop_zh_CN.ts new file mode 100644 index 0000000..41214a3 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_zh_CN.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + 显示桌面:无法注册全局快捷键'%1' + + + + Show Desktop + 显示桌面 + + + diff --git a/plugin-showdesktop/translations/showdesktop_zh_TW.desktop b/plugin-showdesktop/translations/showdesktop_zh_TW.desktop new file mode 100644 index 0000000..e3bc0e3 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Show desktop +Comment=Minimize all windows and show the desktop + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=將所有視窗縮到最小並顯示桌面 +Name[zh_TW]=顯示桌面 diff --git a/plugin-showdesktop/translations/showdesktop_zh_TW.ts b/plugin-showdesktop/translations/showdesktop_zh_TW.ts new file mode 100644 index 0000000..1cc3124 --- /dev/null +++ b/plugin-showdesktop/translations/showdesktop_zh_TW.ts @@ -0,0 +1,22 @@ + + + + + ShowDesktop + + + Show desktop + + + + + Show Desktop: Global shortcut '%1' cannot be registered + 顯示桌面:全域快捷鍵'%1'無法被註冊 + + + + Show Desktop + 顯示桌面 + + + diff --git a/plugin-sysstat/CMakeLists.txt b/plugin-sysstat/CMakeLists.txt new file mode 100644 index 0000000..1634635 --- /dev/null +++ b/plugin-sysstat/CMakeLists.txt @@ -0,0 +1,33 @@ +set(PLUGIN "sysstat") + +find_package(SysStat-Qt5 REQUIRED) + +set(HEADERS + lxqtsysstat.h + lxqtsysstatconfiguration.h + lxqtsysstatcolours.h + lxqtsysstatutils.h +) + +set(SOURCES + lxqtsysstat.cpp + lxqtsysstatconfiguration.cpp + lxqtsysstatcolours.cpp + lxqtsysstatutils.cpp +) + +set(MOCS + lxqtsysstat.h + lxqtsysstatconfiguration.h + lxqtsysstatcolours.h +) + +set(UIS + lxqtsysstatconfiguration.ui + lxqtsysstatcolours.ui +) + +set(LIBRARIES ${SYSSTAT_LIBRARIES}) +include_directories("${SYSSTAT_INCLUDE_DIRS}") + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-sysstat/lxqtsysstat.cpp b/plugin-sysstat/lxqtsysstat.cpp new file mode 100644 index 0000000..7febd34 --- /dev/null +++ b/plugin-sysstat/lxqtsysstat.cpp @@ -0,0 +1,582 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtsysstat.h" +#include "lxqtsysstatutils.h" + +#include +#include +#include + +#include +#include +#include +#include +#include + +LxQtSysStat::LxQtSysStat(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mWidget(new QWidget()), + mFakeTitle(new LxQtSysStatTitle(mWidget)), + mContent(new LxQtSysStatContent(this, mWidget)) +{ + QVBoxLayout *borderLayout = new QVBoxLayout(mWidget); + borderLayout->setContentsMargins(0, 0, 0, 0); + borderLayout->setSpacing(0); + borderLayout->addWidget(mContent); + borderLayout->setStretchFactor(mContent, 1); + + mContent->setMinimumSize(2, 2); + + // qproperty of font type doesn't work with qss, so fake QLabel is used instead + connect(mFakeTitle, SIGNAL(fontChanged(QFont)), mContent, SLOT(setTitleFont(QFont))); + + // has to be postponed to update the size first + QTimer::singleShot(0, this, SLOT(lateInit())); +} + +LxQtSysStat::~LxQtSysStat() +{ + delete mWidget; +} + +void LxQtSysStat::lateInit() +{ + settingsChanged(); + mContent->setTitleFont(mFakeTitle->font()); + mSize = mContent->size(); +} + +QDialog *LxQtSysStat::configureDialog() +{ + return new LxQtSysStatConfiguration(settings(), mWidget); +} + +void LxQtSysStat::realign() +{ + QSize newSize = mContent->size(); + if (mSize != newSize) + { + mContent->reset(); + mSize = newSize; + } +} + +void LxQtSysStat::settingsChanged() +{ + mContent->updateSettings(settings()); +} + +LxQtSysStatTitle::LxQtSysStatTitle(QWidget *parent): + QLabel(parent) +{ + +} + +LxQtSysStatTitle::~LxQtSysStatTitle() +{ + +} + +bool LxQtSysStatTitle::event(QEvent *e) +{ + if (e->type() == QEvent::FontChange) + emit fontChanged(font()); + + return QLabel::event(e); +} + +LxQtSysStatContent::LxQtSysStatContent(ILxQtPanelPlugin *plugin, QWidget *parent): + QWidget(parent), + mPlugin(plugin), + mStat(NULL), + mUpdateInterval(0), + mMinimalSize(0), + mTitleFontPixelHeight(0), + mUseThemeColours(true), + mHistoryOffset(0) +{ + setObjectName("SysStat_Graph"); +} + +LxQtSysStatContent::~LxQtSysStatContent() +{ +} + + +// I don't like macros very much, but writing dozen similar functions is much much worse. + +#undef QSS_GET_COLOUR +#define QSS_GET_COLOUR(GETNAME) \ +QColor LxQtSysStatContent::GETNAME##Colour() const \ +{ \ + return mThemeColours.GETNAME##Colour; \ +} + +#undef QSS_COLOUR +#define QSS_COLOUR(GETNAME, SETNAME) \ +QSS_GET_COLOUR(GETNAME) \ +void LxQtSysStatContent::SETNAME##Colour(QColor value) \ +{ \ + mThemeColours.GETNAME##Colour = value; \ + if (mUseThemeColours) \ + mColours.GETNAME##Colour = mThemeColours.GETNAME##Colour; \ +} + +#undef QSS_NET_COLOUR +#define QSS_NET_COLOUR(GETNAME, SETNAME) \ +QSS_GET_COLOUR(GETNAME) \ +void LxQtSysStatContent::SETNAME##Colour(QColor value) \ +{ \ + mThemeColours.GETNAME##Colour = value; \ + if (mUseThemeColours) \ + { \ + mColours.GETNAME##Colour = mThemeColours.GETNAME##Colour; \ + mixNetColours(); \ + } \ +} + +QSS_COLOUR(grid, setGrid) +QSS_COLOUR(title, setTitle) +QSS_COLOUR(cpuSystem, setCpuSystem) +QSS_COLOUR(cpuUser, setCpuUser) +QSS_COLOUR(cpuNice, setCpuNice) +QSS_COLOUR(cpuOther, setCpuOther) +QSS_COLOUR(frequency, setFrequency) +QSS_COLOUR(memApps, setMemApps) +QSS_COLOUR(memBuffers,setMemBuffers) +QSS_COLOUR(memCached, setMemCached) +QSS_COLOUR(swapUsed, setSwapUsed) + +QSS_NET_COLOUR(netReceived, setNetReceived) +QSS_NET_COLOUR(netTransmitted, setNetTransmitted) + +#undef QSS_NET_COLOUR +#undef QSS_COLOUR +#undef QSS_GET_COLOUR + +void LxQtSysStatContent::mixNetColours() +{ + QColor netReceivedColour_hsv = mColours.netReceivedColour.toHsv(); + QColor netTransmittedColour_hsv = mColours.netTransmittedColour.toHsv(); + qreal hue = (netReceivedColour_hsv.hueF() + netTransmittedColour_hsv.hueF()) / 2; + if (qAbs(netReceivedColour_hsv.hueF() - netTransmittedColour_hsv.hueF()) > 0.5) + hue += 0.5; + mNetBothColour.setHsvF( + hue, + (netReceivedColour_hsv.saturationF() + netTransmittedColour_hsv.saturationF()) / 2, + (netReceivedColour_hsv.valueF() + netTransmittedColour_hsv.valueF() ) / 2 ); +} + +void LxQtSysStatContent::setTitleFont(QFont value) +{ + mTitleFont = value; + updateTitleFontPixelHeight(); + + update(); +} + +void LxQtSysStatContent::updateTitleFontPixelHeight() +{ + if (mTitleLabel.isEmpty()) + mTitleFontPixelHeight = 0; + else + { + QFontMetrics fm(mTitleFont); + mTitleFontPixelHeight = fm.height() - 1; + } +} + +void LxQtSysStatContent::updateSettings(const QSettings *settings) +{ + double old_updateInterval = mUpdateInterval; + int old_minimalSize = mMinimalSize; + QString old_dataType = mDataType; + QString old_dataSource = mDataSource; + bool old_useFrequency = mUseFrequency; + bool old_logarithmicScale = mLogarithmicScale; + int old_logScaleSteps = mLogScaleSteps; + + mUseThemeColours = settings->value("graph/useThemeColours", true).toBool(); + mUpdateInterval = settings->value("graph/updateInterval", 1.0).toDouble(); + mMinimalSize = settings->value("graph/minimalSize", 30).toInt(); + + mGridLines = settings->value("grid/lines", 1).toInt(); + + mTitleLabel = settings->value("title/label", QString()).toString(); + + // default to CPU monitoring + mDataType = settings->value("data/type", QString("CPU")).toString(); + + mDataSource = settings->value("data/source", QString("cpu")).toString(); + + mUseFrequency = settings->value("cpu/useFrequency", true).toBool(); + + mNetMaximumSpeed = PluginSysStat::netSpeedFromString(settings->value("net/maximumSpeed", "1 MB/s").toString()); + mLogarithmicScale = settings->value("net/logarithmicScale", true).toBool(); + + mLogScaleSteps = settings->value("net/logarithmicScaleSteps", 4).toInt(); + mLogScaleMax = static_cast(static_cast(1) << mLogScaleSteps); + + mNetRealMaximumSpeed = static_cast(static_cast(1) << mNetMaximumSpeed); + + + mSettingsColours.gridColour = QColor(settings->value("grid/colour", "#c0c0c0").toString()); + + mSettingsColours.titleColour = QColor(settings->value("title/colour", "#ffffff").toString()); + + mSettingsColours.cpuSystemColour = QColor(settings->value("cpu/systemColour", "#800000").toString()); + mSettingsColours.cpuUserColour = QColor(settings->value("cpu/userColour", "#000080").toString()); + mSettingsColours.cpuNiceColour = QColor(settings->value("cpu/niceColour", "#008000").toString()); + mSettingsColours.cpuOtherColour = QColor(settings->value("cpu/otherColour", "#808000").toString()); + mSettingsColours.frequencyColour = QColor(settings->value("cpu/frequencyColour", "#808080").toString()); + + mSettingsColours.memAppsColour = QColor(settings->value("mem/appsColour", "#000080").toString()); + mSettingsColours.memBuffersColour = QColor(settings->value("mem/buffersColour", "#008000").toString()); + mSettingsColours.memCachedColour = QColor(settings->value("mem/cachedColour", "#808000").toString()); + mSettingsColours.swapUsedColour = QColor(settings->value("mem/swapColour", "#800000").toString()); + + mSettingsColours.netReceivedColour = QColor(settings->value("net/receivedColour", "#000080").toString()); + mSettingsColours.netTransmittedColour = QColor(settings->value("net/transmittedColour", "#808000").toString()); + + + if (mUseThemeColours) + mColours = mThemeColours; + else + mColours = mSettingsColours; + + mixNetColours(); + + updateTitleFontPixelHeight(); + + + bool minimalSizeChanged = old_minimalSize != mMinimalSize; + bool updateIntervalChanged = old_updateInterval != mUpdateInterval; + bool dataTypeChanged = old_dataType != mDataType; + bool dataSourceChanged = old_dataSource != mDataSource; + bool useFrequencyChanged = old_useFrequency != mUseFrequency; + bool logScaleStepsChanged = old_logScaleSteps != mLogScaleSteps; + bool logarithmicScaleChanged = old_logarithmicScale != mLogarithmicScale; + + bool needReconnecting = dataTypeChanged || dataSourceChanged || useFrequencyChanged; + bool needTimerRestarting = needReconnecting || updateIntervalChanged; + bool needFullReset = needTimerRestarting || minimalSizeChanged || logScaleStepsChanged || logarithmicScaleChanged; + + + if (mStat) + { + if (needTimerRestarting) + mStat->stopUpdating(); + + if (needReconnecting) + mStat->disconnect(this); + } + + if (dataTypeChanged) + { + if (mStat) + mStat->deleteLater(); + + if (mDataType == "CPU") + mStat = new SysStat::CpuStat(this); + else if (mDataType == "Memory") + mStat = new SysStat::MemStat(this); + else if (mDataType == "Network") + mStat = new SysStat::NetStat(this); + } + + if (mStat) + { + if (needReconnecting) + { + if (mDataType == "CPU") + { + if (mUseFrequency) + { + qobject_cast(mStat)->setMonitoring(SysStat::CpuStat::LoadAndFrequency); + connect(qobject_cast(mStat), SIGNAL(update(float, float, float, float, float, uint)), this, SLOT(cpuUpdate(float, float, float, float, float, uint))); + } + else + { + qobject_cast(mStat)->setMonitoring(SysStat::CpuStat::LoadOnly); + connect(qobject_cast(mStat), SIGNAL(update(float, float, float, float)), this, SLOT(cpuUpdate(float, float, float, float))); + } + } + else if (mDataType == "Memory") + { + if (mDataSource == "memory") + connect(qobject_cast(mStat), SIGNAL(memoryUpdate(float, float, float)), this, SLOT(memoryUpdate(float, float, float))); + else + connect(qobject_cast(mStat), SIGNAL(swapUpdate(float)), this, SLOT(swapUpdate(float))); + } + else if (mDataType == "Network") + { + connect(qobject_cast(mStat), SIGNAL(update(unsigned, unsigned)), this, SLOT(networkUpdate(unsigned, unsigned))); + } + + mStat->setMonitoredSource(mDataSource); + } + + if (needTimerRestarting) + mStat->setUpdateInterval(static_cast(mUpdateInterval * 1000.0)); + } + + if (needFullReset) + reset(); + else + update(); +} + +void LxQtSysStatContent::resizeEvent(QResizeEvent * /*event*/) +{ + reset(); +} + +void LxQtSysStatContent::reset() +{ + setMinimumSize(mPlugin->panel()->isHorizontal() ? mMinimalSize : 2, + mPlugin->panel()->isHorizontal() ? 2 : mMinimalSize); + + mHistoryOffset = 0; + mHistoryImage = QImage(width(), 100, QImage::Format_ARGB32); + mHistoryImage.fill(Qt::transparent); + update(); +} + +template +T clamp(const T &value, const T &min, const T &max) +{ + return qMin(qMax(value, min), max); +} + +// QPainter.drawLine with pen set to Qt::transparent doesn't clear anything +void LxQtSysStatContent::clearLine() +{ + QRgb bg = QColor(Qt::transparent).rgba(); + for (int i = 0; i < 100; ++i) + reinterpret_cast(mHistoryImage.scanLine(i))[mHistoryOffset] = bg; +} + +void LxQtSysStatContent::cpuUpdate(float user, float nice, float system, float other, float frequencyRate, uint) +{ + int y_system = clamp(static_cast(system * 100.0 * frequencyRate) , 0, 99); + int y_user = clamp(static_cast(user * 100.0 * frequencyRate) + y_system, 0, 99); + int y_nice = clamp(static_cast(nice * 100.0 * frequencyRate) + y_user , 0, 99); + int y_other = clamp(static_cast(other * 100.0 * frequencyRate) + y_nice , 0, 99); + int y_freq = clamp(static_cast( 100.0 * frequencyRate) , 0, 99); + + clearLine(); + QPainter painter(&mHistoryImage); + if (y_system != 0) + { + painter.setPen(mColours.cpuSystemColour); + painter.drawLine(mHistoryOffset, y_system, mHistoryOffset, 0); + } + if (y_user != y_system) + { + painter.setPen(mColours.cpuUserColour); + painter.drawLine(mHistoryOffset, y_user, mHistoryOffset, y_system); + } + if (y_nice != y_user) + { + painter.setPen(mColours.cpuNiceColour); + painter.drawLine(mHistoryOffset, y_nice, mHistoryOffset, y_user); + } + if (y_other != y_nice) + { + painter.setPen(mColours.cpuOtherColour); + painter.drawLine(mHistoryOffset, y_other, mHistoryOffset, y_nice); + } + if (y_freq != y_other) + { + painter.setPen(mColours.frequencyColour); + painter.drawLine(mHistoryOffset, y_freq, mHistoryOffset, y_other); + } + + mHistoryOffset = (mHistoryOffset + 1) % width(); + + update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight); +} + +void LxQtSysStatContent::cpuUpdate(float user, float nice, float system, float other) +{ + int y_system = clamp(static_cast(system * 100.0) , 0, 99); + int y_user = clamp(static_cast(user * 100.0) + y_system, 0, 99); + int y_nice = clamp(static_cast(nice * 100.0) + y_user , 0, 99); + int y_other = clamp(static_cast(other * 100.0) + y_nice , 0, 99); + + clearLine(); + QPainter painter(&mHistoryImage); + if (y_system != 0) + { + painter.setPen(mColours.cpuSystemColour); + painter.drawLine(mHistoryOffset, y_system, mHistoryOffset, 0); + } + if (y_user != y_system) + { + painter.setPen(mColours.cpuUserColour); + painter.drawLine(mHistoryOffset, y_user, mHistoryOffset, y_system); + } + if (y_nice != y_user) + { + painter.setPen(mColours.cpuNiceColour); + painter.drawLine(mHistoryOffset, y_nice, mHistoryOffset, y_user); + } + if (y_other != y_nice) + { + painter.setPen(mColours.cpuOtherColour); + painter.drawLine(mHistoryOffset, y_other, mHistoryOffset, y_nice); + } + + mHistoryOffset = (mHistoryOffset + 1) % width(); + + update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight); +} + +void LxQtSysStatContent::memoryUpdate(float apps, float buffers, float cached) +{ + int y_apps = clamp(static_cast(apps * 100.0) , 0, 99); + int y_buffers = clamp(static_cast(buffers * 100.0) + y_apps , 0, 99); + int y_cached = clamp(static_cast(cached * 100.0) + y_buffers, 0, 99); + + clearLine(); + QPainter painter(&mHistoryImage); + if (y_apps != 0) + { + painter.setPen(mColours.memAppsColour); + painter.drawLine(mHistoryOffset, y_apps, mHistoryOffset, 0); + } + if (y_buffers != y_apps) + { + painter.setPen(mColours.memBuffersColour); + painter.drawLine(mHistoryOffset, y_buffers, mHistoryOffset, y_apps); + } + if (y_cached != y_buffers) + { + painter.setPen(mColours.memCachedColour); + painter.drawLine(mHistoryOffset, y_cached, mHistoryOffset, y_buffers); + } + + mHistoryOffset = (mHistoryOffset + 1) % width(); + + update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight); +} + +void LxQtSysStatContent::swapUpdate(float used) +{ + int y_used = clamp(static_cast(used * 100.0), 0, 99); + + clearLine(); + QPainter painter(&mHistoryImage); + if (y_used != 0) + { + painter.setPen(mColours.swapUsedColour); + painter.drawLine(mHistoryOffset, y_used, mHistoryOffset, 0); + } + + mHistoryOffset = (mHistoryOffset + 1) % width(); + + update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight); +} + +void LxQtSysStatContent::networkUpdate(unsigned received, unsigned transmitted) +{ + qreal min_value = qMin(qMax(static_cast(qMin(received, transmitted)) / mNetRealMaximumSpeed, static_cast(0.0)), static_cast(1.0)); + qreal max_value = qMin(qMax(static_cast(qMax(received, transmitted)) / mNetRealMaximumSpeed, static_cast(0.0)), static_cast(1.0)); + if (mLogarithmicScale) + { + min_value = qLn(min_value * (mLogScaleMax - 1.0) + 1.0) / qLn(2.0) / static_cast(mLogScaleSteps); + max_value = qLn(max_value * (mLogScaleMax - 1.0) + 1.0) / qLn(2.0) / static_cast(mLogScaleSteps); + } + + int y_min_value = clamp(static_cast(min_value * 100.0) , 0, 99); + int y_max_value = clamp(static_cast(max_value * 100.0) + y_min_value, 0, 99); + + clearLine(); + QPainter painter(&mHistoryImage); + if (y_min_value != 0) + { + painter.setPen(mNetBothColour); + painter.drawLine(mHistoryOffset, y_min_value, mHistoryOffset, 0); + } + if (y_max_value != y_min_value) + { + painter.setPen((received > transmitted) ? mColours.netReceivedColour : mColours.netTransmittedColour); + painter.drawLine(mHistoryOffset, y_max_value, mHistoryOffset, y_min_value); + } + + mHistoryOffset = (mHistoryOffset + 1) % width(); + + update(0, mTitleFontPixelHeight, width(), height() - mTitleFontPixelHeight); +} + +void LxQtSysStatContent::paintEvent(QPaintEvent *event) +{ + QPainter p(this); + + qreal graphTop = 0; + qreal graphHeight = height(); + + bool hasTitle = !mTitleLabel.isEmpty(); + + if (hasTitle) + { + graphTop = mTitleFontPixelHeight; + graphHeight -= graphTop; + + if (event->region().intersects(QRect(0, 0, width(), graphTop))) + { + p.setPen(mColours.titleColour); + p.setFont(mTitleFont); + p.drawText(QRectF(0, 0, width(), graphTop), Qt::AlignHCenter | Qt::AlignVCenter, mTitleLabel); + } + } + + if (graphHeight < 1) + graphHeight = 1; + + p.scale(1.0, -1.0); + + p.drawImage(QRect(0, -height(), width() - mHistoryOffset, graphHeight), mHistoryImage, QRect(mHistoryOffset, 0, width() - mHistoryOffset, 100)); + if (mHistoryOffset) + p.drawImage(QRect(width() - mHistoryOffset, -height(), mHistoryOffset, graphHeight), mHistoryImage, QRect(0, 0, mHistoryOffset, 100)); + + p.resetTransform(); + + p.setRenderHint(QPainter::Antialiasing); + + p.setPen(mColours.gridColour); + qreal w = static_cast(width()); + if (hasTitle) + p.drawLine(QPointF(0.0, graphTop + 0.5), QPointF(w, graphTop + 0.5)); // 0.5 looks better with antialiasing + for (int l = 0; l < mGridLines; ++l) + { + qreal y = graphTop + static_cast(l + 1) * graphHeight / (static_cast(mGridLines + 1)); + p.drawLine(QPointF(0.0, y), QPointF(w, y)); + } +} diff --git a/plugin-sysstat/lxqtsysstat.h b/plugin-sysstat/lxqtsysstat.h new file mode 100644 index 0000000..d3ffaa7 --- /dev/null +++ b/plugin-sysstat/lxqtsysstat.h @@ -0,0 +1,226 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTPANELSYSSTAT_H +#define LXQTPANELSYSSTAT_H + +#include "../panel/ilxqtpanelplugin.h" +#include "lxqtsysstatconfiguration.h" + +#include + + +class LxQtSysStatTitle; +class LxQtSysStatContent; +class LxQtPanel; + +namespace SysStat { + class BaseStat; +} + +class LxQtSysStat : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtSysStat(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtSysStat(); + + virtual QWidget *widget() { return mWidget; } + virtual QString themeId() const { return "SysStat"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog; } + virtual bool isSeparate() const { return true; } + + QDialog *configureDialog(); + + void realign(); + +protected slots: + virtual void lateInit(); + virtual void settingsChanged(); + +private: + QWidget *mWidget; + LxQtSysStatTitle *mFakeTitle; + LxQtSysStatContent *mContent; + QSize mSize; +}; + +class LxQtSysStatTitle : public QLabel +{ + Q_OBJECT +public: + LxQtSysStatTitle(QWidget *parent = NULL); + ~LxQtSysStatTitle(); + +protected: + bool event(QEvent *e); + +signals: + void fontChanged(QFont); +}; + +class LxQtSysStatContent : public QWidget +{ + Q_OBJECT + + Q_PROPERTY(QColor gridColor READ gridColour WRITE setGridColour) + Q_PROPERTY(QColor titleColor READ titleColour WRITE setTitleColour) + Q_PROPERTY(QColor cpuSystemColor READ cpuSystemColour WRITE setCpuSystemColour) + Q_PROPERTY(QColor cpuUserColor READ cpuUserColour WRITE setCpuUserColour) + Q_PROPERTY(QColor cpuNiceColor READ cpuNiceColour WRITE setCpuNiceColour) + Q_PROPERTY(QColor cpuOtherColor READ cpuOtherColour WRITE setCpuOtherColour) + Q_PROPERTY(QColor frequencyColor READ frequencyColour WRITE setFrequencyColour) + Q_PROPERTY(QColor memAppsColor READ memAppsColour WRITE setMemAppsColour) + Q_PROPERTY(QColor memBuffersColor READ memBuffersColour WRITE setMemBuffersColour) + Q_PROPERTY(QColor memCachedColor READ memCachedColour WRITE setMemCachedColour) + Q_PROPERTY(QColor swapUsedColor READ swapUsedColour WRITE setSwapUsedColour) + Q_PROPERTY(QColor netReceivedColor READ netReceivedColour WRITE setNetReceivedColour) + Q_PROPERTY(QColor netTransmittedColor READ netTransmittedColour WRITE setNetTransmittedColour) + +public: + LxQtSysStatContent(ILxQtPanelPlugin *plugin, QWidget *parent = NULL); + ~LxQtSysStatContent(); + + void updateSettings(const QSettings *); + +#undef QSS_COLOUR +#define QSS_COLOUR(GETNAME, SETNAME) \ + QColor GETNAME##Colour() const; \ + void SETNAME##Colour(QColor value); + + QSS_COLOUR(grid, setGrid) + QSS_COLOUR(title, setTitle) + QSS_COLOUR(cpuSystem, setCpuSystem) + QSS_COLOUR(cpuUser, setCpuUser) + QSS_COLOUR(cpuNice, setCpuNice) + QSS_COLOUR(cpuOther, setCpuOther) + QSS_COLOUR(frequency, setFrequency) + QSS_COLOUR(memApps, setMemApps) + QSS_COLOUR(memBuffers, setMemBuffers) + QSS_COLOUR(memCached, setMemCached) + QSS_COLOUR(swapUsed, setSwapUsed) + QSS_COLOUR(netReceived, setNetReceived) + QSS_COLOUR(netTransmitted, setNetTransmitted) + +#undef QSS_COLOUR + +public slots: + void setTitleFont(QFont value); + void reset(); + +protected: + void paintEvent(QPaintEvent *); + void resizeEvent(QResizeEvent *); + +protected slots: + void cpuUpdate(float user, float nice, float system, float other, float frequencyRate, uint frequency); + void cpuUpdate(float user, float nice, float system, float other); + void memoryUpdate(float apps, float buffers, float cached); + void swapUpdate(float used); + void networkUpdate(unsigned received, unsigned transmitted); + + + +private: + ILxQtPanelPlugin *mPlugin; + + SysStat::BaseStat *mStat; + + typedef struct ColourPalette + { + QColor gridColour; + + QColor titleColour; + + QColor cpuSystemColour; + QColor cpuUserColour; + QColor cpuNiceColour; + QColor cpuOtherColour; + QColor frequencyColour; + + QColor memAppsColour; + QColor memBuffersColour; + QColor memCachedColour; + QColor swapUsedColour; + + QColor netReceivedColour; + QColor netTransmittedColour; + } ColourPalette; + + double mUpdateInterval; + int mMinimalSize; + + int mGridLines; + + QString mTitleLabel; + QFont mTitleFont; + int mTitleFontPixelHeight; + + QString mDataType; + + QString mDataSource; + + bool mUseFrequency; + + int mNetMaximumSpeed; + qreal mNetRealMaximumSpeed; + bool mLogarithmicScale; + int mLogScaleSteps; + qreal mLogScaleMax; + + + bool mUseThemeColours; + ColourPalette mThemeColours; + ColourPalette mSettingsColours; + ColourPalette mColours; + QColor mNetBothColour; + + + int mHistoryOffset; + QImage mHistoryImage; + + + void clearLine(); + + void mixNetColours(); + void updateTitleFontPixelHeight(); +}; + + +class LxQtSysStatLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtSysStat(startupInfo); + } +}; + +#endif // LXQTPANELSYSSTAT_H diff --git a/plugin-sysstat/lxqtsysstatcolours.cpp b/plugin-sysstat/lxqtsysstatcolours.cpp new file mode 100644 index 0000000..1db61d5 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatcolours.cpp @@ -0,0 +1,187 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtsysstatcolours.h" +#include "ui_lxqtsysstatcolours.h" + +#include +#include + + +LxQtSysStatColours::LxQtSysStatColours(QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtSysStatColours), + mSelectColourMapper(new QSignalMapper(this)) +{ + ui->setupUi(this); + + mDefaultColours["grid"] = QColor("#808080"); + mDefaultColours["title"] = QColor("#000000"); + + mDefaultColours["cpuSystem"] = QColor("#800000"); + mDefaultColours["cpuUser"] = QColor("#000080"); + mDefaultColours["cpuNice"] = QColor("#008000"); + mDefaultColours["cpuOther"] = QColor("#808000"); + mDefaultColours["cpuFrequency"] = QColor("#808080"); + + mDefaultColours["memApps"] = QColor("#000080"); + mDefaultColours["memBuffers"] = QColor("#008000"); + mDefaultColours["memCached"] = QColor("#808000"); + mDefaultColours["memSwap"] = QColor("#800000"); + + mDefaultColours["netReceived"] = QColor("#000080"); + mDefaultColours["netTransmitted"] = QColor("#808000"); + + +#undef CONNECT_SELECT_COLOUR +#define CONNECT_SELECT_COLOUR(VAR) \ + connect(ui-> VAR ## B, SIGNAL(clicked()), mSelectColourMapper, SLOT(map())); \ + mSelectColourMapper->setMapping(ui-> VAR ## B, QString( #VAR )); \ + mShowColourMap[QString( #VAR )] = ui-> VAR ## B; + + CONNECT_SELECT_COLOUR(grid) + CONNECT_SELECT_COLOUR(title) + CONNECT_SELECT_COLOUR(cpuSystem) + CONNECT_SELECT_COLOUR(cpuUser) + CONNECT_SELECT_COLOUR(cpuNice) + CONNECT_SELECT_COLOUR(cpuOther) + CONNECT_SELECT_COLOUR(cpuFrequency) + CONNECT_SELECT_COLOUR(memApps) + CONNECT_SELECT_COLOUR(memBuffers) + CONNECT_SELECT_COLOUR(memCached) + CONNECT_SELECT_COLOUR(memSwap) + CONNECT_SELECT_COLOUR(netReceived) + CONNECT_SELECT_COLOUR(netTransmitted) + +#undef CONNECT_SELECT_COLOUR + + connect(mSelectColourMapper, SIGNAL(mapped(const QString &)), SLOT(selectColour(const QString &))); +} + +LxQtSysStatColours::~LxQtSysStatColours() +{ + delete ui; +} + +void LxQtSysStatColours::selectColour(const QString &name) +{ + QColor color = QColorDialog::getColor(mColours[name], this); + if (color.isValid()) + { + mColours[name] = color; + mShowColourMap[name]->setStyleSheet(QString("background-color: %1;\ncolor: %2;").arg(color.name()).arg((color.toHsl().lightnessF() > 0.5) ? "black" : "white")); + + ui->buttons->button(QDialogButtonBox::Apply)->setEnabled(true); + } +} + +void LxQtSysStatColours::setColours(const Colours &colours) +{ + mInitialColours = colours; + mColours = colours; + applyColoursToButtons(); + + ui->buttons->button(QDialogButtonBox::Apply)->setEnabled(false); +} + +void LxQtSysStatColours::applyColoursToButtons() +{ + Colours::ConstIterator M = mColours.constEnd(); + for (Colours::ConstIterator I = mColours.constBegin(); I != M; ++I) + { + const QColor &color = I.value(); + mShowColourMap[I.key()]->setStyleSheet(QString("background-color: %1;\ncolor: %2;").arg(color.name()).arg((color.toHsl().lightnessF() > 0.5) ? "black" : "white")); + } +} + +void LxQtSysStatColours::on_buttons_clicked(QAbstractButton *button) +{ + switch (ui->buttons->standardButton(button)) + { + case QDialogButtonBox::RestoreDefaults: + restoreDefaults(); + break; + + case QDialogButtonBox::Reset: + reset(); + break; + + case QDialogButtonBox::Ok: + apply(); + accept(); + break; + + case QDialogButtonBox::Apply: + apply(); + break; + + case QDialogButtonBox::Cancel: + reset(); + reject(); + break; + + default:; + } +} + +void LxQtSysStatColours::restoreDefaults() +{ + bool wereTheSame = mColours == mDefaultColours; + + mColours = mDefaultColours; + applyColoursToButtons(); + + ui->buttons->button(QDialogButtonBox::Apply)->setEnabled(!wereTheSame); +} + +void LxQtSysStatColours::reset() +{ + bool wereTheSame = mColours == mInitialColours; + + mColours = mInitialColours; + applyColoursToButtons(); + + ui->buttons->button(QDialogButtonBox::Apply)->setEnabled(!wereTheSame); +} + +void LxQtSysStatColours::apply() +{ + emit coloursChanged(); + + ui->buttons->button(QDialogButtonBox::Apply)->setEnabled(false); +} + +LxQtSysStatColours::Colours LxQtSysStatColours::colours() const +{ + return mColours; +} + +LxQtSysStatColours::Colours LxQtSysStatColours::defaultColours() const +{ + return mDefaultColours; +} diff --git a/plugin-sysstat/lxqtsysstatcolours.h b/plugin-sysstat/lxqtsysstatcolours.h new file mode 100644 index 0000000..91f08c0 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatcolours.h @@ -0,0 +1,88 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTSYSSTATCOLOURS_HPP +#define LXQTSYSSTATCOLOURS_HPP + +#include + +#include +#include +#include + + +namespace Ui { + class LxQtSysStatColours; +} + +class QSignalMapper; +class QAbstractButton; +class QPushButton; + +class LxQtSysStatColours : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtSysStatColours(QWidget *parent = NULL); + ~LxQtSysStatColours(); + + typedef QMap Colours; + + void setColours(const Colours&); + + Colours colours() const; + + Colours defaultColours() const; + +signals: + void coloursChanged(); + +public slots: + void on_buttons_clicked(QAbstractButton*); + + void selectColour(const QString &); + + void restoreDefaults(); + void reset(); + void apply(); + +private: + Ui::LxQtSysStatColours *ui; + + QSignalMapper *mSelectColourMapper; + QMap mShowColourMap; + + Colours mDefaultColours; + Colours mInitialColours; + Colours mColours; + + void applyColoursToButtons(); +}; + +#endif // LXQTSYSSTATCOLOURS_HPP diff --git a/plugin-sysstat/lxqtsysstatcolours.ui b/plugin-sysstat/lxqtsysstatcolours.ui new file mode 100644 index 0000000..0035a98 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatcolours.ui @@ -0,0 +1,340 @@ + + + LxQtSysStatColours + + + + 0 + 0 + 519 + 328 + + + + System Statistics Colors + + + + + + + + + + Graph + + + + + + &Grid + + + gridB + + + + + + + Change ... + + + + + + + T&itle + + + titleB + + + + + + + Change ... + + + + + + + + + + CPU + + + + + + Change ... + + + + + + + &Nice + + + cpuNiceB + + + + + + + Change ... + + + + + + + Ot&her + + + cpuOtherB + + + + + + + &Frequency + + + cpuFrequencyB + + + + + + + Change ... + + + + + + + S&ystem + + + cpuSystemB + + + + + + + &User + + + cpuUserB + + + + + + + Change ... + + + + + + + Change ... + + + + + + + + + + Qt::Vertical + + + + + + + + + + + Memory + + + + + + Change ... + + + + + + + Cache&d + + + memCachedB + + + + + + + S&wap + + + memSwapB + + + + + + + Change ... + + + + + + + &Applications + + + memAppsB + + + + + + + &Buffers + + + memBuffersB + + + + + + + Change ... + + + + + + + Change ... + + + + + + + + + + Network + + + + + + &Received + + + netReceivedB + + + + + + + Change ... + + + + + + + &Transmitted + + + netTransmittedB + + + + + + + Change ... + + + + + + + + + + Qt::Vertical + + + + + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults + + + + + + + gridB + titleB + cpuSystemB + cpuUserB + cpuNiceB + cpuOtherB + cpuFrequencyB + memAppsB + memBuffersB + memCachedB + memSwapB + netReceivedB + netTransmittedB + buttons + + + + + on_buttons_clicked(QAbstractButton*) + + diff --git a/plugin-sysstat/lxqtsysstatconfiguration.cpp b/plugin-sysstat/lxqtsysstatconfiguration.cpp new file mode 100644 index 0000000..c6ca354 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatconfiguration.cpp @@ -0,0 +1,212 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtsysstatconfiguration.h" +#include "ui_lxqtsysstatconfiguration.h" +#include "lxqtsysstatutils.h" +#include "lxqtsysstatcolours.h" + +#include +#include +#include + + +LxQtSysStatConfiguration::LxQtSysStatConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtSysStatConfiguration), + mSettings(settings), + oldSettings(settings), + mStat(NULL), + mLockSaving(false), + mColoursDialog(NULL) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("SysStatConfigurationWindow"); + ui->setupUi(this); + + + loadSettings(); +} + +LxQtSysStatConfiguration::~LxQtSysStatConfiguration() +{ + delete ui; +} + +void LxQtSysStatConfiguration::loadSettings() +{ + mLockSaving = true; + + ui->intervalSB->setValue(mSettings->value("graph/updateInterval", 1.0).toDouble()); + ui->sizeSB->setValue(mSettings->value("graph/minimalSize", 30).toInt()); + + ui->linesSB->setValue(mSettings->value("grid/lines", 1).toInt()); + + ui->titleLE->setText(mSettings->value("title/label", QString()).toString()); + + int typeIndex = ui->typeCOB->findText(mSettings->value("data/type", QString("CPU")).toString()); + ui->typeCOB->setCurrentIndex((typeIndex >= 0) ? typeIndex : 0); + on_typeCOB_currentIndexChanged(ui->typeCOB->currentIndex()); + + int sourceIndex = ui->sourceCOB->findText(mSettings->value("data/source", QString()).toString()); + ui->sourceCOB->setCurrentIndex((sourceIndex >= 0) ? sourceIndex : 0); + + ui->useFrequencyCB->setChecked(mSettings->value("cpu/useFrequency", true).toBool()); + ui->maximumHS->setValue(PluginSysStat::netSpeedFromString(mSettings->value("net/maximumSpeed", "1 MB/s").toString())); + on_maximumHS_valueChanged(ui->maximumHS->value()); + ui->logarithmicCB->setChecked(mSettings->value("net/logarithmicScale", true).toBool()); + ui->logScaleSB->setValue(mSettings->value("net/logarithmicScaleSteps", 4).toInt()); + + bool useThemeColours = mSettings->value("graph/useThemeColours", true).toBool(); + ui->useThemeColoursRB->setChecked(useThemeColours); + ui->useCustomColoursRB->setChecked(!useThemeColours); + ui->customColoursB->setEnabled(!useThemeColours); + + mLockSaving = false; +} + +void LxQtSysStatConfiguration::saveSettings() +{ + if (mLockSaving) + return; + + mSettings->setValue("graph/useThemeColours", ui->useThemeColoursRB->isChecked()); + mSettings->setValue("graph/updateInterval", ui->intervalSB->value()); + mSettings->setValue("graph/minimalSize", ui->sizeSB->value()); + + mSettings->setValue("grid/lines", ui->linesSB->value()); + + mSettings->setValue("title/label", ui->titleLE->text()); + + mSettings->setValue("data/type", ui->typeCOB->currentText()); + mSettings->setValue("data/source", ui->sourceCOB->currentText()); + + mSettings->setValue("cpu/useFrequency", ui->useFrequencyCB->isChecked()); + + mSettings->setValue("net/maximumSpeed", PluginSysStat::netSpeedToString(ui->maximumHS->value())); + mSettings->setValue("net/logarithmicScale", ui->logarithmicCB->isChecked()); + mSettings->setValue("net/logarithmicScaleSteps", ui->logScaleSB->value()); +} + +void LxQtSysStatConfiguration::on_buttons_clicked(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + oldSettings.loadToSettings(); + loadSettings(); + } + else + close(); +} + +void LxQtSysStatConfiguration::on_typeCOB_currentIndexChanged(int index) +{ + if (mStat) + mStat->deleteLater(); + switch (index) + { + case 0: + mStat = new SysStat::CpuStat(this); + break; + + case 1: + mStat = new SysStat::MemStat(this); + break; + + case 2: + mStat = new SysStat::NetStat(this); + break; + } + + ui->sourceCOB->clear(); + ui->sourceCOB->addItems(mStat->sources()); + ui->sourceCOB->setCurrentIndex(0); +} + +void LxQtSysStatConfiguration::on_maximumHS_valueChanged(int value) +{ + emit maximumNetSpeedChanged(PluginSysStat::netSpeedToString(value)); + + saveSettings(); +} + +void LxQtSysStatConfiguration::coloursChanged() +{ + const LxQtSysStatColours::Colours &colours = mColoursDialog->colours(); + + mSettings->setValue("grid/colour", colours["grid"].name()); + mSettings->setValue("title/colour", colours["title"].name()); + + mSettings->setValue("cpu/systemColour", colours["cpuSystem"].name()); + mSettings->setValue("cpu/userColour", colours["cpuUser"].name()); + mSettings->setValue("cpu/niceColour", colours["cpuNice"].name()); + mSettings->setValue("cpu/otherColour", colours["cpuOther"].name()); + mSettings->setValue("cpu/frequencyColour", colours["cpuFrequency"].name()); + + mSettings->setValue("mem/appsColour", colours["memApps"].name()); + mSettings->setValue("mem/buffersColour", colours["memBuffers"].name()); + mSettings->setValue("mem/cachedColour", colours["memCached"].name()); + mSettings->setValue("mem/swapColour", colours["memSwap"].name()); + + mSettings->setValue("net/receivedColour", colours["netReceived"].name()); + mSettings->setValue("net/transmittedColour", colours["netTransmitted"].name()); +} + +void LxQtSysStatConfiguration::on_customColoursB_clicked() +{ + if (!mColoursDialog) + { + mColoursDialog = new LxQtSysStatColours(this); + connect(mColoursDialog, SIGNAL(coloursChanged()), SLOT(coloursChanged())); + } + + LxQtSysStatColours::Colours colours; + + const LxQtSysStatColours::Colours &defaultColours = mColoursDialog->defaultColours(); + + colours["grid"] = QColor(mSettings->value("grid/colour", defaultColours["grid"] .name()).toString()); + colours["title"] = QColor(mSettings->value("title/colour", defaultColours["title"].name()).toString()); + + colours["cpuSystem"] = QColor(mSettings->value("cpu/systemColour", defaultColours["cpuSystem"] .name()).toString()); + colours["cpuUser"] = QColor(mSettings->value("cpu/userColour", defaultColours["cpuUser"] .name()).toString()); + colours["cpuNice"] = QColor(mSettings->value("cpu/niceColour", defaultColours["cpuNice"] .name()).toString()); + colours["cpuOther"] = QColor(mSettings->value("cpu/otherColour", defaultColours["cpuOther"] .name()).toString()); + colours["cpuFrequency"] = QColor(mSettings->value("cpu/frequencyColour", defaultColours["cpuFrequency"].name()).toString()); + + colours["memApps"] = QColor(mSettings->value("mem/appsColour", defaultColours["memApps"] .name()).toString()); + colours["memBuffers"] = QColor(mSettings->value("mem/buffersColour", defaultColours["memBuffers"].name()).toString()); + colours["memCached"] = QColor(mSettings->value("mem/cachedColour", defaultColours["memCached"] .name()).toString()); + colours["memSwap"] = QColor(mSettings->value("mem/swapColour", defaultColours["memSwap"] .name()).toString()); + + colours["netReceived"] = QColor(mSettings->value("net/receivedColour", defaultColours["netReceived"] .name()).toString()); + colours["netTransmitted"] = QColor(mSettings->value("net/transmittedColour", defaultColours["netTransmitted"].name()).toString()); + + mColoursDialog->setColours(colours); + + mColoursDialog->exec(); +} diff --git a/plugin-sysstat/lxqtsysstatconfiguration.h b/plugin-sysstat/lxqtsysstatconfiguration.h new file mode 100644 index 0000000..ef26b90 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatconfiguration.h @@ -0,0 +1,84 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTSYSSTATCONFIGURATION_H +#define LXQTSYSSTATCONFIGURATION_H + +#include + +#include +#include +#include + + +namespace Ui { + class LxQtSysStatConfiguration; +} + +namespace SysStat { + class BaseStat; +} + +class LxQtSysStatColours; + +class LxQtSysStatConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtSysStatConfiguration(QSettings *settings, QWidget *parent = 0); + ~LxQtSysStatConfiguration(); + +public slots: + void saveSettings(); + + void on_typeCOB_currentIndexChanged(int); + void on_maximumHS_valueChanged(int); + void on_customColoursB_clicked(); + void on_buttons_clicked(QAbstractButton *); + + void coloursChanged(); + +signals: + void maximumNetSpeedChanged(QString); + +private: + Ui::LxQtSysStatConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache oldSettings; + + void loadSettings(); + + SysStat::BaseStat *mStat; + + bool mLockSaving; + + LxQtSysStatColours *mColoursDialog; +}; + +#endif // LXQTSYSSTATCONFIGURATION_H diff --git a/plugin-sysstat/lxqtsysstatconfiguration.ui b/plugin-sysstat/lxqtsysstatconfiguration.ui new file mode 100644 index 0000000..b97878e --- /dev/null +++ b/plugin-sysstat/lxqtsysstatconfiguration.ui @@ -0,0 +1,651 @@ + + + LxQtSysStatConfiguration + + + + 0 + 0 + 399 + 438 + + + + System Statistics Settings + + + + + + + + Graph + + + + 4 + + + 4 + + + + + &Minimal size + + + sizeSB + + + + + + + Update &interval + + + intervalSB + + + + + + + &Title + + + titleLE + + + + + + + &Grid lines + + + linesSB + + + + + + + + + + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + + + px + + + 2 + + + 500 + + + 30 + + + + + + + s + + + 1 + + + 0.100000000000000 + + + 60.000000000000000 + + + 0.250000000000000 + + + 1.000000000000000 + + + + + + + + + + Data + + + + 4 + + + 4 + + + + + 0 + + + + + 0 + + + 0 + + + + + Use &frequency + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + 0 + + + 0 + + + + + 4 + + + + + Ma&ximum + + + maximumHS + + + + + + + 4 + + + + + XXX KBs + + + + + + + 39 + + + Qt::Horizontal + + + + + + + + + Lo&garithmic scale + + + + + + + steps + + + 1 + + + 64 + + + 4 + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + + + 0 + + + 3 + + + + CPU + + + + + Memory + + + + + Network + + + + + + + + &Source + + + sourceCOB + + + + + + + T&ype + + + typeCOB + + + + + + + + + + + + + Colours + + + + 4 + + + 5 + + + 4 + + + + + Use t&heme colours + + + true + + + + + + + Use c&ustom colours + + + + + + + Custom colour ... + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + intervalSB + sizeSB + linesSB + titleLE + typeCOB + sourceCOB + useFrequencyCB + maximumHS + logarithmicCB + logScaleSB + useThemeColoursRB + useCustomColoursRB + customColoursB + buttons + + + + + buttons + accepted() + LxQtSysStatConfiguration + accept() + + + 95 + 433 + + + 97 + 295 + + + + + buttons + rejected() + LxQtSysStatConfiguration + reject() + + + 76 + 433 + + + 62 + 296 + + + + + typeCOB + currentIndexChanged(int) + dataSW + setCurrentIndex(int) + + + 386 + 203 + + + 342 + 264 + + + + + LxQtSysStatConfiguration + maximumNetSpeedChanged(QString) + maximumValueL + setText(QString) + + + 704 + 158 + + + 251 + 260 + + + + + intervalSB + valueChanged(double) + LxQtSysStatConfiguration + saveSettings() + + + 386 + 57 + + + 392 + 82 + + + + + sizeSB + valueChanged(int) + LxQtSysStatConfiguration + saveSettings() + + + 386 + 84 + + + 387 + 117 + + + + + linesSB + valueChanged(int) + LxQtSysStatConfiguration + saveSettings() + + + 386 + 111 + + + 390 + 187 + + + + + titleLE + editingFinished() + LxQtSysStatConfiguration + saveSettings() + + + 386 + 138 + + + 386 + 290 + + + + + useFrequencyCB + toggled(bool) + LxQtSysStatConfiguration + saveSettings() + + + 346 + 256 + + + 387 + 244 + + + + + logarithmicCB + toggled(bool) + LxQtSysStatConfiguration + saveSettings() + + + 146 + 287 + + + 392 + 214 + + + + + sourceCOB + currentIndexChanged(int) + LxQtSysStatConfiguration + saveSettings() + + + 386 + 231 + + + 704 + 105 + + + + + typeCOB + currentIndexChanged(int) + LxQtSysStatConfiguration + saveSettings() + + + 386 + 203 + + + 704 + 52 + + + + + useCustomColoursRB + toggled(bool) + customColoursB + setEnabled(bool) + + + 132 + 366 + + + 240 + 365 + + + + + useThemeColoursRB + toggled(bool) + LxQtSysStatConfiguration + saveSettings() + + + 32 + 337 + + + 2 + 335 + + + + + + maximumNetSpeedChanged(QString) + on_typeCOB_currentIndexChanged(int) + on_sourceCOB_currentIndexChanged(int) + on_maximumHS_valueChanged(int) + saveSettings() + on_customColoursB_clicked() + + diff --git a/plugin-sysstat/lxqtsysstatutils.cpp b/plugin-sysstat/lxqtsysstatutils.cpp new file mode 100644 index 0000000..2c7cd1c --- /dev/null +++ b/plugin-sysstat/lxqtsysstatutils.cpp @@ -0,0 +1,74 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include + +#include "lxqtsysstatutils.h" + + +namespace PluginSysStat +{ + +QString netSpeedToString(int value) +{ + QString prefix; + static const char prefixes[] = "kMG"; + if (value / 10) + prefix = QChar(prefixes[value / 10 - 1]); + + return QString("%1 %2B/s").arg(1 << (value % 10)).arg(prefix); +} + +int netSpeedFromString(QString value) +{ + QRegExp re("^(\\d+) ([kMG])B/s$"); + if (re.exactMatch(value)) + { + int shift = 0; + switch (re.cap(2)[0].toLatin1()) + { + case 'k': + shift = 10; + break; + + case 'M': + shift = 20; + break; + + case 'G': + shift = 30; + break; + } + + return qCeil(qLn(re.cap(1).toInt()) / qLn(2.)) + shift; + } + + return 0; +} + +} diff --git a/plugin-sysstat/lxqtsysstatutils.h b/plugin-sysstat/lxqtsysstatutils.h new file mode 100644 index 0000000..889b696 --- /dev/null +++ b/plugin-sysstat/lxqtsysstatutils.h @@ -0,0 +1,41 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTSYSSTATUTILS_HPP +#define LXQTSYSSTATUTILS_HPP + +#include + +namespace PluginSysStat +{ + +QString netSpeedToString(int value); +int netSpeedFromString(QString value); + +} + +#endif // LXQTSYSSTATUTILS_HPP diff --git a/plugin-sysstat/resources/sysstat.desktop.in b/plugin-sysstat/resources/sysstat.desktop.in new file mode 100644 index 0000000..2e51835 --- /dev/null +++ b/plugin-sysstat/resources/sysstat.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System Statistics +Comment=System Statistics plugin. +Icon=utilities-system-monitor + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-sysstat/translations/sysstat.ts b/plugin-sysstat/translations/sysstat.ts new file mode 100644 index 0000000..309f514 --- /dev/null +++ b/plugin-sysstat/translations/sysstat.ts @@ -0,0 +1,237 @@ + + + + + LxQtSysStatColours + + + System Statistics Colors + + + + + Graph + + + + + &Grid + + + + + + + + + + + + + + + + + Change ... + + + + + T&itle + + + + + CPU + + + + + &Nice + + + + + Ot&her + + + + + &Frequency + + + + + S&ystem + + + + + &User + + + + + Memory + + + + + Cache&d + + + + + S&wap + + + + + &Applications + + + + + &Buffers + + + + + Network + + + + + &Received + + + + + &Transmitted + + + + + LxQtSysStatConfiguration + + + Graph + + + + + px + + + + + s + + + + + Data + + + + + System Statistics Settings + + + + + &Minimal size + + + + + Update &interval + + + + + &Title + + + + + &Grid lines + + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + + + + + Use &frequency + + + + + Ma&ximum + + + + + Lo&garithmic scale + + + + + CPU + + + + + Memory + + + + + Network + + + + + &Source + + + + + T&ype + + + + + Colours + + + + + Use t&heme colours + + + + + Use c&ustom colours + + + + + Custom colour ... + + + + + XXX KBs + + + + + steps + + + + diff --git a/plugin-sysstat/translations/sysstat_ja.desktop b/plugin-sysstat/translations/sysstat_ja.desktop new file mode 100644 index 0000000..212b82d --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ja.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ja]=システム統計 +Comment[ja]=システム統計のプラグイン + +#TRANSLATIONS_DIR=../translations + diff --git a/plugin-sysstat/translations/sysstat_ja.ts b/plugin-sysstat/translations/sysstat_ja.ts new file mode 100644 index 0000000..a7baee1 --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ja.ts @@ -0,0 +1,237 @@ + + + + + LxQtSysStatColours + + + System Statistics Colors + システム統計の色 + + + + Graph + グラフ + + + + &Grid + グリッド(&G) + + + + + + + + + + + + + + + + Change ... + 変更する + + + + T&itle + タイトル(&T) + + + + CPU + CPU + + + + &Nice + Nice(&N) + + + + Ot&her + その他(&H) + + + + &Frequency + 周波数(&F) + + + + S&ystem + システム(&Y) + + + + &User + ユーザー(&U) + + + + Memory + メモリー + + + + Cache&d + キャッシュ(&D) + + + + S&wap + スワップ(&W) + + + + &Applications + アプリケーション(&A) + + + + &Buffers + バッファー(&B) + + + + Network + ネットワーク + + + + &Received + 受信(&R) + + + + &Transmitted + 送信(&T) + + + + LxQtSysStatConfiguration + + + Graph + グラフ + + + + px + ピクセル + + + + s + + + + + Data + データー + + + + System Statistics Settings + システム統計の設定 + + + + &Minimal size + サイズの最小値(&M) + + + + Update &interval + 更新頻度(&I) + + + + &Title + タイトル(&T) + + + + &Grid lines + グリッド線の数(&G) + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + <html><head/><body><p>水平なパネルでは幅の最小値、</p><p>垂直なパネルでは高さの最小値です</p></body></html> + + + + Use &frequency + 周波数をグラフ表示(&F) + + + + Ma&ximum + 最大(&X) + + + + Lo&garithmic scale + 対数スケール(&G) + + + + CPU + CPU + + + + Memory + メモリー + + + + Network + ネットワーク + + + + &Source + 情報元(&S) + + + + T&ype + 種類(&Y) + + + + Colours + + + + + Use t&heme colours + テーマの色を使用(&H) + + + + Use c&ustom colours + 色を指定(&U) + + + + Custom colour ... + 色を指定する + + + + XXX KBs + XXX KB + + + + steps + ステップ + + + diff --git a/plugin-sysstat/translations/sysstat_pt.desktop b/plugin-sysstat/translations/sysstat_pt.desktop new file mode 100644 index 0000000..e78968e --- /dev/null +++ b/plugin-sysstat/translations/sysstat_pt.desktop @@ -0,0 +1,3 @@ +#TRANSLATIONS +Name[pt]=Estatísticas do sistema +Comment[pt]=Mostra as estatísticas do sistema diff --git a/plugin-sysstat/translations/sysstat_pt.ts b/plugin-sysstat/translations/sysstat_pt.ts new file mode 100644 index 0000000..dde326d --- /dev/null +++ b/plugin-sysstat/translations/sysstat_pt.ts @@ -0,0 +1,369 @@ + + + + + LxQtSysStatColours + + + System Statistics Colors + Cores das estatísticas do sistema + + + + Graph + Gráfico + + + + &Grid + &Grelha + + + + + + + + + + + + + + + + Change ... + Mudar... + + + + T&itle + Tí&tulo + + + + CPU + CPU + + + + &Nice + A&ceitável + + + + Ot&her + O&utras + + + + &Frequency + &Frequência + + + + S&ystem + S&istema + + + + &User + &Utilizador + + + + Memory + Memória + + + + Cache&d + Cac&he + + + + S&wap + S&wap + + + + &Applications + &Aplicações + + + + &Buffers + &Buffers + + + + Network + Rede + + + + &Received + &Recebido + + + + &Transmitted + &Enviado + + + + LxQtSysStatConfiguration + + LxQt SysStat Settings + Definições do LxQt SysStat + + + + Graph + Gráfico + + + Update interval + Intervalo de atualização + + + Minimal size + Tamanho mínimo + + + + px + px + + + + s + s + + + Grid + Grelha + + + Lines + Linhas + + + Colour + Cor + + + Change ... + Mudar... + + + Title + Título + + + Label + Etiqueta + + + Font + Tipo de letra + + + + Data + Dados + + + Type + Tipo + + + + System Statistics Settings + Defiições das estatísticas do sistema + + + + &Minimal size + Tamanho &mínimo + + + + Update &interval + &Intervalo de atualização + + + + &Title + &Título + + + + &Grid lines + Linhas da &grelha + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + <html><head/><body><p>Lagura mínima se o painelestiver na horizontal.</p><p>Altura mínima se o painel estiver na vertical.</p></body></html> + + + + Use &frequency + Utilizar &frequência + + + + Ma&ximum + Má&ximo + + + + Lo&garithmic scale + Escala lo&garítmica + + + + CPU + CPU + + + + Memory + Memória + + + + Network + Rede + + + + &Source + &Fonte + + + + T&ype + T&ipo + + + + Colours + Cores + + + + Use t&heme colours + Utili&zar cores do tema + + + + Use c&ustom colours + &Utilizar cores personalizadas + + + + Custom colour ... + Cor personalizada... + + + Source + Fonte + + + System + Sistema + + + User + Utilizador + + + Nice + Aceitável + + + Other + Outras + + + Use Frequency + Utilizar frequência + + + Frequency + Frequência + + + Applications + Aplicações + + + Buffers + Buffers + + + Cached + Cache + + + Used + Utilizado + + + Received + Recebido + + + Transmitted + Enviado + + + Maximum + Máximo + + + + XXX KBs + XXX KBs + + + Logarithmic scale + Escala logarítmica + + + + steps + etapas + + + Ultra light + Ultra claro + + + Light + Claro + + + Ultra black + Ultra escuro + + + Black + Escuro + + + Bold + Negrito + + + Demi bold + Semi-negrito + + + Italic + Itálico + + + diff --git a/plugin-sysstat/translations/sysstat_ru.desktop b/plugin-sysstat/translations/sysstat_ru.desktop new file mode 100644 index 0000000..b738aec --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ru.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru]=Системная статистика +Comment[ru]=Плагин системной статистики. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-sysstat/translations/sysstat_ru.ts b/plugin-sysstat/translations/sysstat_ru.ts new file mode 100644 index 0000000..4708e0d --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ru.ts @@ -0,0 +1,237 @@ + + + + + LxQtSysStatColours + + + System Statistics Colors + Цвета статистических данных системы + + + + Graph + График + + + + &Grid + &Сетка + + + + + + + + + + + + + + + + Change ... + Изменить… + + + + T&itle + &Название + + + + CPU + ЦПУ + + + + &Nice + + + + + Ot&her + &Прочее + + + + &Frequency + &Частота + + + + S&ystem + &Система + + + + &User + &Пользователь + + + + Memory + Память + + + + Cache&d + &Кэшировано + + + + S&wap + &Подкачка + + + + &Applications + &Приложения + + + + &Buffers + &Буферы + + + + Network + Сеть + + + + &Received + &Получено + + + + &Transmitted + &Передано + + + + LxQtSysStatConfiguration + + + System Statistics Settings + Настройки статистических данных системы + + + + Graph + График + + + + &Minimal size + &Минимальный размер + + + + Update &interval + И&нтервал обновления + + + + &Title + &Название + + + + &Grid lines + &Линий сетки + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + <html><head/><body><p>Минимальная ширина для горизонтальной панели.</p><p>Минимальная высота для вертикальной панели.</p></body></html> + + + + px + пикс + + + + s + с + + + + Data + Данные + + + + Use &frequency + Использовать &частоту + + + + Ma&ximum + Ма&ксимум + + + + XXX KBs + XXX Кб + + + + Lo&garithmic scale + Ло&гарифмическая шкала + + + + steps + шаги + + + + CPU + ЦПУ + + + + Memory + Память + + + + Network + Сеть + + + + &Source + &Источник + + + + T&ype + &Тип + + + + Colours + Цвета + + + + Use t&heme colours + Использовать цвета &темы + + + + Use c&ustom colours + Использовать с&вои цвета + + + + Custom colour ... + Свои цвета… + + + diff --git a/plugin-sysstat/translations/sysstat_ru_RU.desktop b/plugin-sysstat/translations/sysstat_ru_RU.desktop new file mode 100644 index 0000000..0ef8cb0 --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ru_RU.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru_RU]=Системная статистика +Comment[ru_RU]=Плагин системной статистики. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-sysstat/translations/sysstat_ru_RU.ts b/plugin-sysstat/translations/sysstat_ru_RU.ts new file mode 100644 index 0000000..329baab --- /dev/null +++ b/plugin-sysstat/translations/sysstat_ru_RU.ts @@ -0,0 +1,237 @@ + + + + + LxQtSysStatColours + + + System Statistics Colors + Цвета статистических данных системы + + + + Graph + График + + + + &Grid + &Сетка + + + + + + + + + + + + + + + + Change ... + Изменить… + + + + T&itle + &Название + + + + CPU + ЦПУ + + + + &Nice + + + + + Ot&her + &Прочее + + + + &Frequency + &Частота + + + + S&ystem + &Система + + + + &User + &Пользователь + + + + Memory + Память + + + + Cache&d + &Кэшировано + + + + S&wap + &Подкачка + + + + &Applications + &Приложения + + + + &Buffers + &Буферы + + + + Network + Сеть + + + + &Received + &Получено + + + + &Transmitted + &Передано + + + + LxQtSysStatConfiguration + + + System Statistics Settings + Настройки статистических данных системы + + + + Graph + График + + + + &Minimal size + &Минимальный размер + + + + Update &interval + И&нтервал обновления + + + + &Title + &Название + + + + &Grid lines + &Линий сетки + + + + <html><head/><body><p>Minimal width if the panel is horizontal.</p><p>Minimal height is the panel is vertical.</p></body></html> + <html><head/><body><p>Минимальная ширина для горизонтальной панели.</p><p>Минимальная высота для вертикальной панели.</p></body></html> + + + + px + пикс + + + + s + с + + + + Data + Данные + + + + Use &frequency + Использовать &частоту + + + + Ma&ximum + Ма&ксимум + + + + XXX KBs + XXX Кб + + + + Lo&garithmic scale + Ло&гарифмическая шкала + + + + steps + шаги + + + + CPU + ЦПУ + + + + Memory + Память + + + + Network + Сеть + + + + &Source + &Источник + + + + T&ype + &Тип + + + + Colours + Цвета + + + + Use t&heme colours + Использовать цвета &темы + + + + Use c&ustom colours + Использовать с&вои цвета + + + + Custom colour ... + Свои цвета… + + + diff --git a/plugin-taskbar/CMakeLists.txt b/plugin-taskbar/CMakeLists.txt new file mode 100644 index 0000000..7712eb3 --- /dev/null +++ b/plugin-taskbar/CMakeLists.txt @@ -0,0 +1,33 @@ +set(PLUGIN "taskbar") + +set(HEADERS + lxqttaskbar.h + lxqttaskbutton.h + lxqttaskbarconfiguration.h + lxqttaskbarplugin.h +) + +set(SOURCES + lxqttaskbar.cpp + lxqttaskbutton.cpp + lxqttaskbarconfiguration.cpp + lxqttaskbarplugin.cpp +) + +set(MOCS + lxqttaskbar.h + lxqttaskbutton.h + lxqttaskbarconfiguration.h + lxqttaskbarplugin.h +) + +set(UIS + lxqttaskbarconfiguration.ui +) + +set(LIBRARIES + ${LXQT_LIBRARIES} + ${QTXDG_LIBRARIES} +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-taskbar/lxqttaskbar.cpp b/plugin-taskbar/lxqttaskbar.cpp new file mode 100644 index 0000000..542e066 --- /dev/null +++ b/plugin-taskbar/lxqttaskbar.cpp @@ -0,0 +1,595 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * http://lxqt.org + * + * Copyright: 2011 Razor team + * 2014 LXQt team + * Authors: + * Alexander Sokoloff + * Maciej Płaza + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lxqttaskbar.h" +#include "lxqttaskbutton.h" +#include "../panel/ilxqtpanelplugin.h" + +using namespace LxQt; + +/************************************************ + +************************************************/ +LxQtTaskBar::LxQtTaskBar(ILxQtPanelPlugin *plugin, QWidget *parent) : + QFrame(parent), + mButtonStyle(Qt::ToolButtonTextBesideIcon), + mCheckedBtn(NULL), + mCloseOnMiddleClick(true), + mShowOnlyCurrentDesktopTasks(false), + mAutoRotate(true), + mPlugin(plugin), + mPlaceHolder(new QWidget(this)), + mStyle(new ElidedButtonStyle()) +{ + mLayout = new LxQt::GridLayout(this); + setLayout(mLayout); + mLayout->setMargin(0); + realign(); + + mPlaceHolder->setStyle(mStyle); + mPlaceHolder->setMinimumSize(1, 1); + mPlaceHolder->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + mPlaceHolder->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + mLayout->addWidget(mPlaceHolder); + + settingsChanged(); + setAcceptDrops(true); + + connect(KWindowSystem::self(), SIGNAL(stackingOrderChanged()), SLOT(refreshTaskList())); + connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), SLOT(refreshTaskList())); + connect(KWindowSystem::self(), SIGNAL(activeWindowChanged(WId)), SLOT(activeWindowChanged(WId))); + connect(KWindowSystem::self(), SIGNAL(windowChanged(WId, NET::Properties, NET::Properties2)), + SLOT(windowChanged(WId, NET::Properties, NET::Properties2))); +} + +/************************************************ + + ************************************************/ +LxQtTaskBar::~LxQtTaskBar() +{ + delete mStyle; +} + +/************************************************ + + ************************************************/ +LxQtTaskButton* LxQtTaskBar::buttonByWindow(WId window) const +{ + if (mButtonsHash.contains(window)) + return mButtonsHash.value(window); + return 0; +} + +/************************************************ + + ************************************************/ +bool LxQtTaskBar::windowOnActiveDesktop(WId window) const +{ + if (!mShowOnlyCurrentDesktopTasks) + return true; + + int desktop = KWindowInfo(window, NET::WMDesktop).desktop(); + if (desktop == NET::OnAllDesktops) + return true; + + return desktop == KWindowSystem::currentDesktop(); +} + +/************************************************ + + ************************************************/ +bool LxQtTaskBar::acceptWindow(WId window) const +{ + QFlags ignoreList; + ignoreList |= NET::DesktopMask; + ignoreList |= NET::DockMask; + ignoreList |= NET::SplashMask; + ignoreList |= NET::ToolbarMask; + ignoreList |= NET::MenuMask; + ignoreList |= NET::PopupMenuMask; + ignoreList |= NET::NotificationMask; + + KWindowInfo info(window, NET::WMWindowType | NET::WMState, NET::WM2TransientFor); + if (!info.valid()) + return false; + + if (NET::typeMatchesMask(info.windowType(NET::AllTypesMask), ignoreList)) + return false; + + if (info.state() & NET::SkipTaskbar) + return false; + + // WM_TRANSIENT_FOR hint not set - normal window + WId transFor = info.transientFor(); + if (transFor == 0 || transFor == window || transFor == (WId) QX11Info::appRootWindow()) + return true; + + info = KWindowInfo(transFor, NET::WMWindowType); + + QFlags normalFlag; + normalFlag |= NET::NormalMask; + normalFlag |= NET::DialogMask; + normalFlag |= NET::UtilityMask; + + return !NET::typeMatchesMask(info.windowType(NET::AllTypesMask), normalFlag); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::dragEnterEvent(QDragEnterEvent* event) +{ + if (event->mimeData()->hasFormat("lxqt/lxqttaskbutton")) + event->acceptProposedAction(); + else + event->ignore(); + QWidget::dragEnterEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::dropEvent(QDropEvent* event) +{ + if (!event->mimeData()->hasFormat("lxqt/lxqttaskbutton")) + return; + + QDataStream stream(event->mimeData()->data("lxqt/lxqttaskbutton")); + // window id for dropped button + qlonglong temp; + stream >> temp; + WId droppedWid = (WId) temp; + qDebug() << QString("Dropped window: %1").arg(droppedWid); + + int droppedIndex = mLayout->indexOf(mButtonsHash[droppedWid]); + int newPos = -1; + const int size = mLayout->count(); + for (int i = 0; i < droppedIndex && newPos == -1; i++) + if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 > event->pos().x()) + newPos = i; + + for (int i = size - 1; i > droppedIndex && newPos == -1; i--) + if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 < event->pos().x()) + newPos = i; + + if (newPos == -1 || droppedIndex == newPos) + return; + + qDebug() << QString("Dropped button shoud go to position %1").arg(newPos); + + mLayout->moveItem(droppedIndex, newPos); + mLayout->invalidate(); + + QWidget::dropEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::refreshTaskList() +{ + QList tmp = KWindowSystem::stackingOrder(); + + QMutableHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + int n = tmp.removeAll(i.key()); + + if (!n) + { + // if the button we're removing is the currently selected app + if(i.value() == mCheckedBtn) + mCheckedBtn = NULL; + delete i.value(); + i.remove(); + } + } + + foreach (WId wnd, tmp) + { + if (acceptWindow(wnd)) + { + LxQtTaskButton* btn = new LxQtTaskButton(wnd, this); + btn->setStyle(mStyle); + btn->setToolButtonStyle(mButtonStyle); + + mButtonsHash.insert(wnd, btn); + mLayout->addWidget(btn); + } + } + refreshButtonVisibility(); + mLayout->invalidate(); + activeWindowChanged(); + realign(); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::refreshButtonRotation() +{ + bool autoRotate = mAutoRotate && (mButtonStyle != Qt::ToolButtonIconOnly); + + ILxQtPanel::Position panelPosition = mPlugin->panel()->position(); + + QHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + i.value()->setAutoRotation(autoRotate, panelPosition); + } +} +/************************************************ + + ************************************************/ + +void LxQtTaskBar::refreshButtonVisibility() +{ + bool haveVisibleWindow = false; + QHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + bool isVisible = windowOnActiveDesktop(i.key()); + haveVisibleWindow |= isVisible; + i.value()->setVisible(isVisible); + } + mPlaceHolder->setVisible(!haveVisibleWindow); + if (haveVisibleWindow) + mPlaceHolder->setFixedSize(0, 0); + else + { + mPlaceHolder->setMinimumSize(1, 1); + mPlaceHolder->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + } + +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::refreshIconGeometry() +{ + // FIXME: sometimes we get wrong globalPos here, especially + // after changing the pos or size of the panel. + // this might be caused by bugs in lxqtpanel.cpp. + QHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + LxQtTaskButton* button = i.value(); + QRect rect = button->geometry(); + QPoint globalPos = mapToGlobal(button->pos()); + rect.moveTo(globalPos); + + NETWinInfo info(QX11Info::connection(), button->windowId(), + (WId) QX11Info::appRootWindow(), NET::WMIconGeometry, 0); + NETRect nrect; + nrect.pos.x = rect.x(); + nrect.pos.y = rect.y(); + nrect.size.height = rect.height(); + nrect.size.width = rect.width(); + info.setIconGeometry(nrect); + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::activeWindowChanged(WId window) +{ + if (!window) + window = KWindowSystem::activeWindow(); + + LxQtTaskButton* btn = buttonByWindow(window); + + if (mCheckedBtn != btn) + { + if (mCheckedBtn) + mCheckedBtn->setChecked(false); + if (btn) + { + btn->setChecked(true); + if (btn->hasUrgencyHint()) + btn->setUrgencyHint(false); + } + mCheckedBtn = btn; + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::windowChanged(WId window, NET::Properties prop, NET::Properties2 prop2) +{ + LxQtTaskButton* button = buttonByWindow(window); + if (!button) + return; + + // window changed virtual desktop + if (prop.testFlag(NET::WMDesktop)) + { + if (mShowOnlyCurrentDesktopTasks) + { + int desktop = button->desktopNum(); + button->setHidden(desktop != NET::OnAllDesktops && desktop != KWindowSystem::currentDesktop()); + } + } + + if (prop.testFlag(NET::WMVisibleName) || prop.testFlag(NET::WMName)) + button->updateText(); + + // FIXME: NET::WMIconGeometry is causing high CPU and memory usage + if (prop.testFlag(NET::WMIcon) /*|| prop.testFlag(NET::WMIconGeometry)*/) + button->updateIcon(); + + if (prop.testFlag(NET::WMState)) + button->setUrgencyHint(KWindowInfo(window, NET::WMState).hasState(NET::DemandsAttention)); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::setButtonStyle(Qt::ToolButtonStyle buttonStyle) +{ + mButtonStyle = buttonStyle; + + QHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + i.value()->setToolButtonStyle(mButtonStyle); + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::settingsChanged() +{ + mButtonWidth = mPlugin->settings()->value("buttonWidth", 400).toInt(); + QString s = mPlugin->settings()->value("buttonStyle").toString().toUpper(); + + if (s == "ICON") + setButtonStyle(Qt::ToolButtonIconOnly); + else if (s == "TEXT") + setButtonStyle(Qt::ToolButtonTextOnly); + else + setButtonStyle(Qt::ToolButtonTextBesideIcon); + + mShowOnlyCurrentDesktopTasks = mPlugin->settings()->value("showOnlyCurrentDesktopTasks", mShowOnlyCurrentDesktopTasks).toBool(); + mAutoRotate = mPlugin->settings()->value("autoRotate", true).toBool(); + mCloseOnMiddleClick = mPlugin->settings()->value("closeOnMiddleClick", true).toBool(); + + refreshTaskList(); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::realign() +{ + mLayout->setEnabled(false); + + refreshButtonRotation(); + + ILxQtPanel *panel = mPlugin->panel(); + QSize maxSize = QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + QSize minSize = QSize(0, 0); + + bool rotated = false; + if (panel->isHorizontal()) + { + if (mButtonStyle == Qt::ToolButtonIconOnly) + { + // Horizontal + Icons ************** + mLayout->setRowCount(panel->lineCount()); + mLayout->setColumnCount(0); + mLayout->setStretch(LxQt::GridLayout::StretchVertical); + + minSize.rheight() = 0; + minSize.rwidth() = 0; + + maxSize.rheight() = QWIDGETSIZE_MAX; + maxSize.rwidth() = mButtonWidth; + } + else + { + // Horizontal + Text *************** + mLayout->setRowCount(panel->lineCount()); + mLayout->setColumnCount(0); + mLayout->setStretch(LxQt::GridLayout::StretchHorizontal | LxQt::GridLayout::StretchVertical); + + minSize.rheight() = 0; + minSize.rwidth() = 0; + + maxSize.rheight() = QWIDGETSIZE_MAX; + maxSize.rwidth() = mButtonWidth; + } + } + else + { + if (mButtonStyle == Qt::ToolButtonIconOnly) + { + // Vertical + Icons **************** + mLayout->setRowCount(0); + mLayout->setColumnCount(panel->lineCount()); + mLayout->setStretch(LxQt::GridLayout::StretchHorizontal); + + minSize.rheight() = 0; + minSize.rwidth() = 0; + + maxSize.rheight() = QWIDGETSIZE_MAX; + maxSize.rwidth() = QWIDGETSIZE_MAX; + + } + else + { + if (mAutoRotate) + { + switch (panel->position()) + { + case ILxQtPanel::PositionLeft: + case ILxQtPanel::PositionRight: + rotated = true; + break; + + default:; + } + } + + // Vertical + Text ***************** + if (rotated) + { + mLayout->setColumnCount(panel->lineCount()); + mLayout->setRowCount(0); + mLayout->setStretch(LxQt::GridLayout::StretchHorizontal | LxQt::GridLayout::StretchVertical); + + minSize.rheight() = 0; + minSize.rwidth() = 0; + + maxSize.rheight() = mButtonWidth; + maxSize.rwidth() = QWIDGETSIZE_MAX; + } + else + { + mLayout->setColumnCount(1); + mLayout->setRowCount(0); + mLayout->setStretch(LxQt::GridLayout::StretchHorizontal); + + minSize.rheight() = 0; + minSize.rwidth() = mButtonWidth; + + maxSize.rheight() = QWIDGETSIZE_MAX; + maxSize.rwidth() = QWIDGETSIZE_MAX; + } + } + } + + mLayout->setCellMinimumSize(minSize); + mLayout->setCellMaximumSize(maxSize); + + mLayout->setDirection(rotated ? LxQt::GridLayout::TopToBottom : LxQt::GridLayout::LeftToRight); + mLayout->setEnabled(true); + refreshIconGeometry(); +} + +/************************************************ + + ************************************************/ + +void LxQtTaskBar::mousePressEvent(QMouseEvent *event) +{ + // close the app on mouse middle click + if (mCloseOnMiddleClick && event->button() == Qt::MidButton) + { + // find the button at current cursor pos + QHashIterator i(mButtonsHash); + while (i.hasNext()) + { + i.next(); + LxQtTaskButton* btn = i.value(); + if (btn->geometry().contains(event->pos()) && + (!mShowOnlyCurrentDesktopTasks || KWindowSystem::currentDesktop() == KWindowInfo(i.key(), NET::WMDesktop).desktop())) + { + btn->closeApplication(); + break; + } + } + } + QFrame::mousePressEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::wheelEvent(QWheelEvent* event) +{ + if (!mCheckedBtn) + return; + + int current = mLayout->indexOf(mCheckedBtn); + if (current == -1) + return; + + int delta = event->delta() < 0 ? 1 : -1; + for (int ix = current + delta; 0 <= ix && ix < mLayout->count(); ix += delta) + { + QLayoutItem *item = mLayout->itemAt(ix); + if (!item) + continue; + + WId window = ((LxQtTaskButton *) item->widget())->windowId(); + if (acceptWindow(window) && windowOnActiveDesktop(window)) + { + KWindowSystem::activateWindow(window); + break; + } + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::resizeEvent(QResizeEvent* event) +{ + refreshIconGeometry(); + return QWidget::resizeEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskBar::changeEvent(QEvent* event) +{ + // if current style is changed, reset the base style of the proxy style + // so we can apply the new style correctly to task buttons. + if(event->type() == QEvent::StyleChange) + mStyle->setBaseStyle(NULL); + + QFrame::changeEvent(event); +} diff --git a/plugin-taskbar/lxqttaskbar.h b/plugin-taskbar/lxqttaskbar.h new file mode 100644 index 0000000..675284e --- /dev/null +++ b/plugin-taskbar/lxqttaskbar.h @@ -0,0 +1,103 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * http://lxqt.org + * + * Copyright: 2011 Razor team + * 2014 LXQt team + * Authors: + * Alexander Sokoloff + * Maciej Płaza + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTTASKBAR_H +#define LXQTTASKBAR_H + +#include "lxqttaskbarconfiguration.h" +#include +#include +#include +#include "../panel/ilxqtpanel.h" +#include +#include +#include + +class LxQtTaskButton; +class ElidedButtonStyle; +class ILxQtPanelPlugin; + +namespace LxQt { +class GridLayout; +} + +class LxQtTaskBar : public QFrame +{ + Q_OBJECT + +public: + explicit LxQtTaskBar(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + virtual ~LxQtTaskBar(); + + virtual void settingsChanged(); + void realign(); + +public slots: + void windowChanged(WId window, NET::Properties prop, NET::Properties2 prop2); + void activeWindowChanged(WId window = 0); + void refreshIconGeometry(); + +protected: + virtual void dragEnterEvent(QDragEnterEvent * event); + virtual void dropEvent(QDropEvent * event); + +private slots: + void refreshTaskList(); + void refreshButtonRotation(); + void refreshButtonVisibility(); + +private: + QHash mButtonsHash; + LxQt::GridLayout *mLayout; + Qt::ToolButtonStyle mButtonStyle; + int mButtonWidth; + LxQtTaskButton* mCheckedBtn; + bool mCloseOnMiddleClick; + bool mShowOnlyCurrentDesktopTasks; + bool mAutoRotate; + + LxQtTaskButton* buttonByWindow(WId window) const; + bool windowOnActiveDesktop(WId window) const; + bool acceptWindow(WId window) const; + void setButtonStyle(Qt::ToolButtonStyle buttonStyle); + + void wheelEvent(QWheelEvent* event); + void changeEvent(QEvent* event); + void mousePressEvent(QMouseEvent *event); + void resizeEvent(QResizeEvent *event); + + ILxQtPanelPlugin *mPlugin; + QWidget *mPlaceHolder; + ElidedButtonStyle* mStyle; +}; + +#endif // LXQTTASKBAR_H diff --git a/plugin-taskbar/lxqttaskbarconfiguration.cpp b/plugin-taskbar/lxqttaskbarconfiguration.cpp new file mode 100644 index 0000000..c849a25 --- /dev/null +++ b/plugin-taskbar/lxqttaskbarconfiguration.cpp @@ -0,0 +1,125 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * http://lxqt.org + * + * Copyright: 2011 Razor team + * 2014 LXQt team + * Authors: + * Maciej Płaza + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqttaskbarconfiguration.h" +#include "ui_lxqttaskbarconfiguration.h" + +LxQtTaskbarConfiguration::LxQtTaskbarConfiguration(QSettings &settings, QWidget *parent): + QDialog(parent), + ui(new Ui::LxQtTaskbarConfiguration), + mSettings(settings), + oldSettings(settings) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName("TaskbarConfigurationWindow"); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + + ui->buttonStyleCB->addItem(tr("Icon and text"), "IconText"); + ui->buttonStyleCB->addItem(tr("Only icon"), "Icon"); + ui->buttonStyleCB->addItem(tr("Only text"), "Text"); + + loadSettings(); + /* We use clicked() and activated(int) because these signals aren't emitting after programmaticaly + change of state */ + connect(ui->fAllDesktopsCB, SIGNAL(clicked()), this, SLOT(saveSettings())); + connect(ui->fCurrentDesktopRB, SIGNAL(clicked()), this, SLOT(saveSettings())); + connect(ui->buttonStyleCB, SIGNAL(activated(int)), this, SLOT(updateControls(int))); + connect(ui->buttonStyleCB, SIGNAL(activated(int)), this, SLOT(saveSettings())); + connect(ui->buttonWidthSB, SIGNAL(valueChanged(int)), this, SLOT(saveSettings())); + connect(ui->autoRotateCB, SIGNAL(clicked()), this, SLOT(saveSettings())); + connect(ui->middleClickCB, SIGNAL(clicked()), this, SLOT(saveSettings())); +} + +LxQtTaskbarConfiguration::~LxQtTaskbarConfiguration() +{ + delete ui; +} + +void LxQtTaskbarConfiguration::loadSettings() +{ + if (mSettings.value("showOnlyCurrentDesktopTasks", false).toBool() == true) + { + ui->fCurrentDesktopRB->setChecked(true); + } + else + { + ui->fAllDesktopsCB->setChecked(true); + } + + ui->autoRotateCB->setChecked(mSettings.value("autoRotate", true).toBool()); + ui->middleClickCB->setChecked(mSettings.value("closeOnMiddleClick", true).toBool()); + ui->buttonStyleCB->setCurrentIndex(ui->buttonStyleCB->findData(mSettings.value("buttonStyle", "IconText"))); + updateControls(ui->buttonStyleCB->currentIndex()); + + /* Keep buttonWidth loading at the end of this method to prevent errors */ + ui->buttonWidthSB->setValue(mSettings.value("buttonWidth", 400).toInt()); +} + +void LxQtTaskbarConfiguration::saveSettings() +{ + mSettings.setValue("showOnlyCurrentDesktopTasks", ui->fCurrentDesktopRB->isChecked()); + mSettings.setValue("buttonStyle", ui->buttonStyleCB->itemData(ui->buttonStyleCB->currentIndex())); + mSettings.setValue("buttonWidth", ui->buttonWidthSB->value()); + mSettings.setValue("autoRotate", ui->autoRotateCB->isChecked()); + mSettings.setValue("closeOnMiddleClick", ui->middleClickCB->isChecked()); +} + +void LxQtTaskbarConfiguration::updateControls(int index) +{ + if (ui->buttonStyleCB->itemData(index) == "Icon") + { + ui->buttonWidthSB->setEnabled(false); + ui->buttonWidthL->setEnabled(false); + } + else + { + ui->buttonWidthSB->setEnabled(true); + ui->buttonWidthL->setEnabled(true); + } +} + +void LxQtTaskbarConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + if (ui->buttons->buttonRole(btn) == QDialogButtonBox::ResetRole) + { + /* We have to disable signals for buttonWidthSB to prevent errors. Otherwise not all data + could be restored */ + ui->buttonWidthSB->blockSignals(true); + oldSettings.loadToSettings(); + loadSettings(); + ui->buttonWidthSB->blockSignals(false); + } + else + { + close(); + } +} diff --git a/plugin-taskbar/lxqttaskbarconfiguration.h b/plugin-taskbar/lxqttaskbarconfiguration.h new file mode 100644 index 0000000..999882e --- /dev/null +++ b/plugin-taskbar/lxqttaskbarconfiguration.h @@ -0,0 +1,64 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Maciej Płaza + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTTASKBARCONFIGURATION_H +#define LXQTTASKBARCONFIGURATION_H + +#include +#include + +#include + +namespace Ui { + class LxQtTaskbarConfiguration; +} + +class LxQtTaskbarConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtTaskbarConfiguration(QSettings &settings, QWidget *parent = 0); + ~LxQtTaskbarConfiguration(); + +private: + Ui::LxQtTaskbarConfiguration *ui; + QSettings &mSettings; + LxQt::SettingsCache oldSettings; + + /* + Read settings from conf file and put data into controls. + */ + void loadSettings(); + +private slots: + void saveSettings(); + void dialogButtonsAction(QAbstractButton *btn); + void updateControls(int index); +}; + +#endif // LXQTTASKBARCONFIGURATION_H diff --git a/plugin-taskbar/lxqttaskbarconfiguration.ui b/plugin-taskbar/lxqttaskbarconfiguration.ui new file mode 100644 index 0000000..5c6767c --- /dev/null +++ b/plugin-taskbar/lxqttaskbarconfiguration.ui @@ -0,0 +1,165 @@ + + + LxQtTaskbarConfiguration + + + + 0 + 0 + 354 + 316 + + + + Task Manager Settings + + + + + + Taskbar Contents + + + + + + Show windows from current desktop + + + wlcB + + + + + + + Show windows from all desktops + + + wlcB + + + + + + + + + + Taskbar Appearance + + + + + + Button style + + + + + + + + + + Minimum button width + + + + + + + + 0 + 0 + + + + 1 + + + 500 + + + + + + + Auto&rotate buttons when the panel is vertical + + + + + + + + + + Close on middle-click + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + buttons + accepted() + LxQtTaskbarConfiguration + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttons + rejected() + LxQtTaskbarConfiguration + reject() + + + 316 + 260 + + + 286 + 274 + + + + + + + + diff --git a/plugin-taskbar/lxqttaskbarplugin.cpp b/plugin-taskbar/lxqttaskbarplugin.cpp new file mode 100644 index 0000000..90e3d35 --- /dev/null +++ b/plugin-taskbar/lxqttaskbarplugin.cpp @@ -0,0 +1,54 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqttaskbarplugin.h" + +LxQtTaskBarPlugin::LxQtTaskBarPlugin(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo) + +{ + mTaskBar = new LxQtTaskBar(this); + +} + + +LxQtTaskBarPlugin::~LxQtTaskBarPlugin() +{ + delete mTaskBar; +} + +QDialog *LxQtTaskBarPlugin::configureDialog() +{ + return new LxQtTaskbarConfiguration(*(settings())); +} + +void LxQtTaskBarPlugin::realign() +{ + mTaskBar->realign(); +} diff --git a/plugin-taskbar/lxqttaskbarplugin.h b/plugin-taskbar/lxqttaskbarplugin.h new file mode 100644 index 0000000..bfe363c --- /dev/null +++ b/plugin-taskbar/lxqttaskbarplugin.h @@ -0,0 +1,69 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTTASKBARPLUGIN_H +#define LXQTTASKBARPLUGIN_H + +#include "../panel/ilxqtpanel.h" +#include "../panel/ilxqtpanelplugin.h" +#include "lxqttaskbar.h" +#include +class LxQtTaskBar; + +class LxQtTaskBarPlugin : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtTaskBarPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtTaskBarPlugin(); + + QString themeId() const { return "TaskBar"; } + virtual ILxQtPanelPlugin::Flags flags() const { return HaveConfigDialog ; } + + QWidget *widget() { return mTaskBar; } + QDialog *configureDialog(); + + void settingsChanged() { mTaskBar->settingsChanged(); } + void realign(); + + bool isSeparate() const { return true; } + bool isExpandable() const { return true; } +private: + LxQtTaskBar *mTaskBar; +}; + +class LxQtTaskBarPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) { return new LxQtTaskBarPlugin(startupInfo);} +}; + +#endif // LXQTTASKBARPLUGIN_H diff --git a/plugin-taskbar/lxqttaskbutton.cpp b/plugin-taskbar/lxqttaskbutton.cpp new file mode 100644 index 0000000..4d361d3 --- /dev/null +++ b/plugin-taskbar/lxqttaskbutton.cpp @@ -0,0 +1,632 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * http://lxqt.org + * + * Copyright: 2011 Razor team + * 2014 LXQt team + * Authors: + * Alexander Sokoloff + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lxqttaskbutton.h" +#include + +// Necessary for closeApplication() +#include +#include + +/************************************************ + +************************************************/ +void ElidedButtonStyle::drawItemText(QPainter* painter, const QRect& rect, + int flags, const QPalette & pal, bool enabled, + const QString & text, QPalette::ColorRole textRole) const +{ + QString s = painter->fontMetrics().elidedText(text, Qt::ElideRight, rect.width()); + QProxyStyle::drawItemText(painter, rect, flags, pal, enabled, s, textRole); +} + + +/************************************************ + +************************************************/ +LxQtTaskButton::LxQtTaskButton(const WId window, QWidget *parent) : + QToolButton(parent), + mWindow(window), + mDrawPixmap(false) +{ + setCheckable(true); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + setMinimumWidth(1); + setMinimumHeight(1); + setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + setAcceptDrops(true); + + updateText(); + updateIcon(); +} + +/************************************************ + +************************************************/ +LxQtTaskButton::~LxQtTaskButton() +{ +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::updateText() +{ + KWindowInfo info(mWindow, NET::WMVisibleName | NET::WMName); + QString title = info.visibleName().isEmpty() ? info.name() : info.visibleName(); + setText(title.replace("&", "&&")); + setToolTip(title); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::updateIcon() +{ + QIcon ico; + QPixmap pix = KWindowSystem::icon(mWindow); + ico.addPixmap(pix); + if (!pix.isNull()) + setIcon(ico); + else + setIcon(XdgIcon::defaultApplicationIcon()); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::dragEnterEvent(QDragEnterEvent *event) +{ + if (event->mimeData()->hasFormat("lxqt/lxqttaskbutton")) + { + event->ignore(); + return; + } + + mDraggableMimeData = event->mimeData(); + QTimer::singleShot(1000, this, SLOT(activateWithDraggable())); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::dragLeaveEvent(QDragLeaveEvent *event) +{ + mDraggableMimeData = NULL; +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::mousePressEvent(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) + mDragStartPosition = event->pos(); + QToolButton::mousePressEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::mouseReleaseEvent(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) + { + // qDebug() << "isChecked:" << isChecked(); + if (isChecked()) + minimizeApplication(); + else + raiseApplication(); + } + QToolButton::mouseReleaseEvent(event); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::mouseMoveEvent(QMouseEvent* event) +{ + if (!(event->buttons() & Qt::LeftButton)) + return; + + if ((event->pos() - mDragStartPosition).manhattanLength() < QApplication::startDragDistance()) + return; + + QMimeData *mime = new QMimeData; + QByteArray byteArray; + QDataStream stream(&byteArray, QIODevice::WriteOnly); + qDebug() << QString("Dragging window: %1").arg(mWindow); + stream << (qlonglong) mWindow; + mime->setData("lxqt/lxqttaskbutton", byteArray); + + QDrag *drag = new QDrag(this); + drag->setMimeData(mime); + QPixmap pixmap = grab(); + drag->setPixmap(pixmap); + drag->setHotSpot(QPoint(mapTo(this, event->pos()))); + drag->exec(); + + QAbstractButton::mouseMoveEvent(event); +} + +/************************************************ + + ************************************************/ +bool LxQtTaskButton::isAppHidden() const +{ + KWindowInfo info(mWindow, NET::WMState); + return (info.state() & NET::Hidden); +} + +/************************************************ + + ************************************************/ +bool LxQtTaskButton::isApplicationActive() const +{ + return KWindowSystem::activeWindow() == mWindow; +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::activateWithDraggable() +{ + if (!mDraggableMimeData) + return; + + // raise app in any time when there is a drag + // in progress to allow drop it into an app + raiseApplication(); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::raiseApplication() +{ + KWindowInfo info(mWindow, NET::WMDesktop); + int winDesktop = info.desktop(); + if (KWindowSystem::currentDesktop() != winDesktop) + KWindowSystem::setCurrentDesktop(winDesktop); + KWindowSystem::activateWindow(mWindow); + + setUrgencyHint(false); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::minimizeApplication() +{ + KWindowSystem::minimizeWindow(mWindow); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::maximizeApplication() +{ + QAction* act = qobject_cast(sender()); + if (!act) + return; + + int state = act->data().toInt(); + switch (state) + { + case NET::MaxHoriz: + KWindowSystem::setState(mWindow, NET::MaxHoriz); + break; + + case NET::MaxVert: + KWindowSystem::setState(mWindow, NET::MaxVert); + break; + + default: + KWindowSystem::setState(mWindow, NET::Max); + break; + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::deMaximizeApplication() +{ + KWindowSystem::clearState(mWindow, NET::Max); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::shadeApplication() +{ + KWindowSystem::setState(mWindow, NET::Shaded); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::unShadeApplication() +{ + KWindowSystem::clearState(mWindow, NET::Shaded); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::closeApplication() +{ + // FIXME: Why there is no such thing in KWindowSystem?? + NETRootInfo(QX11Info::connection(), NET::CloseWindow).closeWindowRequest(mWindow); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::setApplicationLayer() +{ + QAction* act = qobject_cast(sender()); + if (!act) + return; + + int layer = act->data().toInt(); + switch(layer) + { + case NET::KeepAbove: + KWindowSystem::clearState(mWindow, NET::KeepBelow); + KWindowSystem::setState(mWindow, NET::KeepAbove); + break; + + case NET::KeepBelow: + KWindowSystem::clearState(mWindow, NET::KeepAbove); + KWindowSystem::setState(mWindow, NET::KeepBelow); + break; + + default: + KWindowSystem::clearState(mWindow, NET::KeepBelow); + KWindowSystem::clearState(mWindow, NET::KeepAbove); + break; + } +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::moveApplicationToDesktop() +{ + QAction* act = qobject_cast(sender()); + if (!act) + return; + + bool ok; + int desk = act->data().toInt(&ok); + + if (!ok) + return; + + KWindowSystem::setOnDesktop(mWindow, desk); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::contextMenuEvent(QContextMenuEvent* event) +{ + if (event->modifiers().testFlag(Qt::ControlModifier)) + { + event->ignore(); + return; + } + + KWindowInfo info(mWindow, 0, NET::WM2AllowedActions); + unsigned long state = KWindowInfo(mWindow, NET::WMState).state(); + + QMenu menu(tr("Application")); + QAction* a; + + /* KDE menu ******* + + + To &Desktop > + + &All Desktops + + --- + + &1 Desktop 1 + + &2 Desktop 2 + + &To Current Desktop + &Move + Re&size + + Mi&nimize + + Ma&ximize + + &Shade + Ad&vanced > + Keep &Above Others + Keep &Below Others + Fill screen + &Layer > + Always on &top + &Normal + Always on &bottom + --- + + &Close + */ + + /********** Desktop menu **********/ + int deskNum = KWindowSystem::numberOfDesktops(); + if (deskNum > 1) + { + int winDesk = KWindowInfo(mWindow, NET::WMDesktop).desktop(); + QMenu* deskMenu = menu.addMenu(tr("To &Desktop")); + + a = deskMenu->addAction(tr("&All Desktops")); + a->setData(NET::OnAllDesktops); + a->setEnabled(winDesk != NET::OnAllDesktops); + connect(a, SIGNAL(triggered(bool)), this, SLOT(moveApplicationToDesktop())); + deskMenu->addSeparator(); + + for (int i = 0; i < deskNum; ++i) + { + a = deskMenu->addAction(tr("Desktop &%1").arg(i + 1)); + a->setData(i + 1); + a->setEnabled(i + 1 != winDesk); + connect(a, SIGNAL(triggered(bool)), this, SLOT(moveApplicationToDesktop())); + } + + int curDesk = KWindowSystem::currentDesktop(); + a = menu.addAction(tr("&To Current Desktop")); + a->setData(curDesk); + a->setEnabled(curDesk != winDesk); + connect(a, SIGNAL(triggered(bool)), this, SLOT(moveApplicationToDesktop())); + } + + /********** State menu **********/ + menu.addSeparator(); + + a = menu.addAction(tr("Ma&ximize")); + a->setEnabled(info.actionSupported(NET::ActionMax) && !(state & NET::Max)); + a->setData(NET::Max); + connect(a, SIGNAL(triggered(bool)), this, SLOT(maximizeApplication())); + + if (event->modifiers() & Qt::ShiftModifier) + { + a = menu.addAction(tr("Maximize vertically")); + a->setEnabled(info.actionSupported(NET::ActionMaxVert) && !((state & NET::MaxVert) || (state & NET::Hidden))); + a->setData(NET::MaxVert); + connect(a, SIGNAL(triggered(bool)), this, SLOT(maximizeApplication())); + + a = menu.addAction(tr("Maximize horizontally")); + a->setEnabled(info.actionSupported(NET::ActionMaxHoriz) && !((state & NET::MaxHoriz) || (state & NET::Hidden))); + a->setData(NET::MaxHoriz); + connect(a, SIGNAL(triggered(bool)), this, SLOT(maximizeApplication())); + } + + a = menu.addAction(tr("&Restore")); + a->setEnabled((state & NET::Hidden) || (state & NET::Max) || (state & NET::MaxHoriz) || (state & NET::MaxVert)); + connect(a, SIGNAL(triggered(bool)), this, SLOT(deMaximizeApplication())); + + a = menu.addAction(tr("Mi&nimize")); + a->setEnabled(info.actionSupported(NET::ActionMinimize) && !(state & NET::Hidden)); + connect(a, SIGNAL(triggered(bool)), this, SLOT(minimizeApplication())); + + if (state & NET::Shaded) + { + a = menu.addAction(tr("Roll down")); + a->setEnabled(info.actionSupported(NET::ActionShade) && !(state & NET::Hidden)); + connect(a, SIGNAL(triggered(bool)), this, SLOT(unShadeApplication())); + } + else + { + a = menu.addAction(tr("Roll up")); + a->setEnabled(info.actionSupported(NET::ActionShade) && !(state & NET::Hidden)); + connect(a, SIGNAL(triggered(bool)), this, SLOT(shadeApplication())); + } + + /********** Layer menu **********/ + menu.addSeparator(); + + QMenu* layerMenu = menu.addMenu(tr("&Layer")); + + a = layerMenu->addAction(tr("Always on &top")); + // FIXME: There is no info.actionSupported(NET::ActionKeepAbove) + a->setEnabled(!(state & NET::KeepAbove)); + a->setData(NET::KeepAbove); + connect(a, SIGNAL(triggered(bool)), this, SLOT(setApplicationLayer())); + + a = layerMenu->addAction(tr("&Normal")); + a->setEnabled((state & NET::KeepAbove) || (state & NET::KeepBelow)); + // FIXME: There is no NET::KeepNormal, so passing 0 + a->setData(0); + connect(a, SIGNAL(triggered(bool)), this, SLOT(setApplicationLayer())); + + a = layerMenu->addAction(tr("Always on &bottom")); + // FIXME: There is no info.actionSupported(NET::ActionKeepBelow) + a->setEnabled(!(state & NET::KeepBelow)); + a->setData(NET::KeepBelow); + connect(a, SIGNAL(triggered(bool)), this, SLOT(setApplicationLayer())); + + /********** Kill menu **********/ + menu.addSeparator(); + a = menu.addAction(XdgIcon::fromTheme("process-stop"), tr("&Close")); + connect(a, SIGNAL(triggered(bool)), this, SLOT(closeApplication())); + menu.exec(mapToGlobal(event->pos())); +} + +/************************************************ + + ************************************************/ +void LxQtTaskButton::setUrgencyHint(bool set) +{ + if (mUrgencyHint == set) + return; + + if (!set) + KWindowSystem::demandAttention(mWindow, false); + + mUrgencyHint = set; + setProperty("urgent", set); + style()->unpolish(this); + style()->polish(this); + update(); +} + +/************************************************ + + ************************************************/ +int LxQtTaskButton::desktopNum() const +{ + return KWindowInfo(mWindow, NET::WMDesktop).desktop(); +} + +Qt::Corner LxQtTaskButton::origin() const +{ + return mOrigin; +} + +void LxQtTaskButton::setOrigin(Qt::Corner newOrigin) +{ + if (mOrigin != newOrigin) + { + mOrigin = newOrigin; + update(); + } +} + +void LxQtTaskButton::setAutoRotation(bool value, ILxQtPanel::Position position) +{ + if (value) + { + switch (position) + { + case ILxQtPanel::PositionTop: + case ILxQtPanel::PositionBottom: + setOrigin(Qt::TopLeftCorner); + break; + + case ILxQtPanel::PositionLeft: + setOrigin(Qt::BottomLeftCorner); + break; + + case ILxQtPanel::PositionRight: + setOrigin(Qt::TopRightCorner); + break; + } + } + else + setOrigin(Qt::TopLeftCorner); +} + +void LxQtTaskButton::paintEvent(QPaintEvent *event) +{ + if (mOrigin == Qt::TopLeftCorner) + { + QToolButton::paintEvent(event); + return; + } + + QSize sz = size(); + QSize adjSz = sz; + QTransform transform; + QPoint originPoint; + + switch (mOrigin) + { + case Qt::TopLeftCorner: + transform.rotate(0.0); + originPoint = QPoint(0.0, 0.0); + break; + + case Qt::TopRightCorner: + transform.rotate(90.0); + originPoint = QPoint(0.0, -sz.width()); + adjSz.transpose(); + break; + + case Qt::BottomRightCorner: + transform.rotate(180.0); + originPoint = QPoint(-sz.width(), -sz.height()); + break; + + case Qt::BottomLeftCorner: + transform.rotate(270.0); + originPoint = QPoint(-sz.height(), 0.0); + adjSz.transpose(); + break; + } + + bool drawPixmapNextTime = false; + + if (!mDrawPixmap) + { + mPixmap = QPixmap(adjSz); + mPixmap.fill(QColor(0, 0, 0, 0)); + + if (adjSz != sz) + resize(adjSz); // this causes paint event to be repeated - next time we'll paint the pixmap to the widget surface. + + // copied from QToolButton::paintEvent { + QStylePainter painter(&mPixmap, this); + QStyleOptionToolButton opt; + initStyleOption(&opt); + painter.drawComplexControl(QStyle::CC_ToolButton, opt); + // } + + if (adjSz != sz) + { + resize(sz); + drawPixmapNextTime = true; + } + else + mDrawPixmap = true; // transfer the pixmap to the widget now! + } + if (mDrawPixmap) + { + QPainter painter(this); + painter.setTransform(transform); + painter.drawPixmap(originPoint, mPixmap); + + drawPixmapNextTime = false; + } + + mDrawPixmap = drawPixmapNextTime; +} diff --git a/plugin-taskbar/lxqttaskbutton.h b/plugin-taskbar/lxqttaskbutton.h new file mode 100644 index 0000000..3b4fa85 --- /dev/null +++ b/plugin-taskbar/lxqttaskbutton.h @@ -0,0 +1,115 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * http://lxqt.org + * + * Copyright: 2011 Razor team + * 2014 LXQt team + * Authors: + * Alexander Sokoloff + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTTASKBUTTON_H +#define LXQTTASKBUTTON_H + +#include +#include +#include "../panel/ilxqtpanel.h" + +class QPainter; +class QPalette; +class QMimeData; + +class ElidedButtonStyle: public QProxyStyle +{ +public: + ElidedButtonStyle(QStyle* style=0): QProxyStyle(style) {} + + void drawItemText(QPainter* painter, const QRect& rect, int flags, + const QPalette & pal, bool enabled, const QString & text, + QPalette::ColorRole textRole = QPalette::NoRole ) const; +}; + + +class LxQtTaskButton : public QToolButton +{ + Q_OBJECT + + Q_PROPERTY(Qt::Corner origin READ origin WRITE setOrigin) + +public: + explicit LxQtTaskButton(const WId window, QWidget *parent = 0); + virtual ~LxQtTaskButton(); + + bool isAppHidden() const; + bool isApplicationActive() const; + WId windowId() const { return mWindow; } + + bool hasUrgencyHint() const { return mUrgencyHint; } + void setUrgencyHint(bool set); + + int desktopNum() const; + void updateText(); + void updateIcon(); + + Qt::Corner origin() const; + void setAutoRotation(bool value, ILxQtPanel::Position position); + +public slots: + void raiseApplication(); + void minimizeApplication(); + void maximizeApplication(); + void deMaximizeApplication(); + void shadeApplication(); + void unShadeApplication(); + void closeApplication(); + void moveApplicationToDesktop(); + void setApplicationLayer(); + + void setOrigin(Qt::Corner); + +protected: + void dragEnterEvent(QDragEnterEvent *event); + void dragLeaveEvent(QDragLeaveEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void contextMenuEvent(QContextMenuEvent *event); + void paintEvent(QPaintEvent *); + +private: + WId mWindow; + bool mUrgencyHint; + const QMimeData *mDraggableMimeData; + QPoint mDragStartPosition; + Qt::Corner mOrigin; + QPixmap mPixmap; + bool mDrawPixmap; + +private slots: + void activateWithDraggable(); +}; + +typedef QHash LxQtTaskButtonHash; + +#endif // LXQTTASKBUTTON_H diff --git a/plugin-taskbar/resources/taskbar.desktop.in b/plugin-taskbar/resources/taskbar.desktop.in new file mode 100644 index 0000000..48840b0 --- /dev/null +++ b/plugin-taskbar/resources/taskbar.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications +Icon=window-duplicate + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-taskbar/translations/taskbar.ts b/plugin-taskbar/translations/taskbar.ts new file mode 100644 index 0000000..559d8dc --- /dev/null +++ b/plugin-taskbar/translations/taskbar.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Show windows from all desktops + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Button style + + + + + Close on middle-click + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_ar.desktop b/plugin-taskbar/translations/taskbar_ar.desktop new file mode 100644 index 0000000..bcf2a28 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=التبديل بين التطبيقات الجارية +Name[ar]=مدير المهامّ diff --git a/plugin-taskbar/translations/taskbar_ar.ts b/plugin-taskbar/translations/taskbar_ar.ts new file mode 100644 index 0000000..ff0277d --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ar.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + التطبيق + + + + To &Desktop + إلى س&طح المكتب + + + + &All Desktops + كا&فَّة أسطح المكتب + + + + Desktop &%1 + سطح المكتب &%1 + + + + &To Current Desktop + إلى سطح المكتب ال&حالي + + + + Ma&ximize + ت&كبير + + + + Maximize vertically + تكبيرٌ عموديٌّ + + + + Maximize horizontally + تكبيرٌ أفقيٌّ + + + + &Restore + استر&جاع + + + + Mi&nimize + ت&صغير + + + + Roll down + لفٌّ نحو اﻷسفل + + + + Roll up + لفٌّ نحو اﻷعلى + + + + &Layer + طب&قة + + + + Always on &top + دوماً في اﻷ&على + + + + &Normal + عا&دي + + + + Always on &bottom + دوماً في اﻷس&فل + + + + &Close + إ&غلاق + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + إعدادات مدير مهام ريزر + + + Window List Content + محتوى قائمة النَّوافذ + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + إظهار نوافذ سطح المكتب الحاليّ + + + + Show windows from all desktops + إظهار نوافذ كافَّة اﻷسطح المكتبيَّة + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + مظهر قائمة النَّوافذ + + + + Button style + شكل الزُّرّ + + + Max button width + عرض زرِّ التكبير + + + + Close on middle-click + إغلاق عند الضغط على زرّ الفأرة اﻷوسط + + + + Icon and text + أيقونةٌ ونصٌّ + + + + Only icon + أيقونةٌ فقط + + + + Only text + نصٌّ فقط + + + diff --git a/plugin-taskbar/translations/taskbar_cs.desktop b/plugin-taskbar/translations/taskbar_cs.desktop new file mode 100644 index 0000000..4ad2449 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Přepínání mezi běžícími programy +Name[cs]=Správce úkolů diff --git a/plugin-taskbar/translations/taskbar_cs.ts b/plugin-taskbar/translations/taskbar_cs.ts new file mode 100644 index 0000000..e09dadd --- /dev/null +++ b/plugin-taskbar/translations/taskbar_cs.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Program + + + + To &Desktop + Na &plochu + + + + &All Desktops + &Všechny plochy + + + + Desktop &%1 + Plocha &%1 + + + + &To Current Desktop + &Na nynější plochu + + + + Ma&ximize + Zvě&tšit + + + + Maximize vertically + Zvětšit svisle + + + + Maximize horizontally + Zvětšit vodorovně + + + + &Restore + &Obnovit + + + + Mi&nimize + &Zmenšit + + + + Roll down + Sbalit + + + + Roll up + Rozbalit + + + + &Layer + &Vrstva + + + + Always on &top + Vždy &nahoře + + + + &Normal + &Obvyklé + + + + Always on &bottom + Vždy &dole + + + + &Close + &Zavřít + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Nastavení správce úkolů + + + Window List Content + Obsah seznamu oken + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Ukázat okna z nynější plochy + + + + Show windows from all desktops + Ukázat okna ze všech ploch + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Vzhled seznamu oken + + + + Button style + Styl tlačítek + + + Max button width + Největší šířka tlačítka + + + + Close on middle-click + Zavřít klepnutím prostředním tlačítkem + + + + Icon and text + Ikona a text + + + + Only icon + Pouze ikona + + + + Only text + Pouze text + + + diff --git a/plugin-taskbar/translations/taskbar_cs_CZ.desktop b/plugin-taskbar/translations/taskbar_cs_CZ.desktop new file mode 100644 index 0000000..bde7a03 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Přepínat mezi běžícími programy +Name[cs_CZ]=Správce úkolů diff --git a/plugin-taskbar/translations/taskbar_cs_CZ.ts b/plugin-taskbar/translations/taskbar_cs_CZ.ts new file mode 100644 index 0000000..a3e26d0 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_cs_CZ.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Program + + + + To &Desktop + Na &plochu + + + + &All Desktops + &Všechny plochy + + + + Desktop &%1 + Plocha &%1 + + + + &To Current Desktop + &Na nynější plochu + + + + Ma&ximize + Zvě&tšit + + + + Maximize vertically + Zvětšit svisle + + + + Maximize horizontally + Zvětšit vodorovně + + + + &Restore + &Obnovit + + + + Mi&nimize + &Zmenšit + + + + Roll down + Sbalit + + + + Roll up + Rozbalit + + + + &Layer + &Vrstva + + + + Always on &top + Vždy &nahoře + + + + &Normal + &Obvyklé + + + + Always on &bottom + Vždy &dole + + + + &Close + &Zavřít + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Nastavení správce úkolů + + + Window List Content + Obsah seznamu oken + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Ukázat okna z nynější plochy + + + + Show windows from all desktops + Ukázat okna ze všech ploch + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Vzhled seznamu oken + + + + Button style + Styl tlačítek + + + Max button width + Největší šířka tlačítka + + + + Close on middle-click + Zavřít klepnutím prostředním tlačítkem + + + + Icon and text + Ikona a text + + + + Only icon + Pouze ikona + + + + Only text + Pouze text + + + diff --git a/plugin-taskbar/translations/taskbar_da.desktop b/plugin-taskbar/translations/taskbar_da.desktop new file mode 100644 index 0000000..c3d5310 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Skifter imellem kørende programmer +Name[da]=Programadministrator diff --git a/plugin-taskbar/translations/taskbar_da.ts b/plugin-taskbar/translations/taskbar_da.ts new file mode 100644 index 0000000..469c550 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_da.ts @@ -0,0 +1,175 @@ + + + + + LxQtTaskButton + + + Application + Program + + + + To &Desktop + Til skrivebor&d + + + + &All Desktops + &Alle skriveborde + + + + Desktop &%1 + Skrivebord &%1 + + + + &To Current Desktop + &Til aktuelt skrivebord + + + + Ma&ximize + Ma&ksimer + + + + Maximize vertically + Maksimer vertikalt + + + + Maximize horizontally + Maksimer horisontalt + + + + &Restore + &Gendan + + + + Mi&nimize + Mi&nimer + + + + Roll down + Rul ned + + + + Roll up + Rul op + + + + &Layer + &Lag + + + + Always on &top + Al&tid øverst + + + + &Normal + &Normal + + + + Always on &bottom + Altid &nederst + + + + &Close + &Luk + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LXQt Opgavehåndtering Indstillinger + + + Window List Content + Indhold af vinduesliste + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Vis vinduer fra aktuelle skrivebord + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + wlcB + wlcB + + + + Show windows from all desktops + Vis vinduer fra alle skriveborde + + + Window List Appearance + Udseende af Vinduesliste + + + + Button style + Knapstil + + + Max button width + Maks knapbredde + + + + Icon and text + Ikon og tekst + + + + Only icon + Kun ikon + + + + Only text + Kun tekst + + + diff --git a/plugin-taskbar/translations/taskbar_da_DK.desktop b/plugin-taskbar/translations/taskbar_da_DK.desktop new file mode 100644 index 0000000..fc3d830 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Skift imellem kørende programmer +Name[da_DK]=Jobliste diff --git a/plugin-taskbar/translations/taskbar_da_DK.ts b/plugin-taskbar/translations/taskbar_da_DK.ts new file mode 100644 index 0000000..b0c221d --- /dev/null +++ b/plugin-taskbar/translations/taskbar_da_DK.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Program + + + + To &Desktop + Til &Skrivebord + + + + &All Desktops + A&lle Skriveborde + + + + Desktop &%1 + Skrivebord &%1 + + + + &To Current Desktop + Til Nuværende Skrivebor&d + + + + Ma&ximize + Ma&ksimer + + + + Maximize vertically + Maksimer vertikalt + + + + Maximize horizontally + Maksimer horisontalt + + + + &Restore + &Gendan + + + + Mi&nimize + Mi&nimer + + + + Roll down + Rul ned + + + + Roll up + Rul op + + + + &Layer + &Lag + + + + Always on &top + Altid &Ovenpå + + + + &Normal + &Normal + + + + Always on &bottom + Altid Ned&erst + + + + &Close + &Afslut + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt Jobliste Indstillinger + + + Window List Content + Indhold Af Vinduesliste + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Vis vinduer fra nuværende skrivebord + + + + Show windows from all desktops + Vis vinduer fra alle skriveborde + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Udseende af vinduesliste + + + + Button style + Knap stil + + + Max button width + Maks. knapbredde + + + + Close on middle-click + Luk ved midterklik + + + + Icon and text + Ikon og tekst + + + + Only icon + Kun ikoner + + + + Only text + Kun tekst + + + diff --git a/plugin-taskbar/translations/taskbar_de.desktop b/plugin-taskbar/translations/taskbar_de.desktop new file mode 100644 index 0000000..c809473 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Wechsel zwischen laufenden Anwendungen +Name[de]=Anwendungsverwalter diff --git a/plugin-taskbar/translations/taskbar_de.ts b/plugin-taskbar/translations/taskbar_de.ts new file mode 100644 index 0000000..9d9a5c2 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_de.ts @@ -0,0 +1,175 @@ + + + + + LxQtTaskButton + + + Application + Anwendung + + + + To &Desktop + Zur Arb&eitsfläche + + + + &All Desktops + &Alle Arbeitsflächen + + + + Desktop &%1 + Arbeitsfläche &%1 + + + + &To Current Desktop + Zur Ak&tuellen Arbeitsfläche + + + + Ma&ximize + Ma&ximieren + + + + Maximize vertically + Vertikal maximieren + + + + Maximize horizontally + Horizontal maximieren + + + + &Restore + &Wiederherstellen + + + + Mi&nimize + Mi&nimieren + + + + Roll down + Herunterrollen + + + + Roll up + Hochrollen + + + + &Layer + &Ebene + + + + Always on &top + Immer &oben + + + + &Normal + &Normal + + + + Always on &bottom + Immer &unten + + + + &Close + &Schließen + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt Taskmanager Einstellungen + + + Window List Content + Fensterlisteninhalt + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Fenster der aktuellen Arbeitsfläche anzeigen + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + wlcB + wlcB + + + + Show windows from all desktops + Fenster aller Arbeitsflächen anzeigen + + + Window List Appearance + Fensterlisten Erscheinungsbild + + + + Button style + Schaltflächenstiel + + + Max button width + Max. Schaltflächenbreite + + + + Icon and text + Symbol und Text + + + + Only icon + Nur Symbol + + + + Only text + Nur Text + + + diff --git a/plugin-taskbar/translations/taskbar_de_DE.desktop b/plugin-taskbar/translations/taskbar_de_DE.desktop new file mode 100644 index 0000000..02c6590 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Zwischen laufenden Applikationen umschalten +Name[de_DE]=Task Manager diff --git a/plugin-taskbar/translations/taskbar_de_DE.ts b/plugin-taskbar/translations/taskbar_de_DE.ts new file mode 100644 index 0000000..f5d5fa8 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_de_DE.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Anwendung + + + + To &Desktop + Zur &Arbeitsfläche + + + + &All Desktops + &Alle Arbeitsflächen + + + + Desktop &%1 + Arbeitsfläche &%1 + + + + &To Current Desktop + &Zur aktuellen Arbeitsfläche + + + + Ma&ximize + Ma&ximieren + + + + Maximize vertically + Maximiere vertikal + + + + Maximize horizontally + Maximiere horizintal + + + + &Restore + &Wiederherstellen + + + + Mi&nimize + Mi&nimieren + + + + Roll down + Roll runter + + + + Roll up + Roll hoch + + + + &Layer + &Schicht + + + + Always on &top + Immer &oben + + + + &Normal + &Normal + + + + Always on &bottom + Immer &unten + + + + &Close + &Schließen + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt Anwendungsverwalter Einstellungen + + + Window List Content + Fester Inhalt + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Zeige Fenster von der aktuellen Arbeitsfläche + + + + Show windows from all desktops + Zeige Fester von allen Arbeitsflächen + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Festerlisten Erscheinungsbild + + + + Button style + Knopf Stil + + + Max button width + Max Knopf breite + + + + Close on middle-click + Schließen mit Mittelklick + + + + Icon and text + Symbole und Text + + + + Only icon + Nur Symbole + + + + Only text + Nur Text + + + diff --git a/plugin-taskbar/translations/taskbar_el_GR.desktop b/plugin-taskbar/translations/taskbar_el_GR.desktop new file mode 100644 index 0000000..ae9fb20 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Εναλλαγή μεταξύ εκτελούμενων εφαρμογών +Name[el_GR]=Διαχειριστής εργασιών diff --git a/plugin-taskbar/translations/taskbar_el_GR.ts b/plugin-taskbar/translations/taskbar_el_GR.ts new file mode 100644 index 0000000..cee922b --- /dev/null +++ b/plugin-taskbar/translations/taskbar_el_GR.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Εφαρμογή + + + + To &Desktop + Στην επι&φάνεια εργασίας + + + + &All Desktops + Ό&λες οι επιφάνειες εργασίας + + + + Desktop &%1 + Επιφάνεια εργασίας &%1 + + + + &To Current Desktop + Στ&ην τρέχουσα επιφάνεια εργασίας + + + + Ma&ximize + &Μεγιστοποίηση + + + + Maximize vertically + Μεγιστοποίηση κάθετα + + + + Maximize horizontally + Μεγιστοποίηση οριζόντια + + + + &Restore + &Επαναφορά + + + + Mi&nimize + Ελα&χιστοποίηση + + + + Roll down + Κύλιση κάτω + + + + Roll up + Κύλιση επάνω + + + + &Layer + Στ&ρώμα + + + + Always on &top + Πάντα ε&πάνω + + + + &Normal + Κα&νονικό + + + + Always on &bottom + Πάντα &κάτω + + + + &Close + Κλεί&σιμο + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Ρυθμίσεις διαχειριστή εργασιών LxQt + + + Window List Content + Περιεχόμενο λίστας παραθύρου + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Εμφάνιση παραθύρων από την τρέχουσα επιφάνεια εργασίας + + + + Show windows from all desktops + Εμφάνιση παραθύρων από όλες τις επιφάνειες εργασίας + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Εμφάνιση λίστας παραθύρων + + + + Button style + Στυλ πλήκτρου + + + Max button width + Μέγιστο πλάτος πλήκτρου + + + + Close on middle-click + Κλείσιμο με μεσαίο κλικ + + + + Icon and text + Εικόνα και κείμενο + + + + Only icon + Μόνο εικόνα + + + + Only text + Μόνο κείμενο + + + diff --git a/plugin-taskbar/translations/taskbar_eo.desktop b/plugin-taskbar/translations/taskbar_eo.desktop new file mode 100644 index 0000000..3e6685b --- /dev/null +++ b/plugin-taskbar/translations/taskbar_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Ŝalti inter rulantaj aplikaĵoj +Name[eo]=Taskmastrumilo diff --git a/plugin-taskbar/translations/taskbar_eo.ts b/plugin-taskbar/translations/taskbar_eo.ts new file mode 100644 index 0000000..8a88838 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_eo.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplikaĵo + + + + To &Desktop + &Al labortablo + + + + &All Desktops + Ĉiuj l&abortabloj + + + + Desktop &%1 + Labortablo &%1 + + + + &To Current Desktop + Al ak&tuala labortablo + + + + Ma&ximize + Ma&ksimumigi + + + + Maximize vertically + Vertikale maksimumigi + + + + Maximize horizontally + Horizontale maksimumigi + + + + &Restore + &Restaŭri + + + + Mi&nimize + &Malmaksimumigi + + + + Roll down + Malsupren rulumi + + + + Roll up + Supren rulumi + + + + &Layer + Tavo&lo + + + + Always on &top + Ĉiam &supre + + + + &Normal + &Normale + + + + Always on &bottom + Ĉiam &malsupre + + + + &Close + &Fermi + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Agordoj de taskmastrumilo de LxQto + + + Window List Content + Enhavo de listo de fenestroj + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Montri fenestrojn el aktuala labortablo + + + + Show windows from all desktops + Montri fenestrojn el ĉiuj labortabloj + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Apero de listo de fenestroj + + + + Button style + Stilo de butonoj + + + Max button width + Maksimuma grando de butonoj + + + + Close on middle-click + + + + + Icon and text + Piktogramo kaj teksto + + + + Only icon + Nur piktogramoj + + + + Only text + Nur teksto + + + diff --git a/plugin-taskbar/translations/taskbar_es.desktop b/plugin-taskbar/translations/taskbar_es.desktop new file mode 100644 index 0000000..f9db5a4 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Cambia entre aplicaciones activas +Name[es]=Administrador de tareas diff --git a/plugin-taskbar/translations/taskbar_es.ts b/plugin-taskbar/translations/taskbar_es.ts new file mode 100644 index 0000000..15d56a4 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_es.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplicación + + + + To &Desktop + Al &escritorio + + + + &All Desktops + &Todos los escritorios + + + + Desktop &%1 + Escritorio &%1 + + + + &To Current Desktop + &Al escritorio actual + + + + Ma&ximize + Ma&ximizar + + + + Maximize vertically + Maximizar verticalmente + + + + Maximize horizontally + Maximizar horizontalmente + + + + &Restore + &Restauar + + + + Mi&nimize + Mi&nimizar + + + + Roll down + Desplegar + + + + Roll up + Enrollar + + + + &Layer + &Capa + + + + Always on &top + Siempre &encima + + + + &Normal + &Normal + + + + Always on &bottom + Siempre al &fondo + + + + &Close + &Cerrar + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Opciones del administrador de tareas de LxQt + + + Window List Content + Contenido del listado de ventanas + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Mostrar ventanas del escritorio actual + + + + Show windows from all desktops + Mostrar ventanas de todos los escritorios + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Apariencia de la lista de ventanas + + + + Button style + Estilo del botón + + + Max button width + Ancho máximo del botón + + + + Close on middle-click + Cerrar con el boton central + + + + Icon and text + Icono y texto + + + + Only icon + Solo icono + + + + Only text + Solo texto + + + diff --git a/plugin-taskbar/translations/taskbar_es_VE.desktop b/plugin-taskbar/translations/taskbar_es_VE.desktop new file mode 100644 index 0000000..2c3841d --- /dev/null +++ b/plugin-taskbar/translations/taskbar_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Cambia entre aplicaciones o programas abiertos +Name[es_VE]=Manejador de ventanas diff --git a/plugin-taskbar/translations/taskbar_es_VE.ts b/plugin-taskbar/translations/taskbar_es_VE.ts new file mode 100644 index 0000000..b064ad9 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_es_VE.ts @@ -0,0 +1,172 @@ + + + + + LxQtTaskButton + + + Application + Aplicación + + + + To &Desktop + Al &Escritorio + + + + &All Desktops + &Todos los escritorios + + + + Desktop &%1 + Escritorio &%1 + + + + &To Current Desktop + &Al escritorio actual + + + + Ma&ximize + Ma&ximizar + + + + Maximize vertically + Maximizar verticalmente + + + + Maximize horizontally + Maximizar Orizzontalmente + + + + &Restore + &Restaurar + + + + Mi&nimize + Mi&nimizar + + + + Roll down + DesEnrolar + + + + Roll up + Enrolar + + + + &Layer + Ca&pa + + + + Always on &top + Siempre &encima + + + + &Normal + &Normal + + + + Always on &bottom + Siempre por de&bajo + + + + &Close + &Cerrar + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Configuaracion de lista de tareas LxQt + + + Window List Content + Lista de ventanas + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Mostrar ventanas del escritorio activo + + + + Show windows from all desktops + Mostrar ventanas de todos los escritorios + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Apariencia de la lista de ventanas + + + + Button style + Estilo de boton + + + Max button width + Ancho maximo + + + + Close on middle-click + Cerrar en click medio + + + + Icon and text + Icono y texto + + + + Only icon + Solo iconos + + + + Only text + +Solo texto + + + diff --git a/plugin-taskbar/translations/taskbar_eu.desktop b/plugin-taskbar/translations/taskbar_eu.desktop new file mode 100644 index 0000000..b585e0b --- /dev/null +++ b/plugin-taskbar/translations/taskbar_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Aldatu martxan dauden aplikazioen artean +Name[eu]=Ataza-kudeatzailea diff --git a/plugin-taskbar/translations/taskbar_eu.ts b/plugin-taskbar/translations/taskbar_eu.ts new file mode 100644 index 0000000..0196e50 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_eu.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplikazioa + + + + To &Desktop + &Mahaigainera + + + + &All Desktops + Mahaigain &guztiak + + + + Desktop &%1 + &%1 mahaigaina + + + + &To Current Desktop + &Uneko mahaigainera + + + + Ma&ximize + Maximizatu + + + + Maximize vertically + Maximizatu bertikalki + + + + Maximize horizontally + Maximizatu horizontalki + + + + &Restore + &Leheneratu + + + + Mi&nimize + Minimizatu + + + + Roll down + Zabaldu + + + + Roll up + Bildu + + + + &Layer + &Geruza + + + + Always on &top + Beti &goian + + + + &Normal + &Normala + + + + Always on &bottom + Beti &behean + + + + &Close + &Itxi + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt ataza-kudeatzailearen ezarpenak + + + Window List Content + Leiho-zerrendaren edukia + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Erakutsi uneko mahaigaineko leihoak + + + + Show windows from all desktops + Erakutsi mahaigain guztietako leihoak + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Leiho-zerrendaren itxura + + + + Button style + Botoi-estiloa + + + Max button width + Botoien zabalera maximoa + + + + Close on middle-click + Itxi erdiko botoia klikatzean + + + + Icon and text + Ikonoa eta testua + + + + Only icon + Ikonoa soilik + + + + Only text + Testua soilik + + + diff --git a/plugin-taskbar/translations/taskbar_fi.desktop b/plugin-taskbar/translations/taskbar_fi.desktop new file mode 100644 index 0000000..6485070 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Vaihda käynnissä olevien sovellusten välillä +Name[fi]=Tehtävähallinta diff --git a/plugin-taskbar/translations/taskbar_fi.ts b/plugin-taskbar/translations/taskbar_fi.ts new file mode 100644 index 0000000..391c1f6 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_fi.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Sovellus + + + + To &Desktop + Työ&pöydälle + + + + &All Desktops + &Kaikille työpöydille + + + + Desktop &%1 + Työpöytä &%1 + + + + &To Current Desktop + &Nykyiselle työpöydälle + + + + Ma&ximize + Suu&renna + + + + Maximize vertically + Suurenna pystysuunnassa + + + + Maximize horizontally + Suurenna vaakasuunnassa + + + + &Restore + &Palauta + + + + Mi&nimize + Pie&nennä + + + + Roll down + Rullaa alas + + + + Roll up + Rullaa ylös + + + + &Layer + Tas&o + + + + Always on &top + Aina &ylimpänä + + + + &Normal + &Tavallinen + + + + Always on &bottom + Aina &alimpana + + + + &Close + &Sulje + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt:n tehtävienhallinnan asetukset + + + Window List Content + Ikkunaluettelon sisältö + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Näytä ikkunat nykyiseltä työpöydältä + + + + Show windows from all desktops + Näytä ikkunat kaikilta työpöydiltä + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Ikkunaluettelon ulkoasu + + + + Button style + Painiketyyli + + + Max button width + Painikkeen enimmäisleveys + + + + Close on middle-click + Sulje hiiren keskimmäisen painikkeen painalluksella + + + + Icon and text + Kuvake ja teksti + + + + Only icon + Pelkkä kuvake + + + + Only text + Pelkkä teksti + + + diff --git a/plugin-taskbar/translations/taskbar_fr_FR.desktop b/plugin-taskbar/translations/taskbar_fr_FR.desktop new file mode 100644 index 0000000..528a962 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Basculer entre des applications actives +Name[fr_FR]=Gestionnaire des tâches diff --git a/plugin-taskbar/translations/taskbar_fr_FR.ts b/plugin-taskbar/translations/taskbar_fr_FR.ts new file mode 100644 index 0000000..7efcfb1 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_fr_FR.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Application + + + + To &Desktop + Vers &le bureau + + + + &All Desktops + &Tous les bureaux + + + + Desktop &%1 + Bureau &%1 + + + + &To Current Desktop + &Vers le bureau courant + + + + Ma&ximize + Maximiser + + + + Maximize vertically + Maximiser verticalement + + + + Maximize horizontally + Maximiser horizontalement + + + + &Restore + &Restaurer + + + + Mi&nimize + Mi&nimiser + + + + Roll down + Enrouler vers le bas + + + + Roll up + Enrouler vers le haut + + + + &Layer + &Calque + + + + Always on &top + Toujours au &dessus + + + + &Normal + &Normal + + + + Always on &bottom + Toujours en &bas + + + + &Close + &Fermer + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Paramètres du gestionnaire des tâches de LxQt + + + Window List Content + Contenu de la liste des fenêtres + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Montrer les fenêtres du bureau actuel + + + + Show windows from all desktops + Montrer les fenêtres de tous les bureaux + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Apparence de la liste des fenêtres + + + + Button style + Style de boutons + + + Max button width + Largeur maximale du bouton + + + + Close on middle-click + Fermer d'un clic du milieu + + + + Icon and text + Icone et texte + + + + Only icon + Icone seule + + + + Only text + Texte seul + + + diff --git a/plugin-taskbar/translations/taskbar_hu.desktop b/plugin-taskbar/translations/taskbar_hu.desktop new file mode 100644 index 0000000..bfea3f8 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=Váltás a futú alkalmazások között +Name[hu]=Feladatkezelő diff --git a/plugin-taskbar/translations/taskbar_hu.ts b/plugin-taskbar/translations/taskbar_hu.ts new file mode 100644 index 0000000..93c55c7 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_hu.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + + Show windows from all desktops + + + + + Button style + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_hu_HU.ts b/plugin-taskbar/translations/taskbar_hu_HU.ts new file mode 100644 index 0000000..ec78c39 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_hu_HU.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Alkalmazás + + + + To &Desktop + Erre az asztal&ra + + + + &All Desktops + &Az összes asztalra + + + + Desktop &%1 + &%1. asztal + + + + &To Current Desktop + Az ak&tuális asztalra + + + + Ma&ximize + Ma&ximalizálás + + + + Maximize vertically + Maximalizálás függőlegesen + + + + Maximize horizontally + Maximalizálás vízszintesen + + + + &Restore + &Visszaállítás + + + + Mi&nimize + Mi&nimalizálás + + + + Roll down + Legördítés + + + + Roll up + Felgördítés + + + + &Layer + Réte&] + + + + Always on &top + Mindig &felül + + + + &Normal + &Normál + + + + Always on &bottom + Min&dig alul + + + + &Close + &Bezárás + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + A LxQt feladatkezelő beállításai + + + Window List Content + Az ablaklista tartalma + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + A jelenlegi asztal ablakai + + + + Show windows from all desktops + Az összes asztal ablakai + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Az ablaklista megjelenése + + + + Button style + Gombstílus: + + + Max button width + Max. gombszélesség: + + + + Close on middle-click + + + + + Icon and text + Ikon és szöveg + + + + Only icon + Csak ikon + + + + Only text + Csak szöveg + + + diff --git a/plugin-taskbar/translations/taskbar_ia.desktop b/plugin-taskbar/translations/taskbar_ia.desktop new file mode 100644 index 0000000..796c9bb --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task Manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-taskbar/translations/taskbar_ia.ts b/plugin-taskbar/translations/taskbar_ia.ts new file mode 100644 index 0000000..895e429 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ia.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + + Show windows from all desktops + + + + + Button style + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_id_ID.desktop b/plugin-taskbar/translations/taskbar_id_ID.desktop new file mode 100644 index 0000000..796c9bb --- /dev/null +++ b/plugin-taskbar/translations/taskbar_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task Manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-taskbar/translations/taskbar_id_ID.ts b/plugin-taskbar/translations/taskbar_id_ID.ts new file mode 100644 index 0000000..da02ff8 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_id_ID.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + + Show windows from all desktops + + + + + Button style + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_it_IT.desktop b/plugin-taskbar/translations/taskbar_it_IT.desktop new file mode 100644 index 0000000..2788eb9 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Permette di accedere alle applicazioni in esecuzione +Name[it_IT]=Gestore dei processi diff --git a/plugin-taskbar/translations/taskbar_it_IT.ts b/plugin-taskbar/translations/taskbar_it_IT.ts new file mode 100644 index 0000000..e326388 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_it_IT.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Applicazione + + + + To &Desktop + Al &desktop + + + + &All Desktops + &Tutti i desktop + + + + Desktop &%1 + Desktop &%1 + + + + &To Current Desktop + &Al desktop corrente + + + + Ma&ximize + Ma&ssimizza + + + + Maximize vertically + Massimizza verticalmente + + + + Maximize horizontally + Massimizza orizzontalmente + + + + &Restore + &Ripristina + + + + Mi&nimize + Mi&nimizza + + + + Roll down + Minimizza + + + + Roll up + Ripristina + + + + &Layer + &Livello + + + + Always on &top + Sempre in &alto + + + + &Normal + &Normale + + + + Always on &bottom + Sempre in &basso + + + + &Close + &Chiudi + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Impostazioni del Task Manager di LxQt + + + Window List Content + Mostra finestre + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Mostra finestre sul desktop corrente + + + + Show windows from all desktops + Mostra finestre da tutti i desktop + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Aspetto delle finestre + + + + Button style + Stile dei pulsanti + + + Max button width + Larghezza massima dei pulsanti + + + + Close on middle-click + Chiudi con un clic del tasto centrale + + + + Icon and text + Icone e testo + + + + Only icon + Solo icone + + + + Only text + Solo testo + + + diff --git a/plugin-taskbar/translations/taskbar_ja.desktop b/plugin-taskbar/translations/taskbar_ja.desktop new file mode 100644 index 0000000..af8e794 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=実行中のアプリケーションを切り替えます +Name[ja]=タスク管理 diff --git a/plugin-taskbar/translations/taskbar_ja.ts b/plugin-taskbar/translations/taskbar_ja.ts new file mode 100644 index 0000000..618c4d0 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ja.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + アプリケーション + + + + To &Desktop + デスクトップへ(&D) + + + + &All Desktops + すべてのデスクトップ(&A) + + + + Desktop &%1 + デスクトップ &%1 + + + + &To Current Desktop + 現在のデスクトップへ(&T) + + + + Ma&ximize + 最大化(&x) + + + + Maximize vertically + 縦方向の最大化 + + + + Maximize horizontally + 横方向の最大化 + + + + &Restore + 復元(&R) + + + + Mi&nimize + 最小化(&N) + + + + Roll down + 広げる + + + + Roll up + たたむ + + + + &Layer + レイヤー(&L) + + + + Always on &top + 常に手前に表示(&T) + + + + &Normal + 通常(&N) + + + + Always on &bottom + 常に奥に表示(&B) + + + + &Close + 閉じる(&C) + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + タスクマネージャーの設定 + + + + Taskbar Contents + タスクバーの内容 + + + + Show windows from current desktop + 現在のデスクトップのウィンドウを表示 + + + + Show windows from all desktops + 全てのデスクトップのウィンドウを表示 + + + + Taskbar Appearance + タスクバーの見た目 + + + + Minimum button width + ボタン幅の最小値 + + + + Auto&rotate buttons when the panel is vertical + パネルが垂直なときにはボタンを回転(&R) + + + + Button style + ボタンのスタイル + + + + Close on middle-click + 中ボタンのクリックで閉じる + + + + Icon and text + アイコンとテキスト + + + + Only icon + アイコンのみ + + + + Only text + テキストのみ + + + diff --git a/plugin-taskbar/translations/taskbar_ko.desktop b/plugin-taskbar/translations/taskbar_ko.desktop new file mode 100644 index 0000000..796c9bb --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task Manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-taskbar/translations/taskbar_ko.ts b/plugin-taskbar/translations/taskbar_ko.ts new file mode 100644 index 0000000..6b3f9d2 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ko.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + + Show windows from all desktops + + + + + Button style + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_lt.desktop b/plugin-taskbar/translations/taskbar_lt.desktop new file mode 100644 index 0000000..09b4c1b --- /dev/null +++ b/plugin-taskbar/translations/taskbar_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Persijungimas tarp programų +Name[lt]=Užduočių tvarkytuvė diff --git a/plugin-taskbar/translations/taskbar_lt.ts b/plugin-taskbar/translations/taskbar_lt.ts new file mode 100644 index 0000000..970e65d --- /dev/null +++ b/plugin-taskbar/translations/taskbar_lt.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Programa + + + + To &Desktop + Į &darbalaukį + + + + &All Desktops + &visus darbalaukius + + + + Desktop &%1 + &%1 darbalaukį + + + + &To Current Desktop + &Į dabartinį darbalaukį + + + + Ma&ximize + &Išdidinti + + + + Maximize vertically + Išdidinti vertikaliai + + + + Maximize horizontally + Išdidinti horizontaliai + + + + &Restore + &Atstatyti + + + + Mi&nimize + &Nuleisti + + + + Roll down + Išvynioti + + + + Roll up + Suvynioti + + + + &Layer + S&luoksnis + + + + Always on &top + Visada &viršuje + + + + &Normal + Įpras&tas + + + + Always on &bottom + Visada vi&ršuje + + + + &Close + &Užverti + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt užduočių tvarkutyvės nuostatos + + + Window List Content + Langų sąrašo turinys + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Rodyti tik šio darbalaukio langus + + + + Show windows from all desktops + Rodyti visų darbalaukių langus + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Langų sąrašo išvaizda + + + + Button style + Mygtuko stilius + + + Max button width + Didžiausias leidžiamas plotis + + + + Close on middle-click + + + + + Icon and text + Ženkliukas ir tekstas + + + + Only icon + Tik ženkliukas + + + + Only text + Tik tekstas + + + diff --git a/plugin-taskbar/translations/taskbar_nl.desktop b/plugin-taskbar/translations/taskbar_nl.desktop new file mode 100644 index 0000000..cce1496 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Wissel tussen draaiende applicaties +Name[nl]=taak-manager diff --git a/plugin-taskbar/translations/taskbar_nl.ts b/plugin-taskbar/translations/taskbar_nl.ts new file mode 100644 index 0000000..b04a855 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_nl.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Toepassing + + + + To &Desktop + Naar &bureaublad + + + + &All Desktops + &Alle bureaubladen + + + + Desktop &%1 + Bureaublad &%1 + + + + &To Current Desktop + &Naar huidig bureaublad + + + + Ma&ximize + Ma&ximaliseren + + + + Maximize vertically + Verticaal maximaliseren + + + + Maximize horizontally + Horizontaal maximaliseren + + + + &Restore + &Herstellen + + + + Mi&nimize + Mi&nimaliseren + + + + Roll down + Uitrollen + + + + Roll up + Oprollen + + + + &Layer + &Laag + + + + Always on &top + Altijd bovenop + + + + &Normal + &Normaal + + + + Always on &bottom + Altijd onderop + + + + &Close + &Sluiten + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Instellingen voor taakbeheerder van LxQt + + + Window List Content + Inhoud van vensterlijst + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Toon vensters van huidig bureaublad + + + + Show windows from all desktops + Toon vensters van alle bureaubladen + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Uiterlijk van vensterlijst + + + + Button style + Stijl van knoppen + + + Max button width + Maximale knopbreedte + + + + Close on middle-click + Sluiten bij middelklik + + + + Icon and text + Pictogram en tekst + + + + Only icon + Alleen pictogram + + + + Only text + Alleen tekst + + + diff --git a/plugin-taskbar/translations/taskbar_pl.desktop b/plugin-taskbar/translations/taskbar_pl.desktop new file mode 100644 index 0000000..251074c --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Przełączaj się pomiędzy otwartymi aplikacjami +Name[pl]=Pasek zadań diff --git a/plugin-taskbar/translations/taskbar_pl_PL.desktop b/plugin-taskbar/translations/taskbar_pl_PL.desktop new file mode 100644 index 0000000..ae01ac8 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Przełączaj między uruchomionymi aplikacjami +Name[pl_PL]=Pasek zadań diff --git a/plugin-taskbar/translations/taskbar_pl_PL.ts b/plugin-taskbar/translations/taskbar_pl_PL.ts new file mode 100644 index 0000000..0677000 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pl_PL.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplikacja + + + + To &Desktop + Na &pulpit + + + + &All Desktops + &Wszystkie pulpity + + + + Desktop &%1 + Pulpit &%1 + + + + &To Current Desktop + &Na obecny pulpit + + + + Ma&ximize + Zma&ksymalizuj + + + + Maximize vertically + Zmaksymalizuj pionowo + + + + Maximize horizontally + Zmaksymalizuj poziomo + + + + &Restore + &Odzyskaj + + + + Mi&nimize + Zmi&nimalizuj + + + + Roll down + Zwiń + + + + Roll up + Rozwiń + + + + &Layer + &Warstwa + + + + Always on &top + Zawsze na &wierzchu + + + + &Normal + &Normalnie + + + + Always on &bottom + Zawsze pod &spodem + + + + &Close + &Zamknij + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Ustawienia listy zadań LxQt + + + Window List Content + Zawartość listy zadań + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Pokazuj okna z obecnego pulpitu + + + + Show windows from all desktops + Pokazuj okna ze wszystkich pulpitów + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Wygląd listy zadań + + + + Button style + Styl przycisku + + + Max button width + Maksymalna szerokość + + + + Close on middle-click + Zamknij środkowym klawiszem + + + + Icon and text + Ikona i tekst + + + + Only icon + Tylko ikona + + + + Only text + Tylko tekst + + + diff --git a/plugin-taskbar/translations/taskbar_pt.desktop b/plugin-taskbar/translations/taskbar_pt.desktop new file mode 100644 index 0000000..2c03a41 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Gestor de tarefas +Comment[pt]=Permite trocar entre as aplicações em execução diff --git a/plugin-taskbar/translations/taskbar_pt.ts b/plugin-taskbar/translations/taskbar_pt.ts new file mode 100644 index 0000000..5c8c24e --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pt.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplicação + + + + To &Desktop + Na área &de trabalho + + + + &All Desktops + Tod&as as áreas de trabalho + + + + Desktop &%1 + Área de trabalho &%1 + + + + &To Current Desktop + Na área de &trabalho atual + + + + Ma&ximize + Ma&ximizar + + + + Maximize vertically + Maximizar na vertical + + + + Maximize horizontally + Maximizar na horizontal + + + + &Restore + &Restaurar + + + + Mi&nimize + Mi&nimizar + + + + Roll down + Enrolar para baixo + + + + Roll up + Enrolar para cima + + + + &Layer + Ca&mada + + + + Always on &top + Sempre na &frente + + + + &Normal + &Normal + + + + Always on &bottom + Sempre a&trás + + + + &Close + Fe&char + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Definições do gestor de tarefas LxQt + + + Window List Content + Conteúdo da lista de janelas + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Mostrar janelas da área de trabalho atual + + + + Show windows from all desktops + Mostrar janelas de todas as áreas de trabalho + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Aparência da lista de janelas + + + + Button style + Estilo dos botões + + + Max button width + Largura máxima do botão + + + + Close on middle-click + Fechar com a roda do rato + + + + Icon and text + Ícones e texto + + + + Only icon + Ícones + + + + Only text + Texto + + + diff --git a/plugin-taskbar/translations/taskbar_pt_BR.desktop b/plugin-taskbar/translations/taskbar_pt_BR.desktop new file mode 100644 index 0000000..9ea13e3 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Alterne entre aplicativos em execução +Name[pt_BR]=Gerenciador de tarefas diff --git a/plugin-taskbar/translations/taskbar_pt_BR.ts b/plugin-taskbar/translations/taskbar_pt_BR.ts new file mode 100644 index 0000000..69c7fe1 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_pt_BR.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplicativo + + + + To &Desktop + Para a área &de trabalho + + + + &All Desktops + Todas &as áreas de trabalho + + + + Desktop &%1 + Área de trabalho &%1 + + + + &To Current Desktop + Para a área de &trabalho atual + + + + Ma&ximize + Ma&ximizar + + + + Maximize vertically + Maximizar verticalmente + + + + Maximize horizontally + Maximizar horizontalmente + + + + &Restore + &Restaurar + + + + Mi&nimize + Mi&nimizar + + + + Roll down + Rolar para baixo + + + + Roll up + Rolar para cima + + + + &Layer + &Camada + + + + Always on &top + Sempre em &cima + + + + &Normal + &Normal + + + + Always on &bottom + Sempre em &baixo + + + + &Close + &Fechar + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Configurações do gerenciador de tarefas do LxQt + + + Window List Content + Conteúdo da lista de janelas + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Exibir as janelas da área de trabalho atual + + + + Show windows from all desktops + Exibir as janelas de todas as áreas de trabalho + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Aparência da lista de janelas + + + + Button style + Estilo dos botões + + + Max button width + Largura máxima do botão + + + + Close on middle-click + Fechar em meio clique + + + + Icon and text + Ícone e texto + + + + Only icon + Apenas ícone + + + + Only text + Apenas texto + + + diff --git a/plugin-taskbar/translations/taskbar_ro_RO.desktop b/plugin-taskbar/translations/taskbar_ro_RO.desktop new file mode 100644 index 0000000..005309c --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ro_RO.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Comută între aplcațiile active diff --git a/plugin-taskbar/translations/taskbar_ro_RO.ts b/plugin-taskbar/translations/taskbar_ro_RO.ts new file mode 100644 index 0000000..46ab9af --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ro_RO.ts @@ -0,0 +1,167 @@ + + + + + LxQtTaskButton + + + Application + Aplicație + + + + To &Desktop + Către &desktop + + + + &All Desktops + Toate ecr&anele + + + + Desktop &%1 + Ecranul &%1 + + + + &To Current Desktop + Că&tre ecranul virtual curent + + + + Ma&ximize + Ma&ximizează + + + + Maximize vertically + Maximizează pe verticală + + + + Maximize horizontally + Maximizează pe orizontală + + + + &Restore + &Restaurează + + + + Mi&nimize + Mi&nimizează + + + + Roll down + Derulează în jos + + + + Roll up + Derulează în sus + + + + &Layer + &Strat + + + + Always on &top + Întotdeauna de&asupra + + + + &Normal + &Normal + + + + Always on &bottom + Întotdeauna de&desubt + + + + &Close + În&chide + + + + LxQtTaskbarConfiguration + + Window List Content + Conținut listă ferestre + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Afișează ferestrele de pe ecranul virtual curent + + + + Show windows from all desktops + Afișează ferestrele din toate ecranele virtuale + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Aspect listă ferestre + + + + Button style + Stil butoane + + + Max button width + Lățime maximă butoane + + + + Close on middle-click + Închide prin clic pe butonul din mijloc + + + + Icon and text + Pictograme și text + + + + Only icon + Doar pictograme + + + + Only text + Doar text + + + diff --git a/plugin-taskbar/translations/taskbar_ru.desktop b/plugin-taskbar/translations/taskbar_ru.desktop new file mode 100644 index 0000000..e049334 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Переключиться между запущенными приложениями +Name[ru]=Панель задач \ No newline at end of file diff --git a/plugin-taskbar/translations/taskbar_ru.ts b/plugin-taskbar/translations/taskbar_ru.ts new file mode 100644 index 0000000..b38a3aa --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ru.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + Приложение + + + + To &Desktop + &На рабочий стол + + + + &All Desktops + &Все рабочие столы + + + + Desktop &%1 + Рабочий стол &%1 + + + + &To Current Desktop + На &текущий рабочий стол + + + + Ma&ximize + Р&аспахнуть + + + + Maximize vertically + Распахнуть по вертикали + + + + Maximize horizontally + Распахнуть по горизонтали + + + + &Restore + &Восстановить + + + + Mi&nimize + &Свернуть + + + + Roll down + Развернуть из заголовока + + + + Roll up + Свернуть в заголовок + + + + &Layer + &Положение + + + + Always on &top + Всегда на &верху + + + + &Normal + &Обычное + + + + Always on &bottom + Всегда в&низу + + + + &Close + &Закрыть + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + Настройки панели задач + + + + Taskbar Contents + Содержимое панели задач + + + + Show windows from current desktop + Показывать окна только с текущего стола + + + + Show windows from all desktops + Показывать окна со всех рабочих столов + + + + Taskbar Appearance + Внешний вид панели задач + + + + Button style + Стиль кнопок + + + + Minimum button width + Минимальная ширина кнопки + + + + Auto&rotate buttons when the panel is vertical + Авто&поворот кнопок, когда панель вертикальна + + + + Close on middle-click + Закрыть по щелчку средней кнопки мыши + + + + Icon and text + Значок и текст + + + + Only icon + Только значок + + + + Only text + Только текст + + + diff --git a/plugin-taskbar/translations/taskbar_ru_RU.desktop b/plugin-taskbar/translations/taskbar_ru_RU.desktop new file mode 100644 index 0000000..d58c7bf --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Переключиться между запущенными приложениями +Name[ru_RU]=Панель задач \ No newline at end of file diff --git a/plugin-taskbar/translations/taskbar_ru_RU.ts b/plugin-taskbar/translations/taskbar_ru_RU.ts new file mode 100644 index 0000000..9130364 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_ru_RU.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + Приложение + + + + To &Desktop + &На рабочий стол + + + + &All Desktops + &Все рабочие столы + + + + Desktop &%1 + Рабочий стол &%1 + + + + &To Current Desktop + На &текущий рабочий стол + + + + Ma&ximize + Р&аспахнуть + + + + Maximize vertically + Распахнуть по вертикали + + + + Maximize horizontally + Распахнуть по горизонтали + + + + &Restore + &Восстановить + + + + Mi&nimize + &Свернуть + + + + Roll down + Развернуть из заголовока + + + + Roll up + Свернуть в заголовок + + + + &Layer + &Положение + + + + Always on &top + Всегда на &верху + + + + &Normal + &Обычное + + + + Always on &bottom + Всегда в&низу + + + + &Close + &Закрыть + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + Настройки панели задач + + + + Taskbar Contents + Содержимое панели задач + + + + Show windows from current desktop + Показывать окна только с текущего стола + + + + Show windows from all desktops + Показывать окна со всех рабочих столов + + + + Taskbar Appearance + Внешний вид панели задач + + + + Button style + Стиль кнопок + + + + Minimum button width + Минимальная ширина кнопки + + + + Auto&rotate buttons when the panel is vertical + Авто&поворот кнопок, когда панель вертикальна + + + + Close on middle-click + Закрыть по щелчку средней кнопки мыши + + + + Icon and text + Значок и текст + + + + Only icon + Только значок + + + + Only text + Только текст + + + diff --git a/plugin-taskbar/translations/taskbar_sk.desktop b/plugin-taskbar/translations/taskbar_sk.desktop new file mode 100644 index 0000000..ed38f45 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Prepínanie medzi bežiacimi aplikáciami +Name[sk]=Správca úloh diff --git a/plugin-taskbar/translations/taskbar_sk_SK.ts b/plugin-taskbar/translations/taskbar_sk_SK.ts new file mode 100644 index 0000000..34187fe --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sk_SK.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Aplikácia + + + + To &Desktop + Na &plochu + + + + &All Desktops + &Všetky plochy + + + + Desktop &%1 + Plocha &%1 + + + + &To Current Desktop + &Na aktuálnu plochu + + + + Ma&ximize + Ma&ximalizovať + + + + Maximize vertically + Maximalizovať zvisle + + + + Maximize horizontally + Maximalizovať vodorovne + + + + &Restore + &Obnoviť + + + + Mi&nimize + Mi&nimalizovať + + + + Roll down + Zrolovať nahor + + + + Roll up + Zrolovať dolu + + + + &Layer + &Vrstva + + + + Always on &top + Vždy &navrchu + + + + &Normal + &Normálne + + + + Always on &bottom + Vždy na&spodku + + + + &Close + &Zatvoriť + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Nastavenia správcu úloh prostredia LxQt + + + Window List Content + Obsah zoznamu okien + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Zobraziť okná z aktuálnej plochy + + + + Show windows from all desktops + Zobraziť okná z každej plochy + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Vzhľad zoznamu okien + + + + Button style + Štýl tlačidiel + + + Max button width + Maximálna šírka tlačidla + + + + Close on middle-click + + + + + Icon and text + Ikona a text + + + + Only icon + Iba ikona + + + + Only text + Iba text + + + diff --git a/plugin-taskbar/translations/taskbar_sl.desktop b/plugin-taskbar/translations/taskbar_sl.desktop new file mode 100644 index 0000000..808db85 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Preklapljajte med zagnanimi programi +Name[sl]=Upravljalnik opravil diff --git a/plugin-taskbar/translations/taskbar_sl.ts b/plugin-taskbar/translations/taskbar_sl.ts new file mode 100644 index 0000000..e90975f --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sl.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Program + + + + To &Desktop + &Na namizje + + + + &All Desktops + &Vsa namizja + + + + Desktop &%1 + Namizje &%1 + + + + &To Current Desktop + Na &trenutno namizje + + + + Ma&ximize + &Razpni + + + + Maximize vertically + Razpni navpično + + + + Maximize horizontally + Razpni vodoravno + + + + &Restore + &Obnovi + + + + Mi&nimize + Po&manjšaj + + + + Roll down + Razvij + + + + Roll up + Zvij + + + + &Layer + &Plast + + + + Always on &top + Vedno na &vrhu + + + + &Normal + &Običajno + + + + Always on &bottom + Vedno na &dnu + + + + &Close + &Zapri + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Nastavitve upravitelja opravil za LxQt + + + Window List Content + Vsebina seznama oken + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Pokaži okna s trenutnega namizja + + + + Show windows from all desktops + Pokaži okna z vseh namizij + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Videz seznama oken + + + + Button style + Slog z gumbi + + + Max button width + Največja širina gumbov + + + + Close on middle-click + + + + + Icon and text + Ikona in besedilo + + + + Only icon + Samo ikona + + + + Only text + Samo besedilo + + + diff --git a/plugin-taskbar/translations/taskbar_sr.desktop b/plugin-taskbar/translations/taskbar_sr.desktop new file mode 100644 index 0000000..947c212 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Пребацујте између програма у раду +Name[sr]=Менаџер задатака diff --git a/plugin-taskbar/translations/taskbar_sr@ijekavian.desktop b/plugin-taskbar/translations/taskbar_sr@ijekavian.desktop new file mode 100644 index 0000000..f350dc6 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Менаџер задатака +Comment[sr@ijekavian]=Пребацујте између програма у раду diff --git a/plugin-taskbar/translations/taskbar_sr@ijekavianlatin.desktop b/plugin-taskbar/translations/taskbar_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..0f165ed --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Menadžer zadataka +Comment[sr@ijekavianlatin]=Prebacujte između programa u radu diff --git a/plugin-taskbar/translations/taskbar_sr@latin.desktop b/plugin-taskbar/translations/taskbar_sr@latin.desktop new file mode 100644 index 0000000..a392965 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Prebacujte između programa u radu +Name[sr@latin]=Menadžer zadataka diff --git a/plugin-taskbar/translations/taskbar_sr@latin.ts b/plugin-taskbar/translations/taskbar_sr@latin.ts new file mode 100644 index 0000000..0ce8342 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr@latin.ts @@ -0,0 +1,155 @@ + + + + + LxQtTaskButton + + + Application + + + + + To &Desktop + + + + + &All Desktops + + + + + Desktop &%1 + + + + + &To Current Desktop + + + + + Ma&ximize + + + + + Maximize vertically + + + + + Maximize horizontally + + + + + &Restore + + + + + Mi&nimize + + + + + Roll down + + + + + Roll up + + + + + &Layer + + + + + Always on &top + + + + + &Normal + + + + + Always on &bottom + + + + + &Close + + + + + LxQtTaskbarConfiguration + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + + Show windows from all desktops + + + + + Button style + + + + + Icon and text + + + + + Only icon + + + + + Only text + + + + diff --git a/plugin-taskbar/translations/taskbar_sr_BA.ts b/plugin-taskbar/translations/taskbar_sr_BA.ts new file mode 100644 index 0000000..c10a40f --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr_BA.ts @@ -0,0 +1,175 @@ + + + + + LxQtTaskButton + + + Application + Програм + + + + To &Desktop + На &површ + + + + &All Desktops + &све површи + + + + Desktop &%1 + површ &%1 + + + + &To Current Desktop + &На тренутну површ + + + + Ma&ximize + Ма&ксимизуј + + + + Maximize vertically + Максимизуј вертикално + + + + Maximize horizontally + Максимизуј хоризонтално + + + + &Restore + &Обнови + + + + Mi&nimize + &Минимизуј + + + + Roll down + Одмотај + + + + Roll up + Намотај + + + + &Layer + &Слој + + + + Always on &top + увијек &изнад + + + + &Normal + &нормално + + + + Always on &bottom + увијек испо&д + + + + &Close + &Затвори + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Подешавања менаџера задатака + + + Window List Content + Садржај листе прозора + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Прикажи прозоре са тренутне површи + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + + Close on middle-click + + + + wlcB + wlcB + + + + Show windows from all desktops + Прикажи прозоре са свих површи + + + Window List Appearance + Изглед листе прозора + + + + Button style + Стил тастера + + + Max button width + Макс. ширина тастера + + + + Icon and text + икона и текст + + + + Only icon + само икона + + + + Only text + само текст + + + diff --git a/plugin-taskbar/translations/taskbar_sr_RS.ts b/plugin-taskbar/translations/taskbar_sr_RS.ts new file mode 100644 index 0000000..fdb6660 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_sr_RS.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Програм + + + + To &Desktop + На &површ + + + + &All Desktops + &све површи + + + + Desktop &%1 + површ &%1 + + + + &To Current Desktop + &На тренутну површ + + + + Ma&ximize + Ма&ксимизуј + + + + Maximize vertically + Максимизуј вертикално + + + + Maximize horizontally + Максимизуј хоризонтално + + + + &Restore + &Обнови + + + + Mi&nimize + &Минимизуј + + + + Roll down + Одмотај + + + + Roll up + Намотај + + + + &Layer + &Слој + + + + Always on &top + увек &изнад + + + + &Normal + &нормално + + + + Always on &bottom + увек испо&д + + + + &Close + &Затвори + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Подешавања менаџера задатака + + + Window List Content + Садржај листе прозора + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Прикажи прозоре са тренутне површи + + + + Show windows from all desktops + Прикажи прозоре са свих површи + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Изглед листе прозора + + + + Button style + Стил тастера + + + Max button width + Макс. ширина тастера + + + + Close on middle-click + + + + + Icon and text + икона и текст + + + + Only icon + само икона + + + + Only text + само текст + + + diff --git a/plugin-taskbar/translations/taskbar_th_TH.desktop b/plugin-taskbar/translations/taskbar_th_TH.desktop new file mode 100644 index 0000000..0acbbb5 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=สลับใช้งานระหว่างโปรแกรมที่เปิดอยู่ +Name[th_TH]=ตัวจัดการงาน diff --git a/plugin-taskbar/translations/taskbar_th_TH.ts b/plugin-taskbar/translations/taskbar_th_TH.ts new file mode 100644 index 0000000..33f2d3b --- /dev/null +++ b/plugin-taskbar/translations/taskbar_th_TH.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + โปรแกรม + + + + To &Desktop + ไปยัง &พ&ื&้นโต๊ะ + + + + &All Desktops + &ท&ุกพื้นโต๊ะ + + + + Desktop &%1 + พื้นโต๊ะ &%1 + + + + &To Current Desktop + &ไปยังพื้นโต๊ะปัจจุบัน + + + + Ma&ximize + &ขยายแผ่ + + + + Maximize vertically + ขยายแผ่ทางแนวตั้ง + + + + Maximize horizontally + ขยายแผ่ทางแนวนอน + + + + &Restore + &ค&ืนสภาพ + + + + Mi&nimize + &ย&่อเก็บ + + + + Roll down + ม้วนลง + + + + Roll up + ม้วนขึ้น + + + + &Layer + &ลำดับชั้น + + + + Always on &top + ด้าน&หน้าเสมอ + + + + &Normal + &ปกติ + + + + Always on &bottom + ด้านหลัง&งเสมอ + + + + &Close + ปิ&ด + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + ค่าตั้งตัวจัดการงาน LxQt + + + Window List Content + การแสดงรายการหน้าต่าง + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + แสดงหน้าต่างเฉพาะพื้นโต๊ะปัจจุบัน + + + + Show windows from all desktops + แสดงหน้าต่างจากทุกพื้นโต๊ะ + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + ลักษณะรายการหน้าต่าง + + + + Button style + รูปแบบปุ่ม + + + Max button width + ความกว้างปุ่มขนาดสูงสุด + + + + Close on middle-click + ปิดด้วยการคลิกปุ่มกลาง + + + + Icon and text + ไอคอนและข้อความ + + + + Only icon + ไอคอนเท่านั้น + + + + Only text + ข้อความเท่านั้น + + + diff --git a/plugin-taskbar/translations/taskbar_tr.desktop b/plugin-taskbar/translations/taskbar_tr.desktop new file mode 100644 index 0000000..fdbbc97 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Çalışan uygulamalar arasında geçiş yapın +Name[tr]=Görev Yöneticisi diff --git a/plugin-taskbar/translations/taskbar_tr.ts b/plugin-taskbar/translations/taskbar_tr.ts new file mode 100644 index 0000000..f830e48 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_tr.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Uygulama + + + + To &Desktop + &Masaüstüne + + + + &All Desktops + &Tüm Masaüstlerine + + + + Desktop &%1 + Masaüstü &%1 + + + + &To Current Desktop + &Şimdiki Masaüstüne + + + + Ma&ximize + Bü&yüt + + + + Maximize vertically + Dikey büyüt + + + + Maximize horizontally + Yatay büyüt + + + + &Restore + &Geri getir + + + + Mi&nimize + Kü&çült + + + + Roll down + Aşağı indir + + + + Roll up + Yukarı çıkar + + + + &Layer + &Katman + + + + Always on &top + Her zaman &üstte + + + + &Normal + &Normal + + + + Always on &bottom + Her zaman &altta + + + + &Close + &Kapat + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt Görev Yöneticisi Ayarları + + + Window List Content + Pencere Listesi İçeriği + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Şimdiki masaüstündeki pencereleri göster + + + + Show windows from all desktops + Tüm masaüstlerindeki pencereleri göster + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Pencere Listesi Görünümü + + + + Button style + Düğme biçimi + + + Max button width + En fazla düğme genişliği + + + + Close on middle-click + Orta tıklama ile kapat + + + + Icon and text + Simge ve metin + + + + Only icon + Sadece simge + + + + Only text + Sadece metin + + + diff --git a/plugin-taskbar/translations/taskbar_uk.desktop b/plugin-taskbar/translations/taskbar_uk.desktop new file mode 100644 index 0000000..1219f40 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Перемкнутися між запущеними вікнами +Name[uk]=Менеджер завдань diff --git a/plugin-taskbar/translations/taskbar_uk.ts b/plugin-taskbar/translations/taskbar_uk.ts new file mode 100644 index 0000000..62dc0cc --- /dev/null +++ b/plugin-taskbar/translations/taskbar_uk.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + Програма + + + + To &Desktop + На &стільницю + + + + &All Desktops + На &всі стільниці + + + + Desktop &%1 + Стільниця &%1 + + + + &To Current Desktop + На &поточну стільницю + + + + Ma&ximize + Ма&ксимізувати + + + + Maximize vertically + Максимізувати вертикально + + + + Maximize horizontally + Максимізувати горизонтально + + + + &Restore + &Розгорнути + + + + Mi&nimize + &Згорнути + + + + Roll down + Посунути вниз + + + + Roll up + Посунути вгору + + + + &Layer + &Шар + + + + Always on &top + Завжди з&гори + + + + &Normal + &Типово + + + + Always on &bottom + Завжди з&низу + + + + &Close + З&акрити + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + Налаштування списку вікон + + + Window List Content + Вміст списку вікон + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + Показувати вікна поточної стільниці + + + + Show windows from all desktops + Показувати вікна всіх стільниць + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + Вигляд списку вікон + + + + Button style + Стиль кнопок + + + Max button width + Макс. довжина кнопки + + + + Close on middle-click + Закривати по середній кнопці миші + + + + Icon and text + Значок та текст + + + + Only icon + Лише значок + + + + Only text + Лише текст + + + diff --git a/plugin-taskbar/translations/taskbar_zh_CN.GB2312.desktop b/plugin-taskbar/translations/taskbar_zh_CN.GB2312.desktop new file mode 100644 index 0000000..796c9bb --- /dev/null +++ b/plugin-taskbar/translations/taskbar_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task Manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-taskbar/translations/taskbar_zh_CN.desktop b/plugin-taskbar/translations/taskbar_zh_CN.desktop new file mode 100644 index 0000000..0afacc1 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=在运行的程序间切换 +Name[zh_CN]=任务管理器 diff --git a/plugin-taskbar/translations/taskbar_zh_CN.ts b/plugin-taskbar/translations/taskbar_zh_CN.ts new file mode 100644 index 0000000..4711892 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_zh_CN.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + 应用程序 + + + + To &Desktop + 到&桌面 + + + + &All Desktops + &全部桌面 + + + + Desktop &%1 + 桌面 &%1 + + + + &To Current Desktop + &到当前桌面 + + + + Ma&ximize + 最&大化 + + + + Maximize vertically + 垂直最大化 + + + + Maximize horizontally + 水平最大化 + + + + &Restore + &恢复 + + + + Mi&nimize + 最&小化 + + + + Roll down + 卷下 + + + + Roll up + 卷上 + + + + &Layer + &层 + + + + Always on &top + 总在&顶层 + + + + &Normal + &正常 + + + + Always on &bottom + 总在&底层 + + + + &Close + &关闭 + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt任务管理器设置 + + + Window List Content + 窗口列表内容 + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + 显示当前桌面的窗口 + + + + Show windows from all desktops + 显示所有桌面的窗口 + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + 窗口列表外观 + + + + Button style + 按钮样式 + + + Max button width + 最大按钮宽度 + + + + Close on middle-click + 鼠标中击时关闭 + + + + Icon and text + 图标和文字 + + + + Only icon + 仅图标 + + + + Only text + 仅文字 + + + diff --git a/plugin-taskbar/translations/taskbar_zh_TW.desktop b/plugin-taskbar/translations/taskbar_zh_TW.desktop new file mode 100644 index 0000000..dc5d003 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Task manager +Comment=Switch between running applications + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=在正在運行程式中切換 +Name[zh_TW]=工作管理員 diff --git a/plugin-taskbar/translations/taskbar_zh_TW.ts b/plugin-taskbar/translations/taskbar_zh_TW.ts new file mode 100644 index 0000000..fac5b24 --- /dev/null +++ b/plugin-taskbar/translations/taskbar_zh_TW.ts @@ -0,0 +1,171 @@ + + + + + LxQtTaskButton + + + Application + 應用程式 + + + + To &Desktop + 傳送到桌面(&D) + + + + &All Desktops + 傳送到全部桌面(&A) + + + + Desktop &%1 + 桌面 &%1 + + + + &To Current Desktop + 傳送到當前桌面(&T) + + + + Ma&ximize + 最大化(&x) + + + + Maximize vertically + 垂直最大化 + + + + Maximize horizontally + 水平最大化 + + + + &Restore + 恢復(&R) + + + + Mi&nimize + 最小化(&n) + + + + Roll down + 放下視窗 + + + + Roll up + 捲起視窗 + + + + &Layer + 層(&L) + + + + Always on &top + 總是在最上層(&t) + + + + &Normal + 正常(&N) + + + + Always on &bottom + 總是在最底層(&b) + + + + &Close + 關閉(&C) + + + + LxQtTaskbarConfiguration + + LxQt Task Manager Settings + LxQt工作管理員設定 + + + Window List Content + 視窗清單內容 + + + + Task Manager Settings + + + + + Taskbar Contents + + + + + Show windows from current desktop + 顯示當前桌面視窗 + + + + Show windows from all desktops + 顯示所有桌面視窗 + + + + Taskbar Appearance + + + + + Minimum button width + + + + + Auto&rotate buttons when the panel is vertical + + + + Window List Appearance + 視窗清單外觀 + + + + Button style + 按鈕樣式 + + + Max button width + 最大按鈕寬度 + + + + Close on middle-click + 按滑鼠中鍵關閉 + + + + Icon and text + 圖示與文字 + + + + Only icon + 僅圖示 + + + + Only text + 僅文字 + + + diff --git a/plugin-tray/CMakeLists.txt b/plugin-tray/CMakeLists.txt new file mode 100644 index 0000000..d5238f8 --- /dev/null +++ b/plugin-tray/CMakeLists.txt @@ -0,0 +1,41 @@ +set(PLUGIN "tray") + +include(FindPkgConfig) +include(CheckLibraryExists) + +find_package(X11 REQUIRED) +pkg_check_modules(XCOMPOSITE REQUIRED xcomposite) +pkg_check_modules(XDAMAGE REQUIRED xdamage) +pkg_check_modules(XRENDER REQUIRED xrender) + +set(HEADERS + lxqttrayplugin.h + lxqttray.h + trayicon.h + xfitman.h +) + +set(SOURCES + lxqttrayplugin.cpp + lxqttray.cpp + trayicon.cpp + xfitman.cpp +) + +set(MOCS + lxqttrayplugin.h + lxqttray.h + trayicon.h + xfitman.h +) + +set(LIBRARIES + ${X11_LIBRARIES} + ${XCOMPOSITE_LIBRARIES} + ${XDAMAGE_LIBRARIES} + ${XRENDER_LIBRARIES} + ${XCB_LIBRARIES} + ${XCB_DAMAGE_LIBRARIES} +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-tray/lxqttray.cpp b/plugin-tray/lxqttray.cpp new file mode 100644 index 0000000..efa8d05 --- /dev/null +++ b/plugin-tray/lxqttray.cpp @@ -0,0 +1,391 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +/******************************************************************** + Inspired by freedesktops tint2 ;) + +*********************************************************************/ + +#include +#include +#include +#include +#include "trayicon.h" +#include "../panel/ilxqtpanel.h" +#include +#include "lxqttray.h" +#include "xfitman.h" + +#include +#include +#include +#include +#include +#include +#include + +#undef Bool // defined as int in X11/Xlib.h + +#include "../panel/ilxqtpanelplugin.h" + +#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0 +#define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1 + +#define SYSTEM_TRAY_REQUEST_DOCK 0 +#define SYSTEM_TRAY_BEGIN_MESSAGE 1 +#define SYSTEM_TRAY_CANCEL_MESSAGE 2 + +#define XEMBED_EMBEDDED_NOTIFY 0 +#define XEMBED_MAPPED (1 << 0) + + +/************************************************ + + ************************************************/ +LxQtTray::LxQtTray(ILxQtPanelPlugin *plugin, QWidget *parent): + QFrame(parent), + mValid(false), + mTrayId(0), + mDamageEvent(0), + mDamageError(0), + mIconSize(TRAY_ICON_SIZE_DEFAULT, TRAY_ICON_SIZE_DEFAULT), + mPlugin(plugin), + mDisplay(QX11Info::display()) +{ + mLayout = new LxQt::GridLayout(this); + realign(); + _NET_SYSTEM_TRAY_OPCODE = XfitMan::atom("_NET_SYSTEM_TRAY_OPCODE"); + // Init the selection later just to ensure that no signals are sent until + // after construction is done and the creating object has a chance to connect. + QTimer::singleShot(0, this, SLOT(startTray())); +} + + +/************************************************ + + ************************************************/ +LxQtTray::~LxQtTray() +{ + stopTray(); +} + + +/************************************************ + + ************************************************/ +bool LxQtTray::nativeEventFilter(const QByteArray &eventType, void *message, long *) +{ + if (eventType != "xcb_generic_event_t") + return false; + + xcb_generic_event_t* event = static_cast(message); + + TrayIcon* icon; + int event_type = event->response_type & ~0x80; + + switch (event_type) + { + case ClientMessage: + clientMessageEvent(event); + break; + +// case ConfigureNotify: +// icon = findIcon(event->xconfigure.window); +// if (icon) +// icon->configureEvent(&(event->xconfigure)); +// break; + + case DestroyNotify: { + unsigned long event_window; + event_window = reinterpret_cast(event)->window; + icon = findIcon(event_window); + if (icon) + { + mIcons.removeAll(icon); + delete icon; + } + break; + } + default: + if (event_type == mDamageEvent + XDamageNotify) + { + xcb_damage_notify_event_t* dmg = reinterpret_cast(event); + icon = findIcon(dmg->drawable); + if (icon) + icon->update(); + } + break; + } + + return false; +} + + +/************************************************ + + ************************************************/ +void LxQtTray::realign() +{ + mLayout->setEnabled(false); + ILxQtPanel *panel = mPlugin->panel(); + + if (panel->isHorizontal()) + { + mLayout->setRowCount(panel->lineCount()); + mLayout->setColumnCount(0); + } + else + { + mLayout->setColumnCount(panel->lineCount()); + mLayout->setRowCount(0); + } + mLayout->setEnabled(true); +} + + +/************************************************ + + ************************************************/ +void LxQtTray::clientMessageEvent(xcb_generic_event_t *e) +{ + unsigned long opcode; + unsigned long message_type; + Window id; + xcb_client_message_event_t* event = reinterpret_cast(e); + uint32_t* data32 = event->data.data32; + message_type = event->type; + opcode = data32[1]; + if(message_type != _NET_SYSTEM_TRAY_OPCODE) + return; + + switch (opcode) + { + case SYSTEM_TRAY_REQUEST_DOCK: + id = data32[2]; + if (id) + addIcon(id); + break; + + + case SYSTEM_TRAY_BEGIN_MESSAGE: + case SYSTEM_TRAY_CANCEL_MESSAGE: + qDebug() << "we don't show balloon messages."; + break; + + + default: +// if (opcode == xfitMan().atom("_NET_SYSTEM_TRAY_MESSAGE_DATA")) +// qDebug() << "message from dockapp:" << e->data.b; +// else +// qDebug() << "SYSTEM_TRAY : unknown message type" << opcode; + break; + } +} + +/************************************************ + + ************************************************/ +TrayIcon* LxQtTray::findIcon(Window id) +{ + foreach(TrayIcon* icon, mIcons) + { + if (icon->iconId() == id || icon->windowId() == id) + return icon; + } + return 0; +} + + +/************************************************ + +************************************************/ +void LxQtTray::setIconSize(QSize iconSize) +{ + unsigned long size = qMin(mIconSize.width(), mIconSize.height()); + XChangeProperty(mDisplay, + mTrayId, + XfitMan::atom("_NET_SYSTEM_TRAY_ICON_SIZE"), + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char*)&size, + 1); + + mIconSize = iconSize; + foreach(TrayIcon* icon, mIcons) + icon->setIconSize(mIconSize); +} + + +/************************************************ + +************************************************/ +VisualID LxQtTray::getVisual() +{ + VisualID visualId = 0; + Display* dsp = mDisplay; + + XVisualInfo templ; + templ.screen=QX11Info::appScreen(); + templ.depth=32; + templ.c_class=TrueColor; + + int nvi; + XVisualInfo* xvi = XGetVisualInfo(dsp, VisualScreenMask|VisualDepthMask|VisualClassMask, &templ, &nvi); + + if (xvi) + { + int i; + XRenderPictFormat* format; + for (i = 0; i < nvi; i++) + { + format = XRenderFindVisualFormat(dsp, xvi[i].visual); + if (format && + format->type == PictTypeDirect && + format->direct.alphaMask) + { + visualId = xvi[i].visualid; + break; + } + } + XFree(xvi); + } + + return visualId; +} + + +/************************************************ + freedesktop systray specification + ************************************************/ +void LxQtTray::startTray() +{ + Display* dsp = mDisplay; + Window root = QX11Info::appRootWindow(); + + QString s = QString("_NET_SYSTEM_TRAY_S%1").arg(DefaultScreen(dsp)); + Atom _NET_SYSTEM_TRAY_S = XfitMan::atom(s.toLatin1()); + + if (XGetSelectionOwner(dsp, _NET_SYSTEM_TRAY_S) != None) + { + qWarning() << "Another systray is running"; + mValid = false; + return; + } + + // init systray protocol + mTrayId = XCreateSimpleWindow(dsp, root, -1, -1, 1, 1, 0, 0, 0); + + XSetSelectionOwner(dsp, _NET_SYSTEM_TRAY_S, mTrayId, CurrentTime); + if (XGetSelectionOwner(dsp, _NET_SYSTEM_TRAY_S) != mTrayId) + { + qWarning() << "Can't get systray manager"; + stopTray(); + mValid = false; + return; + } + + int orientation = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; + XChangeProperty(dsp, + mTrayId, + XfitMan::atom("_NET_SYSTEM_TRAY_ORIENTATION"), + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char *) &orientation, + 1); + + // ** Visual ******************************** + VisualID visualId = getVisual(); + if (visualId) + { + XChangeProperty(mDisplay, + mTrayId, + XfitMan::atom("_NET_SYSTEM_TRAY_VISUAL"), + XA_VISUALID, + 32, + PropModeReplace, + (unsigned char*)&visualId, + 1); + } + // ****************************************** + + setIconSize(mIconSize); + + XClientMessageEvent ev; + ev.type = ClientMessage; + ev.window = root; + ev.message_type = XfitMan::atom("MANAGER"); + ev.format = 32; + ev.data.l[0] = CurrentTime; + ev.data.l[1] = _NET_SYSTEM_TRAY_S; + ev.data.l[2] = mTrayId; + ev.data.l[3] = 0; + ev.data.l[4] = 0; + XSendEvent(dsp, root, False, StructureNotifyMask, (XEvent*)&ev); + + XDamageQueryExtension(mDisplay, &mDamageEvent, &mDamageError); + + qDebug() << "Systray started"; + mValid = true; + + qApp->installNativeEventFilter(this); +} + + +/************************************************ + + ************************************************/ +void LxQtTray::stopTray() +{ + qDeleteAll(mIcons); + if (mTrayId) + { + XDestroyWindow(mDisplay, mTrayId); + mTrayId = 0; + } + mValid = false; +} + + +/************************************************ + + ************************************************/ +void LxQtTray::addIcon(Window winId) +{ + TrayIcon* icon = new TrayIcon(winId, this); + if (!icon->isValid()) + { + delete icon; + return; + } + + icon->setIconSize(mIconSize); + mIcons.append(icon); + mLayout->addWidget(icon); +} + diff --git a/plugin-tray/lxqttray.h b/plugin-tray/lxqttray.h new file mode 100644 index 0000000..53354cc --- /dev/null +++ b/plugin-tray/lxqttray.h @@ -0,0 +1,101 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTTRAY_H +#define LXQTTRAY_H + +#include +#include +#include "../panel/ilxqtpanel.h" +#include +#include +#include + +class TrayIcon; +class QSize; + +namespace LxQt { +class GridLayout; +} + +/** + * @brief This makes our trayplugin + */ +class ILxQtPanelPlugin; + +class LxQtTray: public QFrame, QAbstractNativeEventFilter +{ + Q_OBJECT + Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize) +public: + LxQtTray(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~LxQtTray(); + + + QSize iconSize() const { return mIconSize; } + void setIconSize(QSize iconSize); + + bool nativeEventFilter(const QByteArray &eventType, void *message, long *); + + void realign(); + +signals: + void iconSizeChanged(int iconSize); + +private slots: + void startTray(); + void stopTray(); + +private: + VisualID getVisual(); + + void clientMessageEvent(xcb_generic_event_t *e); + + int clientMessage(WId _wid, Atom _msg, + long unsigned int data0, + long unsigned int data1 = 0, + long unsigned int data2 = 0, + long unsigned int data3 = 0, + long unsigned int data4 = 0) const; + + void addIcon(Window id); + TrayIcon* findIcon(Window trayId); + + bool mValid; + Window mTrayId; + QList mIcons; + int mDamageEvent; + int mDamageError; + QSize mIconSize; + LxQt::GridLayout *mLayout; + ILxQtPanelPlugin *mPlugin; + Atom _NET_SYSTEM_TRAY_OPCODE; + Display* mDisplay; +}; + + +#endif diff --git a/plugin-tray/lxqttrayplugin.cpp b/plugin-tray/lxqttrayplugin.cpp new file mode 100644 index 0000000..f7c8a09 --- /dev/null +++ b/plugin-tray/lxqttrayplugin.cpp @@ -0,0 +1,54 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqttrayplugin.h" +#include "lxqttray.h" + +LxQtTrayPlugin::LxQtTrayPlugin(const ILxQtPanelPluginStartupInfo &startupInfo) : + QObject(), + ILxQtPanelPlugin(startupInfo), + mWidget(new LxQtTray(this)) +{ +} + +LxQtTrayPlugin::~LxQtTrayPlugin() +{ + delete mWidget; +} + +QWidget *LxQtTrayPlugin::widget() +{ + return mWidget; +} + +void LxQtTrayPlugin::realign() +{ + mWidget->realign(); +} + + diff --git a/plugin-tray/lxqttrayplugin.h b/plugin-tray/lxqttrayplugin.h new file mode 100644 index 0000000..49d9068 --- /dev/null +++ b/plugin-tray/lxqttrayplugin.h @@ -0,0 +1,67 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQTTRAYPLUGIN_H +#define LXQTTRAYPLUGIN_H + +#include "../panel/ilxqtpanelplugin.h" +#include + +class LxQtTray; +class LxQtTrayPlugin : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + explicit LxQtTrayPlugin(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtTrayPlugin(); + + virtual QWidget *widget(); + virtual QString themeId() const { return "Tray"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment; } + void realign(); + + bool isSeparate() const { return true; } + +private: + LxQtTray *mWidget; + +}; + +class LxQtTrayPluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtTrayPlugin(startupInfo); + } +}; + +#endif // LXQTTRAYPLUGIN_H diff --git a/plugin-tray/resources/tray.desktop.in b/plugin-tray/resources/tray.desktop.in new file mode 100644 index 0000000..110e874 --- /dev/null +++ b/plugin-tray/resources/tray.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-tray/translations/tray.ts b/plugin-tray/translations/tray.ts new file mode 100644 index 0000000..6401616 --- /dev/null +++ b/plugin-tray/translations/tray.ts @@ -0,0 +1,4 @@ + + + + diff --git a/plugin-tray/translations/tray_ar.desktop b/plugin-tray/translations/tray_ar.desktop new file mode 100644 index 0000000..544a1e8 --- /dev/null +++ b/plugin-tray/translations/tray_ar.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ar]=الوصول إلى التطبيقات المخفيَّة المصغَّرة في دفَّة النّظام +Name[ar]=دفَّة النِّظام diff --git a/plugin-tray/translations/tray_cs.desktop b/plugin-tray/translations/tray_cs.desktop new file mode 100644 index 0000000..a09379a --- /dev/null +++ b/plugin-tray/translations/tray_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Přístup ke skrytým programům zmenšeným v oznamovací oblasti panelu +Name[cs]=Oznamovací oblast panelu diff --git a/plugin-tray/translations/tray_cs_CZ.desktop b/plugin-tray/translations/tray_cs_CZ.desktop new file mode 100644 index 0000000..5a00e70 --- /dev/null +++ b/plugin-tray/translations/tray_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Přistoupit k programům zmenšeným v oznamovací oblasti panelu +Name[cs_CZ]=Oznamovací oblast diff --git a/plugin-tray/translations/tray_da.desktop b/plugin-tray/translations/tray_da.desktop new file mode 100644 index 0000000..cfeb5c0 --- /dev/null +++ b/plugin-tray/translations/tray_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Adgang til skjulte programmer der er minimeret til systembakken +Name[da]=Systembakke diff --git a/plugin-tray/translations/tray_da_DK.desktop b/plugin-tray/translations/tray_da_DK.desktop new file mode 100644 index 0000000..2bca7ae --- /dev/null +++ b/plugin-tray/translations/tray_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Giver adgang til skjulte programmer, minimeret til systembakken +Name[da_DK]=Systembakke diff --git a/plugin-tray/translations/tray_de.desktop b/plugin-tray/translations/tray_de.desktop new file mode 100644 index 0000000..a4f2628 --- /dev/null +++ b/plugin-tray/translations/tray_de.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de]=Zugang zu minimierten Anwendungen in der Fensterleiste +Name[de]=Fensterleiste diff --git a/plugin-tray/translations/tray_de_DE.desktop b/plugin-tray/translations/tray_de_DE.desktop new file mode 100644 index 0000000..fff3edc --- /dev/null +++ b/plugin-tray/translations/tray_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Auf versteckte, minimierte Anwendungen im System Tray zugreifen +Name[de_DE]=System Tray diff --git a/plugin-tray/translations/tray_el_GR.desktop b/plugin-tray/translations/tray_el_GR.desktop new file mode 100644 index 0000000..c327815 --- /dev/null +++ b/plugin-tray/translations/tray_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Πρόσβαση στις κρυφές εφαρμογές που ελαχιστοποιήθηκαν στο πλαίσιο συστήματος +Name[el_GR]=Πλαίσιο συστήματος diff --git a/plugin-tray/translations/tray_eo.desktop b/plugin-tray/translations/tray_eo.desktop new file mode 100644 index 0000000..536d196 --- /dev/null +++ b/plugin-tray/translations/tray_eo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eo]=Akiri kaŝitajn aplikaĵojn malmaksimigitajn en la sistempleto +Name[eo]=Sistempleto diff --git a/plugin-tray/translations/tray_es.desktop b/plugin-tray/translations/tray_es.desktop new file mode 100644 index 0000000..a0dee4d --- /dev/null +++ b/plugin-tray/translations/tray_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Accede a aplicaciones ocultas minimizadas en la bandeja del sistema +Name[es]=Bandeja del sistema diff --git a/plugin-tray/translations/tray_es_VE.desktop b/plugin-tray/translations/tray_es_VE.desktop new file mode 100644 index 0000000..7717aa0 --- /dev/null +++ b/plugin-tray/translations/tray_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Acceder aplicaciones minimizadas en la barra de iconos de sistema +Name[es_VE]=Barra de sistema diff --git a/plugin-tray/translations/tray_eu.desktop b/plugin-tray/translations/tray_eu.desktop new file mode 100644 index 0000000..cdb1700 --- /dev/null +++ b/plugin-tray/translations/tray_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Bistaratu aplikazioak minimizatuta ataza-barran. +Name[eu]=Ataza-barra diff --git a/plugin-tray/translations/tray_fi.desktop b/plugin-tray/translations/tray_fi.desktop new file mode 100644 index 0000000..d829580 --- /dev/null +++ b/plugin-tray/translations/tray_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Käytä ilmoitusalueelle pienennettyjä sovelluksia +Name[fi]=Ilmoitusalue diff --git a/plugin-tray/translations/tray_fr_FR.desktop b/plugin-tray/translations/tray_fr_FR.desktop new file mode 100644 index 0000000..3befb02 --- /dev/null +++ b/plugin-tray/translations/tray_fr_FR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fr_FR]=Accéder aux applications cachées minimisées dans la zone de notification +Name[fr_FR]=Zone de notification diff --git a/plugin-tray/translations/tray_hu.desktop b/plugin-tray/translations/tray_hu.desktop new file mode 100644 index 0000000..8f180da --- /dev/null +++ b/plugin-tray/translations/tray_hu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[hu]=A paneltálcára minimalizált, rejtett alkalmazások elérése +Name[hu]=Paneltálca diff --git a/plugin-tray/translations/tray_ia.desktop b/plugin-tray/translations/tray_ia.desktop new file mode 100644 index 0000000..4863c5c --- /dev/null +++ b/plugin-tray/translations/tray_ia.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Access hidden applications minimized in the system tray + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-tray/translations/tray_id_ID.desktop b/plugin-tray/translations/tray_id_ID.desktop new file mode 100644 index 0000000..4863c5c --- /dev/null +++ b/plugin-tray/translations/tray_id_ID.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Access hidden applications minimized in the system tray + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-tray/translations/tray_it_IT.desktop b/plugin-tray/translations/tray_it_IT.desktop new file mode 100644 index 0000000..2e2d81f --- /dev/null +++ b/plugin-tray/translations/tray_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Accedi alle applicazioni nascoste minimizzate nel vassoio di sistema +Name[it_IT]=Vassoio di sistema diff --git a/plugin-tray/translations/tray_ja.desktop b/plugin-tray/translations/tray_ja.desktop new file mode 100644 index 0000000..686b3f6 --- /dev/null +++ b/plugin-tray/translations/tray_ja.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ja]=システムトレイに最小化されたアプリケーションを表示します +Name[ja]=システムトレイ diff --git a/plugin-tray/translations/tray_ko.desktop b/plugin-tray/translations/tray_ko.desktop new file mode 100644 index 0000000..4863c5c --- /dev/null +++ b/plugin-tray/translations/tray_ko.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Access hidden applications minimized in the system tray + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-tray/translations/tray_lt.desktop b/plugin-tray/translations/tray_lt.desktop new file mode 100644 index 0000000..ca5a573 --- /dev/null +++ b/plugin-tray/translations/tray_lt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[lt]=Leidžia pasiekti į sistemos dėklą nuleistas programas +Name[lt]=Sistemos dėklas diff --git a/plugin-tray/translations/tray_nl.desktop b/plugin-tray/translations/tray_nl.desktop new file mode 100644 index 0000000..330c634 --- /dev/null +++ b/plugin-tray/translations/tray_nl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[nl]=Verborgen pictogrammen tonen +Name[nl]=Systeem vak diff --git a/plugin-tray/translations/tray_pl.desktop b/plugin-tray/translations/tray_pl.desktop new file mode 100644 index 0000000..476e525 --- /dev/null +++ b/plugin-tray/translations/tray_pl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl]=Udostępnia ukryte aplikacje +Name[pl]=Tacka systemowa diff --git a/plugin-tray/translations/tray_pl_PL.desktop b/plugin-tray/translations/tray_pl_PL.desktop new file mode 100644 index 0000000..7318e67 --- /dev/null +++ b/plugin-tray/translations/tray_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Dostęp do aplikacji zminimalizowanych do tacki systemowej. +Name[pl_PL]=Tacka systemowa diff --git a/plugin-tray/translations/tray_pt.desktop b/plugin-tray/translations/tray_pt.desktop new file mode 100644 index 0000000..f323312 --- /dev/null +++ b/plugin-tray/translations/tray_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Bandeja do sistema +Comment[pt]=Aceder às aplicações minimizadas na bandeja do sistema diff --git a/plugin-tray/translations/tray_pt_BR.desktop b/plugin-tray/translations/tray_pt_BR.desktop new file mode 100644 index 0000000..4433563 --- /dev/null +++ b/plugin-tray/translations/tray_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Acesse aplicativos ocultos minimizados na área de notificação +Name[pt_BR]=Área de notificação diff --git a/plugin-tray/translations/tray_ro_RO.desktop b/plugin-tray/translations/tray_ro_RO.desktop new file mode 100644 index 0000000..385751d --- /dev/null +++ b/plugin-tray/translations/tray_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Acceasți aplicații ascunse minimizate în tava sistem +Name[ro_RO]=Zonă de notificare diff --git a/plugin-tray/translations/tray_ru.desktop b/plugin-tray/translations/tray_ru.desktop new file mode 100644 index 0000000..a33a7a8 --- /dev/null +++ b/plugin-tray/translations/tray_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Значки программ, свернутых в системный лоток. +Name[ru]=Системный лоток \ No newline at end of file diff --git a/plugin-tray/translations/tray_ru_RU.desktop b/plugin-tray/translations/tray_ru_RU.desktop new file mode 100644 index 0000000..a01f6d3 --- /dev/null +++ b/plugin-tray/translations/tray_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Значки программ, свернутых в системный лоток. +Name[ru_RU]=Системный лоток \ No newline at end of file diff --git a/plugin-tray/translations/tray_sk.desktop b/plugin-tray/translations/tray_sk.desktop new file mode 100644 index 0000000..93483bf --- /dev/null +++ b/plugin-tray/translations/tray_sk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sk]=Prístup k skrytým aplikáciám minimalizovaným v oznamovacej oblasti +Name[sk]=Oznamovacia oblasť diff --git a/plugin-tray/translations/tray_sl.desktop b/plugin-tray/translations/tray_sl.desktop new file mode 100644 index 0000000..3ac7521 --- /dev/null +++ b/plugin-tray/translations/tray_sl.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sl]=Dostopajte do programov pomanjšanih v sistemsko vrstico +Name[sl]=Sistemska vrstica diff --git a/plugin-tray/translations/tray_sr.desktop b/plugin-tray/translations/tray_sr.desktop new file mode 100644 index 0000000..58bc455 --- /dev/null +++ b/plugin-tray/translations/tray_sr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr]=Приступ скривеним програмима минимизованим у системску касету +Name[sr]=Системска касета diff --git a/plugin-tray/translations/tray_sr@ijekavian.desktop b/plugin-tray/translations/tray_sr@ijekavian.desktop new file mode 100644 index 0000000..1dc3a5c --- /dev/null +++ b/plugin-tray/translations/tray_sr@ijekavian.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavian]=Системска касета +Comment[sr@ijekavian]=Приступ скривеним програмима минимизованим у системску касету diff --git a/plugin-tray/translations/tray_sr@ijekavianlatin.desktop b/plugin-tray/translations/tray_sr@ijekavianlatin.desktop new file mode 100644 index 0000000..cad4967 --- /dev/null +++ b/plugin-tray/translations/tray_sr@ijekavianlatin.desktop @@ -0,0 +1,2 @@ +Name[sr@ijekavianlatin]=Sistemska kaseta +Comment[sr@ijekavianlatin]=Pristup skrivenim programima minimizovanim u sistemsku kasetu diff --git a/plugin-tray/translations/tray_sr@latin.desktop b/plugin-tray/translations/tray_sr@latin.desktop new file mode 100644 index 0000000..ffe4618 --- /dev/null +++ b/plugin-tray/translations/tray_sr@latin.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[sr@latin]=Pristup skrivenim programima minimizovanim u sistemsku kasetu +Name[sr@latin]=Sistemska kaseta diff --git a/plugin-tray/translations/tray_th_TH.desktop b/plugin-tray/translations/tray_th_TH.desktop new file mode 100644 index 0000000..af63f22 --- /dev/null +++ b/plugin-tray/translations/tray_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=เข้าใช้งานโปรแกรมที่ย่อเก็บอยู่ในถาดระบบ +Name[th_TH]=ถาดระบบ diff --git a/plugin-tray/translations/tray_tr.desktop b/plugin-tray/translations/tray_tr.desktop new file mode 100644 index 0000000..b4f8019 --- /dev/null +++ b/plugin-tray/translations/tray_tr.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[tr]=Sistem çekmecesinde gizli uygulamalara erişin +Name[tr]=Sistem çekmecesi diff --git a/plugin-tray/translations/tray_uk.desktop b/plugin-tray/translations/tray_uk.desktop new file mode 100644 index 0000000..9eff55f --- /dev/null +++ b/plugin-tray/translations/tray_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Показує програми, згорнуті до системного лотка. +Name[uk]=Системний лоток diff --git a/plugin-tray/translations/tray_zh_CN.GB2312.desktop b/plugin-tray/translations/tray_zh_CN.GB2312.desktop new file mode 100644 index 0000000..4863c5c --- /dev/null +++ b/plugin-tray/translations/tray_zh_CN.GB2312.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Access hidden applications minimized in the system tray + +#TRANSLATIONS_DIR=../translations + + +# Translations diff --git a/plugin-tray/translations/tray_zh_CN.desktop b/plugin-tray/translations/tray_zh_CN.desktop new file mode 100644 index 0000000..e4158b3 --- /dev/null +++ b/plugin-tray/translations/tray_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=访问最小化到系统托盘的隐藏程序 +Name[zh_CN]=系统托盘 diff --git a/plugin-tray/translations/tray_zh_TW.desktop b/plugin-tray/translations/tray_zh_TW.desktop new file mode 100644 index 0000000..c8d5a76 --- /dev/null +++ b/plugin-tray/translations/tray_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=System tray +Comment=Display applications minimized to the system tray. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=讀取縮小在系統列的隱藏程式 +Name[zh_TW]=系統列 diff --git a/plugin-tray/trayicon.cpp b/plugin-tray/trayicon.cpp new file mode 100644 index 0000000..157fc17 --- /dev/null +++ b/plugin-tray/trayicon.cpp @@ -0,0 +1,365 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +// Warning: order of those include is important. +#include +#include +#include +#include +#include +#include + +#include "../panel/lxqtpanel.h" +#include "trayicon.h" +#include "xfitman.h" + +#include +#include +#include +#include +#include + +#define XEMBED_EMBEDDED_NOTIFY 0 + + +static bool xError; + +/************************************************ + +************************************************/ +int windowErrorHandler(Display *d, XErrorEvent *e) +{ + xError = true; + if (e->error_code != BadWindow) { + char str[1024]; + XGetErrorText(d, e->error_code, str, 1024); + qWarning() << "Error handler" << e->error_code + << str; + } + return 0; +} + + +/************************************************ + + ************************************************/ +TrayIcon::TrayIcon(Window iconId, QWidget* parent): + QFrame(parent), + mIconId(iconId), + mWindowId(0), + mIconSize(TRAY_ICON_SIZE_DEFAULT, TRAY_ICON_SIZE_DEFAULT), + mDamage(0), + mDisplay(QX11Info::display()) +{ + // NOTE: + // it's a good idea to save the return value of QX11Info::display(). + // In Qt 5, this API is slower and has some limitations which can trigger crashes. + // The XDisplay value is actally stored in QScreen object of the primary screen rather than + // in a global variable. So when the parimary QScreen is being deleted and becomes invalid, + // QX11Info::display() will fail and cause crash. Storing this value improves the efficiency and + // also prevent potential crashes caused by this bug. + + setObjectName("TrayIcon"); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + mValid = init(); +} + + + +/************************************************ + + ************************************************/ +bool TrayIcon::init() +{ + Display* dsp = mDisplay; + + XWindowAttributes attr; + if (! XGetWindowAttributes(dsp, mIconId, &attr)) return false; + +// qDebug() << "New tray icon ***********************************"; +// qDebug() << " * window id: " << hex << mIconId; +// qDebug() << " * window name:" << xfitMan().getName(mIconId); +// qDebug() << " * size (WxH): " << attr.width << "x" << attr.height; +// qDebug() << " * color depth:" << attr.depth; + + unsigned long mask = 0; + XSetWindowAttributes set_attr; + + Visual* visual = attr.visual; + set_attr.colormap = attr.colormap; + set_attr.background_pixel = 0; + set_attr.border_pixel = 0; + mask = CWColormap|CWBackPixel|CWBorderPixel; + + mWindowId = XCreateWindow(dsp, this->winId(), 0, 0, mIconSize.width(), mIconSize.height(), + 0, attr.depth, InputOutput, visual, mask, &set_attr); + + + xError = false; + XErrorHandler old; + old = XSetErrorHandler(windowErrorHandler); + XReparentWindow(dsp, mIconId, mWindowId, 0, 0); + XSync(dsp, false); + XSetErrorHandler(old); + + if (xError) + { + qWarning() << "****************************************"; + qWarning() << "* Not icon_swallow *"; + qWarning() << "****************************************"; + XDestroyWindow(dsp, mWindowId); + return false; + } + + + { + Atom acttype; + int actfmt; + unsigned long nbitem, bytes; + unsigned char *data = 0; + int ret; + + ret = XGetWindowProperty(dsp, mIconId, xfitMan().atom("_XEMBED_INFO"), + 0, 2, false, xfitMan().atom("_XEMBED_INFO"), + &acttype, &actfmt, &nbitem, &bytes, &data); + if (ret == Success) + { + if (data) + XFree(data); + } + else + { + qWarning() << "TrayIcon: xembed error"; + XDestroyWindow(dsp, mWindowId); + return false; + } + } + + { + XEvent e; + e.xclient.type = ClientMessage; + e.xclient.serial = 0; + e.xclient.send_event = True; + e.xclient.message_type = xfitMan().atom("_XEMBED"); + e.xclient.window = mIconId; + e.xclient.format = 32; + e.xclient.data.l[0] = CurrentTime; + e.xclient.data.l[1] = XEMBED_EMBEDDED_NOTIFY; + e.xclient.data.l[2] = 0; + e.xclient.data.l[3] = mWindowId; + e.xclient.data.l[4] = 0; + XSendEvent(dsp, mIconId, false, 0xFFFFFF, &e); + } + + XSelectInput(dsp, mIconId, StructureNotifyMask); + mDamage = XDamageCreate(dsp, mIconId, XDamageReportRawRectangles); + XCompositeRedirectWindow(dsp, mWindowId, CompositeRedirectManual); + + XMapWindow(dsp, mIconId); + XMapRaised(dsp, mWindowId); + + XResizeWindow(dsp, mWindowId, mIconSize.width(), mIconSize.height()); + XResizeWindow(dsp, mIconId, mIconSize.width(), mIconSize.height()); + + return true; +} + + +/************************************************ + + ************************************************/ +TrayIcon::~TrayIcon() +{ + Display* dsp = mDisplay; + XSelectInput(dsp, mIconId, NoEventMask); + + if (mDamage) + XDamageDestroy(dsp, mDamage); + + // reparent to root + xError = false; + XErrorHandler old = XSetErrorHandler(windowErrorHandler); + + XUnmapWindow(dsp, mIconId); + XReparentWindow(dsp, mIconId, QX11Info::appRootWindow(), 0, 0); + + XDestroyWindow(dsp, mWindowId); + XSync(dsp, False); + XSetErrorHandler(old); +} + + +/************************************************ + + ************************************************/ +QSize TrayIcon::sizeHint() const +{ + QMargins margins = contentsMargins(); + return QSize(margins.left() + mIconSize.width() + margins.right(), + margins.top() + mIconSize.height() + margins.bottom() + ); +} + + +/************************************************ + + ************************************************/ +void TrayIcon::setIconSize(QSize iconSize) +{ + mIconSize = iconSize; + + if (mWindowId) + xfitMan().resizeWindow(mWindowId, mIconSize.width(), mIconSize.height()); + + if (mIconId) + xfitMan().resizeWindow(mIconId, mIconSize.width(), mIconSize.height()); +} + + +/************************************************ + + ************************************************/ +bool TrayIcon::event(QEvent *event) +{ + switch (event->type()) + { + case QEvent::Paint: + draw(static_cast(event)); + break; + + case QEvent::Resize: + { + QRect rect = iconGeometry(); + xfitMan().moveWindow(mWindowId, rect.left(), rect.top()); + } + break; + + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + case QEvent::MouseButtonDblClick: + event->accept(); + break; + + default: + break; + } + + return QFrame::event(event); +} + + +/************************************************ + + ************************************************/ +QRect TrayIcon::iconGeometry() +{ + QRect res = QRect(QPoint(0, 0), mIconSize); + + res.moveCenter(QRect(0, 0, width(), height()).center()); + return res; +} + + +/************************************************ + + ************************************************/ +void TrayIcon::draw(QPaintEvent* /*event*/) +{ + Display* dsp = mDisplay; + + XWindowAttributes attr; + if (!XGetWindowAttributes(dsp, mIconId, &attr)) + { + qWarning() << "Paint error"; + return; + } + + QImage image; + XImage* ximage = XGetImage(dsp, mIconId, 0, 0, attr.width, attr.height, AllPlanes, ZPixmap); + if(ximage) + { + image = QImage((const uchar*) ximage->data, ximage->width, ximage->height, ximage->bytes_per_line, QImage::Format_ARGB32_Premultiplied); + } + else + { + qWarning() << " * Error image is NULL"; + + XClearArea(mDisplay, (Window)winId(), 0, 0, attr.width, attr.height, False); + // for some unknown reason, XGetImage failed. try another less efficient method. + // QPixmap::grabWindow uses XCopyArea() internally. + image = QPixmap::grabWindow(mIconId).toImage(); + } + +// qDebug() << "Paint icon **************************************"; +// qDebug() << " * XComposite: " << isXCompositeAvailable(); +// qDebug() << " * Icon geometry:" << iconGeometry(); +// qDebug() << " Icon"; +// qDebug() << " * window id: " << hex << mIconId; +// qDebug() << " * window name:" << xfitMan().getName(mIconId); +// qDebug() << " * size (WxH): " << attr.width << "x" << attr.height; +// qDebug() << " * pos (XxY): " << attr.x << attr.y; +// qDebug() << " * color depth:" << attr.depth; +// qDebug() << " XImage"; +// qDebug() << " * size (WxH): " << ximage->width << "x" << ximage->height; +// switch (ximage->format) +// { +// case XYBitmap: qDebug() << " * format: XYBitmap"; break; +// case XYPixmap: qDebug() << " * format: XYPixmap"; break; +// case ZPixmap: qDebug() << " * format: ZPixmap"; break; +// } +// qDebug() << " * color depth: " << ximage->depth; +// qDebug() << " * bits per pixel:" << ximage->bits_per_pixel; + + // Draw QImage ........................... + QPainter painter(this); + QRect iconRect = iconGeometry(); + if (image.size() != iconRect.size()) + { + image = image.scaled(iconRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation); + QRect r = image.rect(); + r.moveCenter(iconRect.center()); + iconRect = r; + } +// qDebug() << " Draw rect:" << iconRect; + + painter.drawImage(iconRect, image); + + if(ximage) + XDestroyImage(ximage); +// debug << "End paint icon **********************************"; +} + + +/************************************************ + + ************************************************/ +bool TrayIcon::isXCompositeAvailable() +{ + int eventBase, errorBase; + return XCompositeQueryExtension(QX11Info::display(), &eventBase, &errorBase ); +} diff --git a/plugin-tray/trayicon.h b/plugin-tray/trayicon.h new file mode 100644 index 0000000..7e8c413 --- /dev/null +++ b/plugin-tray/trayicon.h @@ -0,0 +1,80 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef TRAYICON_H +#define TRAYICON_H + +#include +#include +#include + +#include +#include + +#define TRAY_ICON_SIZE_DEFAULT 24 + +class QWidget; +class LxQtPanel; + +class TrayIcon: public QFrame +{ + Q_OBJECT + Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize) + +public: + TrayIcon(Window iconId, QWidget* parent); + virtual ~TrayIcon(); + + Window iconId() { return mIconId; } + Window windowId() { return mWindowId; } + + bool isValid() const { return mValid; } + + QSize iconSize() const { return mIconSize; } + void setIconSize(QSize iconSize); + + QSize sizeHint() const; + +protected: + bool event(QEvent *event); + void draw(QPaintEvent* event); + +private: + bool init(); + QRect iconGeometry(); + Window mIconId; + Window mWindowId; + bool mValid; + QSize mIconSize; + Damage mDamage; + Display* mDisplay; + + static bool isXCompositeAvailable(); +}; + +#endif // TRAYICON_H diff --git a/plugin-tray/xfitman.cpp b/plugin-tray/xfitman.cpp new file mode 100644 index 0000000..af66264 --- /dev/null +++ b/plugin-tray/xfitman.cpp @@ -0,0 +1,334 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXQt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Christopher "VdoP" Regali + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include + +// #include +// #include +// #include +// #include + +#include +#include + +#include "xfitman.h" +#include +#include +#include + +/** + * @file xfitman.cpp + * @brief implements class Xfitman + * @author Christopher "VdoP" Regali + */ + +/* + S ome requests from Cli*ents include type of the Client, for example the _NET_ACTIVE_WINDOW + message. Currently the types can be 1 for normal applications, and 2 for pagers. + See http://standards.freedesktop.org/wm-spec/latest/ar01s09.html#sourceindication + */ +#define SOURCE_NORMAL 1 +#define SOURCE_PAGER 2 + +const XfitMan& xfitMan() +{ + static XfitMan instance; + return instance; +} + +/** + * @brief constructor: gets Display vars and registers us + */ +XfitMan::XfitMan() +{ + root = (Window)QX11Info::appRootWindow(); +} + +Atom XfitMan::atom(const char* atomName) +{ + static QHash hash; + if (hash.contains(atomName)) + return hash.value(atomName); + Atom atom = XInternAtom(QX11Info::display(), atomName, false); + hash[atomName] = atom; + return atom; +} + +/** + * @brief moves a window to a new position + */ + +void XfitMan::moveWindow(Window _win, int _x, int _y) const +{ + XMoveWindow(QX11Info::display(), _win, _x, _y); +} + +/************************************************ + + ************************************************/ +bool XfitMan::getWindowProperty(Window window, + Atom atom, // property + Atom reqType, // req_type + unsigned long* resultLen,// nitems_return + unsigned char** result // prop_return + ) const +{ + int format; + unsigned long type, rest; + return XGetWindowProperty(QX11Info::display(), window, atom, 0, 4096, false, + reqType, &type, &format, resultLen, &rest, + result) == Success; +} + + +/************************************************ + + ************************************************/ +bool XfitMan::getRootWindowProperty(Atom atom, // property + Atom reqType, // req_type + unsigned long* resultLen,// nitems_return + unsigned char** result // prop_return + ) const +{ + return getWindowProperty(root, atom, reqType, resultLen, result); +} + +/** + * @brief resizes a window to the given dimensions + */ +void XfitMan::resizeWindow(Window _wid, int _width, int _height) const +{ + XResizeWindow(QX11Info::display(), _wid, _width, _height); +} + +/** + * @brief gets a windowpixmap from a window + */ +bool XfitMan::getClientIcon(Window _wid, QPixmap& _pixreturn) const +{ + int format; + ulong type, nitems, extra; + ulong* data = 0; + + XGetWindowProperty(QX11Info::display(), _wid, atom("_NET_WM_ICON"), + 0, LONG_MAX, False, AnyPropertyType, + &type, &format, &nitems, &extra, + (uchar**)&data); + if (!data) + { + return false; + } + + QImage img (data[0], data[1], QImage::Format_ARGB32); + for (int i=0; iaddPixmap(QPixmap::fromImage(img)); + } + + XFree(data); + return true; +} + +/** + * @brief destructor + */ +XfitMan::~XfitMan() +{ +} + +/** + * @brief returns a windowname and sets _nameSource to the finally used Atom + */ +// i got the idea for this from taskbar-plugin of LXPanel - so credits fly out :) +QString XfitMan::getWindowTitle(Window _wid) const +{ + QString name = ""; + //first try the modern net-wm ones + unsigned long length; + unsigned char *data = NULL; + Atom utf8Atom = atom("UTF8_STRING"); + + if (getWindowProperty(_wid, atom("_NET_WM_VISIBLE_NAME"), utf8Atom, &length, &data)) + { + name = QString::fromUtf8((char*) data); + XFree(data); + + } + + if (name.isEmpty()) + { + if (getWindowProperty(_wid, atom("_NET_WM_NAME"), utf8Atom, &length, &data)) + { + name = QString::fromUtf8((char*) data); + XFree(data); + } + } + + if (name.isEmpty()) + { + if (getWindowProperty(_wid, atom("XA_WM_NAME"), XA_STRING, &length, &data)) + { + name = (char*) data; + XFree(data); + } + } + + if (name.isEmpty()) + { + Status ok = XFetchName(QX11Info::display(), _wid, (char**) &data); + name = QString((char*) data); + if (0 != ok) XFree(data); + } + + if (name.isEmpty()) + { + XTextProperty prop; + if (XGetWMName(QX11Info::display(), _wid, &prop)) + { + name = QString::fromUtf8((char*) prop.value); + XFree(prop.value); + } + } + + return name; +} + +QString XfitMan::getApplicationName(Window _wid) const +{ + XClassHint hint; + QString ret; + + if (XGetClassHint(QX11Info::display(), _wid, &hint)) + { + if (hint.res_name) + { + ret = hint.res_name; + XFree(hint.res_name); + } + if (hint.res_class) + { + XFree(hint.res_class); + } + } + + return ret; +} + +/** + * @brief sends a clientmessage to a window + */ +int XfitMan::clientMessage(Window _wid, Atom _msg, + unsigned long data0, + unsigned long data1, + unsigned long data2, + unsigned long data3, + unsigned long data4) const +{ + XClientMessageEvent msg; + msg.window = _wid; + msg.type = ClientMessage; + msg.message_type = _msg; + msg.send_event = true; + msg.display = QX11Info::display(); + msg.format = 32; + msg.data.l[0] = data0; + msg.data.l[1] = data1; + msg.data.l[2] = data2; + msg.data.l[3] = data3; + msg.data.l[4] = data4; + if (XSendEvent(QX11Info::display(), root, false, (SubstructureRedirectMask | SubstructureNotifyMask) , (XEvent *) &msg) == Success) + return EXIT_SUCCESS; + else + return EXIT_FAILURE; +} + +/** + * @brief raises windows _wid + */ +void XfitMan::raiseWindow(Window _wid) const +{ + clientMessage(_wid, atom("_NET_ACTIVE_WINDOW"), + SOURCE_PAGER); +} + +/************************************************ + + ************************************************/ +void XfitMan::closeWindow(Window _wid) const +{ + clientMessage(_wid, atom("_NET_CLOSE_WINDOW"), + 0, // Timestamp + SOURCE_PAGER); +} + +void XfitMan::setIconGeometry(Window _wid, QRect* rect) const +{ + Atom net_wm_icon_geometry = atom("_NET_WM_ICON_GEOMETRY"); + if(!rect) + XDeleteProperty(QX11Info::display(), _wid, net_wm_icon_geometry); + else + { + long data[4]; + data[0] = rect->x(); + data[1] = rect->y(); + data[2] = rect->width(); + data[3] = rect->height(); + XChangeProperty(QX11Info::display(), _wid, net_wm_icon_geometry, + XA_CARDINAL, 32, PropModeReplace, (unsigned char*)data, 4); + } +} diff --git a/plugin-tray/xfitman.h b/plugin-tray/xfitman.h new file mode 100644 index 0000000..4b837d1 --- /dev/null +++ b/plugin-tray/xfitman.h @@ -0,0 +1,96 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXQt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Christopher "VdoP" Regali + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTXFITMAN_H +#define LXQTXFITMAN_H + +#include + +/** + * @file xfitman.h + * @author Christopher "VdoP" Regali + * @brief handles all of our xlib-calls. + */ + +/** + * @brief manages the Xlib apicalls + */ +class XfitMan +{ +public: + XfitMan(); + ~XfitMan(); + + static Atom atom(const char* atomName); + + void moveWindow(Window _win, int _x, int _y) const; + void raiseWindow(Window _wid) const; + void resizeWindow(Window _wid, int _width, int _height) const; + void closeWindow(Window _wid) const; + + bool getClientIcon(Window _wid, QPixmap& _pixreturn) const; + bool getClientIcon(Window _wid, QIcon *icon) const; + void setIconGeometry(Window _wid, QRect* rect = 0) const; + + QString getWindowTitle(Window _wid) const; + QString getApplicationName(Window _wid) const; + + int clientMessage(Window _wid, Atom _msg, + long unsigned int data0, + long unsigned int data1 = 0, + long unsigned int data2 = 0, + long unsigned int data3 = 0, + long unsigned int data4 = 0) const; + +private: + + /** \warning Do not forget to XFree(result) after data are processed! + */ + bool getWindowProperty(Window window, + Atom atom, // property + Atom reqType, // req_type + unsigned long* resultLen,// nitems_return + unsigned char** result // prop_return + ) const; + + /** \warning Do not forget to XFree(result) after data are processed! + */ + bool getRootWindowProperty(Atom atom, // property + Atom reqType, // req_type + unsigned long* resultLen,// nitems_return + unsigned char** result // prop_return + ) const; + + + Window root; //the actual root window on the used screen +}; + + +const XfitMan& xfitMan(); + +#endif // LXQTXFITMAN_H diff --git a/plugin-volume/CMakeLists.txt b/plugin-volume/CMakeLists.txt new file mode 100644 index 0000000..6dd8c6d --- /dev/null +++ b/plugin-volume/CMakeLists.txt @@ -0,0 +1,61 @@ +set(PLUGIN "volume") + +set(HEADERS + lxqtvolume.h + volumebutton.h + volumepopup.h + audiodevice.h + lxqtvolumeconfiguration.h + audioengine.h +) + +set(SOURCES + ${PROJECT_SOURCE_DIR}/panel/lxqtpanelpluginconfigdialog.cpp + lxqtvolume.cpp + volumebutton.cpp + volumepopup.cpp + audiodevice.cpp + lxqtvolumeconfiguration.cpp + audioengine.cpp + ossengine.cpp +) + +set(MOCS + ${PROJECT_SOURCE_DIR}/panel/lxqtpanelpluginconfigdialog.h + lxqtvolume.h + volumebutton.h + volumepopup.h + audiodevice.h + lxqtvolumeconfiguration.h + audioengine.h + ossengine.h +) + +set(UIS + lxqtvolumeconfiguration.ui +) + +set(LIBRARIES + ${LIBRARIES} + ${LXQT_GLOBALKEYS_LIBRARIES} + ${QTXDG_LIBRARIES} +) + +if(PULSEAUDIO_FOUND) + add_definitions(-DUSE_PULSEAUDIO) + include_directories(${PULSEAUDIO_INCLUDE_DIR}) + set(HEADERS ${HEADERS} pulseaudioengine.h) + set(SOURCES ${SOURCES} pulseaudioengine.cpp) + set(MOCS ${MOCS} pulseaudioengine.h) + set(LIBRARIES ${LIBRARIES} ${PULSEAUDIO_LIBRARY}) +endif() + +if(ALSA_FOUND) + add_definitions(-DUSE_ALSA) + set(HEADERS ${HEADERS} alsaengine.h alsadevice.h) + set(SOURCES ${SOURCES} alsaengine.cpp alsadevice.cpp) + set(MOCS ${MOCS} alsaengine.h alsadevice.h) + set(LIBRARIES ${LIBRARIES} ${ALSA_LIBRARIES}) +endif() + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-volume/alsadevice.cpp b/plugin-volume/alsadevice.cpp new file mode 100644 index 0000000..3e049a9 --- /dev/null +++ b/plugin-volume/alsadevice.cpp @@ -0,0 +1,62 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "alsadevice.h" + +AlsaDevice::AlsaDevice(AudioDeviceType t, AudioEngine *engine, QObject *parent) : + AudioDevice(t, engine, parent), + m_mixer(0), + m_elem(0) +{ +} + +void AlsaDevice::setMixer(snd_mixer_t *mixer) +{ + if (m_mixer == mixer) + return; + + m_mixer = mixer; + emit mixerChanged(); +} + +void AlsaDevice::setElement(snd_mixer_elem_t *elem) +{ + if (m_elem == elem) + return; + + m_elem = elem; + emit elementChanged(); +} + +void AlsaDevice::setCardName(const QString &cardName) +{ + if (m_cardName == cardName) + return; + + m_cardName = cardName; + emit cardNameChanged(); +} diff --git a/plugin-volume/alsadevice.h b/plugin-volume/alsadevice.h new file mode 100644 index 0000000..c2a9440 --- /dev/null +++ b/plugin-volume/alsadevice.h @@ -0,0 +1,64 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef ALSADEVICE_H +#define ALSADEVICE_H + +#include "audiodevice.h" + +#include + +#include +#include + +class AlsaDevice : public AudioDevice +{ + Q_OBJECT + +public: + AlsaDevice(AudioDeviceType t, AudioEngine *engine, QObject *parent = 0); + + snd_mixer_t *mixer() const { return m_mixer; } + snd_mixer_elem_t *element() const { return m_elem; } + const QString &cardName() const { return m_cardName; } + + void setMixer(snd_mixer_t *mixer); + void setElement(snd_mixer_elem_t *elem); + void setCardName(const QString &cardName); + +signals: + void mixerChanged(); + void elementChanged(); + void cardNameChanged(); + +private: + snd_mixer_t *m_mixer; + snd_mixer_elem_t *m_elem; + QString m_cardName; +}; + +#endif // ALSADEVICE_H diff --git a/plugin-volume/alsaengine.cpp b/plugin-volume/alsaengine.cpp new file mode 100644 index 0000000..026479f --- /dev/null +++ b/plugin-volume/alsaengine.cpp @@ -0,0 +1,220 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "alsaengine.h" + +#include "alsadevice.h" + +#include +#include +#include + +AlsaEngine *AlsaEngine::m_instance = 0; + +static int alsa_elem_event_callback(snd_mixer_elem_t *elem, unsigned int mask) +{ + AlsaEngine *engine = AlsaEngine::instance(); + if (engine) + engine->updateDevice(engine->getDeviceByAlsaElem(elem)); + + return 0; +} + +static int alsa_mixer_event_callback(snd_mixer_t *mixer, unsigned int mask, snd_mixer_elem_t *elem) +{ + return 0; +} + +AlsaEngine::AlsaEngine(QObject *parent) : + AudioEngine(parent) +{ + discoverDevices(); + m_instance = this; +} + +AlsaEngine *AlsaEngine::instance() +{ + return m_instance; +} + +int AlsaEngine::volumeMax(AudioDevice *device) const +{ + // We already did snd_mixer_selem_set_playback_volume_range(mixerElem, 0, 100); + // during initialization. So we can return 100 directly here. + return 100; +} + +AlsaDevice *AlsaEngine::getDeviceByAlsaElem(snd_mixer_elem_t *elem) const +{ + foreach (AudioDevice *device, m_sinks) { + AlsaDevice *dev = qobject_cast(device); + if (!dev || !dev->element()) + continue; + + if (dev->element() == elem) + return dev; + } + + return 0; +} + +void AlsaEngine::commitDeviceVolume(AudioDevice *device) +{ + AlsaDevice *dev = qobject_cast(device); + if (!dev || !dev->element()) + return; + + long value = dev->volume(); + snd_mixer_selem_set_playback_volume_all(dev->element(), value); +} + +void AlsaEngine::setMute(AudioDevice *device, bool state) +{ + AlsaDevice *dev = qobject_cast(device); + if (!dev || !dev->element()) + return; + + if (snd_mixer_selem_has_playback_switch(dev->element())) + snd_mixer_selem_set_playback_switch_all(dev->element(), (int)!state); + else if (state) + dev->setVolume(0); +} + +void AlsaEngine::updateDevice(AlsaDevice *device) +{ + if (!device) + return; + + long value; + snd_mixer_selem_get_playback_volume(device->element(), (snd_mixer_selem_channel_id_t)0, &value); + // qDebug() << "updateDevice:" << device->name() << value; + device->setVolumeNoCommit(value); + + if (snd_mixer_selem_has_playback_switch(device->element())) { + int mute; + snd_mixer_selem_get_playback_switch(device->element(), (snd_mixer_selem_channel_id_t)0, &mute); + device->setMuteNoCommit(!(bool)mute); + } +} + +void AlsaEngine::driveAlsaEventHandling(int fd) +{ + snd_mixer_handle_events(m_mixerMap.value(fd)); +} + +void AlsaEngine::discoverDevices() +{ + int error; + int cardNum = -1; + + while (1) { + error = snd_card_next(&cardNum); + + if (cardNum < 0) + break; + + char str[64]; + sprintf(str, "hw:%i", cardNum); + + snd_ctl_t *cardHandle; + if ((error = snd_ctl_open(&cardHandle, str, 0)) < 0) { + qWarning("Can't open card %i: %s\n", cardNum, snd_strerror(error)); + continue; + } + + snd_ctl_card_info_t *cardInfo; + snd_ctl_card_info_alloca(&cardInfo); + + QString cardName = QString::fromLatin1(snd_ctl_card_info_get_name(cardInfo)); + if (cardName.isEmpty()) + cardName = QString::fromLatin1(str); + + if ((error = snd_ctl_card_info(cardHandle, cardInfo)) < 0) { + qWarning("Can't get info for card %i: %s\n", cardNum, snd_strerror(error)); + } else { + // setup mixer and iterate over channels + snd_mixer_t *mixer = 0; + snd_mixer_open(&mixer, 0); + snd_mixer_attach(mixer, str); + snd_mixer_selem_register(mixer, NULL, NULL); + snd_mixer_load(mixer); + + // setup event handler for mixer + snd_mixer_set_callback(mixer, alsa_mixer_event_callback); + + // setup eventloop handling + struct pollfd pfd; + if (snd_mixer_poll_descriptors(mixer, &pfd, 1)) { + QSocketNotifier *notifier = new QSocketNotifier(pfd.fd, QSocketNotifier::Read, this); + connect(notifier, SIGNAL(activated(int)), this, SLOT(driveAlsaEventHandling(int))); + m_mixerMap.insert(pfd.fd, mixer); + } + + snd_mixer_elem_t *mixerElem = 0; + mixerElem = snd_mixer_first_elem(mixer); + + while (mixerElem) { + // check if we have a Sink or Source + if (snd_mixer_selem_has_playback_volume(mixerElem)) { + AlsaDevice *dev = new AlsaDevice(Sink, this, this); + dev->setName(QString::fromLatin1(snd_mixer_selem_get_name(mixerElem))); + dev->setIndex(cardNum); + dev->setDescription(cardName + " - " + dev->name()); + + // set alsa specific members + dev->setCardName(QString::fromLatin1(str)); + dev->setMixer(mixer); + dev->setElement(mixerElem); + + // set the range of volume to 0-100 + snd_mixer_selem_set_playback_volume_range(mixerElem, 0, 100); + long value; + snd_mixer_selem_get_playback_volume(mixerElem, (snd_mixer_selem_channel_id_t)0, &value); + // qDebug() << dev->name() << "initial volume" << value; + dev->setVolumeNoCommit(value); + + if (snd_mixer_selem_has_playback_switch(mixerElem)) { + int mute; + snd_mixer_selem_get_playback_switch(mixerElem, (snd_mixer_selem_channel_id_t)0, &mute); + dev->setMuteNoCommit(!(bool)mute); + } + + // register event callback + snd_mixer_elem_set_callback(mixerElem, alsa_elem_event_callback); + + m_sinks.append(dev); + } + + mixerElem = snd_mixer_elem_next(mixerElem); + } + } + + snd_ctl_close(cardHandle); + } + + snd_config_update_free_global(); +} diff --git a/plugin-volume/alsaengine.h b/plugin-volume/alsaengine.h new file mode 100644 index 0000000..0bfeb79 --- /dev/null +++ b/plugin-volume/alsaengine.h @@ -0,0 +1,70 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef ALSAENGINE_H +#define ALSAENGINE_H + +#include "audioengine.h" + +#include +#include +#include +#include + +#include + +class AlsaDevice; +class QSocketNotifier; + +class AlsaEngine : public AudioEngine +{ + Q_OBJECT + +public: + AlsaEngine(QObject *parent = 0); + static AlsaEngine *instance(); + + virtual const QString backendName() const { return QLatin1String("Alsa"); } + + int volumeMax(AudioDevice *device) const; + AlsaDevice *getDeviceByAlsaElem(snd_mixer_elem_t *elem) const; + +public slots: + void commitDeviceVolume(AudioDevice *device); + void setMute(AudioDevice *device, bool state); + void updateDevice(AlsaDevice *device); + +private slots: + void driveAlsaEventHandling(int fd); + +private: + void discoverDevices(); + QMap m_mixerMap; + static AlsaEngine *m_instance; +}; + +#endif // ALSAENGINE_H diff --git a/plugin-volume/audiodevice.cpp b/plugin-volume/audiodevice.cpp new file mode 100644 index 0000000..b50f2af --- /dev/null +++ b/plugin-volume/audiodevice.cpp @@ -0,0 +1,122 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "audiodevice.h" + +#include "audioengine.h" + +AudioDevice::AudioDevice(AudioDeviceType t, AudioEngine *engine, QObject *parent) : + QObject(parent), + m_engine(engine), + m_volume(0), + m_mute(false), + m_type(t), + m_index(0) +{ +} + +AudioDevice::~AudioDevice() +{ +} + +void AudioDevice::setName(const QString &name) +{ + if (m_name == name) + return; + + m_name = name; + emit nameChanged(m_name); +} + +void AudioDevice::setDescription(const QString &description) +{ + if (m_description == description) + return; + + m_description = description; + emit descriptionChanged(m_description); +} + +void AudioDevice::setIndex(uint index) +{ + if (m_index == index) + return; + + m_index = index; + emit indexChanged(index); +} + +// this is just for setting the internal volume +void AudioDevice::setVolumeNoCommit(int volume) +{ + if (m_engine) + volume = qBound(0, volume, m_engine->volumeMax(this)); + + if (m_volume == volume) + return; + + m_volume = volume; + emit volumeChanged(m_volume); +} + +void AudioDevice::toggleMute() +{ + setMute(!m_mute); +} + +void AudioDevice::setMute(bool state) +{ + if (m_mute == state) + return; + + setMuteNoCommit(state); + + if (m_engine) + m_engine->setMute(this, state); +} + +void AudioDevice::setMuteNoCommit(bool state) +{ + if (m_mute == state) + return; + + m_mute = state; + emit muteChanged(m_mute); +} + +// this performs a volume change on the device +void AudioDevice::setVolume(int volume) +{ + if (m_volume == volume) + return; + + setVolumeNoCommit(volume); + setMute(false); + + if (m_engine) + m_engine->commitDeviceVolume(this); +} diff --git a/plugin-volume/audiodevice.h b/plugin-volume/audiodevice.h new file mode 100644 index 0000000..1a9e3c2 --- /dev/null +++ b/plugin-volume/audiodevice.h @@ -0,0 +1,90 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef AUDIODEVICE_H +#define AUDIODEVICE_H + +#include + +class AudioEngine; + +typedef enum AudioDeviceType { + Sink = 0, + Source = 1, + PulseAudioDeviceTypeLength +} AudioDeviceType; + +class AudioDevice : public QObject +{ + Q_OBJECT + Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged) + Q_PROPERTY(AudioDeviceType type READ type CONSTANT) + +public: + AudioDevice(AudioDeviceType t, AudioEngine *engine, QObject *parent = 0); + ~AudioDevice(); + + // the volume can range from 0 to 100. + int volume() const { return m_volume; } + bool mute() const { return m_mute; } + AudioDeviceType type() const { return m_type; } + const QString &name() const { return m_name; } + const QString &description() const { return m_description; } + uint index() const { return m_index; } + + void setName(const QString &name); + void setDescription(const QString &description); + void setIndex(uint index); + + AudioEngine* engine() { return m_engine; } + +public slots: + // the volume can range from 0 to 100. + void setVolume(int volume); + void setVolumeNoCommit(int volume); + void toggleMute(); + void setMute(bool state); + void setMuteNoCommit(bool state); + +signals: + void volumeChanged(int volume); + void muteChanged(bool state); + void nameChanged(const QString &name); + void descriptionChanged(const QString &description); + void indexChanged(uint index); + +private: + AudioEngine *m_engine; + int m_volume; // the volume can range from 0 to 100. + bool m_mute; + AudioDeviceType m_type; + QString m_name; + uint m_index; + QString m_description; +}; + +#endif // AUDIODEVICE_H diff --git a/plugin-volume/audioengine.cpp b/plugin-volume/audioengine.cpp new file mode 100644 index 0000000..b1cbd81 --- /dev/null +++ b/plugin-volume/audioengine.cpp @@ -0,0 +1,59 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "audioengine.h" + +#include "audiodevice.h" + +#include +#include + +AudioEngine::AudioEngine(QObject *parent) : + QObject(parent) +{ +} + +AudioEngine::~AudioEngine() +{ + qDeleteAll(m_sinks); + m_sinks.clear(); +} + +void AudioEngine::mute(AudioDevice *device) +{ + setMute(device, true); +} + +void AudioEngine::unmute(AudioDevice *device) +{ + setMute(device, false); +} + +void AudioEngine::setIgnoreMaxVolume(bool ignore) +{ + Q_UNUSED(ignore) +} diff --git a/plugin-volume/audioengine.h b/plugin-volume/audioengine.h new file mode 100644 index 0000000..cfb83d4 --- /dev/null +++ b/plugin-volume/audioengine.h @@ -0,0 +1,63 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef AUDIOENGINE_H +#define AUDIOENGINE_H + +#include +#include +#include + +class AudioDevice; + +class AudioEngine : public QObject +{ + Q_OBJECT + +public: + AudioEngine(QObject *parent = 0); + ~AudioEngine(); + + const QList &sinks() const { return m_sinks; } + virtual int volumeMax(AudioDevice *device) const = 0; + virtual const QString backendName() const = 0; + +public slots: + virtual void commitDeviceVolume(AudioDevice *device) = 0; + virtual void setMute(AudioDevice *device, bool state) = 0; + void mute(AudioDevice *device); + void unmute(AudioDevice *device); + virtual void setIgnoreMaxVolume(bool ignore); + +signals: + void sinkListChanged(); + +protected: + QList m_sinks; +}; + +#endif // AUDIOENGINE_H diff --git a/plugin-volume/lxqtvolume.cpp b/plugin-volume/lxqtvolume.cpp new file mode 100644 index 0000000..6dd2977 --- /dev/null +++ b/plugin-volume/lxqtvolume.cpp @@ -0,0 +1,248 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtvolume.h" + +#include "volumebutton.h" +#include "volumepopup.h" +#include "lxqtvolumeconfiguration.h" +#include "audiodevice.h" +#ifdef USE_PULSEAUDIO +#include "pulseaudioengine.h" +#endif +#ifdef USE_ALSA +#include "alsaengine.h" +#endif +#include "ossengine.h" + +#include +#include +#include +#include +#include + +#define DEFAULT_UP_SHORTCUT "XF86AudioRaiseVolume" +#define DEFAULT_DOWN_SHORTCUT "XF86AudioLowerVolume" +#define DEFAULT_MUTE_SHORTCUT "XF86AudioMute" + +LxQtVolume::LxQtVolume(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + m_engine(0), + m_defaultSinkIndex(0), + m_defaultSink(0) +{ + m_volumeButton = new VolumeButton(this); + + m_notification = new LxQt::Notification("", this); + + // global key shortcuts + QString shortcutNotRegistered; + + m_keyVolumeUp = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/up").arg(settings()->group()), tr("Increase sound volume"), this); + if (m_keyVolumeUp) + { + connect(m_keyVolumeUp, SIGNAL(activated()), this, SLOT(handleShortcutVolumeUp())); + + if (m_keyVolumeUp->shortcut().isEmpty()) + { + m_keyVolumeUp->changeShortcut(DEFAULT_UP_SHORTCUT); + if (m_keyVolumeUp->shortcut().isEmpty()) + { + shortcutNotRegistered = " '" DEFAULT_UP_SHORTCUT "'"; + } + } + } + + m_keyVolumeDown = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/down").arg(settings()->group()), tr("Decrease sound volume"), this); + if (m_keyVolumeDown) + { + connect(m_keyVolumeDown, SIGNAL(activated()), this, SLOT(handleShortcutVolumeDown())); + + if (m_keyVolumeDown->shortcut().isEmpty()) + { + m_keyVolumeDown->changeShortcut(DEFAULT_DOWN_SHORTCUT); + if (m_keyVolumeDown->shortcut().isEmpty()) + { + shortcutNotRegistered += " '" DEFAULT_DOWN_SHORTCUT "'"; + } + } + } + + m_keyMuteToggle = GlobalKeyShortcut::Client::instance()->addAction(QString(), QString("/panel/%1/mute").arg(settings()->group()), tr("Mute/unmute sound volume"), this); + if (m_keyMuteToggle) + { + connect(m_keyMuteToggle, SIGNAL(activated()), this, SLOT(handleShortcutVolumeMute())); + + if (m_keyMuteToggle->shortcut().isEmpty()) + { + m_keyMuteToggle->changeShortcut(DEFAULT_MUTE_SHORTCUT); + if (m_keyMuteToggle->shortcut().isEmpty()) + { + shortcutNotRegistered += " '" DEFAULT_MUTE_SHORTCUT "'"; + } + } + } + + if(!shortcutNotRegistered.isEmpty()) + { + m_notification->setSummary(tr("Volume Control: The following shortcuts can not be registered: %1").arg(shortcutNotRegistered)); + m_notification->update(); + } + + m_notification->setTimeout(1000); + m_notification->setUrgencyHint(LxQt::Notification::UrgencyLow); + + settingsChanged(); +} + +LxQtVolume::~LxQtVolume() +{ + delete m_volumeButton; +} + +void LxQtVolume::setAudioEngine(AudioEngine *engine) +{ + if (m_engine) { + if (m_engine->backendName() == engine->backendName()) + return; + + m_volumeButton->volumePopup()->setDevice(0); + + disconnect(m_engine, 0, 0, 0); + delete m_engine; + m_engine = 0; + } + + m_engine = engine; + connect(m_engine, SIGNAL(sinkListChanged()), this, SLOT(updateConfigurationSinkList())); + + updateConfigurationSinkList(); +} + + +void LxQtVolume::settingsChanged() +{ + QString engineName = settings()->value(SETTINGS_AUDIO_ENGINE, SETTINGS_DEFAULT_AUDIO_ENGINE).toString(); + qDebug() << "settingsChanged" << engineName; + if (!m_engine || m_engine->backendName() != engineName) { +#if defined(USE_PULSEAUDIO) && defined(USE_ALSA) + if (engineName == QLatin1String("PulseAudio")) + setAudioEngine(new PulseAudioEngine(this)); + else if (engineName == QLatin1String("Alsa")) + setAudioEngine(new AlsaEngine(this)); + else // fallback to OSS + setAudioEngine(new OssEngine(this)); +#elif defined(USE_PULSEAUDIO) + if (engineName == QLatin1String("PulseAudio")) + setAudioEngine(new PulseAudioEngine(this)); + else // fallback to OSS + setAudioEngine(new OssEngine(this)); +#elif defined(USE_ALSA) + if (engineName == QLatin1String("Alsa")) + setAudioEngine(new AlsaEngine(this)); + else // fallback to OSS + setAudioEngine(new OssEngine(this)); +#else + // No other backends are available, fallback to OSS + setAudioEngine(new OssEngine(this)); +#endif + } + + m_volumeButton->setShowOnClicked(settings()->value(SETTINGS_SHOW_ON_LEFTCLICK, SETTINGS_DEFAULT_SHOW_ON_LEFTCLICK).toBool()); + m_volumeButton->setMuteOnMiddleClick(settings()->value(SETTINGS_MUTE_ON_MIDDLECLICK, SETTINGS_DEFAULT_MUTE_ON_MIDDLECLICK).toBool()); + m_volumeButton->setMixerCommand(settings()->value(SETTINGS_MIXER_COMMAND, SETTINGS_DEFAULT_MIXER_COMMAND).toString()); + m_volumeButton->volumePopup()->setSliderStep(settings()->value(SETTINGS_STEP, SETTINGS_DEFAULT_STEP).toInt()); + + m_defaultSinkIndex = settings()->value(SETTINGS_DEVICE, SETTINGS_DEFAULT_DEVICE).toInt(); + if (m_engine && m_engine->sinks().count() > 0) { + m_defaultSinkIndex = qBound(0, m_defaultSinkIndex, m_engine->sinks().count()-1); + + m_defaultSink = m_engine->sinks().at(m_defaultSinkIndex); + m_volumeButton->volumePopup()->setDevice(m_defaultSink); + + m_engine->setIgnoreMaxVolume(settings()->value(SETTINGS_IGNORE_MAX_VOLUME, SETTINGS_DEFAULT_IGNORE_MAX_VOLUME).toBool()); + } +} + +void LxQtVolume::updateConfigurationSinkList() +{ + if (m_engine && m_configDialog) + m_configDialog->setSinkList(m_engine->sinks()); +} + +void LxQtVolume::handleShortcutVolumeUp() +{ + if (m_defaultSink) + { + m_defaultSink->setVolume(m_defaultSink->volume() + settings()->value(SETTINGS_STEP, SETTINGS_DEFAULT_STEP).toInt()); + m_notification->setSummary(tr("Volume: %1").arg(QString::number(m_defaultSink->volume()))); + m_notification->update(); + } +} + +void LxQtVolume::handleShortcutVolumeDown() +{ + if (m_defaultSink) + { + m_defaultSink->setVolume(m_defaultSink->volume() - settings()->value(SETTINGS_STEP, SETTINGS_DEFAULT_STEP).toInt()); + m_notification->setSummary(tr("Volume: %1").arg(QString::number(m_defaultSink->volume()))); + m_notification->update(); + } +} + +void LxQtVolume::handleShortcutVolumeMute() +{ + if (m_defaultSink) + m_defaultSink->toggleMute(); +} + +QWidget *LxQtVolume::widget() +{ + return m_volumeButton; +} + +void LxQtVolume::realign() +{ +} + +QDialog *LxQtVolume::configureDialog() +{ + if(!m_configDialog) + { + m_configDialog = new LxQtVolumeConfiguration(*settings()); + m_configDialog->setAttribute(Qt::WA_DeleteOnClose, true); + + if (m_engine) + m_configDialog->setSinkList(m_engine->sinks()); + } + return m_configDialog; +} + +#undef DEFAULT_UP_SHORTCUT +#undef DEFAULT_DOWN_SHORTCUT +#undef DEFAULT_MUTE_SHORTCUT diff --git a/plugin-volume/lxqtvolume.h b/plugin-volume/lxqtvolume.h new file mode 100644 index 0000000..b72fe3f --- /dev/null +++ b/plugin-volume/lxqtvolume.h @@ -0,0 +1,95 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTVOLUME_H +#define LXQTVOLUME_H + +#include "../panel/ilxqtpanelplugin.h" +#include +#include +#include + +class VolumeButton; +class AudioEngine; +class AudioDevice; +namespace LxQt { +class Notification; +} +namespace GlobalKeyShortcut +{ +class Action; +} + +class LxQtVolumeConfiguration; + +class LxQtVolume : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtVolume(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtVolume(); + + virtual QWidget *widget(); + virtual QString themeId() const { return "Volume"; } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog ; } + void realign(); + QDialog *configureDialog(); + + void setAudioEngine(AudioEngine *engine); +protected slots: + virtual void settingsChanged(); + void updateConfigurationSinkList(); + void handleShortcutVolumeUp(); + void handleShortcutVolumeDown(); + void handleShortcutVolumeMute(); + +private: + AudioEngine *m_engine; + VolumeButton *m_volumeButton; + int m_defaultSinkIndex; + AudioDevice *m_defaultSink; + GlobalKeyShortcut::Action *m_keyVolumeUp; + GlobalKeyShortcut::Action *m_keyVolumeDown; + GlobalKeyShortcut::Action *m_keyMuteToggle; + LxQt::Notification *m_notification; + QPointer m_configDialog; +}; + + +class LxQtVolumePluginLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtVolume(startupInfo); + } +}; + +#endif // LXQTVOLUME_H diff --git a/plugin-volume/lxqtvolumeconfiguration.cpp b/plugin-volume/lxqtvolumeconfiguration.cpp new file mode 100644 index 0000000..43120f7 --- /dev/null +++ b/plugin-volume/lxqtvolumeconfiguration.cpp @@ -0,0 +1,153 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtvolumeconfiguration.h" +#include "ui_lxqtvolumeconfiguration.h" + +#include "audiodevice.h" + +#include +#include + +LxQtVolumeConfiguration::LxQtVolumeConfiguration(QSettings &settings, QWidget *parent) : + LxQtPanelPluginConfigDialog(settings, parent), + ui(new Ui::LxQtVolumeConfiguration) +{ + ui->setupUi(this); + + loadSettings(); + connect(ui->ossRadioButton, SIGNAL(toggled(bool)), this, SLOT(audioEngineChanged(bool))); + connect(ui->devAddedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(sinkSelectionChanged(int))); + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + connect(ui->showOnClickCheckBox, SIGNAL(toggled(bool)), this, SLOT(showOnClickedChanged(bool))); + connect(ui->muteOnMiddleClickCheckBox, SIGNAL(toggled(bool)), this, SLOT(muteOnMiddleClickChanged(bool))); + connect(ui->mixerLineEdit, SIGNAL(textChanged(QString)), this, SLOT(mixerLineEditChanged(QString))); + connect(ui->stepSpinBox, SIGNAL(valueChanged(int)), this, SLOT(stepSpinBoxChanged(int))); + connect(ui->ignoreMaxVolumeCheckBox, SIGNAL(toggled(bool)), this, SLOT(ignoreMaxVolumeCheckBoxChanged(bool))); + + // currently, this option is only supported by the pulse audio backend + if(!ui->pulseAudioRadioButton->isChecked()) + ui->ignoreMaxVolumeCheckBox->setEnabled(false); + +#ifdef USE_PULSEAUDIO + connect(ui->pulseAudioRadioButton, SIGNAL(toggled(bool)), this, SLOT(audioEngineChanged(bool))); +#else + ui->pulseAudioRadioButton->setVisible(false); +#endif + +#ifdef USE_ALSA + connect(ui->alsaRadioButton, SIGNAL(toggled(bool)), this, SLOT(audioEngineChanged(bool))); +#else + ui->alsaRadioButton->setVisible(false); +#endif +} + +LxQtVolumeConfiguration::~LxQtVolumeConfiguration() +{ + delete ui; +} + +void LxQtVolumeConfiguration::setSinkList(const QList sinks) +{ + // preserve the current index, as we change the list + int tmp_index = settings().value(SETTINGS_DEVICE, SETTINGS_DEFAULT_DEVICE).toInt(); + + ui->devAddedCombo->clear(); + + foreach (const AudioDevice *dev, sinks) { + ui->devAddedCombo->addItem(dev->description(), dev->index()); + } + + ui->devAddedCombo->setCurrentIndex(tmp_index); +} + +void LxQtVolumeConfiguration::audioEngineChanged(bool checked) +{ + if (!checked) + return; + + bool canIgnoreMaxVolume = false; + if (ui->pulseAudioRadioButton->isChecked()) + { + settings().setValue(SETTINGS_AUDIO_ENGINE, "PulseAudio"); + canIgnoreMaxVolume = true; + } + else if(ui->alsaRadioButton->isChecked()) + settings().setValue(SETTINGS_AUDIO_ENGINE, "Alsa"); + else + settings().setValue(SETTINGS_AUDIO_ENGINE, "Oss"); + ui->ignoreMaxVolumeCheckBox->setEnabled(canIgnoreMaxVolume); +} + +void LxQtVolumeConfiguration::sinkSelectionChanged(int index) +{ + settings().setValue(SETTINGS_DEVICE, index >= 0 ? index : 0); +} + +void LxQtVolumeConfiguration::showOnClickedChanged(bool state) +{ + settings().setValue(SETTINGS_SHOW_ON_LEFTCLICK, state); +} + +void LxQtVolumeConfiguration::muteOnMiddleClickChanged(bool state) +{ + settings().setValue(SETTINGS_MUTE_ON_MIDDLECLICK, state); +} + +void LxQtVolumeConfiguration::mixerLineEditChanged(const QString &command) +{ + settings().setValue(SETTINGS_MIXER_COMMAND, command); +} + +void LxQtVolumeConfiguration::stepSpinBoxChanged(int step) +{ + settings().setValue(SETTINGS_STEP, step); +} + +void LxQtVolumeConfiguration::ignoreMaxVolumeCheckBoxChanged(bool state) +{ + settings().setValue(SETTINGS_IGNORE_MAX_VOLUME, state); +} + +void LxQtVolumeConfiguration::loadSettings() +{ + QString engine = settings().value(SETTINGS_AUDIO_ENGINE, SETTINGS_DEFAULT_AUDIO_ENGINE).toString().toLower(); + if (engine == "pulseaudio") + ui->pulseAudioRadioButton->setChecked(true); + else if (engine == "alsa") + ui->alsaRadioButton->setChecked(true); + else + ui->ossRadioButton->setChecked(true); + + setComboboxIndexByData(ui->devAddedCombo, settings().value(SETTINGS_DEVICE, SETTINGS_DEFAULT_DEVICE), 1); + ui->showOnClickCheckBox->setChecked(settings().value(SETTINGS_SHOW_ON_LEFTCLICK, SETTINGS_DEFAULT_SHOW_ON_LEFTCLICK).toBool()); + ui->muteOnMiddleClickCheckBox->setChecked(settings().value(SETTINGS_MUTE_ON_MIDDLECLICK, SETTINGS_DEFAULT_MUTE_ON_MIDDLECLICK).toBool()); + ui->mixerLineEdit->setText(settings().value(SETTINGS_MIXER_COMMAND, SETTINGS_DEFAULT_MIXER_COMMAND).toString()); + ui->stepSpinBox->setValue(settings().value(SETTINGS_STEP, SETTINGS_DEFAULT_STEP).toInt()); + ui->ignoreMaxVolumeCheckBox->setChecked(settings().value(SETTINGS_IGNORE_MAX_VOLUME, SETTINGS_DEFAULT_IGNORE_MAX_VOLUME).toBool()); +} + diff --git a/plugin-volume/lxqtvolumeconfiguration.h b/plugin-volume/lxqtvolumeconfiguration.h new file mode 100644 index 0000000..ab04866 --- /dev/null +++ b/plugin-volume/lxqtvolumeconfiguration.h @@ -0,0 +1,90 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2011 Razor team + * Authors: + * Alexander Sokoloff + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQTVOLUMECONFIGURATION_H +#define LXQTVOLUMECONFIGURATION_H + +#include "../panel/lxqtpanelpluginconfigdialog.h" + +#include + +#define SETTINGS_MIXER_COMMAND "mixerCommand" +#define SETTINGS_SHOW_ON_LEFTCLICK "showOnLeftClick" +#define SETTINGS_MUTE_ON_MIDDLECLICK "showOnMiddleClick" +#define SETTINGS_DEVICE "device" +#define SETTINGS_STEP "volumeAdjustStep" +#define SETTINGS_IGNORE_MAX_VOLUME "ignoreMaxVolume" +#define SETTINGS_AUDIO_ENGINE "audioEngine" + +#define SETTINGS_DEFAULT_SHOW_ON_LEFTCLICK true +#define SETTINGS_DEFAULT_MUTE_ON_MIDDLECLICK true +#define SETTINGS_DEFAULT_DEVICE 0 +#define SETTINGS_DEFAULT_STEP 3 +#ifdef USE_PULSEAUDIO + #define SETTINGS_DEFAULT_MIXER_COMMAND "pavucontrol" + #define SETTINGS_DEFAULT_AUDIO_ENGINE "PulseAudio" +#elif defined(USE_ALSA) + #define SETTINGS_DEFAULT_MIXER_COMMAND "qasmixer" + #define SETTINGS_DEFAULT_AUDIO_ENGINE "Alsa" +#else + #define SETTINGS_DEFAULT_MIXER_COMMAND "" + #define SETTINGS_DEFAULT_AUDIO_ENGINE "Oss" +#endif +#define SETTINGS_DEFAULT_IGNORE_MAX_VOLUME false + +class AudioDevice; + +namespace Ui { + class LxQtVolumeConfiguration; +} + +class LxQtVolumeConfiguration : public LxQtPanelPluginConfigDialog +{ + Q_OBJECT + +public: + explicit LxQtVolumeConfiguration(QSettings &settings, QWidget *parent = 0); + ~LxQtVolumeConfiguration(); + +public slots: + void setSinkList(const QList sinks); + void audioEngineChanged(bool checked); + void sinkSelectionChanged(int index); + void showOnClickedChanged(bool state); + void muteOnMiddleClickChanged(bool state); + void mixerLineEditChanged(const QString &command); + void stepSpinBoxChanged(int step); + void ignoreMaxVolumeCheckBoxChanged(bool state); + +protected slots: + virtual void loadSettings(); + +private: + Ui::LxQtVolumeConfiguration *ui; +}; + +#endif // LXQTVOLUMECONFIGURATION_H diff --git a/plugin-volume/lxqtvolumeconfiguration.ui b/plugin-volume/lxqtvolumeconfiguration.ui new file mode 100644 index 0000000..2c6591b --- /dev/null +++ b/plugin-volume/lxqtvolumeconfiguration.ui @@ -0,0 +1,167 @@ + + + LxQtVolumeConfiguration + + + + 0 + 0 + 306 + 407 + + + + Volume Control Settings + + + + + + Device to control + + + + + + + + Alsa + + + + + + + PulseAudio + + + + + + + OSS + + + + + + + + + + + + + + + Behavior + + + + + + Mute on middle click + + + + + + + Show on mouse click + + + + + + + Allow volume beyond 100% (0dB) + + + + + + + + + + 0 + 0 + + + + Volume adjust step + + + + + + + 1 + + + + + + + + + + + + External Mixer + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + + buttons + accepted() + LxQtVolumeConfiguration + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttons + rejected() + LxQtVolumeConfiguration + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/plugin-volume/ossengine.cpp b/plugin-volume/ossengine.cpp new file mode 100644 index 0000000..7a6e8b6 --- /dev/null +++ b/plugin-volume/ossengine.cpp @@ -0,0 +1,127 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXQt - a lightweight, Qt based, desktop toolset + * http://lxqt.org + * + * Copyright: 2014 LXQt team + * Authors: + * Hong Jen Yee (PCMan) + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "ossengine.h" +#include "audiodevice.h" +#include + +#include +#include +#include +#include +#include +#include + +#ifdef __FreeBSD__ +#include +#elif defined(__linux__) || defined(__Linux__) +#include +#else +#error "Not supported platform" +#endif + +OssEngine::OssEngine(QObject *parent) : + AudioEngine(parent), + m_mixer(-1), + m_device(NULL), + m_leftVolume(0), + m_rightVolume(0) +{ + qDebug() << "OssEngine"; + initMixer(); +} + +OssEngine::~OssEngine() +{ + if(m_mixer >= 0) + close(m_mixer); +} + +void OssEngine::initMixer() { + m_mixer = open ("/dev/mixer", O_RDWR, 0); + if (m_mixer < 0) { + qDebug() << "/dev/mixer cannot be opened"; + return; + } + qDebug() << "InitMixer:" << m_mixer; + + m_device = new AudioDevice(Sink, this); + m_device->setName("Master"); + m_device->setIndex(0); + m_device->setDescription("Master Volume"); + m_device->setMuteNoCommit(false); + updateVolume(); + + m_sinks.append(m_device); + emit sinkListChanged(); +} + +void OssEngine::updateVolume() { + if(m_mixer < 0 || !m_device) + return; + int volumes; + if(ioctl(m_mixer, MIXER_READ(SOUND_MIXER_VOLUME), &volumes) < 0) { + qDebug() << "updateVolume() failed" << errno; + } + m_leftVolume = volumes & 0xff; // left + m_rightVolume = (volumes >> 8) & 0xff; // right + qDebug() << "volume:" << m_leftVolume << m_rightVolume; + + m_device->setVolumeNoCommit(m_leftVolume); +} + +void OssEngine::setVolume(int volume) { + if(m_mixer < 0) + return; + int volumes = (volume << 8) + volume; + if(ioctl(m_mixer, MIXER_WRITE(SOUND_MIXER_VOLUME), &volumes) < 0) { + qDebug() << "setVolume() failed" << errno; + } + else { + qDebug() << "setVolume()" << volume; + } +} + +void OssEngine::commitDeviceVolume(AudioDevice *device) +{ + if (!device) + return; + setVolume(device->volume()); +} + +void OssEngine::setMute(AudioDevice *device, bool state) +{ + if(state) + setVolume(0); + else + setVolume(m_leftVolume); +} + +void OssEngine::setIgnoreMaxVolume(bool ignore) +{ + // TODO +} diff --git a/plugin-volume/ossengine.h b/plugin-volume/ossengine.h new file mode 100644 index 0000000..d13c836 --- /dev/null +++ b/plugin-volume/ossengine.h @@ -0,0 +1,70 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef OSSENGINE_H +#define OSSENGINE_H + +#include "audioengine.h" + +#include +#include +#include + +class AudioDevice; + +class OssEngine : public AudioEngine +{ + Q_OBJECT + +public: + OssEngine(QObject *parent = 0); + ~OssEngine(); + + virtual const QString backendName() const { return QLatin1String("Oss"); } + virtual int volumeMax(AudioDevice */*device*/) const { return 100; } + + virtual void commitDeviceVolume(AudioDevice *device); + virtual void setMute(AudioDevice *device, bool state); + virtual void setIgnoreMaxVolume(bool ignore); + +signals: + void sinkInfoChanged(AudioDevice *device); + void readyChanged(bool ready); + +private: + void initMixer(); + void updateVolume(); + void setVolume(int volume); + +private: + int m_mixer; // oss mixer fd + AudioDevice* m_device; + int m_leftVolume; + int m_rightVolume; +}; + +#endif // OSSENGINE_H diff --git a/plugin-volume/pulseaudioengine.cpp b/plugin-volume/pulseaudioengine.cpp new file mode 100644 index 0000000..406e94b --- /dev/null +++ b/plugin-volume/pulseaudioengine.cpp @@ -0,0 +1,410 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "pulseaudioengine.h" + +#include "audiodevice.h" + +#include +#include + +//#define PULSEAUDIO_ENGINE_DEBUG + +static void sinkInfoCallback(pa_context *context, const pa_sink_info *info, int isLast, void *userdata) +{ + PulseAudioEngine *pulseEngine = static_cast(userdata); + QMap stateMap; + stateMap[PA_SINK_INVALID_STATE] = "n/a"; + stateMap[PA_SINK_RUNNING] = "RUNNING"; + stateMap[PA_SINK_IDLE] = "IDLE"; + stateMap[PA_SINK_SUSPENDED] = "SUSPENDED"; + + if (isLast < 0) { + pa_threaded_mainloop_signal(pulseEngine->mainloop(), 0); + qWarning() << QString("Failed to get sink information: %1").arg(pa_strerror(pa_context_errno(context))); + return; + } + + if (isLast) { + pa_threaded_mainloop_signal(pulseEngine->mainloop(), 0); + return; + } + + pulseEngine->addOrUpdateSink(info); +} + +static void contextEventCallback(pa_context *context, const char *name, pa_proplist *p, void *userdata) +{ +#ifdef PULSEAUDIO_ENGINE_DEBUG + qWarning("event received %s", name); +#endif +} + +static void contextStateCallback(pa_context *context, void *userdata) +{ + PulseAudioEngine *pulseEngine = reinterpret_cast(userdata); + + // update internal state + pa_context_state_t state = pa_context_get_state(context); + pulseEngine->setContextState(state); + +#ifdef PULSEAUDIO_ENGINE_DEBUG + switch (state) { + case PA_CONTEXT_UNCONNECTED: + qWarning("context unconnected"); + break; + case PA_CONTEXT_CONNECTING: + qWarning("context connecting"); + break; + case PA_CONTEXT_AUTHORIZING: + qWarning("context authorizing"); + break; + case PA_CONTEXT_SETTING_NAME: + qWarning("context setting name"); + break; + case PA_CONTEXT_READY: + qWarning("context ready"); + break; + case PA_CONTEXT_FAILED: + qWarning("context failed"); + break; + case PA_CONTEXT_TERMINATED: + qWarning("context terminated"); + break; + default: + qWarning("we should never hit this state"); + } +#endif + + pa_threaded_mainloop_signal(pulseEngine->mainloop(), 0); +} + +static void contextSuccessCallback(pa_context *context, int success, void *userdata) +{ + Q_UNUSED(context); + Q_UNUSED(success); + Q_UNUSED(userdata); + + PulseAudioEngine *pulseEngine = reinterpret_cast(userdata); + pa_threaded_mainloop_signal(pulseEngine->mainloop(), 0); +} + +static void contextSubscriptionCallback(pa_context *context, pa_subscription_event_type_t t, uint32_t idx, void *userdata) +{ + PulseAudioEngine *pulseEngine = reinterpret_cast(userdata); + foreach (AudioDevice *dev, pulseEngine->sinks()) { + if (dev->index() == idx) { + pulseEngine->requestSinkInfoUpdate(dev); + break; + } + } +} + + +PulseAudioEngine::PulseAudioEngine(QObject *parent) : + AudioEngine(parent), + m_context(0), + m_contextState(PA_CONTEXT_UNCONNECTED), + m_ready(false), + m_maximumVolume(PA_VOLUME_UI_MAX) +{ + qRegisterMetaType("pa_context_state_t"); + + m_reconnectionTimer.setSingleShot(true); + m_reconnectionTimer.setInterval(100); + connect(&m_reconnectionTimer, SIGNAL(timeout()), this, SLOT(connectContext())); + + m_mainLoop = pa_threaded_mainloop_new(); + if (m_mainLoop == 0) { + qWarning("Unable to create pulseaudio mainloop"); + return; + } + + if (pa_threaded_mainloop_start(m_mainLoop) != 0) { + qWarning("Unable to start pulseaudio mainloop"); + pa_threaded_mainloop_free(m_mainLoop); + m_mainLoop = 0; + return; + } + + m_mainLoopApi = pa_threaded_mainloop_get_api(m_mainLoop); + + connect(this, SIGNAL(contextStateChanged(pa_context_state_t)), this, SLOT(handleContextStateChanged())); + + connectContext(); +} + +PulseAudioEngine::~PulseAudioEngine() +{ + if (m_context) { + pa_context_unref(m_context); + m_context = 0; + } + + if (m_mainLoop) { + pa_threaded_mainloop_free(m_mainLoop); + m_mainLoop = 0; + } +} + +void PulseAudioEngine::addOrUpdateSink(const pa_sink_info *info) +{ + AudioDevice *dev = 0; + bool newSink = false; + QString name = QString::fromUtf8(info->name); + + foreach (AudioDevice *device, m_sinks) { + if (device->name() == name) { + dev = device; + break; + } + } + + if (!dev) { + dev = new AudioDevice(Sink, this); + newSink = true; + } + + dev->setName(name); + dev->setIndex(info->index); + dev->setDescription(QString::fromUtf8(info->description)); + dev->setMuteNoCommit(info->mute); + + // TODO: save separately? alsa does not have it + m_cVolumeMap.insert(dev, info->volume); + + pa_volume_t v = pa_cvolume_avg(&(info->volume)); + // convert real volume to percentage + dev->setVolumeNoCommit(((double)v * 100.0) / m_maximumVolume); + + if (newSink) { + m_sinks.append(dev); + emit sinkListChanged(); + } +} + +void PulseAudioEngine::requestSinkInfoUpdate(AudioDevice *device) +{ + emit sinkInfoChanged(device); +} + +void PulseAudioEngine::commitDeviceVolume(AudioDevice *device) +{ + if (!device || !m_ready) + return; + + // convert from percentage to real volume value + pa_volume_t v = ((double)device->volume() / 100.0) * m_maximumVolume; + pa_cvolume tmpVolume = m_cVolumeMap.value(device); + pa_cvolume *volume = pa_cvolume_set(&tmpVolume, tmpVolume.channels, v); + // qDebug() << "PulseAudioEngine::commitDeviceVolume" << v; + pa_threaded_mainloop_lock(m_mainLoop); + + pa_operation *operation; + if (device->type() == Sink) + operation = pa_context_set_sink_volume_by_index(m_context, device->index(), volume, contextSuccessCallback, this); + else + operation = pa_context_set_source_volume_by_index(m_context, device->index(), volume, contextSuccessCallback, this); + + while (pa_operation_get_state(operation) == PA_OPERATION_RUNNING) + pa_threaded_mainloop_wait(m_mainLoop); + pa_operation_unref(operation); + + pa_threaded_mainloop_unlock(m_mainLoop); +} + +void PulseAudioEngine::retrieveSinks() +{ + if (!m_ready) + return; + + pa_threaded_mainloop_lock(m_mainLoop); + + pa_operation *operation; + operation = pa_context_get_sink_info_list(m_context, sinkInfoCallback, this); + while (pa_operation_get_state(operation) == PA_OPERATION_RUNNING) + pa_threaded_mainloop_wait(m_mainLoop); + pa_operation_unref(operation); + + pa_threaded_mainloop_unlock(m_mainLoop); +} + +void PulseAudioEngine::setupSubscription() +{ + if (!m_ready) + return; + + connect(this, SIGNAL(sinkInfoChanged(AudioDevice*)), this, SLOT(retrieveSinkInfo(AudioDevice*)), Qt::QueuedConnection); + pa_context_set_subscribe_callback(m_context, contextSubscriptionCallback, this); + + pa_threaded_mainloop_lock(m_mainLoop); + + pa_operation *operation; + operation = pa_context_subscribe(m_context, PA_SUBSCRIPTION_MASK_SINK, contextSuccessCallback, this); + while (pa_operation_get_state(operation) == PA_OPERATION_RUNNING) + pa_threaded_mainloop_wait(m_mainLoop); + pa_operation_unref(operation); + + pa_threaded_mainloop_unlock(m_mainLoop); +} + +void PulseAudioEngine::handleContextStateChanged() +{ + if (m_contextState == PA_CONTEXT_FAILED || m_contextState == PA_CONTEXT_TERMINATED) { + qWarning("LxQt-Volume: Context connection failed or terminated lets try to reconnect"); + m_reconnectionTimer.start(); + } +} + +void PulseAudioEngine::connectContext() +{ + bool keepGoing = true; + bool ok = false; + + m_reconnectionTimer.stop(); + + if (!m_mainLoop) + return; + + pa_threaded_mainloop_lock(m_mainLoop); + + if (m_context) { + pa_context_unref(m_context); + m_context = 0; + } + + m_context = pa_context_new(m_mainLoopApi, "lxqt-volume"); + pa_context_set_state_callback(m_context, contextStateCallback, this); + pa_context_set_event_callback(m_context, contextEventCallback, this); + + if (!m_context) { + pa_threaded_mainloop_unlock(m_mainLoop); + m_reconnectionTimer.start(); + return; + } + + if (pa_context_connect(m_context, NULL, (pa_context_flags_t)0, NULL) < 0) { + pa_threaded_mainloop_unlock(m_mainLoop); + m_reconnectionTimer.start(); + return; + } + + while (keepGoing) { + switch (m_contextState) { + case PA_CONTEXT_CONNECTING: + case PA_CONTEXT_AUTHORIZING: + case PA_CONTEXT_SETTING_NAME: + break; + + case PA_CONTEXT_READY: + keepGoing = false; + ok = true; + break; + + case PA_CONTEXT_TERMINATED: + keepGoing = false; + break; + + case PA_CONTEXT_FAILED: + default: + qWarning() << QString("Connection failure: %1").arg(pa_strerror(pa_context_errno(m_context))); + keepGoing = false; + } + + if (keepGoing) + pa_threaded_mainloop_wait(m_mainLoop); + } + + pa_threaded_mainloop_unlock(m_mainLoop); + + if (ok) { + retrieveSinks(); + setupSubscription(); + } else { + m_reconnectionTimer.start(); + } +} + +void PulseAudioEngine::retrieveSinkInfo(AudioDevice *device) +{ + if (!m_ready) + return; + + pa_threaded_mainloop_lock(m_mainLoop); + + pa_operation *operation; + operation = pa_context_get_sink_info_by_index(m_context, device->index(), sinkInfoCallback, this); + while (pa_operation_get_state(operation) == PA_OPERATION_RUNNING) + pa_threaded_mainloop_wait(m_mainLoop); + pa_operation_unref(operation); + + pa_threaded_mainloop_unlock(m_mainLoop); +} + +void PulseAudioEngine::setMute(AudioDevice *device, bool state) +{ + if (!m_ready) + return; + + pa_threaded_mainloop_lock(m_mainLoop); + + pa_operation *operation; + operation = pa_context_set_sink_mute_by_index(m_context, device->index(), state, contextSuccessCallback, this); + while (pa_operation_get_state(operation) == PA_OPERATION_RUNNING) + pa_threaded_mainloop_wait(m_mainLoop); + pa_operation_unref(operation); + + pa_threaded_mainloop_unlock(m_mainLoop); +} + +void PulseAudioEngine::setContextState(pa_context_state_t state) +{ + if (m_contextState == state) + return; + + m_contextState = state; + + // update ready member as it depends on state + if (m_ready == (m_contextState == PA_CONTEXT_READY)) + return; + + m_ready = (m_contextState == PA_CONTEXT_READY); + + emit contextStateChanged(m_contextState); + emit readyChanged(m_ready); +} + +void PulseAudioEngine::setIgnoreMaxVolume(bool ignore) +{ + if (ignore) + m_maximumVolume = PA_VOLUME_UI_MAX; + else + m_maximumVolume = pa_sw_volume_from_dB(0); +} + + + diff --git a/plugin-volume/pulseaudioengine.h b/plugin-volume/pulseaudioengine.h new file mode 100644 index 0000000..bd7591a --- /dev/null +++ b/plugin-volume/pulseaudioengine.h @@ -0,0 +1,98 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef PULSEAUDIOENGINE_H +#define PULSEAUDIOENGINE_H + +#include "audioengine.h" + +#include +#include +#include +#include + +#include + +// PA_VOLUME_UI_MAX is only supported since pulseaudio 0.9.23 +#ifndef PA_VOLUME_UI_MAX +#define PA_VOLUME_UI_MAX (pa_sw_volume_from_dB(+11.0)) +#endif + +class AudioDevice; + +class PulseAudioEngine : public AudioEngine +{ + Q_OBJECT + +public: + PulseAudioEngine(QObject *parent = 0); + ~PulseAudioEngine(); + + virtual const QString backendName() const { return QLatin1String("PulseAudio"); } + + int volumeMax(AudioDevice */*device*/) const { return m_maximumVolume; } + + void requestSinkInfoUpdate(AudioDevice *device); + void addOrUpdateSink(const pa_sink_info *info); + + pa_context_state_t contextState() const { return m_contextState; } + bool ready() const { return m_ready; } + pa_threaded_mainloop *mainloop() const { return m_mainLoop; } + +public slots: + void commitDeviceVolume(AudioDevice *device); + void retrieveSinkInfo(AudioDevice *device); + void setMute(AudioDevice *device, bool state); + void setContextState(pa_context_state_t state); + void setIgnoreMaxVolume(bool ignore); + +signals: + void sinkInfoChanged(AudioDevice *device); + void contextStateChanged(pa_context_state_t state); + void readyChanged(bool ready); + +private slots: + void handleContextStateChanged(); + void connectContext(); + +private: + void retrieveSinks(); + void setupSubscription(); + + pa_mainloop_api *m_mainLoopApi; + pa_threaded_mainloop *m_mainLoop; + pa_context *m_context; + + pa_context_state_t m_contextState; + bool m_ready; + QTimer m_reconnectionTimer; + int m_maximumVolume; + + QMap m_cVolumeMap; +}; + +#endif // PULSEAUDIOENGINE_H diff --git a/plugin-volume/resources/volume.desktop.in b/plugin-volume/resources/volume.desktop.in new file mode 100644 index 0000000..a519581 --- /dev/null +++ b/plugin-volume/resources/volume.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. +Icon=multimedia-volume-control + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-volume/translations/volume.ts b/plugin-volume/translations/volume.ts new file mode 100644 index 0000000..4171d29 --- /dev/null +++ b/plugin-volume/translations/volume.ts @@ -0,0 +1,104 @@ + + + + + LxQtVolume + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + + Volume Control Settings + + + + + Device to control + + + + + Alsa + + + + + PulseAudio + + + + + OSS + + + + + Behavior + + + + + Mute on middle click + + + + + Show on mouse click + + + + + Allow volume beyond 100% (0dB) + + + + + Volume adjust step + + + + + External Mixer + + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_ar.ts b/plugin-volume/translations/volume_ar.ts new file mode 100644 index 0000000..109debb --- /dev/null +++ b/plugin-volume/translations/volume_ar.ts @@ -0,0 +1,108 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + إظهار سطح المكتب: ﻻ يمكن تسجيل اختصار لوحة المفاتيح العامُّ `%1` + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + + Volume Control Settings + + + + + Device to control + + + + + Alsa + + + + + PulseAudio + + + + + OSS + + + + + Behavior + + + + + Mute on middle click + + + + + Show on mouse click + + + + + Allow volume beyond 100% (0dB) + + + + + Volume adjust step + + + + + External Mixer + + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_cs.desktop b/plugin-volume/translations/volume_cs.desktop new file mode 100644 index 0000000..e8f34f5 --- /dev/null +++ b/plugin-volume/translations/volume_cs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs]=Ovládejte hlasitost systému a spusťte svůj upřednostňovaný směšovač. +Name[cs]=Ovládání hlasitosti diff --git a/plugin-volume/translations/volume_cs.ts b/plugin-volume/translations/volume_cs.ts new file mode 100644 index 0000000..cfb7d75 --- /dev/null +++ b/plugin-volume/translations/volume_cs.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Ukázat plochu: Celkovou zkratku '%1' nelze zapsat + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Nastavení ovládání hlasitosti + + + + Volume Control Settings + + + + + Device to control + Zařízení k ovládání + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Chování + + + + Mute on middle click + Ztlumit při klepnutí prostředním tlačítkem + + + + Show on mouse click + Ukázat při klepnutí myší + + + + Allow volume beyond 100% (0dB) + Povolit hlasitost přes 100% (0dB) + + + + Volume adjust step + Krok úpravy hlasitosti + + + + External Mixer + Vnější směšovač + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_cs_CZ.desktop b/plugin-volume/translations/volume_cs_CZ.desktop new file mode 100644 index 0000000..7833031 --- /dev/null +++ b/plugin-volume/translations/volume_cs_CZ.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[cs_CZ]=Ovládejte hlasitost systému a spusťte svůj upřednostňovaný směšovač. +Name[cs_CZ]=Ovládání hlasitosti diff --git a/plugin-volume/translations/volume_cs_CZ.ts b/plugin-volume/translations/volume_cs_CZ.ts new file mode 100644 index 0000000..ae9f3f4 --- /dev/null +++ b/plugin-volume/translations/volume_cs_CZ.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Ukázat plochu: Celkovou zkratku '%1' nelze zapsat + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Nastavení ovládání hlasitosti + + + + Volume Control Settings + + + + + Device to control + Zařízení k ovládání + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Chování + + + + Mute on middle click + Ztlumit při klepnutí prostředním tlačítkem + + + + Show on mouse click + Ukázat při klepnutí myší + + + + Allow volume beyond 100% (0dB) + Povolit hlasitost přes 100% (0dB) + + + + Volume adjust step + Krok úpravy hlasitosti + + + + External Mixer + Vnější směšovač + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_da.desktop b/plugin-volume/translations/volume_da.desktop new file mode 100644 index 0000000..8638826 --- /dev/null +++ b/plugin-volume/translations/volume_da.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da]=Kontroller systemets lydstyrke og start din foretrukne mixer. +Name[da]=Lydstyrkekontrol diff --git a/plugin-volume/translations/volume_da_DK.desktop b/plugin-volume/translations/volume_da_DK.desktop new file mode 100644 index 0000000..6958179 --- /dev/null +++ b/plugin-volume/translations/volume_da_DK.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[da_DK]=Kontroller systemets lydstyrke og start din foretrukne mixer. +Name[da_DK]=Lydstyrkekontrol diff --git a/plugin-volume/translations/volume_da_DK.ts b/plugin-volume/translations/volume_da_DK.ts new file mode 100644 index 0000000..34aaae4 --- /dev/null +++ b/plugin-volume/translations/volume_da_DK.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Vis Skrivebord: Global genvej '%1' kan ikke registreres + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Indstillinger for LxQt Lydstyrkekontrol + + + + Volume Control Settings + + + + + Device to control + Enhed som styres + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Adfærd + + + + Mute on middle click + Lydløs ved midterklik + + + + Show on mouse click + Vis ved museklik + + + + Allow volume beyond 100% (0dB) + Tillad lydstyrke over 100% (0dB) + + + + Volume adjust step + Trin for lydstyrkejustering + + + + External Mixer + Ekstern mixer + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_de_DE.desktop b/plugin-volume/translations/volume_de_DE.desktop new file mode 100644 index 0000000..fab0912 --- /dev/null +++ b/plugin-volume/translations/volume_de_DE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[de_DE]=Regele die Systemlautstärke und starte bevorzugten Mixer. +Name[de_DE]=Lautstärken Regelung diff --git a/plugin-volume/translations/volume_de_DE.ts b/plugin-volume/translations/volume_de_DE.ts new file mode 100644 index 0000000..4174f9c --- /dev/null +++ b/plugin-volume/translations/volume_de_DE.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Zeige Desktop: Globales Tastenkürzel '%1' kann nicht vergeben werden + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + LxQt Lautstärkeregelung + + + + Volume Control Settings + + + + + Device to control + Zu regelndes Gerät + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Verhalten + + + + Mute on middle click + Stummschaltung per Mittelklick + + + + Show on mouse click + Bei Mausklick anzeigen + + + + Allow volume beyond 100% (0dB) + Lautstärken über 100% (0dB) erlauben + + + + Volume adjust step + Lautstärken Schrittweite + + + + External Mixer + Externer Mixer + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_el_GR.desktop b/plugin-volume/translations/volume_el_GR.desktop new file mode 100644 index 0000000..206426c --- /dev/null +++ b/plugin-volume/translations/volume_el_GR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[el_GR]=Ελέγξτε την ένταση ήχου του συστήματος και ξεκινήστε τον προτιμώμενο μίκτη. +Name[el_GR]=Έλεγχος έντασης ήχου diff --git a/plugin-volume/translations/volume_el_GR.ts b/plugin-volume/translations/volume_el_GR.ts new file mode 100644 index 0000000..adfa582 --- /dev/null +++ b/plugin-volume/translations/volume_el_GR.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Εμφάνιση επιφάνειας εργασίας: Δεν είναι δυνατή η καταχώριση της καθολικής συντόμευσης "%1" + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Ρυθμίσεις ελέγχου έντασης ήχου LxQt + + + + Volume Control Settings + + + + + Device to control + Συσκευή για έλεγχο + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Συμπεριφορά + + + + Mute on middle click + Σίγαση με μεσαίο κλικ + + + + Show on mouse click + Εμφάνιση με κλικ + + + + Allow volume beyond 100% (0dB) + Να επιτρέπεται ένταση πάνω από 100% (0dB) + + + + Volume adjust step + Βήμα προσαρμογής έντασης + + + + External Mixer + Εξωτερικός μίκτης + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_eo.ts b/plugin-volume/translations/volume_eo.ts new file mode 100644 index 0000000..4f31086 --- /dev/null +++ b/plugin-volume/translations/volume_eo.ts @@ -0,0 +1,108 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Montri labortablon: ĉiea klavkombino '%1' ne registreblas + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + + Volume Control Settings + + + + + Device to control + + + + + Alsa + + + + + PulseAudio + + + + + OSS + + + + + Behavior + + + + + Mute on middle click + + + + + Show on mouse click + + + + + Allow volume beyond 100% (0dB) + + + + + Volume adjust step + + + + + External Mixer + + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_es.desktop b/plugin-volume/translations/volume_es.desktop new file mode 100644 index 0000000..333136d --- /dev/null +++ b/plugin-volume/translations/volume_es.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es]=Controla el volumen del sistema y lanza su mezclador preferido +Name[es]=Control de volumen diff --git a/plugin-volume/translations/volume_es.ts b/plugin-volume/translations/volume_es.ts new file mode 100644 index 0000000..7514323 --- /dev/null +++ b/plugin-volume/translations/volume_es.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar Escritorio: Atajo global '%1' no puede ser registrado + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Opciones del Control de Volumen de LxQt + + + + Volume Control Settings + + + + + Device to control + Dispositivo de control + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportamiento + + + + Mute on middle click + Silenciar con click central + + + + Show on mouse click + Mostrar con un click + + + + Allow volume beyond 100% (0dB) + Permitir que el volumen sobrepase el 100% (0dB) + + + + Volume adjust step + Tamaño del ajuste de volumen + + + + External Mixer + Mezclador externo + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_es_VE.desktop b/plugin-volume/translations/volume_es_VE.desktop new file mode 100644 index 0000000..aea4eeb --- /dev/null +++ b/plugin-volume/translations/volume_es_VE.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[es_VE]=Controla el volumen del sistema y lanza el mezclador escogido referido +Name[es_VE]=Control de volumen diff --git a/plugin-volume/translations/volume_es_VE.ts b/plugin-volume/translations/volume_es_VE.ts new file mode 100644 index 0000000..a63ca2e --- /dev/null +++ b/plugin-volume/translations/volume_es_VE.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar escritorio: Acceso de teclado global '%1' no puede registrarse + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Preferencias de control de volumen de LxQt + + + + Volume Control Settings + + + + + Device to control + Disositivo + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportamiento + + + + Mute on middle click + Silenciar en clic medio + + + + Show on mouse click + Mostrar en clic de raton + + + + Allow volume beyond 100% (0dB) + permitir volumen mas alla de 100% (0db) + + + + Volume adjust step + paso de ajuste de volumen + + + + External Mixer + Mexclador + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_eu.desktop b/plugin-volume/translations/volume_eu.desktop new file mode 100644 index 0000000..6ebf4c0 --- /dev/null +++ b/plugin-volume/translations/volume_eu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[eu]=Kontrolatu sistemaren bolumena eta abiarazi zure gogoko nahasgailua. +Name[eu]=Bolumen-kontrola diff --git a/plugin-volume/translations/volume_eu.ts b/plugin-volume/translations/volume_eu.ts new file mode 100644 index 0000000..12b8546 --- /dev/null +++ b/plugin-volume/translations/volume_eu.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Erakutsi mahaigaina: Ezin da '%1' lasterbide globala erregistratu + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + LxQt bolumen-kontrolaren ezarpenak + + + + Volume Control Settings + + + + + Device to control + Kontrolatu beharreko gailua + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Portaera + + + + Mute on middle click + Mututu erdiko botoiarekin klikatzean + + + + Show on mouse click + Erakutsi saguarekin klikatzean + + + + Allow volume beyond 100% (0dB) + Baimendu % 100etik (0dB) gorako bolumena + + + + Volume adjust step + Bolumen-doikuntzaren pausoa + + + + External Mixer + Kanpoko nahastailea + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_fi.desktop b/plugin-volume/translations/volume_fi.desktop new file mode 100644 index 0000000..121baa7 --- /dev/null +++ b/plugin-volume/translations/volume_fi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[fi]=Hallitse järjestelmän äänenvoimakkuutta, ja käynnistä suosimasi mikseri. +Name[fi]=Äänenvoimakkuuden hallinta diff --git a/plugin-volume/translations/volume_fi.ts b/plugin-volume/translations/volume_fi.ts new file mode 100644 index 0000000..2926394 --- /dev/null +++ b/plugin-volume/translations/volume_fi.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Näytä työpöytä: globaalia pikanäppäintä '%1' ei voi rekisteröidä + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + LxQtin äänenhallinnan asetukset + + + + Volume Control Settings + + + + + Device to control + Hallittava laite + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Toiminta + + + + Mute on middle click + Vaimenna hiiren keskimmäisen painikkeen painalluksella + + + + Show on mouse click + Näytä hiiren painalluksella + + + + Allow volume beyond 100% (0dB) + Salli yli 100 %:n äänenvoimakkuus (0 dB) + + + + Volume adjust step + Äänenvoimakkuuden säätöväli + + + + External Mixer + Ulkoinen mikseri + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_fr_FR.ts b/plugin-volume/translations/volume_fr_FR.ts new file mode 100644 index 0000000..23e922b --- /dev/null +++ b/plugin-volume/translations/volume_fr_FR.ts @@ -0,0 +1,108 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Montrer le bureau : le raccourci global '%1' ne peut pas être défini + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + + Volume Control Settings + + + + + Device to control + + + + + Alsa + + + + + PulseAudio + + + + + OSS + + + + + Behavior + + + + + Mute on middle click + + + + + Show on mouse click + + + + + Allow volume beyond 100% (0dB) + + + + + Volume adjust step + + + + + External Mixer + + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_it_IT.desktop b/plugin-volume/translations/volume_it_IT.desktop new file mode 100644 index 0000000..353e2eb --- /dev/null +++ b/plugin-volume/translations/volume_it_IT.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[it_IT]=Controlla il volume del sistema e avvia il tuo mixer preferito. +Name[it_IT]=Controllo del volume diff --git a/plugin-volume/translations/volume_it_IT.ts b/plugin-volume/translations/volume_it_IT.ts new file mode 100644 index 0000000..2da4b27 --- /dev/null +++ b/plugin-volume/translations/volume_it_IT.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Mostra desktop: la scorciatoia globale '%1' non può essere registrata + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Impostazioni del controllo del volume di LxQt + + + + Volume Control Settings + + + + + Device to control + Dispositivo da controllare + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportamento + + + + Mute on middle click + Muto al clic centrale del mouse + + + + Show on mouse click + Mostra al clic del mouse + + + + Allow volume beyond 100% (0dB) + Permetti volume oltre il 100% (0dB) + + + + Volume adjust step + Valore di regolazione del volume + + + + External Mixer + Mixer esterno + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_ja.desktop b/plugin-volume/translations/volume_ja.desktop new file mode 100644 index 0000000..d1d547e --- /dev/null +++ b/plugin-volume/translations/volume_ja.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ja]=音量調節 +Comment[ja]=システムの音量を制御したり、ミキサーを起動したりします + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-volume/translations/volume_ja.ts b/plugin-volume/translations/volume_ja.ts new file mode 100644 index 0000000..5a11437 --- /dev/null +++ b/plugin-volume/translations/volume_ja.ts @@ -0,0 +1,104 @@ + + + + + LxQtVolume + + + Increase sound volume + 音量を上げる + + + + Decrease sound volume + 音量を下げる + + + + Mute/unmute sound volume + ミュート/解除 + + + + Volume Control: The following shortcuts can not be registered: %1 + 音量制御: このショートカットは登録することができません: %1 + + + + + Volume: %1 + 音量: %1 + + + + LxQtVolumeConfiguration + + + Volume Control Settings + 音量制御の設定 + + + + Device to control + 制御するデバイス + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + OSS + + + + Behavior + 挙動 + + + + Mute on middle click + 中ボタンのクリックでミュート + + + + Show on mouse click + マウスのクリックで表示 + + + + Allow volume beyond 100% (0dB) + 100% (0dB)を超える音量を許可 + + + + Volume adjust step + 音量変更のステップ幅 + + + + External Mixer + 外部ミキサー + + + + VolumePopup + + + Launch mixer + ミキサーを起動 + + + + Mixer + ミキサー + + + diff --git a/plugin-volume/translations/volume_lt.ts b/plugin-volume/translations/volume_lt.ts new file mode 100644 index 0000000..3049e00 --- /dev/null +++ b/plugin-volume/translations/volume_lt.ts @@ -0,0 +1,108 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Rodyti darbalaukį: globalusis klavišas „%1“ negali būti registruojamas + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + + Volume Control Settings + + + + + Device to control + + + + + Alsa + + + + + PulseAudio + + + + + OSS + + + + + Behavior + + + + + Mute on middle click + + + + + Show on mouse click + + + + + Allow volume beyond 100% (0dB) + + + + + Volume adjust step + + + + + External Mixer + + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_nl.ts b/plugin-volume/translations/volume_nl.ts new file mode 100644 index 0000000..7e931fb --- /dev/null +++ b/plugin-volume/translations/volume_nl.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Bureaublad weergeven: systeembrede sneltoets '%1' kan niet worden geregistreerd + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Instellingen voor volumebeheer van LxQt + + + + Volume Control Settings + + + + + Device to control + Apparaat om te beheren + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Gedrag + + + + Mute on middle click + Dempen bij middelklik + + + + Show on mouse click + Tonen bij muisklik + + + + Allow volume beyond 100% (0dB) + Volume hoger dan 100% toestaan (0dB) + + + + Volume adjust step + Trap voor bijstellen van volume + + + + External Mixer + Extern mengpaneel + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_pl_PL.desktop b/plugin-volume/translations/volume_pl_PL.desktop new file mode 100644 index 0000000..6e3a462 --- /dev/null +++ b/plugin-volume/translations/volume_pl_PL.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pl_PL]=Dopasuj poziom dźwięku i włącz preferowany mikser. +Name[pl_PL]=Regulacja poziomu dźwięku diff --git a/plugin-volume/translations/volume_pl_PL.ts b/plugin-volume/translations/volume_pl_PL.ts new file mode 100644 index 0000000..5df03e8 --- /dev/null +++ b/plugin-volume/translations/volume_pl_PL.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Pokaż Pulpit: Globalny skrót '%1' nie może zostać zarejestrowany + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Ustawienia regulacji poziomu dźwięku LxQt + + + + Volume Control Settings + + + + + Device to control + Używane urządzenie + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Zachowanie + + + + Mute on middle click + Wycisz na klikniecie środkowym przyciskiem myszy + + + + Show on mouse click + Pokaż na kliknięcie myszką + + + + Allow volume beyond 100% (0dB) + Pozwól poziom dźwięku powyżej 100% (0db) + + + + Volume adjust step + Stopień regulowania poziomu dźwięku + + + + External Mixer + Zewnętrzny mikser + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_pt.desktop b/plugin-volume/translations/volume_pt.desktop new file mode 100644 index 0000000..85fb03e --- /dev/null +++ b/plugin-volume/translations/volume_pt.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + +# Translations +Name[pt]=Controlo de volume +Comment[pt]=Controlar o volume do sistema e abrir o gestor de som diff --git a/plugin-volume/translations/volume_pt.ts b/plugin-volume/translations/volume_pt.ts new file mode 100644 index 0000000..7da3821 --- /dev/null +++ b/plugin-volume/translations/volume_pt.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Tecla de atalho global: "%1" não pode ser registada + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Definições do controlo de volume do LxQt + + + + Volume Control Settings + + + + + Device to control + Dispositivo a controlar + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportamento + + + + Mute on middle click + Silenciar com a roda do rato + + + + Show on mouse click + Mostrar ao clicar com o rato + + + + Allow volume beyond 100% (0dB) + Permitir volume abaixo de 100% (0dB) + + + + Volume adjust step + Nível de ajuste do volume + + + + External Mixer + Gestor de som externo + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_pt_BR.desktop b/plugin-volume/translations/volume_pt_BR.desktop new file mode 100644 index 0000000..d03cdbd --- /dev/null +++ b/plugin-volume/translations/volume_pt_BR.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[pt_BR]=Controla o volume do sistema e lança seu mixer preferido. +Name[pt_BR]=Controle de Volume diff --git a/plugin-volume/translations/volume_pt_BR.ts b/plugin-volume/translations/volume_pt_BR.ts new file mode 100644 index 0000000..a0b338b --- /dev/null +++ b/plugin-volume/translations/volume_pt_BR.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Mostrar Área De Trabalho: Atalho Global '%1'não pode se registrado + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Configurações Do Controle De Volume + + + + Volume Control Settings + + + + + Device to control + Dispositivo para controlar + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportamento + + + + Mute on middle click + Mudo no clique do meio + + + + Show on mouse click + Mostrar no clique do mouse + + + + Allow volume beyond 100% (0dB) + Permitir o volume além de 100% (0dB) + + + + Volume adjust step + Ajustar passo do volume + + + + External Mixer + Mixer Externo + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_ro_RO.desktop b/plugin-volume/translations/volume_ro_RO.desktop new file mode 100644 index 0000000..373ecb6 --- /dev/null +++ b/plugin-volume/translations/volume_ro_RO.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ro_RO]=Controlează volumul sistem și lansează mixerul dvs preferat +Name[ro_RO]=Control volum diff --git a/plugin-volume/translations/volume_ro_RO.ts b/plugin-volume/translations/volume_ro_RO.ts new file mode 100644 index 0000000..f7cfbb6 --- /dev/null +++ b/plugin-volume/translations/volume_ro_RO.ts @@ -0,0 +1,108 @@ + + + + + LxQtVolume + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Setări control volum LxQt + + + + Volume Control Settings + + + + + Device to control + Dispozitiv de controlat + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Comportament + + + + Mute on middle click + + + + + Show on mouse click + Afișează la clic de maus + + + + Allow volume beyond 100% (0dB) + Permite volum dincolo de 100% (0dB) + + + + Volume adjust step + + + + + External Mixer + Mixer extern + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_ru.desktop b/plugin-volume/translations/volume_ru.desktop new file mode 100644 index 0000000..21165b3 --- /dev/null +++ b/plugin-volume/translations/volume_ru.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru]=Контролировать громкость звука в системе и запустить предпочтитаемый микшер. +Name[ru]=Регулятор громкости \ No newline at end of file diff --git a/plugin-volume/translations/volume_ru.ts b/plugin-volume/translations/volume_ru.ts new file mode 100644 index 0000000..a651d8d --- /dev/null +++ b/plugin-volume/translations/volume_ru.ts @@ -0,0 +1,104 @@ + + + + + LxQtVolume + + + Increase sound volume + Увеличить громкость звука + + + + Decrease sound volume + Уменьшить громкость звука + + + + Mute/unmute sound volume + Выкл/вкл звук + + + + Volume Control: The following shortcuts can not be registered: %1 + Контроль громкости: следующие сочетания клавиш не могут быть зарегистрированы: %1 + + + + + Volume: %1 + Громкость: %1 + + + + LxQtVolumeConfiguration + + + Volume Control Settings + Настройки контроля громкости + + + + Device to control + Контролируемое устройство + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + OSS + + + + Behavior + Поведение + + + + Mute on middle click + Отключать звук при щелчке средней кнопкой мыши + + + + Show on mouse click + Показать по щелчку мыши + + + + Allow volume beyond 100% (0dB) + Разрешить громкость выше 100% (0Дб) + + + + Volume adjust step + Шаг регулировки громкости + + + + External Mixer + Внешний микшер + + + + VolumePopup + + + Launch mixer + Запустить микшер + + + + Mixer + Микшер + + + diff --git a/plugin-volume/translations/volume_ru_RU.desktop b/plugin-volume/translations/volume_ru_RU.desktop new file mode 100644 index 0000000..eb99000 --- /dev/null +++ b/plugin-volume/translations/volume_ru_RU.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[ru_RU]=Контролировать громкость звука в системе и запустить предпочтитаемый микшер. +Name[ru_RU]=Регулятор громкости \ No newline at end of file diff --git a/plugin-volume/translations/volume_ru_RU.ts b/plugin-volume/translations/volume_ru_RU.ts new file mode 100644 index 0000000..a7988d5 --- /dev/null +++ b/plugin-volume/translations/volume_ru_RU.ts @@ -0,0 +1,104 @@ + + + + + LxQtVolume + + + Increase sound volume + Увеличить громкость звука + + + + Decrease sound volume + Уменьшить громкость звука + + + + Mute/unmute sound volume + Выкл/вкл звук + + + + Volume Control: The following shortcuts can not be registered: %1 + Контроль громкости: следующие сочетания клавиш не могут быть зарегистрированы: %1 + + + + + Volume: %1 + Громкость: %1 + + + + LxQtVolumeConfiguration + + + Volume Control Settings + Настройки контроля громкости + + + + Device to control + Контролируемое устройство + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + OSS + + + + Behavior + Поведение + + + + Mute on middle click + Отключать звук при щелчке средней кнопкой мыши + + + + Show on mouse click + Показать по щелчку мыши + + + + Allow volume beyond 100% (0dB) + Разрешить громкость выше 100% (0Дб) + + + + Volume adjust step + Шаг регулировки громкости + + + + External Mixer + Внешний микшер + + + + VolumePopup + + + Launch mixer + Запустить микшер + + + + Mixer + Микшер + + + diff --git a/plugin-volume/translations/volume_sl.ts b/plugin-volume/translations/volume_sl.ts new file mode 100644 index 0000000..342d1b9 --- /dev/null +++ b/plugin-volume/translations/volume_sl.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Prikaz namizja: globalne bližnjice »%1« ni moč registrirati + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Nastavitve upravljalnika glasnosti LXQt + + + + Volume Control Settings + + + + + Device to control + Naprava + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Obnašanje + + + + Mute on middle click + Utišaj s srednjim klikom + + + + Show on mouse click + Pokaži z miškinim klikom + + + + Allow volume beyond 100% (0dB) + Dovoli glasnost, večjo od 100% (0 dB) + + + + Volume adjust step + Velikost koraka + + + + External Mixer + Zunanji mešalnik + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_th_TH.desktop b/plugin-volume/translations/volume_th_TH.desktop new file mode 100644 index 0000000..9ae62c8 --- /dev/null +++ b/plugin-volume/translations/volume_th_TH.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[th_TH]=ควบคุมระดับเสียงของระบบและเรียกใช้ตัวผสมที่คุณต้องการ +Name[th_TH]=ควบคุมระดับเสียง diff --git a/plugin-volume/translations/volume_th_TH.ts b/plugin-volume/translations/volume_th_TH.ts new file mode 100644 index 0000000..3d6e732 --- /dev/null +++ b/plugin-volume/translations/volume_th_TH.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + แสดงพื้นโต๊ะ: ไม่สามารถตั้ง '%1' เป็นปุ่มลัดส่วนกลางได้ + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + ค่าตั้งควบคุมระดับเสียง LxQt + + + + Volume Control Settings + + + + + Device to control + อุปกรณ์ที่จะควบคุม + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + พฤติกรรม + + + + Mute on middle click + ปิดเสียงด้วยการคลิกปุ่มกลาง + + + + Show on mouse click + แสดงขึ้นมาเมื่อถูกคลิก + + + + Allow volume beyond 100% (0dB) + อนุญาตให้ใช้ระดับเสียงเกินกว่า 100% (0dB) + + + + Volume adjust step + ช่วงการปรับระดับเสียง + + + + External Mixer + ตัวผสมภายนอก + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_uk.desktop b/plugin-volume/translations/volume_uk.desktop new file mode 100644 index 0000000..6730561 --- /dev/null +++ b/plugin-volume/translations/volume_uk.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[uk]=Регулює системну гучність та запускає ваш улюблений мікшер +Name[uk]=Регулятор гучності diff --git a/plugin-volume/translations/volume_uk.ts b/plugin-volume/translations/volume_uk.ts new file mode 100644 index 0000000..18c26b8 --- /dev/null +++ b/plugin-volume/translations/volume_uk.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + Показати стільницю: Не вдалося зареєструвати глобальне скорочення '%1' + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + Налаштування регулятора гучності LxQt + + + + Volume Control Settings + + + + + Device to control + Контролювати пристрій + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + Поведінка + + + + Mute on middle click + Приглушити по середній кнопці + + + + Show on mouse click + Показати по кнопці миші + + + + Allow volume beyond 100% (0dB) + Дозволяти гучність вище 100% (0 дБ) + + + + Volume adjust step + Крок регулювання гучності + + + + External Mixer + Зовнішній мікшер + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_zh_CN.desktop b/plugin-volume/translations/volume_zh_CN.desktop new file mode 100644 index 0000000..396fca5 --- /dev/null +++ b/plugin-volume/translations/volume_zh_CN.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_CN]=控制系统音量并启动您喜欢的混音器。 +Name[zh_CN]=音量控制 diff --git a/plugin-volume/translations/volume_zh_CN.ts b/plugin-volume/translations/volume_zh_CN.ts new file mode 100644 index 0000000..9ff66e5 --- /dev/null +++ b/plugin-volume/translations/volume_zh_CN.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + 显示桌面:无法注册全局快捷键'%1' + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + LxQt 声音控制设置 + + + + Volume Control Settings + + + + + Device to control + 控制设备 + + + + Alsa + Alsa + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + 行为 + + + + Mute on middle click + 鼠标中击时静音 + + + + Show on mouse click + 显示鼠标点击 + + + + Allow volume beyond 100% (0dB) + 允许声音超过 100%(0分贝) + + + + Volume adjust step + 声音调整幅度 + + + + External Mixer + 外部混音器 + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/translations/volume_zh_TW.desktop b/plugin-volume/translations/volume_zh_TW.desktop new file mode 100644 index 0000000..16d426a --- /dev/null +++ b/plugin-volume/translations/volume_zh_TW.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=Volume control +Comment=Control the system's volume and launch your preferred mixer. + +#TRANSLATIONS_DIR=../translations + + +# Translations +Comment[zh_TW]=控制系統音量並啟動您喜愛的音量控制器 +Name[zh_TW]=音量控制 diff --git a/plugin-volume/translations/volume_zh_TW.ts b/plugin-volume/translations/volume_zh_TW.ts new file mode 100644 index 0000000..63391a5 --- /dev/null +++ b/plugin-volume/translations/volume_zh_TW.ts @@ -0,0 +1,112 @@ + + + + + LxQtVolume + + Show Desktop: Global shortcut '%1' cannot be registered + 顯示桌面:全域快捷鍵'%1'無法被註冊 + + + + Increase sound volume + + + + + Decrease sound volume + + + + + Mute/unmute sound volume + + + + + Volume Control: The following shortcuts can not be registered: %1 + + + + + + Volume: %1 + + + + + LxQtVolumeConfiguration + + LxQt Volume Control Settings + LxQt音量調整設定 + + + + Volume Control Settings + + + + + Device to control + 設置裝置 + + + + Alsa + ALSA + + + + PulseAudio + PulseAudio + + + + OSS + + + + + Behavior + 行為 + + + + Mute on middle click + 按滑鼠中鍵時靜音 + + + + Show on mouse click + 滑鼠點擊時顯示 + + + + Allow volume beyond 100% (0dB) + 允許音量超過 100% (0dB) + + + + Volume adjust step + 音量調整步驟 + + + + External Mixer + 外掛音量調整程式 + + + + VolumePopup + + + Launch mixer + + + + + Mixer + + + + diff --git a/plugin-volume/volumebutton.cpp b/plugin-volume/volumebutton.cpp new file mode 100644 index 0000000..ff489ef --- /dev/null +++ b/plugin-volume/volumebutton.cpp @@ -0,0 +1,157 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "volumebutton.h" + +#include "volumepopup.h" +#include "audiodevice.h" + +#include +#include +#include + +#include +#include "../panel/ilxqtpanel.h" +#include "../panel/ilxqtpanelplugin.h" + +VolumeButton::VolumeButton(ILxQtPanelPlugin *plugin, QWidget* parent): + QToolButton(parent), + mPlugin(plugin), + m_panel(plugin->panel()), + m_showOnClick(true), + m_muteOnMiddleClick(true) +{ + // initial icon for button. It will be replaced after devices scan. + // In the worst case - no soundcard/pulse - is found it remains + // in the button but at least the button is not blank ("invisible") + handleStockIconChanged("dialog-error"); + m_volumePopup = new VolumePopup(); + + m_popupHideTimer.setInterval(1000); + connect(this, SIGNAL(clicked()), this, SLOT(toggleVolumeSlider())); + connect(&m_popupHideTimer, SIGNAL(timeout()), this, SLOT(hideVolumeSlider())); + + connect(m_volumePopup, SIGNAL(mouseEntered()), &m_popupHideTimer, SLOT(stop())); + connect(m_volumePopup, SIGNAL(mouseLeft()), &m_popupHideTimer, SLOT(start())); + + connect(m_volumePopup, SIGNAL(launchMixer()), this, SLOT(handleMixerLaunch())); + connect(m_volumePopup, SIGNAL(stockIconChanged(QString)), this, SLOT(handleStockIconChanged(QString))); +} + +VolumeButton::~VolumeButton() +{ + if (m_volumePopup) + delete m_volumePopup; +} + +void VolumeButton::setShowOnClicked(bool state) +{ + if (m_showOnClick == state) + return; + + m_showOnClick = state; +} + +void VolumeButton::setMuteOnMiddleClick(bool state) +{ + m_muteOnMiddleClick = state; +} + +void VolumeButton::setMixerCommand(const QString &command) +{ + m_mixerCommand = command; +} + +void VolumeButton::enterEvent(QEvent *event) +{ + if (!m_showOnClick) + showVolumeSlider(); + + m_popupHideTimer.stop(); +} + +void VolumeButton::leaveEvent(QEvent *event) +{ + m_popupHideTimer.start(); +} + +void VolumeButton::wheelEvent(QWheelEvent *event) +{ + m_volumePopup->handleWheelEvent(event); +} + +void VolumeButton::mouseReleaseEvent(QMouseEvent *event) +{ + if (event->button() == Qt::MidButton && m_muteOnMiddleClick) { + if (m_volumePopup->device()) { + m_volumePopup->device()->toggleMute(); + return; + } + } + + QToolButton::mouseReleaseEvent(event); +} + +void VolumeButton::toggleVolumeSlider() +{ + if (m_volumePopup->isVisible()) { + hideVolumeSlider(); + } else { + showVolumeSlider(); + } +} + +void VolumeButton::showVolumeSlider() +{ + + if (m_volumePopup->isVisible()) + return; + + m_popupHideTimer.stop(); + m_volumePopup->updateGeometry(); + m_volumePopup->adjustSize(); + QRect pos = mPlugin->calculatePopupWindowPos(m_volumePopup->size()); + m_volumePopup->open(pos.topLeft(), Qt::TopLeftCorner); + m_volumePopup->activateWindow(); +} + +void VolumeButton::hideVolumeSlider() +{ + // qDebug() << "hideVolumeSlider"; + m_popupHideTimer.stop(); + m_volumePopup->hide(); +} + +void VolumeButton::handleMixerLaunch() +{ + QProcess::startDetached(m_mixerCommand); +} + +void VolumeButton::handleStockIconChanged(const QString &iconName) +{ + setIcon(XdgIcon::fromTheme(iconName)); +} diff --git a/plugin-volume/volumebutton.h b/plugin-volume/volumebutton.h new file mode 100644 index 0000000..7d5cb7f --- /dev/null +++ b/plugin-volume/volumebutton.h @@ -0,0 +1,77 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef VOLUMEBUTTON_H +#define VOLUMEBUTTON_H + +#include +#include + +class VolumePopup; +class ILxQtPanel; +class LxQtVolume; +class ILxQtPanelPlugin; + +class VolumeButton : public QToolButton +{ + Q_OBJECT +public: + VolumeButton(ILxQtPanelPlugin *plugin, QWidget* parent = 0); + ~VolumeButton(); + + void setShowOnClicked(bool state); + void setMuteOnMiddleClick(bool state); + void setMixerCommand(const QString &command); + + VolumePopup *volumePopup() const { return m_volumePopup; } + +public slots: + void hideVolumeSlider(); + void showVolumeSlider(); + +protected: + void enterEvent(QEvent *event); + void leaveEvent(QEvent *event); + void wheelEvent(QWheelEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + +private slots: + void toggleVolumeSlider(); + void handleMixerLaunch(); + void handleStockIconChanged(const QString &iconName); + +private: + VolumePopup *m_volumePopup; + ILxQtPanelPlugin *mPlugin; + ILxQtPanel *m_panel; + QTimer m_popupHideTimer; + bool m_showOnClick; + bool m_muteOnMiddleClick; + QString m_mixerCommand; +}; + +#endif // VOLUMEBUTTON_H diff --git a/plugin-volume/volumepopup.cpp b/plugin-volume/volumepopup.cpp new file mode 100644 index 0000000..4313c19 --- /dev/null +++ b/plugin-volume/volumepopup.cpp @@ -0,0 +1,248 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "volumepopup.h" + +#include "audiodevice.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "audioengine.h" +#include + +VolumePopup::VolumePopup(QWidget* parent): + QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::Popup | Qt::X11BypassWindowManagerHint), + m_pos(0,0), + m_anchor(Qt::TopLeftCorner), + m_device(0) +{ + m_mixerButton = new QPushButton(this); + m_mixerButton->setObjectName("MixerLink"); + m_mixerButton->setMinimumWidth(1); + m_mixerButton->setFlat(true); + m_mixerButton->setToolTip(tr("Launch mixer")); + m_mixerButton->setText(tr("Mixer")); + QSize textSize = m_mixerButton->fontMetrics().size(Qt::TextShowMnemonic, m_mixerButton->text()); + QStyleOptionButton opt; + opt.initFrom(m_mixerButton); + opt.rect.setSize(textSize); + m_mixerButton->setMaximumSize(m_mixerButton->style()->sizeFromContents(QStyle::CT_PushButton, + &opt, + textSize, + m_mixerButton)); + m_mixerButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + m_volumeSlider = new QSlider(Qt::Vertical, this); + m_volumeSlider->setTickPosition(QSlider::TicksBothSides); + m_volumeSlider->setTickInterval(10); + // the volume slider shows 0-100 and volumes of all devices + // should be converted to percentages. + m_volumeSlider->setRange(0, 100); + + m_muteToggleButton = new QPushButton(this); + m_muteToggleButton->setIcon(XdgIcon::fromTheme(QStringList() << "audio-volume-muted")); + m_muteToggleButton->setCheckable(true); + m_muteToggleButton->setFlat(true); + + QVBoxLayout *l = new QVBoxLayout(this); + l->setSpacing(0); + l->setMargin(2); + + l->addWidget(m_mixerButton, 0, Qt::AlignHCenter); + l->addWidget(m_volumeSlider, 0, Qt::AlignHCenter); + l->addWidget(m_muteToggleButton, 0, Qt::AlignHCenter); + + connect(m_mixerButton, SIGNAL(released()), this, SIGNAL(launchMixer())); + connect(m_volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(handleSliderValueChanged(int))); + connect(m_muteToggleButton, SIGNAL(clicked()), this, SLOT(handleMuteToggleClicked())); +} + +bool VolumePopup::event(QEvent *event) +{ + if(event->type() == QEvent::WindowDeactivate) + { + // qDebug("QEvent::WindowDeactivate"); + hide(); + } + return QDialog::event(event); +} + +void VolumePopup::enterEvent(QEvent *event) +{ + emit mouseEntered(); +} + +void VolumePopup::leaveEvent(QEvent *event) +{ + // qDebug("leaveEvent"); + emit mouseLeft(); +} + +void VolumePopup::handleSliderValueChanged(int value) +{ + if (!m_device) + return; + // qDebug("VolumePopup::handleSliderValueChanged: %d\n", value); + m_device->setVolume(value); +} + +void VolumePopup::handleMuteToggleClicked() +{ + if (!m_device) + return; + + m_device->toggleMute(); +} + +void VolumePopup::handleDeviceVolumeChanged(int volume) +{ + // qDebug() << "handleDeviceVolumeChanged" << "volume" << volume << "max" << max; + // calling m_volumeSlider->setValue will trigger + // handleSliderValueChanged(), which set the device volume + // again, so we have to block the signals to avoid recursive + // signal emission. + m_volumeSlider->blockSignals(true); + m_volumeSlider->setValue(volume); + m_volumeSlider->blockSignals(false); + + // emit volumeChanged(percent); + updateStockIcon(); +} + +void VolumePopup::handleDeviceMuteChanged(bool mute) +{ + m_muteToggleButton->setChecked(mute); + updateStockIcon(); +} + +void VolumePopup::updateStockIcon() +{ + if (!m_device) + return; + + QString iconName; + if (m_device->volume() <= 0 || m_device->mute()) + iconName = "audio-volume-muted"; + else if (m_device->volume() <= 33) + iconName = "audio-volume-low"; + else if (m_device->volume() <= 66) + iconName = "audio-volume-medium"; + else + iconName = "audio-volume-high"; + + m_muteToggleButton->setIcon(XdgIcon::fromTheme(iconName)); + emit stockIconChanged(iconName); +} + +void VolumePopup::resizeEvent(QResizeEvent *event) +{ + QWidget::resizeEvent(event); + realign(); +} + +void VolumePopup::open(QPoint pos, Qt::Corner anchor) +{ + m_pos = pos; + m_anchor = anchor; + realign(); + show(); +} + +void VolumePopup::handleWheelEvent(QWheelEvent *event) +{ + m_volumeSlider->event(reinterpret_cast(event)); +} + +void VolumePopup::setDevice(AudioDevice *device) +{ + if (device == m_device) + return; + + // disconnect old device + if (m_device) + disconnect(m_device); + + m_device = device; + + if (m_device) { + m_muteToggleButton->setChecked(m_device->mute()); + handleDeviceVolumeChanged(m_device->volume()); + connect(m_device, SIGNAL(volumeChanged(int)), this, SLOT(handleDeviceVolumeChanged(int))); + connect(m_device, SIGNAL(muteChanged(bool)), this, SLOT(handleDeviceMuteChanged(bool))); + } + else + updateStockIcon(); + emit deviceChanged(); +} + +void VolumePopup::setSliderStep(int step) +{ + m_volumeSlider->setSingleStep(step); + m_volumeSlider->setPageStep(step * 10); +} + +void VolumePopup::realign() +{ + QRect rect; + rect.setSize(sizeHint()); + switch (m_anchor) + { + case Qt::TopLeftCorner: + rect.moveTopLeft(m_pos); + break; + + case Qt::TopRightCorner: + rect.moveTopRight(m_pos); + break; + + case Qt::BottomLeftCorner: + rect.moveBottomLeft(m_pos); + break; + + case Qt::BottomRightCorner: + rect.moveBottomRight(m_pos); + break; + + } + + QRect screen = QApplication::desktop()->availableGeometry(m_pos); + + if (rect.right() > screen.right()) + rect.moveRight(screen.right()); + + if (rect.bottom() > screen.bottom()) + rect.moveBottom(screen.bottom()); + + move(rect.topLeft()); +} diff --git a/plugin-volume/volumepopup.h b/plugin-volume/volumepopup.h new file mode 100644 index 0000000..04de241 --- /dev/null +++ b/plugin-volume/volumepopup.h @@ -0,0 +1,85 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Johannes Zellner + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef VOLUMEPOPUP_H +#define VOLUMEPOPUP_H + +#include + +class QSlider; +class QPushButton; +class AudioDevice; + +class VolumePopup : public QDialog +{ + Q_OBJECT +public: + VolumePopup(QWidget* parent = 0); + + void open(QPoint pos, Qt::Corner anchor); + void handleWheelEvent(QWheelEvent *event); + + QSlider *volumeSlider() const { return m_volumeSlider; } + + AudioDevice *device() const { return m_device; } + void setDevice(AudioDevice *device); + void setSliderStep(int step); + +signals: + void mouseEntered(); + void mouseLeft(); + + // void volumeChanged(int value); + void deviceChanged(); + void launchMixer(); + void stockIconChanged(const QString &iconName); + +protected: + void resizeEvent(QResizeEvent *event); + void enterEvent(QEvent *event); + void leaveEvent(QEvent *event); + bool event(QEvent * event); + +private slots: + void handleSliderValueChanged(int value); + void handleMuteToggleClicked(); + void handleDeviceVolumeChanged(int volume); + void handleDeviceMuteChanged(bool mute); + +private: + void realign(); + void updateStockIcon(); + + QSlider *m_volumeSlider; + QPushButton *m_mixerButton; + QPushButton *m_muteToggleButton; + QPoint m_pos; + Qt::Corner m_anchor; + AudioDevice *m_device; +}; + +#endif // VOLUMEPOPUP_H diff --git a/plugin-worldclock/CMakeLists.txt b/plugin-worldclock/CMakeLists.txt new file mode 100644 index 0000000..b43151b --- /dev/null +++ b/plugin-worldclock/CMakeLists.txt @@ -0,0 +1,30 @@ +set(PLUGIN "worldclock") + +set(HEADERS + lxqtworldclock.h + lxqtworldclockconfiguration.h + lxqtworldclockconfigurationtimezones.h + lxqtworldclockconfigurationmanualformat.h +) + +set(SOURCES + lxqtworldclock.cpp + lxqtworldclockconfiguration.cpp + lxqtworldclockconfigurationtimezones.cpp + lxqtworldclockconfigurationmanualformat.cpp +) + +set(MOCS + lxqtworldclock.h + lxqtworldclockconfiguration.h + lxqtworldclockconfigurationtimezones.h + lxqtworldclockconfigurationmanualformat.h +) + +set(UIS + lxqtworldclockconfiguration.ui + lxqtworldclockconfigurationtimezones.ui + lxqtworldclockconfigurationmanualformat.ui +) + +BUILD_LXQT_PLUGIN(${PLUGIN}) diff --git a/plugin-worldclock/lxqtworldclock.cpp b/plugin-worldclock/lxqtworldclock.cpp new file mode 100644 index 0000000..8dc473b --- /dev/null +++ b/plugin-worldclock/lxqtworldclock.cpp @@ -0,0 +1,560 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012-2013 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include "lxqtworldclock.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +LxQtWorldClock::LxQtWorldClock(const ILxQtPanelPluginStartupInfo &startupInfo): + QObject(), + ILxQtPanelPlugin(startupInfo), + mPopup(NULL), + mTimer(new QTimer(this)), + mAutoRotate(true), + mPopupContent(NULL) +{ + mMainWidget = new QWidget(); + mContent = new ActiveLabel(); + mRotatedWidget = new LxQt::RotatedWidget(*mContent, mMainWidget); + + mRotatedWidget->setTransferWheelEvent(true); + + QVBoxLayout *borderLayout = new QVBoxLayout(mMainWidget); + borderLayout->setContentsMargins(0, 0, 0, 0); + borderLayout->setSpacing(0); + borderLayout->addWidget(mRotatedWidget, 0, Qt::AlignCenter); + + mContent->setObjectName(QLatin1String("WorldClockContent")); + + mContent->setAlignment(Qt::AlignCenter); + + settingsChanged(); + + connect(mTimer, SIGNAL(timeout()), SLOT(timeout())); + + connect(mContent, SIGNAL(wheelScrolled(int)), SLOT(wheelScrolled(int))); +} + +LxQtWorldClock::~LxQtWorldClock() +{ + delete mMainWidget; +} + +void LxQtWorldClock::timeout() +{ + QString str = formatDateTime(QDateTime::currentDateTime(), mActiveTimeZone); + if (str != mLastShownText) + { + mContent->setText(str); + mLastShownText = str; + + mRotatedWidget->adjustContentSize(); + mRotatedWidget->update(); + + updatePopupContent(); + } +} + + +void LxQtWorldClock::restartTimer(int timerInterval) +{ + mTimer->stop(); + mTimer->setInterval(timerInterval); + + if (timerInterval < 1000) + mTimer->start(); + else + { + int delay = static_cast((timerInterval + 100 - (static_cast(QTime::currentTime().msecsSinceStartOfDay()) % timerInterval)) % timerInterval); + QTimer::singleShot(delay, this, SLOT(timeout())); + QTimer::singleShot(delay, mTimer, SLOT(start())); + } +} + +void LxQtWorldClock::settingsChanged() +{ + QSettings *_settings = settings(); + + QString oldFormat = mFormat; + + mTimeZones.clear(); + + int size = _settings->beginReadArray(QLatin1String("timeZones")); + for (int i = 0; i < size; ++i) + { + _settings->setArrayIndex(i); + QString timeZoneName = _settings->value(QLatin1String("timeZone"), QString()).toString(); + mTimeZones.append(timeZoneName); + mTimeZoneCustomNames[timeZoneName] = _settings->value(QLatin1String("customName"), QString()).toString(); + } + _settings->endArray(); + if (mTimeZones.isEmpty()) + mTimeZones.append(QString::fromLatin1(QTimeZone::systemTimeZoneId())); + + mDefaultTimeZone = _settings->value(QLatin1String("defaultTimeZone"), QString()).toString(); + if (mDefaultTimeZone.isEmpty()) + mDefaultTimeZone = mTimeZones[0]; + mActiveTimeZone = mDefaultTimeZone; + + + bool longTimeFormatSelected = false; + + QString formatType = _settings->value(QLatin1String("formatType"), QString()).toString(); + QString dateFormatType = _settings->value(QLatin1String("dateFormatType"), QString()).toString(); + bool advancedManual = _settings->value(QLatin1String("useAdvancedManualFormat"), false).toBool(); + + // backward compatibility + if (formatType == QLatin1String("custom")) + { + formatType = QLatin1String("short-timeonly"); + dateFormatType = QLatin1String("short"); + advancedManual = true; + } + else if (formatType == QLatin1String("short")) + { + formatType = QLatin1String("short-timeonly"); + dateFormatType = QLatin1String("short"); + advancedManual = false; + } + else if ((formatType == QLatin1String("full")) || + (formatType == QLatin1String("long")) || + (formatType == QLatin1String("medium"))) + { + formatType = QLatin1String("long-timeonly"); + dateFormatType = QLatin1String("long"); + advancedManual = false; + } + + if (formatType == QLatin1String("long-timeonly")) + longTimeFormatSelected = true; + + bool timeShowSeconds = _settings->value(QLatin1String("timeShowSeconds"), false).toBool(); + bool timePadHour = _settings->value(QLatin1String("timePadHour"), false).toBool(); + bool timeAMPM = _settings->value(QLatin1String("timeAMPM"), false).toBool(); + + // timezone + bool showTimezone = _settings->value(QLatin1String("showTimezone"), false).toBool() && !longTimeFormatSelected; + + QString timezonePosition = _settings->value(QLatin1String("timezonePosition"), QString()).toString(); + QString timezoneFormatType = _settings->value(QLatin1String("timezoneFormatType"), QString()).toString(); + + // date + bool showDate = _settings->value(QLatin1String("showDate"), false).toBool(); + + QString datePosition = _settings->value(QLatin1String("datePosition"), QString()).toString(); + + bool dateShowYear = _settings->value(QLatin1String("dateShowYear"), false).toBool(); + bool dateShowDoW = _settings->value(QLatin1String("dateShowDoW"), false).toBool(); + bool datePadDay = _settings->value(QLatin1String("datePadDay"), false).toBool(); + bool dateLongNames = _settings->value(QLatin1String("dateLongNames"), false).toBool(); + + // advanced + QString customFormat = _settings->value(QLatin1String("customFormat"), tr("''HH:mm:ss'
'ddd, d MMM yyyy'
'TT'
'")).toString(); + + if (advancedManual) + mFormat = customFormat; + else + { + QTimeZone timeZone(mActiveTimeZone.toLatin1()); + QLocale locale = QLocale(QLocale::AnyLanguage, QLocale().country()); + + if (formatType == QLatin1String("short-timeonly")) + mFormat = locale.timeFormat(QLocale::ShortFormat); + else if (formatType == QLatin1String("long-timeonly")) + mFormat = locale.timeFormat(QLocale::LongFormat); + else // if (formatType == QLatin1String("custom-timeonly")) + mFormat = QString(QLatin1String("%1:mm%2%3")).arg(timePadHour ? QLatin1String("hh") : QLatin1String("h")).arg(timeShowSeconds ? QLatin1String(":ss") : QLatin1String("")).arg(timeAMPM ? QLatin1String(" A") : QLatin1String("")); + + if (showTimezone) + { + QString timezonePortion; + if (timezoneFormatType == QLatin1String("short")) + timezonePortion = QLatin1String("TTTT"); + else if (timezoneFormatType == QLatin1String("long")) + timezonePortion = QLatin1String("TTTTT"); + else if (timezoneFormatType == QLatin1String("offset")) + timezonePortion = QLatin1String("T"); + else if (timezoneFormatType == QLatin1String("abbreviation")) + timezonePortion = QLatin1String("TTT"); + else if (timezoneFormatType == QLatin1String("iana")) + timezonePortion = QLatin1String("TT"); + else // if (timezoneFormatType == QLatin1String("custom")) + timezonePortion = QLatin1String("TTTTTT"); + + if (timezonePosition == QLatin1String("below")) + mFormat = mFormat + QLatin1String("'
'") + timezonePortion; + else if (timezonePosition == QLatin1String("above")) + mFormat = timezonePortion + QLatin1String("'
'") + mFormat; + else if (timezonePosition == QLatin1String("before")) + mFormat = timezonePortion + QLatin1String(" ") + mFormat; + else // if (timezonePosition == QLatin1String("after")) + mFormat = mFormat + QLatin1String(" ") + timezonePortion; + } + + if (showDate) + { + QString datePortion; + if (dateFormatType == QLatin1String("short")) + datePortion = locale.dateFormat(QLocale::ShortFormat); + else if (dateFormatType == QLatin1String("long")) + datePortion = locale.dateFormat(QLocale::LongFormat); + else if (dateFormatType == QLatin1String("iso")) + datePortion = QLatin1String("yyyy-MM-dd"); + else // if (dateFormatType == QLatin1String("custom")) + { + QString datePortionOrder; + QString dateLocale = locale.dateFormat(QLocale::ShortFormat).toLower(); + int yearIndex = dateLocale.indexOf("y"); + int monthIndex = dateLocale.indexOf("m"); + int dayIndex = dateLocale.indexOf("d"); + if (yearIndex < dayIndex) + // Big-endian (year, month, day) (yyyy MMMM dd, dddd) -> in some Asia countires like China or Japan + datePortionOrder = QLatin1String("%1%2%3 %4%5%6"); + else if (monthIndex < dayIndex) + // Middle-endian (month, day, year) (dddd, MMMM dd yyyy) -> USA + datePortionOrder = QLatin1String("%6%5%3 %4%2%1"); + else + // Little-endian (day, month, year) (dddd, dd MMMM yyyy) -> most of Europe + datePortionOrder = QLatin1String("%6%5%4 %3%2%1"); + datePortion = datePortionOrder.arg(dateShowYear ? QLatin1String("yyyy") : QLatin1String("")).arg(dateShowYear ? QLatin1String(" ") : QLatin1String("")).arg(dateLongNames ? QLatin1String("MMMM") : QLatin1String("MMM")).arg(datePadDay ? QLatin1String("dd") : QLatin1String("d")).arg(dateShowDoW ? QLatin1String(", ") : QLatin1String("")).arg(dateShowDoW ? (dateLongNames ? QLatin1String("dddd") : QLatin1String("ddd")) : QLatin1String("")); + } + + if (datePosition == QLatin1String("below")) + mFormat = mFormat + QLatin1String("'
'") + datePortion; + else if (datePosition == QLatin1String("above")) + mFormat = datePortion + QLatin1String("'
'") + mFormat; + else if (datePosition == QLatin1String("before")) + mFormat = datePortion + QLatin1String(" ") + mFormat; + else // if (datePosition == QLatin1String("after")) + mFormat = mFormat + QLatin1String(" ") + datePortion; + } + } + + + if ((oldFormat != mFormat)) + { + int timerInterval = 0; + + QString format = mFormat; + format.replace(QRegExp(QLatin1String("'[^']*'")), QString()); + if (format.contains(QLatin1String("z"))) + timerInterval = 1; + else if (format.contains(QLatin1String("s"))) + timerInterval = 1000; + else + timerInterval = 60000; + + restartTimer(timerInterval); + } + + bool autoRotate = settings()->value(QLatin1String("autoRotate"), true).toBool(); + if (autoRotate != mAutoRotate) + { + mAutoRotate = autoRotate; + realign(); + } + + if (mPopup) + { + updatePopupContent(); + mPopup->adjustSize(); + mPopup->setGeometry(calculatePopupWindowPos(mPopup->size())); + } + + timeout(); +} + +QDialog *LxQtWorldClock::configureDialog() +{ + return new LxQtWorldClockConfiguration(settings()); +} + +void LxQtWorldClock::wheelScrolled(int delta) +{ + if (mTimeZones.count() > 1) + { + mActiveTimeZone = mTimeZones[(mTimeZones.indexOf(mActiveTimeZone) + ((delta > 0) ? -1 : 1) + mTimeZones.size()) % mTimeZones.size()]; + timeout(); + } +} + +void LxQtWorldClock::activated(ActivationReason reason) +{ + switch (reason) + { + case ILxQtPanelPlugin::Trigger: + case ILxQtPanelPlugin::MiddleClick: + break; + + default: + return; + } + + if (!mPopup) + { + mPopup = new LxQtWorldClockPopup(mContent); + connect(mPopup, SIGNAL(deactivated()), SLOT(deletePopup())); + + if (reason == ILxQtPanelPlugin::Trigger) + { + mPopup->setObjectName(QLatin1String("WorldClockCalendar")); + + mPopup->layout()->setContentsMargins(0, 0, 0, 0); + QCalendarWidget *calendarWidget = new QCalendarWidget(mPopup); + mPopup->layout()->addWidget(calendarWidget); + + QTimeZone timeZone(mActiveTimeZone.toLatin1()); + calendarWidget->setFirstDayOfWeek(QLocale(QLocale::AnyLanguage, timeZone.country()).firstDayOfWeek()); + calendarWidget->setSelectedDate(QDateTime::currentDateTime().toTimeZone(timeZone).date()); + } + else + { + mPopup->setObjectName(QLatin1String("WorldClockPopup")); + + mPopupContent = new QLabel(mPopup); + mPopup->layout()->addWidget(mPopupContent); + mPopupContent->setAlignment(mContent->alignment()); + + updatePopupContent(); + } + + mPopup->adjustSize(); + mPopup->setGeometry(calculatePopupWindowPos(mPopup->size())); + + mPopup->show(); + } + else + { + deletePopup(); + } +} + +void LxQtWorldClock::deletePopup() +{ + mPopupContent = NULL; + mPopup->deleteLater(); + mPopup = NULL; +} + +QString LxQtWorldClock::formatDateTime(const QDateTime &datetime, const QString &timeZoneName) +{ + QTimeZone timeZone(timeZoneName.toLatin1()); + QDateTime tzNow = datetime.toTimeZone(timeZone); + return tzNow.toString(preformat(mFormat, timeZone, tzNow)); +} + +void LxQtWorldClock::updatePopupContent() +{ + if (mPopupContent) + { + QDateTime now = QDateTime::currentDateTime(); + QStringList allTimeZones; + bool hasTimeZone = formatHasTimeZone(mFormat); + + foreach (QString timeZoneName, mTimeZones) + { + QString formatted = formatDateTime(now, timeZoneName); + + if (!hasTimeZone) + formatted += QLatin1String("
") + QString::fromLatin1(QTimeZone(timeZoneName.toLatin1()).id()); + + allTimeZones.append(formatted); + } + + mPopupContent->setText(allTimeZones.join(QLatin1String("
"))); + } +} + +bool LxQtWorldClock::formatHasTimeZone(QString format) +{ + format.replace(QRegExp(QLatin1String("'[^']*'")), QString()); + return format.toLower().contains(QLatin1String("t")); +} + +QString LxQtWorldClock::preformat(const QString &format, const QTimeZone &timeZone, const QDateTime &dateTime) +{ + QString result = format; + int from = 0; + for (;;) + { + int apos = result.indexOf(QLatin1Char('\''), from); + int tz = result.indexOf(QLatin1Char('T'), from); + if ((apos != -1) && (tz != -1)) + { + if (apos > tz) + apos = -1; + else + tz = -1; + } + if (apos != -1) + { + from = apos + 1; + apos = result.indexOf(QLatin1Char('\''), from); + if (apos == -1) // misformat + break; + from = apos + 1; + } + else if (tz != -1) + { + int length = 1; + for (; result[tz + length] == QLatin1Char('T'); ++length); + if (length > 6) + length = 6; + QString replacement; + switch (length) + { + case 1: + replacement = timeZone.displayName(dateTime, QTimeZone::OffsetName); + if (replacement.startsWith(QLatin1String("UTC"))) + replacement = replacement.mid(3); + break; + + case 2: + replacement = QString::fromLatin1(timeZone.id()); + break; + + case 3: + replacement = timeZone.abbreviation(dateTime); + break; + + case 4: + replacement = timeZone.displayName(dateTime, QTimeZone::ShortName); + break; + + case 5: + replacement = timeZone.displayName(dateTime, QTimeZone::LongName); + break; + + case 6: + replacement = mTimeZoneCustomNames[QString::fromLatin1(timeZone.id())]; + } + + if ((tz > 0) && (result[tz - 1] == QLatin1Char('\''))) + { + --tz; + ++length; + } + else + replacement.prepend(QLatin1Char('\'')); + + if (result[tz + length] == QLatin1Char('\'')) + ++length; + else + replacement.append(QLatin1Char('\'')); + + result.replace(tz, length, replacement); + from = tz + replacement.length(); + } + else + break; + } + return result; +} + +void LxQtWorldClock::realign() +{ + if (mAutoRotate) + switch (panel()->position()) + { + case ILxQtPanel::PositionTop: + case ILxQtPanel::PositionBottom: + mRotatedWidget->setOrigin(Qt::TopLeftCorner); + break; + + case ILxQtPanel::PositionLeft: + mRotatedWidget->setOrigin(Qt::BottomLeftCorner); + break; + + case ILxQtPanel::PositionRight: + mRotatedWidget->setOrigin(Qt::TopRightCorner); + break; + } + else + mRotatedWidget->setOrigin(Qt::TopLeftCorner); +} + +ActiveLabel::ActiveLabel(QWidget *parent) : + QLabel(parent) +{ +} + +void ActiveLabel::wheelEvent(QWheelEvent *event) +{ + emit wheelScrolled(event->delta()); + + QLabel::wheelEvent(event); +} + +void ActiveLabel::mouseReleaseEvent(QMouseEvent* event) +{ + switch (event->button()) + { + case Qt::LeftButton: + emit leftMouseButtonClicked(); + break; + + case Qt::MidButton: + emit middleMouseButtonClicked(); + break; + + default:; + } + + QLabel::mouseReleaseEvent(event); +} + +LxQtWorldClockPopup::LxQtWorldClockPopup(QWidget *parent) : + QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::Popup | Qt::X11BypassWindowManagerHint) +{ + setLayout(new QHBoxLayout(this)); + layout()->setMargin(1); +} + +void LxQtWorldClockPopup::show() +{ + QDialog::show(); + activateWindow(); +} + +bool LxQtWorldClockPopup::event(QEvent *event) +{ + if (event->type() == QEvent::WindowDeactivate) + emit deactivated(); + + return QDialog::event(event); +} diff --git a/plugin-worldclock/lxqtworldclock.h b/plugin-worldclock/lxqtworldclock.h new file mode 100644 index 0000000..118c77e --- /dev/null +++ b/plugin-worldclock/lxqtworldclock.h @@ -0,0 +1,143 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012-2013 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LXQT_PANEL_WORLDCLOCK_H +#define LXQT_PANEL_WORLDCLOCK_H + +#include + +#include +#include + +#include + +#include "../panel/ilxqtpanelplugin.h" +#include "lxqtworldclockconfiguration.h" + + +class ActiveLabel; +class QTimer; +class LxQtWorldClockPopup; + + +class LxQtWorldClock : public QObject, public ILxQtPanelPlugin +{ + Q_OBJECT +public: + LxQtWorldClock(const ILxQtPanelPluginStartupInfo &startupInfo); + ~LxQtWorldClock(); + + virtual QWidget *widget() { return mMainWidget; } + virtual QString themeId() const { return QLatin1String("WorldClock"); } + virtual ILxQtPanelPlugin::Flags flags() const { return PreferRightAlignment | HaveConfigDialog ; } + bool isSeparate() const { return true; } + void activated(ActivationReason reason); + + virtual void settingsChanged(); + virtual void realign(); + QDialog *configureDialog(); + +private slots: + void timeout(); + void wheelScrolled(int); + void deletePopup(); + +private: + QWidget *mMainWidget; + LxQt::RotatedWidget* mRotatedWidget; + ActiveLabel *mContent; + LxQtWorldClockPopup* mPopup; + + QTimer *mTimer; + + QStringList mTimeZones; + QMap mTimeZoneCustomNames; + QString mDefaultTimeZone; + QString mActiveTimeZone; + QString mFormat; + + bool mAutoRotate; + QString mLastShownText; + QLabel *mPopupContent; + + void restartTimer(int); + + QString formatDateTime(const QDateTime &datetime, const QString &timeZoneName); + void updatePopupContent(); + bool formatHasTimeZone(QString format); + QString preformat(const QString &format, const QTimeZone &timeZone, const QDateTime& dateTime); +}; + + +class ActiveLabel : public QLabel +{ +Q_OBJECT + +public: + explicit ActiveLabel(QWidget * = NULL); + +signals: + void wheelScrolled(int); + void leftMouseButtonClicked(); + void middleMouseButtonClicked(); + +protected: + void wheelEvent(QWheelEvent *); + void mouseReleaseEvent(QMouseEvent* event); +}; + +class LxQtWorldClockPopup : public QDialog +{ + Q_OBJECT + +public: + LxQtWorldClockPopup(QWidget *parent = 0); + + void show(); + +signals: + void deactivated(); + +protected: + virtual bool event(QEvent* ); + +}; + +class LxQtWorldClockLibrary: public QObject, public ILxQtPanelPluginLibrary +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "lxde-qt.org/Panel/PluginInterface/3.0") + Q_INTERFACES(ILxQtPanelPluginLibrary) +public: + ILxQtPanelPlugin *instance(const ILxQtPanelPluginStartupInfo &startupInfo) + { + return new LxQtWorldClock(startupInfo); + } +}; + +#endif // LXQT_PANEL_WORLDCLOCK_H diff --git a/plugin-worldclock/lxqtworldclockconfiguration.cpp b/plugin-worldclock/lxqtworldclockconfiguration.cpp new file mode 100644 index 0000000..ff1d128 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfiguration.cpp @@ -0,0 +1,664 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include "lxqtworldclockconfiguration.h" + +#include "ui_lxqtworldclockconfiguration.h" + +#include "lxqtworldclockconfigurationtimezones.h" +#include "lxqtworldclockconfigurationmanualformat.h" + +#include + + +LxQtWorldClockConfiguration::LxQtWorldClockConfiguration(QSettings *settings, QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtWorldClockConfiguration), + mSettings(settings), + mOldSettings(settings), + mLockCascadeSettingChanges(false), + mConfigurationTimeZones(NULL), + mConfigurationManualFormat(NULL) +{ + setAttribute(Qt::WA_DeleteOnClose); + setObjectName(QLatin1String("WorldClockConfigurationWindow")); + ui->setupUi(this); + + connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonsAction(QAbstractButton*))); + + connect(ui->timeFormatCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->timeShowSecondsCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->timePadHourCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->timeAMPMCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->timezoneGB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->timezonePositionCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->timezoneFormatCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->dateGB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->datePositionCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->dateFormatCB, SIGNAL(currentIndexChanged(int)), SLOT(saveSettings())); + connect(ui->dateShowYearCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->dateShowDoWCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->datePadDayCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->dateLongNamesCB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->advancedManualGB, SIGNAL(clicked()), SLOT(saveSettings())); + connect(ui->customisePB, SIGNAL(clicked()), SLOT(customiseManualFormatClicked())); + + + connect(ui->timeFormatCB, SIGNAL(currentIndexChanged(int)), SLOT(timeFormatChanged(int))); + connect(ui->dateGB, SIGNAL(toggled(bool)), SLOT(dateGroupToggled(bool))); + connect(ui->dateFormatCB, SIGNAL(currentIndexChanged(int)), SLOT(dateFormatChanged(int))); + connect(ui->advancedManualGB, SIGNAL(toggled(bool)), SLOT(advancedFormatToggled(bool))); + + connect(ui->timeZonesTW, SIGNAL(itemSelectionChanged()), SLOT(updateTimeZoneButtons())); + connect(ui->addPB, SIGNAL(clicked()), SLOT(addTimeZone())); + connect(ui->removePB, SIGNAL(clicked()), SLOT(removeTimeZone())); + connect(ui->setAsDefaultPB, SIGNAL(clicked()), SLOT(setTimeZoneAsDefault())); + connect(ui->editCustomNamePB, SIGNAL(clicked()), SLOT(editTimeZoneCustomName())); + connect(ui->moveUpPB, SIGNAL(clicked()), SLOT(moveTimeZoneUp())); + connect(ui->moveDownPB, SIGNAL(clicked()), SLOT(moveTimeZoneDown())); + + connect(ui->autorotateCB, SIGNAL(clicked()), SLOT(saveSettings())); + + loadSettings(); +} + +LxQtWorldClockConfiguration::~LxQtWorldClockConfiguration() +{ + delete ui; +} + +void LxQtWorldClockConfiguration::loadSettings() +{ + mLockCascadeSettingChanges = true; + + bool longTimeFormatSelected = false; + + QString formatType = mSettings->value(QLatin1String("formatType"), QString()).toString(); + QString dateFormatType = mSettings->value(QLatin1String("dateFormatType"), QString()).toString(); + bool advancedManual = mSettings->value(QLatin1String("useAdvancedManualFormat"), false).toBool(); + mManualFormat = mSettings->value(QLatin1String("customFormat"), tr("''HH:mm:ss'
'ddd, d MMM yyyy'
'TT'
'")).toString(); + + // backward compatibility + if (formatType == QLatin1String("custom")) + { + formatType = QLatin1String("short-timeonly"); + dateFormatType = QLatin1String("short"); + advancedManual = true; + } + else if (formatType == QLatin1String("short")) + { + formatType = QLatin1String("short-timeonly"); + dateFormatType = QLatin1String("short"); + advancedManual = false; + } + else if ((formatType == QLatin1String("full")) || + (formatType == QLatin1String("long")) || + (formatType == QLatin1String("medium"))) + { + formatType = QLatin1String("long-timeonly"); + dateFormatType = QLatin1String("long"); + advancedManual = false; + } + + + if (formatType == QLatin1String("short-timeonly")) + ui->timeFormatCB->setCurrentIndex(0); + else if (formatType == QLatin1String("long-timeonly")) + { + ui->timeFormatCB->setCurrentIndex(1); + longTimeFormatSelected = true; + } + else // if (formatType == QLatin1String("custom-timeonly")) + ui->timeFormatCB->setCurrentIndex(2); + + ui->timeShowSecondsCB->setChecked(mSettings->value(QLatin1String("timeShowSeconds"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + ui->timePadHourCB->setChecked(mSettings->value(QLatin1String("timePadHour"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + ui->timeAMPMCB->setChecked(mSettings->value(QLatin1String("timeAMPM"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + + bool customTimeFormatSelected = ui->timeFormatCB->currentIndex() == ui->timeFormatCB->count() - 1; + ui->timeCustomW->setEnabled(customTimeFormatSelected); + + ui->timezoneGB->setEnabled(!longTimeFormatSelected); + + // timezone + ui->timezoneGB->setChecked(mSettings->value(QLatin1String("showTimezone"), false).toBool() && !longTimeFormatSelected); + + QString timezonePosition = mSettings->value(QLatin1String("timezonePosition"), QString()).toString(); + if (timezonePosition == QLatin1String("above")) + ui->timezonePositionCB->setCurrentIndex(1); + else if (timezonePosition == QLatin1String("before")) + ui->timezonePositionCB->setCurrentIndex(2); + else if (timezonePosition == QLatin1String("after")) + ui->timezonePositionCB->setCurrentIndex(3); + else // if (timezonePosition == QLatin1String("below")) + ui->timezonePositionCB->setCurrentIndex(0); + + QString timezoneFormatType = mSettings->value(QLatin1String("timezoneFormatType"), QString()).toString(); + if (timezoneFormatType == QLatin1String("short")) + ui->timezoneFormatCB->setCurrentIndex(0); + else if (timezoneFormatType == QLatin1String("long")) + ui->timezoneFormatCB->setCurrentIndex(1); + else if (timezoneFormatType == QLatin1String("offset")) + ui->timezoneFormatCB->setCurrentIndex(2); + else if (timezoneFormatType == QLatin1String("abbreviation")) + ui->timezoneFormatCB->setCurrentIndex(3); + else // if (timezoneFormatType == QLatin1String("iana")) + ui->timezoneFormatCB->setCurrentIndex(4); + + // date + bool dateIsChecked = mSettings->value(QLatin1String("showDate"), false).toBool(); + ui->dateGB->setChecked(dateIsChecked); + + QString datePosition = mSettings->value(QLatin1String("datePosition"), QString()).toString(); + if (datePosition == QLatin1String("above")) + ui->datePositionCB->setCurrentIndex(1); + else if (datePosition == QLatin1String("before")) + ui->datePositionCB->setCurrentIndex(2); + else if (datePosition == QLatin1String("after")) + ui->datePositionCB->setCurrentIndex(3); + else // if (datePosition == QLatin1String("below")) + ui->datePositionCB->setCurrentIndex(0); + + if (dateFormatType == QLatin1String("short")) + ui->dateFormatCB->setCurrentIndex(0); + else if (dateFormatType == QLatin1String("long")) + ui->dateFormatCB->setCurrentIndex(1); + else if (dateFormatType == QLatin1String("iso")) + ui->dateFormatCB->setCurrentIndex(2); + else // if (dateFormatType == QLatin1String("custom")) + ui->dateFormatCB->setCurrentIndex(3); + + ui->dateShowYearCB->setChecked(mSettings->value(QLatin1String("dateShowYear"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + ui->dateShowDoWCB->setChecked(mSettings->value(QLatin1String("dateShowDoW"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + ui->datePadDayCB->setChecked(mSettings->value(QLatin1String("datePadDay"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + ui->dateLongNamesCB->setChecked(mSettings->value(QLatin1String("dateLongNames"), false).toBool() ? Qt::Checked : Qt:: Unchecked); + + bool customDateFormatSelected = ui->dateFormatCB->currentIndex() == ui->dateFormatCB->count() - 1; + ui->dateCustomW->setEnabled(dateIsChecked && customDateFormatSelected); + + + ui->advancedManualGB->setChecked(advancedManual); + + + mDefaultTimeZone = mSettings->value("defaultTimeZone", QString()).toString(); + + ui->timeZonesTW->setRowCount(0); + + int size = mSettings->beginReadArray(QLatin1String("timeZones")); + for (int i = 0; i < size; ++i) + { + mSettings->setArrayIndex(i); + ui->timeZonesTW->setRowCount(ui->timeZonesTW->rowCount() + 1); + + QString timeZoneName = mSettings->value(QLatin1String("timeZone"), QString()).toString(); + if (mDefaultTimeZone.isEmpty()) + mDefaultTimeZone = timeZoneName; + + ui->timeZonesTW->setItem(i, 0, new QTableWidgetItem(timeZoneName)); + ui->timeZonesTW->setItem(i, 1, new QTableWidgetItem(mSettings->value(QLatin1String("customName"), QString()).toString())); + + setBold(i, mDefaultTimeZone == timeZoneName); + } + mSettings->endArray(); + + ui->timeZonesTW->resizeColumnsToContents(); + + + ui->autorotateCB->setChecked(mSettings->value("autoRotate", true).toBool()); + + + mLockCascadeSettingChanges = false; +} + +void LxQtWorldClockConfiguration::saveSettings() +{ + if (mLockCascadeSettingChanges) + return; + + QString formatType; + switch (ui->timeFormatCB->currentIndex()) + { + case 0: + formatType = QLatin1String("short-timeonly"); + break; + + case 1: + formatType = QLatin1String("long-timeonly"); + break; + + case 2: + formatType = QLatin1String("custom-timeonly"); + break; + } + mSettings->setValue(QLatin1String("formatType"), formatType); + + mSettings->setValue(QLatin1String("timeShowSeconds"), ui->timeShowSecondsCB->isChecked()); + mSettings->setValue(QLatin1String("timePadHour"), ui->timePadHourCB->isChecked()); + mSettings->setValue(QLatin1String("timeAMPM"), ui->timeAMPMCB->isChecked()); + + mSettings->setValue(QLatin1String("showTimezone"), ui->timezoneGB->isChecked()); + + QString timezonePosition; + switch (ui->timezonePositionCB->currentIndex()) + { + case 0: + timezonePosition = QLatin1String("below"); + break; + + case 1: + timezonePosition = QLatin1String("above"); + break; + + case 2: + timezonePosition = QLatin1String("before"); + break; + + case 3: + timezonePosition = QLatin1String("after"); + break; + } + mSettings->setValue(QLatin1String("timezonePosition"), timezonePosition); + + QString timezoneFormatType; + switch (ui->timezoneFormatCB->currentIndex()) + { + case 0: + timezoneFormatType = QLatin1String("short"); + break; + + case 1: + timezoneFormatType = QLatin1String("long"); + break; + + case 2: + timezoneFormatType = QLatin1String("offset"); + break; + + case 3: + timezoneFormatType = QLatin1String("abbreviation"); + break; + + case 4: + timezoneFormatType = QLatin1String("iana"); + break; + } + mSettings->setValue(QLatin1String("timezoneFormatType"), timezoneFormatType); + + mSettings->setValue(QLatin1String("showDate"), ui->dateGB->isChecked()); + + QString datePosition; + switch (ui->datePositionCB->currentIndex()) + { + case 0: + datePosition = QLatin1String("below"); + break; + + case 1: + datePosition = QLatin1String("above"); + break; + + case 2: + datePosition = QLatin1String("before"); + break; + + case 3: + datePosition = QLatin1String("after"); + break; + } + mSettings->setValue(QLatin1String("datePosition"), datePosition); + + QString dateFormatType; + switch (ui->dateFormatCB->currentIndex()) + { + case 0: + dateFormatType = QLatin1String("short"); + break; + + case 1: + dateFormatType = QLatin1String("long"); + break; + + case 2: + dateFormatType = QLatin1String("iso"); + break; + + case 3: + dateFormatType = QLatin1String("custom"); + break; + } + mSettings->setValue(QLatin1String("dateFormatType"), dateFormatType); + + mSettings->setValue(QLatin1String("dateShowYear"), ui->dateShowYearCB->isChecked()); + mSettings->setValue(QLatin1String("dateShowDoW"), ui->dateShowDoWCB->isChecked()); + mSettings->setValue(QLatin1String("datePadDay"), ui->datePadDayCB->isChecked()); + mSettings->setValue(QLatin1String("dateLongNames"), ui->dateLongNamesCB->isChecked()); + + mSettings->setValue(QLatin1String("customFormat"), mManualFormat); + + + mSettings->remove(QLatin1String("timeZones")); + + int size = ui->timeZonesTW->rowCount(); + mSettings->beginWriteArray(QLatin1String("timeZones"), size); + for (int i = 0; i < size; ++i) + { + mSettings->setArrayIndex(i); + mSettings->setValue(QLatin1String("timeZone"), ui->timeZonesTW->item(i, 0)->text()); + mSettings->setValue(QLatin1String("customName"), ui->timeZonesTW->item(i, 1)->text()); + } + mSettings->endArray(); + + mSettings->setValue(QLatin1String("defaultTimeZone"), mDefaultTimeZone); + + + mSettings->setValue(QLatin1String("useAdvancedManualFormat"), ui->advancedManualGB->isChecked()); + + + mSettings->setValue(QLatin1String("autoRotate"), ui->autorotateCB->isChecked()); +} + +void LxQtWorldClockConfiguration::dialogButtonsAction(QAbstractButton *button) +{ + if (ui->buttons->buttonRole(button) == QDialogButtonBox::ResetRole) + { + mOldSettings.loadToSettings(); + loadSettings(); + } + else + close(); +} + +void LxQtWorldClockConfiguration::timeFormatChanged(int index) +{ + bool longTimeFormatSelected = index == 1; + bool customTimeFormatSelected = index == 2; + ui->timeCustomW->setEnabled(customTimeFormatSelected); + ui->timezoneGB->setEnabled(!longTimeFormatSelected); +} + +void LxQtWorldClockConfiguration::dateGroupToggled(bool dateIsChecked) +{ + bool customDateFormatSelected = ui->dateFormatCB->currentIndex() == ui->dateFormatCB->count() - 1; + ui->dateCustomW->setEnabled(dateIsChecked && customDateFormatSelected); +} + +void LxQtWorldClockConfiguration::dateFormatChanged(int index) +{ + bool customDateFormatSelected = index == ui->dateFormatCB->count() - 1; + bool dateIsChecked = ui->dateGB->isChecked(); + ui->dateCustomW->setEnabled(dateIsChecked && customDateFormatSelected); +} + +void LxQtWorldClockConfiguration::advancedFormatToggled(bool on) +{ + bool longTimeFormatSelected = ui->timeFormatCB->currentIndex() == 1; + ui->timeGB->setEnabled(!on); + ui->timezoneGB->setEnabled(!on && !longTimeFormatSelected); + ui->dateGB->setEnabled(!on); +} + +void LxQtWorldClockConfiguration::customiseManualFormatClicked() +{ + if (!mConfigurationManualFormat) + { + mConfigurationManualFormat = new LxQtWorldClockConfigurationManualFormat(this); + connect(mConfigurationManualFormat, SIGNAL(manualFormatChanged()), this, SLOT(manualFormatChanged())); + } + + mConfigurationManualFormat->setManualFormat(mManualFormat); + + QString oldManualFormat = mManualFormat; + + mManualFormat = (mConfigurationManualFormat->exec() == QDialog::Accepted) ? mConfigurationManualFormat->manualFormat() : oldManualFormat; + + saveSettings(); +} + +void LxQtWorldClockConfiguration::manualFormatChanged() +{ + mManualFormat = mConfigurationManualFormat->manualFormat(); + saveSettings(); +} + +void LxQtWorldClockConfiguration::updateTimeZoneButtons() +{ + QList selectedItems = ui->timeZonesTW->selectedItems(); + int selectedCount = selectedItems.count() / 2; + int allCount = ui->timeZonesTW->rowCount(); + + ui->removePB->setEnabled(selectedCount != 0); + bool canSetAsDefault = (selectedCount == 1); + if (canSetAsDefault) + { + if (selectedItems[0]->column() == 0) + canSetAsDefault = (selectedItems[0]->text() != mDefaultTimeZone); + else + canSetAsDefault = (selectedItems[1]->text() != mDefaultTimeZone); + } + + bool canMoveUp = false; + bool canMoveDown = false; + if ((selectedCount != 0) && (selectedCount != allCount)) + { + bool skipBottom = true; + for (int i = allCount - 1; i >= 0; --i) + { + if (ui->timeZonesTW->item(i, 0)->isSelected()) + { + if (!skipBottom) + { + canMoveDown = true; + break; + } + } + else + skipBottom = false; + } + + bool skipTop = true; + for (int i = 0; i < allCount; ++i) + { + if (ui->timeZonesTW->item(i, 0)->isSelected()) + { + if (!skipTop) + { + canMoveUp = true; + break; + } + } + else + skipTop = false; + } + } + ui->setAsDefaultPB->setEnabled(canSetAsDefault); + ui->editCustomNamePB->setEnabled(selectedCount == 1); + ui->moveUpPB->setEnabled(canMoveUp); + ui->moveDownPB->setEnabled(canMoveDown); +} + +int LxQtWorldClockConfiguration::findTimeZone(const QString& timeZone) +{ + QList items = ui->timeZonesTW->findItems(timeZone, Qt::MatchExactly); + foreach (QTableWidgetItem* item, items) + if (item->column() == 0) + return item->row(); + return -1; +} + +void LxQtWorldClockConfiguration::addTimeZone() +{ + if (!mConfigurationTimeZones) + mConfigurationTimeZones = new LxQtWorldClockConfigurationTimeZones(this); + + if (mConfigurationTimeZones->updateAndExec() == QDialog::Accepted) + { + QString timeZone = mConfigurationTimeZones->timeZone(); + if (findTimeZone(timeZone) == -1) + { + int row = ui->timeZonesTW->rowCount(); + ui->timeZonesTW->setRowCount(row + 1); + QTableWidgetItem *item = new QTableWidgetItem(timeZone); + ui->timeZonesTW->setItem(row, 0, item); + ui->timeZonesTW->setItem(row, 1, new QTableWidgetItem(QString())); + if (mDefaultTimeZone.isEmpty()) + setDefault(row); + } + } + + saveSettings(); +} + +void LxQtWorldClockConfiguration::removeTimeZone() +{ + foreach (QTableWidgetItem *item, ui->timeZonesTW->selectedItems()) + if (item->column() == 0) + { + if (item->text() == mDefaultTimeZone) + mDefaultTimeZone.clear(); + ui->timeZonesTW->removeRow(item->row()); + } + + if ((mDefaultTimeZone.isEmpty()) && ui->timeZonesTW->rowCount()) + setDefault(0); + + saveSettings(); +} + +void LxQtWorldClockConfiguration::setBold(QTableWidgetItem *item, bool value) +{ + if (item) + { + QFont font = item->font(); + font.setBold(value); + item->setFont(font); + } +} + +void LxQtWorldClockConfiguration::setBold(int row, bool value) +{ + setBold(ui->timeZonesTW->item(row, 0), value); + setBold(ui->timeZonesTW->item(row, 1), value); +} + +void LxQtWorldClockConfiguration::setDefault(int row) +{ + setBold(row, true); + mDefaultTimeZone = ui->timeZonesTW->item(row, 0)->text(); +} + +void LxQtWorldClockConfiguration::setTimeZoneAsDefault() +{ + setBold(findTimeZone(mDefaultTimeZone), false); + + setDefault(ui->timeZonesTW->selectedItems()[0]->row()); + + saveSettings(); +} + +void LxQtWorldClockConfiguration::editTimeZoneCustomName() +{ + int row = ui->timeZonesTW->selectedItems()[0]->row(); + + QString oldName = ui->timeZonesTW->item(row, 1)->text(); + + bool ok; + QString newName = QInputDialog::getText(this, tr("Input custom time zone name"), tr("Custom name"), QLineEdit::Normal, oldName, &ok); + if (ok) + { + ui->timeZonesTW->item(row, 1)->setText(newName); + + saveSettings(); + } +} + +void LxQtWorldClockConfiguration::moveTimeZoneUp() +{ + int m = ui->timeZonesTW->rowCount(); + bool skipTop = true; + for (int i = 0; i < m; ++i) + { + if (ui->timeZonesTW->item(i, 0)->isSelected()) + { + if (!skipTop) + { + QTableWidgetItem *itemP0 = ui->timeZonesTW->takeItem(i - 1, 0); + QTableWidgetItem *itemP1 = ui->timeZonesTW->takeItem(i - 1, 1); + QTableWidgetItem *itemT0 = ui->timeZonesTW->takeItem(i, 0); + QTableWidgetItem *itemT1 = ui->timeZonesTW->takeItem(i, 1); + + ui->timeZonesTW->setItem(i - 1, 0, itemT0); + ui->timeZonesTW->setItem(i - 1, 1, itemT1); + ui->timeZonesTW->setItem(i, 0, itemP0); + ui->timeZonesTW->setItem(i, 1, itemP1); + + itemT0->setSelected(true); + itemT1->setSelected(true); + itemP0->setSelected(false); + itemP1->setSelected(false); + } + } + else + skipTop = false; + } + + saveSettings(); +} + +void LxQtWorldClockConfiguration::moveTimeZoneDown() +{ + int m = ui->timeZonesTW->rowCount(); + bool skipBottom = true; + for (int i = m - 1; i >= 0; --i) + { + if (ui->timeZonesTW->item(i, 0)->isSelected()) + { + if (!skipBottom) + { + QTableWidgetItem *itemN0 = ui->timeZonesTW->takeItem(i + 1, 0); + QTableWidgetItem *itemN1 = ui->timeZonesTW->takeItem(i + 1, 1); + QTableWidgetItem *itemT0 = ui->timeZonesTW->takeItem(i, 0); + QTableWidgetItem *itemT1 = ui->timeZonesTW->takeItem(i, 1); + + ui->timeZonesTW->setItem(i + 1, 0, itemT0); + ui->timeZonesTW->setItem(i + 1, 1, itemT1); + ui->timeZonesTW->setItem(i, 0, itemN0); + ui->timeZonesTW->setItem(i, 1, itemN1); + + itemT0->setSelected(true); + itemT1->setSelected(true); + itemN0->setSelected(false); + itemN1->setSelected(false); + } + } + else + skipBottom = false; + } + + saveSettings(); +} diff --git a/plugin-worldclock/lxqtworldclockconfiguration.h b/plugin-worldclock/lxqtworldclockconfiguration.h new file mode 100644 index 0000000..69e5428 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfiguration.h @@ -0,0 +1,106 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQT_PANEL_WORLDCLOCK_CONFIGURATION_H +#define LXQT_PANEL_WORLDCLOCK_CONFIGURATION_H + +#include + +#include +#include +#include +#include + + +namespace Ui { + class LxQtWorldClockConfiguration; +} + +class LxQtWorldClockConfigurationTimeZones; +class LxQtWorldClockConfigurationManualFormat; +class QTableWidgetItem; + +class LxQtWorldClockConfiguration : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtWorldClockConfiguration(QSettings *settings, QWidget *parent = NULL); + ~LxQtWorldClockConfiguration(); + +public slots: + void saveSettings(); + +private: + Ui::LxQtWorldClockConfiguration *ui; + QSettings *mSettings; + LxQt::SettingsCache mOldSettings; + + /* + Read settings from conf file and put data into controls. + */ + void loadSettings(); + +private slots: + /* + Saves settings in conf file. + */ + void dialogButtonsAction(QAbstractButton *); + + void timeFormatChanged(int); + void dateGroupToggled(bool); + void dateFormatChanged(int); + void advancedFormatToggled(bool); + void customiseManualFormatClicked(); + void manualFormatChanged(); + + void updateTimeZoneButtons(); + void addTimeZone(); + void removeTimeZone(); + void setTimeZoneAsDefault(); + void editTimeZoneCustomName(); + void moveTimeZoneUp(); + void moveTimeZoneDown(); + +private: + QString mDefaultTimeZone; + + bool mLockCascadeSettingChanges; + + LxQtWorldClockConfigurationTimeZones *mConfigurationTimeZones; + LxQtWorldClockConfigurationManualFormat *mConfigurationManualFormat; + + QString mManualFormat; + + void setDefault(int); + void setBold(QTableWidgetItem*, bool); + void setBold(int row, bool value); + int findTimeZone(const QString& timeZone); +}; + +#endif // LXQT_PANEL_WORLDCLOCK_CONFIGURATION_H diff --git a/plugin-worldclock/lxqtworldclockconfiguration.ui b/plugin-worldclock/lxqtworldclockconfiguration.ui new file mode 100644 index 0000000..e9994c9 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfiguration.ui @@ -0,0 +1,631 @@ + + + LxQtWorldClockConfiguration + + + + 0 + 0 + 600 + 686 + + + + World Clock Settings + + + + + + 0 + + + + Display &format + + + + + + &Time + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + F&ormat: + + + timeFormatCB + + + + + + + + Short + + + + + Long + + + + + Custom + + + + + + + + + + + false + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Sho&w seconds + + + + + + + Pad &hour with zero + + + + + + + &Use 12-hour format + + + + + + + + + + + + + T&ime zone + + + true + + + false + + + + + + &Position: + + + timezonePositionCB + + + + + + + For&mat: + + + timezoneFormatCB + + + + + + + + Below + + + + + Above + + + + + Before + + + + + After + + + + + + + + 0 + + + + Short + + + + + Long + + + + + Offset from UTC + + + + + Abbreviation + + + + + Location identifier + + + + + Custom name + + + + + + + + + + + &Date + + + true + + + false + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Po&sition: + + + datePositionCB + + + + + + + + Below + + + + + Above + + + + + Before + + + + + After + + + + + + + + Fo&rmat: + + + dateFormatCB + + + + + + + + Short + + + + + Long + + + + + ISO 8601 + + + + + Custom + + + + + + + + + + + false + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Show &year + + + + + + + Show day of wee&k + + + + + + + Pad d&ay with zero + + + + + + + &Long month and day of week names + + + + + + + + + + + + + Ad&vanced manual format + + + true + + + false + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Customise ... + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Time &zones + + + + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::ExtendedSelection + + + QAbstractItemView::SelectRows + + + 2 + + + true + + + false + + + + IANA id + + + + + Custom name + + + + + + + + + + &Add ... + + + + + + + false + + + &Remove + + + + + + + false + + + Set as &default + + + + + + + false + + + &Edit custom name ... + + + + + + + false + + + Move &up + + + + + + + false + + + Move do&wn + + + + + + + Qt::Vertical + + + + 1 + 0 + + + + + + + + + + + &General + + + + + + Auto&rotate when the panel is vertical + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + tabWidget + timeFormatCB + timeShowSecondsCB + timePadHourCB + timeAMPMCB + timezoneGB + timezonePositionCB + timezoneFormatCB + dateGB + datePositionCB + dateFormatCB + dateShowYearCB + dateShowDoWCB + datePadDayCB + dateLongNamesCB + advancedManualGB + customisePB + timeZonesTW + addPB + removePB + setAsDefaultPB + editCustomNamePB + moveUpPB + moveDownPB + autorotateCB + buttons + + + + + buttons + accepted() + LxQtWorldClockConfiguration + accept() + + + 104 + 438 + + + 97 + 253 + + + + + buttons + rejected() + LxQtWorldClockConfiguration + reject() + + + 85 + 438 + + + 62 + 253 + + + + + + maximumNetSpeedChanged(QString) + on_typeCOB_currentIndexChanged(int) + on_sourceCOB_currentIndexChanged(int) + on_maximumHS_valueChanged(int) + saveSettings() + + diff --git a/plugin-worldclock/lxqtworldclockconfigurationmanualformat.cpp b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.cpp new file mode 100644 index 0000000..9edffc5 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.cpp @@ -0,0 +1,60 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include + +#include "lxqtworldclockconfigurationmanualformat.h" + +#include "ui_lxqtworldclockconfigurationmanualformat.h" + + +LxQtWorldClockConfigurationManualFormat::LxQtWorldClockConfigurationManualFormat(QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtWorldClockConfigurationManualFormat) +{ + setObjectName("WorldClockConfigurationManualFormatWindow"); + ui->setupUi(this); + + connect(ui->manualFormatPTE, SIGNAL(textChanged()), this, SIGNAL(manualFormatChanged())); +} + +LxQtWorldClockConfigurationManualFormat::~LxQtWorldClockConfigurationManualFormat() +{ + delete ui; +} + +void LxQtWorldClockConfigurationManualFormat::setManualFormat(const QString& text) +{ + ui->manualFormatPTE->setPlainText(text); +} + +QString LxQtWorldClockConfigurationManualFormat::manualFormat() const +{ + return ui->manualFormatPTE->toPlainText(); +} diff --git a/plugin-worldclock/lxqtworldclockconfigurationmanualformat.h b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.h new file mode 100644 index 0000000..62572ee --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.h @@ -0,0 +1,62 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQT_PANEL_WORLDCLOCK_CONFIGURATION_MANUAL_FORMAT_H +#define LXQT_PANEL_WORLDCLOCK_CONFIGURATION_MANUAL_FORMAT_H + +#include +#include + + +namespace Ui { + class LxQtWorldClockConfigurationManualFormat; +} + +class QTreeWidgetItem; + +class LxQtWorldClockConfigurationManualFormat : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtWorldClockConfigurationManualFormat(QWidget *parent = NULL); + ~LxQtWorldClockConfigurationManualFormat(); + + void setManualFormat(const QString&); + + QString manualFormat() const; + +signals: + void manualFormatChanged(); + +private: + Ui::LxQtWorldClockConfigurationManualFormat *ui; +}; + +#endif // LXQT_PANEL_WORLDCLOCK_CONFIGURATION_MANUAL_FORMAT_H diff --git a/plugin-worldclock/lxqtworldclockconfigurationmanualformat.ui b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.ui new file mode 100644 index 0000000..c95c4c7 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationmanualformat.ui @@ -0,0 +1,190 @@ + + + LxQtWorldClockConfigurationManualFormat + + + + 0 + 0 + 800 + 500 + + + + World Clock Time Zones + + + + + + Qt::Vertical + + + false + + + + + 0 + 1 + + + + + 0 + 100 + + + + + + + 0 + 100 + + + + + 0 + 100 + + + + Qt::ScrollBarAlwaysOff + + + true + + + + + 0 + 0 + 766 + 1050 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + + + Qt::RichText + + + true + + + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + manualFormatPTE + scrollArea + buttons + + + + + buttons + accepted() + LxQtWorldClockConfigurationManualFormat + accept() + + + 95 + 490 + + + 97 + 253 + + + + + buttons + rejected() + LxQtWorldClockConfigurationManualFormat + reject() + + + 76 + 490 + + + 62 + 253 + + + + + + maximumNetSpeedChanged(QString) + on_typeCOB_currentIndexChanged(int) + on_sourceCOB_currentIndexChanged(int) + on_maximumHS_valueChanged(int) + saveSettings() + + diff --git a/plugin-worldclock/lxqtworldclockconfigurationtimezones.cpp b/plugin-worldclock/lxqtworldclockconfigurationtimezones.cpp new file mode 100644 index 0000000..dce022f --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationtimezones.cpp @@ -0,0 +1,129 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#include + +#include "lxqtworldclockconfigurationtimezones.h" + +#include "ui_lxqtworldclockconfigurationtimezones.h" + + +LxQtWorldClockConfigurationTimeZones::LxQtWorldClockConfigurationTimeZones(QWidget *parent) : + QDialog(parent), + ui(new Ui::LxQtWorldClockConfigurationTimeZones) +{ + setObjectName("WorldClockConfigurationTimeZonesWindow"); + ui->setupUi(this); + + connect(ui->timeZonesTW, SIGNAL(itemSelectionChanged()), SLOT(itemSelectionChanged())); + connect(ui->timeZonesTW, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(itemDoubleClicked(QTreeWidgetItem*,int))); +} + +LxQtWorldClockConfigurationTimeZones::~LxQtWorldClockConfigurationTimeZones() +{ + delete ui; +} + +QString LxQtWorldClockConfigurationTimeZones::timeZone() +{ + return mTimeZone; +} + +void LxQtWorldClockConfigurationTimeZones::itemSelectionChanged() +{ + QList items = ui->timeZonesTW->selectedItems(); + if (!items.empty()) + mTimeZone = items[0]->data(0, Qt::UserRole).toString(); + else + mTimeZone.clear(); +} + +void LxQtWorldClockConfigurationTimeZones::itemDoubleClicked(QTreeWidgetItem* /*item*/, int /*column*/) +{ + if (!mTimeZone.isEmpty()) + accept(); +} + +QTreeWidgetItem* LxQtWorldClockConfigurationTimeZones::makeSureParentsExist(const QStringList &parts, QMap &parentItems) +{ + if (parts.length() == 1) + return 0; + + QStringList parentParts = parts.mid(0, parts.length() - 1); + + QString parentPath = parentParts.join(QLatin1String("/")); + + QMap::Iterator I = parentItems.find(parentPath); + if (I != parentItems.end()) + return I.value(); + + QTreeWidgetItem* newItem = new QTreeWidgetItem(QStringList() << parts[parts.length() - 2]); + + QTreeWidgetItem* parentItem = makeSureParentsExist(parentParts, parentItems); + + if (!parentItem) + ui->timeZonesTW->addTopLevelItem(newItem); + else + parentItem->addChild(newItem); + + parentItems[parentPath] = newItem; + + return newItem; +} + +int LxQtWorldClockConfigurationTimeZones::updateAndExec() +{ + QDateTime now = QDateTime::currentDateTime(); + + ui->timeZonesTW->clear(); + + QMap parentItems; + + foreach(QByteArray ba, QTimeZone::availableTimeZoneIds()) + { + QTimeZone timeZone(ba); + QString ianaId(ba); + QStringList qStrings(QString(ba).split(QLatin1Char('/'))); + + if ((qStrings.size() == 1) && (qStrings[0].startsWith(QLatin1String("UTC")))) + qStrings.prepend(tr("UTC")); + + if (qStrings.size() == 1) + qStrings.prepend(tr("Other")); + + QTreeWidgetItem *tzItem = new QTreeWidgetItem(QStringList() << qStrings[qStrings.length() - 1] << timeZone.displayName(now) << timeZone.comment() << QLocale::countryToString(timeZone.country())); + tzItem->setData(0, Qt::UserRole, ianaId); + + makeSureParentsExist(qStrings, parentItems)->addChild(tzItem); + } + + ui->timeZonesTW->sortByColumn(0, Qt::AscendingOrder); + + return exec(); +} diff --git a/plugin-worldclock/lxqtworldclockconfigurationtimezones.h b/plugin-worldclock/lxqtworldclockconfigurationtimezones.h new file mode 100644 index 0000000..d3f1677 --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationtimezones.h @@ -0,0 +1,67 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2012 Razor team + * 2014 LXQt team + * Authors: + * Kuzma Shapran + * + * This program or 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 + * + * END_COMMON_COPYRIGHT_HEADER */ + + +#ifndef LXQT_PANEL_WORLDCLOCK_CONFIGURATION_TIMEZONES_H +#define LXQT_PANEL_WORLDCLOCK_CONFIGURATION_TIMEZONES_H + +#include +#include + + +namespace Ui { + class LxQtWorldClockConfigurationTimeZones; +} + +class QTreeWidgetItem; + +class LxQtWorldClockConfigurationTimeZones : public QDialog +{ + Q_OBJECT + +public: + explicit LxQtWorldClockConfigurationTimeZones(QWidget *parent = NULL); + ~LxQtWorldClockConfigurationTimeZones(); + + int updateAndExec(); + + QString timeZone(); + +public slots: + void itemSelectionChanged(); + void itemDoubleClicked(QTreeWidgetItem*,int); + +private: + Ui::LxQtWorldClockConfigurationTimeZones *ui; + + QString mTimeZone; + + QTreeWidgetItem* makeSureParentsExist(const QStringList &parts, QMap &parentItems); +}; + +#endif // LXQT_PANEL_WORLDCLOCK_CONFIGURATION_TIMEZONES_H diff --git a/plugin-worldclock/lxqtworldclockconfigurationtimezones.ui b/plugin-worldclock/lxqtworldclockconfigurationtimezones.ui new file mode 100644 index 0000000..017c5cd --- /dev/null +++ b/plugin-worldclock/lxqtworldclockconfigurationtimezones.ui @@ -0,0 +1,111 @@ + + + LxQtWorldClockConfigurationTimeZones + + + + 0 + 0 + 718 + 280 + + + + World Clock Time Zones + + + + + + QAbstractItemView::NoEditTriggers + + + true + + + true + + + 4 + + + 150 + + + + Time zone + + + + + Name + + + + + Comment + + + + + Country + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + timeZonesTW + buttons + + + + + buttons + accepted() + LxQtWorldClockConfigurationTimeZones + accept() + + + 86 + 244 + + + 97 + 253 + + + + + buttons + rejected() + LxQtWorldClockConfigurationTimeZones + reject() + + + 67 + 244 + + + 62 + 253 + + + + + + maximumNetSpeedChanged(QString) + on_typeCOB_currentIndexChanged(int) + on_sourceCOB_currentIndexChanged(int) + on_maximumHS_valueChanged(int) + saveSettings() + + diff --git a/plugin-worldclock/resources/worldclock.desktop.in b/plugin-worldclock/resources/worldclock.desktop.in new file mode 100644 index 0000000..f0aecd0 --- /dev/null +++ b/plugin-worldclock/resources/worldclock.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name=World clock +Comment=World clock plugin. +Icon=clock + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-worldclock/translations/worldclock.ts b/plugin-worldclock/translations/worldclock.ts new file mode 100644 index 0000000..f0efb2a --- /dev/null +++ b/plugin-worldclock/translations/worldclock.ts @@ -0,0 +1,328 @@ + + + + + LxQtWorldClock + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + LxQtWorldClockConfiguration + + + World Clock Settings + + + + + Display &format + + + + + &Time + + + + + F&ormat: + + + + + + + Short + + + + + + + Long + + + + + + Custom + + + + + Sho&w seconds + + + + + Pad &hour with zero + + + + + T&ime zone + + + + + &Position: + + + + + For&mat: + + + + + + Below + + + + + + Above + + + + + + Before + + + + + + After + + + + + Offset from UTC + + + + + Abbreviation + + + + + IANA id + + + + + + + Custom name + + + + + &Use 12-hour format + + + + + Location identifier + + + + + &Date + + + + + Po&sition: + + + + + Fo&rmat: + + + + + ISO 8601 + + + + + Show &year + + + + + Show day of wee&k + + + + + Pad d&ay with zero + + + + + &Long month and day of week names + + + + + Ad&vanced manual format + + + + + &Customise ... + + + + + Time &zones + + + + + &Add ... + + + + + &Remove + + + + + Set as &default + + + + + &Edit custom name ... + + + + + Move &up + + + + + Move do&wn + + + + + &General + + + + + Auto&rotate when the panel is vertical + + + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + Input custom time zone name + + + + + LxQtWorldClockConfigurationManualFormat + + + World Clock Time Zones + + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + + + + + LxQtWorldClockConfigurationTimeZones + + + World Clock Time Zones + + + + + Time zone + + + + + Name + + + + + Comment + + + + + Country + + + + + UTC + + + + + Other + + + + diff --git a/plugin-worldclock/translations/worldclock_ja.desktop b/plugin-worldclock/translations/worldclock_ja.desktop new file mode 100644 index 0000000..b9b6f8e --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ja.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ja]=世界時計 +Comment[ja]=世界時計のウィジェットです + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-worldclock/translations/worldclock_ja.ts b/plugin-worldclock/translations/worldclock_ja.ts new file mode 100644 index 0000000..f9657dc --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ja.ts @@ -0,0 +1,365 @@ + + + + + LxQtWorldClock + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + LxQtWorldClockConfiguration + + + World Clock Settings + 世界時計の設定 + + + + Display &format + 表示形式 (&F) + + + + &Time + 時刻(&T) + + + + F&ormat: + 形式(&O): + + + + + + Short + 短い + + + + + + Long + 長い + + + + + Custom + 指定する + + + + Sho&w seconds + 秒も表示(&W) + + + + Pad &hour with zero + 時が一桁のときゼロで埋める(&H) + + + + &Use 12-hour format + 12時間制で表示(&U) + + + + T&ime zone + タイムゾーン(&I) + + + + &Position: + 位置(&P): + + + + For&mat: + 形式(&M) + + + + + Below + + + + + + Above + + + + + + Before + + + + + + After + + + + + Offset from UTC + UTCからの時差 + + + + Abbreviation + 短縮形 + + + + Location identifier + 場所 + + + + + IANA id + IANAのID + + + + + + Custom name + 指定した名前 + + + + &Date + 日時(&D) + + + + Po&sition: + 位置(&S): + + + + Fo&rmat: + 形式(&R): + + + + ISO 8601 + ISO 8601 + + + + Show &year + 年を表示(&Y) + + + + Show day of wee&k + 曜日を表示(&K) + + + + Pad d&ay with zero + 日が一桁のときゼロで埋める(&A) + + + + &Long month and day of week names + 月や曜日を長い名前で表示(&L) + + + + Ad&vanced manual format + 形式を詳しく指定する(&V) + + + + &Customise ... + 指定する(&C) + + + + Time &zones + タイムゾーン(&Z) + + + + &Add ... + 追加(&A) + + + + &Remove + 削除(&R) + + + + Set as &default + デフォルトにする(&D) + + + + &Edit custom name ... + 名前を付ける(&E) + + + + Move &up + 上へ(&U) + + + + Move do&wn + 下へ(&W) + + + + &General + 一般(&G) + + + + Auto&rotate when the panel is vertical + パネルが垂直なときには回転する(&R) + + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + Input custom time zone name + タイムゾーンの名前を入力 + + + + LxQtWorldClockConfigurationManualFormat + + + World Clock Time Zones + 世界時計のタイムゾーン + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + <h1>日時形式の指定方法</h1> +<p>日時の表現パターンは文字列で表記します。特定の文字列は生成処理時に解釈され、カレンダー上の日時の情報に置き換えられます。</p> +<p>以下の日付フィールドのシンボル表は、例えば yyyy が年を意味するといったように、設定されているロケールに合わせた形式で表示されるパターン文字列を示しています。また、同じ文字を並べるものがあり、例えば y は年を示すために用い、'yy' なら '99'、'yyyy' なら '1999' といったように生成されます。数字を示す多くのフィールドは、文字長を表しています。例えば、時を示す h は、'h' は '5'、'hh' は '05' を生成します。繰り返す回数により短縮名かフルネームかを区別するものもあります。そのほか下表に示す通りです。</p> +<p>引用符内か否かに関わらず、シングルクオーテーションを2つ続けると、シングルクオーテーション文字1つを表します。シングルクオーテーション内の文字列は、(2つ連続している場合を除いて、)解釈されません。a から Z および A から Z までの ASCII 文字は、この記法のための予約文字で、文字そのものを表したいときには引用符で括る必要があります。しかも、いくつかの ASCII 記号も、将来は変数に指定される可能性があります。(例えば、":" は時刻のセパレータとして、'/' は日付のセパレータとして、ロケールに合わせた別の文字に差し替えられることになるかもしれません。)<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">文字列</th><th>意味</th></tr> +<tr><td>d</td><td>日(ゼロ埋めしない) (1-31)</td></tr> +<tr><td>dd</td><td>日(ゼロ埋めする) (01-31)</td></tr> +<tr><td>ddd</td><td>ロケールに合わせた曜日(短縮名) ('月'-'日').</td></tr> +<tr><td>dddd</td><td>ロケールに合わせた曜日(フルネーム) ('月曜日'-'日曜日')</td></tr> +<tr><td>M</td><td>月(ゼロ埋めしない) (1-12)</td></tr> +<tr><td>MM</td><td>月(ゼロ埋めする) (01-12)</td></tr> +<tr><td>MMM</td><td>月(短縮名) ('1月'-'12月'、※英語ならJan...).</td></tr> +<tr><td>MMMM</td><td>月(フルネーム) ('1月'-'12月'、※英語ならJanuary...).</td></tr> +<tr><td>yy</td><td>西暦の二桁 (00-99)</td></tr> +<tr><td>yyyy</td><td>西暦の四桁</td></tr> +<tr><td>h</td><td>時(ゼロ埋めしない) (0-23、午前/午後表示時は 1-12)</td></tr> +<tr><td>hh</td><td>時(ゼロ埋めする) (00-23、午前/午後表示時は 01-12)</td></tr> +<tr><td>H</td><td>時(ゼロ埋めしない) (0-23、常に24時間制)</td></tr> +<tr><td>HH</td><td>時(ゼロ埋めする) (00-23、常に24時間制)</td></tr> +<tr><td>m</td><td>分(ゼロ埋めしない) (0-59)</td></tr> +<tr><td>mm</td><td>分(ゼロ埋めする) (00-59)</td></tr> +<tr><td>s</td><td>秒(ゼロ埋めしない) (0-59)</td></tr> +<tr><td>ss</td><td>秒(ゼロ埋めする) (00-59)</td></tr> +<tr><td>z</td><td>ミリ秒(ゼロ埋めしない) (0-999)</td></tr> +<tr><td>zzz</td><td>ミリ秒(ゼロ埋めする) (000-999)</td></tr> +<tr><td>AP <i>または</i> A</td><td>午前/午後。<b>A や AP</b> は "午前"または"午後"に置き換えられる(※英語ならAM/PM)<</td></tr> +<tr><td>ap <i>または</i> a</td><td>午前/午後。<b>a や ap</b> は "午前"または"午後"に置き換えられる(※英語ならam/pm)<</td></tr> +<tr><td>t</td><td>タイムゾーン(例えば"JST")</td></tr> +<tr><td>T</td><td>UTC(世界標準時)からの時差</td></tr> +<tr><td>TT</td><td>IANA で定める ID</td></tr> +<tr><td>TTT</td><td>タイムゾーンの短縮名</td></tr> +<tr><td>TTTT</td><td>タイムゾーン名(短い)</td></tr> +<tr><td>TTTTT</td><td>タイムゾーン名(長い)</td></tr> +<tr><td>TTTTTT</td><td>設定ウィンドウの'タイムゾーン'タブで付けた名前</td></tr></table> +<p><br /><b>Note:</b> ['a'..'z'] および ['A'..'Z'] 以外の文字は解釈されません。例えば ':' や '.'、' '、'#'、'@'のような文字は、引用符で括らなくとも、そのまま表示されます。シングルクオーテーションは、'エスケープ文字'として使用します。連続するシングルクオーテーションは、'本物の' 1個のシングルクオーテーションを表します。</p> + + + + + LxQtWorldClockConfigurationTimeZones + + + World Clock Time Zones + 世界時計のタイムゾーン + + + + Time zone + 都市 + + + + Name + タイムゾーン + + + + Comment + 備考 + + + + Country + 国名 + + + + UTC + UTC + + + + Other + その他 + + + diff --git a/plugin-worldclock/translations/worldclock_pt.desktop b/plugin-worldclock/translations/worldclock_pt.desktop new file mode 100644 index 0000000..de26cac --- /dev/null +++ b/plugin-worldclock/translations/worldclock_pt.desktop @@ -0,0 +1,3 @@ +#TRANSLATIONS +Name[pt]=Relógio mundial +Comment[pt]=Extra para mostrar um relógio mundial diff --git a/plugin-worldclock/translations/worldclock_pt.ts b/plugin-worldclock/translations/worldclock_pt.ts new file mode 100644 index 0000000..26ed172 --- /dev/null +++ b/plugin-worldclock/translations/worldclock_pt.ts @@ -0,0 +1,387 @@ + + + + + LxQtWorldClock + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + LxQtWorldClockConfiguration + + + World Clock Settings + Definições do relógio mundial + + + &Short, time only + &Curto, apenas horas + + + &Long, time only + &Longo, apenas horas + + + S&hort, date && time + C&urto, hora e data + + + L&ong, date && time + L&ongo, hora e data + + + &Custom + &Personalizar + + + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Custom Date/Time Format Syntax</span></p><p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p><p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p><p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg &quot;:&quot; being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br/></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Code</span></p></td><td><p align="center"><span style=" font-weight:600;">Meaning</span></p></td></tr><tr><td><p>d</p></td><td><p>the day as number without a leading zero (1 to 31)</p></td></tr><tr><td><p>dd</p></td><td><p>the day as number with a leading zero (01 to 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</p></td></tr><tr><td><p>dddd</p></td><td><p>the long localized day name (e.g. 'Monday' to 'Sunday</p></td></tr><tr><td><p>M</p></td><td><p>the month as number without a leading zero (1-12)</p></td></tr><tr><td><p>MM</p></td><td><p>the month as number with a leading zero (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</p></td></tr><tr><td><p>MMMM</p></td><td><p>the long localized month name (e.g. 'January' to 'December').</p></td></tr><tr><td><p>yy</p></td><td><p>the year as two digit number (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>the year as four digit number</p></td></tr><tr><td><p>h</p></td><td><p>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</p></td></tr><tr><td><p>hh</p></td><td><p>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</p></td></tr><tr><td><p>H</p></td><td><p>the hour without a leading zero (0 to 23, even with AM/PM display)</p></td></tr><tr><td><p>HH</p></td><td><p>the hour with a leading zero (00 to 23, even with AM/PM display)</p></td></tr><tr><td><p>m</p></td><td><p>the minute without a leading zero (0 to 59)</p></td></tr><tr><td><p>mm</p></td><td><p>the minute with a leading zero (00 to 59)</p></td></tr><tr><td><p>s</p></td><td><p>the second without a leading zero (0 to 59)</p></td></tr><tr><td><p>ss</p></td><td><p>the second with a leading zero (00 to 59)</p></td></tr><tr><td><p>z</p></td><td><p>the milliseconds without leading zeroes (0 to 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>the milliseconds with leading zeroes (000 to 999)</p></td></tr><tr><td><p>AP or A</p></td><td><p>use AM/PM display. <span style=" font-weight:600;">A/AP</span> will be replaced by either &quot;AM&quot; or &quot;PM&quot;.</p></td></tr><tr><td><p>ap or a</p></td><td><p>use am/pm display. <span style=" font-weight:600;">a/ap</span> will be replaced by either &quot;am&quot; or &quot;pm&quot;.</p></td></tr><tr><td><p>t</p></td><td><p>the timezone (for example &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>the offset from UTC</p></td></tr><tr><td><p>TT</p></td><td><p>the timezone IANA id</p></td></tr><tr><td><p>TTT</p></td><td><p>the timezone abbreviation</p></td></tr><tr><td><p>TTTT</p></td><td><p>the timezone short display name</p></td></tr><tr><td><p>TTTTT</p></td><td><p>the timezone long display name</p></td></tr></table><p><br/><span style=" font-weight:600;">Note:</span> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p></body></html> + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Sintaxe do formato de data/hora personalizado</span></p><p>Um formato de data é uma cadeia de caracteres em que os caracteres são substituidos pelos dados de data e hora de um calendário ou que são utilizados para gerar os dados do calendário.</p><p>A tabela de símbolos para campos de data abaixo contém os caracteres utilizados em padrões para mostrar os devidos formatos de uma região. Os caracteres podem ser utilizados diversas vezes. Por exemplo, se utilizar y para o anor, yy devolve 99 e yyyy devolve 1999. Para a maioria dos campo numéricos, o número de caracteres especifica o tamanho do campo. Por exemplo, se utilizar h para a hora, h devolve 5 mas hh devolve 05. Para alguns caracteres, o número de letras especifica o formato utilizado (pode ser abreviado ou completo), conforme explicado abaixo.</p><p>Duas aspas simples representam uma aspa simples literal, seja dentro ou fora das aspas simples. O texto entre aspas simples não é interpretado de qualquer forma (exceto para duas aspas simples adjacentes). Doutra forma, todas as letras ASCII , de "a" a "z" e "A" a "Z" estão reservadas para caracteres de sintaxe e são necessárias aspas para representarem caracteres literais. Adicionalmente, alguns símbolos de pontuação ASCII podem ser tornados variáveis no futuro (ex: &quot;:&quot; é interpretado como separador de hora e '/' como separador de data e são substituidos pelos separadores normalmente utilizados na região).<br/></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Code</span></p></td><td><p align="center"><span style=" font-weight:600;">Significado</span></p></td></tr><tr><td><p>d</p></td><td><p>o dia como número sem o zero inicial (1 a 31)</p></td></tr><tr><td><p>dd</p></td><td><p>o dia como número mas com zero inicial (01 a 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>o nome do dia abreviado (Seg a Dom).</p></td></tr><tr><td><p>dddd</p></td><td><p>o nome do dia completo (Segunda a Domingo</p></td></tr><tr><td><p>M</p></td><td><p>o mês como número sem o zero inicial (1-12)</p></td></tr><tr><td><p>MM</p></td><td><p>o mês como número mas com zero inicial (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>o nome abreviado do mês (Jan a Dez).</p></td></tr><tr><td><p>MMMM</p></td><td><p>o nome completo do mês (Janeiro a Dezembro).</p></td></tr><tr><td><p>yy</p></td><td><p>o ano como número de 2 dígitos (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>o ano como número de 4 dígitos</p></td></tr><tr><td><p>h</p></td><td><p>a hora sem o zero inicial (0 a 23 ou 1 a 12 se AM/PM)</p></td></tr><tr><td><p>hh</p></td><td><p>a hora mas com o zero inicial (00 a 23 ou 01 a 12 se AM/PM)</p></td></tr><tr><td><p>H</p></td><td><p>a hora sem o zero inicial (0 a 23, mesmo se AM/PM)</p></td></tr><tr><td><p>HH</p></td><td><p>a hora mas com o zero inicial (00 a 23, mesmo se AM/PM)</p></td></tr><tr><td><p>m</p></td><td><p>os minutos sem o zero inicial (0 a 59)</p></td></tr><tr><td><p>mm</p></td><td><p>os minutos mas com zero inicial (00 a 59)</p></td></tr><tr><td><p>s</p></td><td><p>os segundos sem o zero inicial (0 a 59)</p></td></tr><tr><td><p>ss</p></td><td><p>os segundos mas com zero inicial (00 a 59)</p></td></tr><tr><td><p>z</p></td><td><p>os milissegundos sem o zero inicial (0 a 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>os milissegundos mas com zero inicial (000 a 999)</p></td></tr><tr><td><p>AP ou A</p></td><td><p>para mostrar AM/PM <span style=" font-weight:600;">A/AP</span> será substituido por &quot;AM&quot; ou &quot;PM&quot;.</p></td></tr><tr><td><p>ap ou a</p></td><td><p>para mostrar am/pm <span style=" font-weight:600;">a/ap</span> será substituido por &quot;am&quot; ou &quot;pm&quot;.</p></td></tr><tr><td><p>t</p></td><td><p>o fuso horário (por exemplo: &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>o desvio da UTC</p></td></tr><tr><td><p>TT</p></td><td><p>a ID IANA do fuso horário</p></td></tr><tr><td><p>TTT</p></td><td><p>a abreviatura do fuso horário</p></td></tr><tr><td><p>TTTT</p></td><td><p>o nome abreviado do fuso horário</p></td></tr><tr><td><p>TTTTT</p></td><td><p>o nome completo do fuso horário</p></td></tr></table><p><br/><span style=" font-weight:600;">Nota:</span> quaisquer caracteres no padrão que não estejam no intervalo [a...z] e [A...Z] serão tratados como texto. Por exemplo, os caracteres ':', '.', ' ', '#' e '@' aparecerão no texto mesmo se não tiverem aspas.As aspas simples são utilizadas para 'escape' de letras. As aspas duplas, dentro ou fora da sequência entre aspas, representa uma aspa simples 'real.</p></body></html> + + + + Time &zones + Fusos &horários + + + + &Add ... + &Adicionar... + + + + &Remove + &Remover + + + + Set as &default + Utilizar como pré-&definido + + + + Move &up + Mover para &cima + + + + Move do&wn + Mover para &baixo + + + + Display &format + &Formato de exibição + + + + &Time + &Hora + + + + F&ormat: + F&ormato: + + + + + + Short + Curto + + + + + + Long + Longo + + + + + Custom + Personalizado + + + + Sho&w seconds + Mo&strar segundos + + + + Pad &hour with zero + Mostrar zero inicial nas &horas + + + + &Use 12-hour format + &Utilizar formato AM/PM + + + + T&ime zone + Fuso horár&io + + + + &Position: + &Posição: + + + + For&mat: + F&ormato: + + + + + Below + Abaixo + + + + + Above + Acima + + + + + Before + Antes + + + + + After + Depois + + + + Offset from UTC + Desvio da UTC + + + + Abbreviation + Abreviatura + + + + Location identifier + Identificador da localização + + + + + + Custom name + Nome personalizado + + + + &Date + &Data + + + + Po&sition: + Pos&ição: + + + + Fo&rmat: + Fo&rmato: + + + + ISO 8601 + ISO 8601 + + + + Show &year + Mostrar &ano + + + + Show day of wee&k + Mostrar dia da se&mana + + + + Pad d&ay with zero + Mostrar zero inicial nos di&as + + + + &Long month and day of week names + Mês &longo e nome do dia da semana + + + + Ad&vanced manual format + Formato a&vançado + + + + &Customise ... + &Personalizar... + + + + IANA id + ID IANA + + + + &Edit custom name ... + &Editar nome personalizado... + + + + &General + &Geral + + + + Auto&rotate when the panel is vertical + &Rodar automaticamente se o painel estiver na vertical + + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + Input custom time zone name + Escreva o nome do fuso horário personalizado + + + + LxQtWorldClockConfigurationManualFormat + + + World Clock Time Zones + Fusos horários do relógio mundial + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + <h1>Sintaxe personalizada para datas e horas</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Código</th><th>Significado</th></tr> +<tr><td>d</td><td>o número do dia sem o zero inicial (1 a 31)</td></tr> +<tr><td>dd</td><td>o número do dia com o zero inicial (01 a 31)</td></tr> +<tr><td>ddd</td><td>o nome abrevidado do dia (Seg a Dom).</td></tr> +<tr><td>dddd</td><td>o nome completo do dia (Segunda a Domingo)</td></tr> +<tr><td>M</td><td>o número do mês sem o zero inicial (1 a 12)</td></tr> +<tr><td>MM</td><td>o número do mês com o zero inicial (01 a 12)</td></tr> +<tr><td>MMM</td><td>o nome abreviado do mês (Jan a Dez)</td></tr> +<tr><td>MMMM</td><td>o nome completo do mês (Janeiro a Dezembro)</td></tr> +<tr><td>yy</td><td>o ano na forma de dois dígitos (00 a 99)</td></tr> +<tr><td>yyyy</td><td>o ano na forma de quatro dígitos</td></tr> +<tr><td>h</td><td>a hora sem o zero inicial (0 a 23 ou 1 a 12 com AM/PM)</td></tr> +<tr><td>hh</td><td>a hora com o zero inicial (00 a 23 ou 01 a 12 com AM/PM)</td></tr> +<tr><td>H</td><td>a hora sem o zero inicial (0 a 23 mesmo se com AM/PM)</td></tr> +<tr><td>HH</td><td>a hora sem o zero inicial (00 a 23 mesmo se com AM/PM)</td></tr> +<tr><td>m</td><td>os minutos sem o zero inicial (0 a 59)</td></tr> +<tr><td>mm</td><td>os minutos com o zero inicial (00 a 59)</td></tr> +<tr><td>s</td><td>os segundos sem o zero inicial (0 a 59)</td></tr> +<tr><td>ss</td><td>os segundos com o zero inicial (00 a 59)</td></tr> +<tr><td>z</td><td>os milissegundos sem o zero inicial (0 a 999)</td></tr> +<tr><td>zzz</td><td>os milissegundos com o zero inicial (0 a 999)</td></tr> +<tr><td>AP <i>ou</i> A</td><td>para mostrar AM/PM. <b>A/AP</b> será substituido por "AM" ou "PM"<</td></tr> +<tr><td>ap <i>ou</i> a</td><td>para mostrar am/pm. <b>a/ap</b> será substituido por "am" ou "pm"<</td></tr> +<tr><td>t</td><td>o fuso horário (por exemplo: "CEST")</td></tr> +<tr><td>T</td><td>o desvio da UTC</td></tr> +<tr><td>TT</td><td>o identificador IANA do fuso horário</td></tr> +<tr><td>TTT</td><td>a abreviatura do fuso horário</td></tr> +<tr><td>TTTT</td><td>o nome abreviado do fuso horário</td></tr> +<tr><td>TTTTT</td><td>o nome completo do fuso horário</td></tr> +<tr><td>TTTTTT</td><td>o nome personalizado do fuso horario. Pode mudar o nome no separador 'Fusos horários' da janela de configurações</td></tr></table> +<p><br /><b>Nota:</b> quaisquer caracteres do padrão que não estejam no intervalo ['a'..'z'] e ['A'..'Z'] serão tratados como texto entre aspas. Por exemplo, os caracteres ':', '.', ' ', '#' e '@' aparecerão na hora resultante do padrão mesmo se não estiverem entre aspas. A plica é utilizada para fazer o 'escape' das letras. Duas plicas seguidas numa linha, dentro ou fora de uma frase entre aspas representa uma plica 'real'.</p + + + + LxQtWorldClockConfigurationTimeZones + + + World Clock Time Zones + Fusos horários do relógio mundial + + + + Time zone + Fuso horário + + + + Name + Nome + + + + Comment + Comentário + + + + Country + País + + + + UTC + UTC + + + + Other + Outro + + + diff --git a/plugin-worldclock/translations/worldclock_ru.desktop b/plugin-worldclock/translations/worldclock_ru.desktop new file mode 100644 index 0000000..34bfbcd --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ru.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru]=Мировое время +Comment[ru]=Плагин мирового времени. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-worldclock/translations/worldclock_ru.ts b/plugin-worldclock/translations/worldclock_ru.ts new file mode 100644 index 0000000..47e6c35 --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ru.ts @@ -0,0 +1,387 @@ + + + + + LxQtWorldClock + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + LxQtWorldClockConfiguration + + + World Clock Settings + Настройки мирового времени + + + &Short, time only + &Короткий, только время + + + &Long, time only + &Длинный, только время + + + S&hort, date && time + К&ороткий, дата и время + + + L&ong, date && time + Д&линный, дата и время + + + &Custom + &Свой + + + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Custom Date/Time Format Syntax</span></p><p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p><p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p><p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg &quot;:&quot; being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br/></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Code</span></p></td><td><p align="center"><span style=" font-weight:600;">Meaning</span></p></td></tr><tr><td><p>d</p></td><td><p>the day as number without a leading zero (1 to 31)</p></td></tr><tr><td><p>dd</p></td><td><p>the day as number with a leading zero (01 to 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</p></td></tr><tr><td><p>dddd</p></td><td><p>the long localized day name (e.g. 'Monday' to 'Sunday</p></td></tr><tr><td><p>M</p></td><td><p>the month as number without a leading zero (1-12)</p></td></tr><tr><td><p>MM</p></td><td><p>the month as number with a leading zero (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</p></td></tr><tr><td><p>MMMM</p></td><td><p>the long localized month name (e.g. 'January' to 'December').</p></td></tr><tr><td><p>yy</p></td><td><p>the year as two digit number (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>the year as four digit number</p></td></tr><tr><td><p>h</p></td><td><p>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</p></td></tr><tr><td><p>hh</p></td><td><p>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</p></td></tr><tr><td><p>H</p></td><td><p>the hour without a leading zero (0 to 23, even with AM/PM display)</p></td></tr><tr><td><p>HH</p></td><td><p>the hour with a leading zero (00 to 23, even with AM/PM display)</p></td></tr><tr><td><p>m</p></td><td><p>the minute without a leading zero (0 to 59)</p></td></tr><tr><td><p>mm</p></td><td><p>the minute with a leading zero (00 to 59)</p></td></tr><tr><td><p>s</p></td><td><p>the second without a leading zero (0 to 59)</p></td></tr><tr><td><p>ss</p></td><td><p>the second with a leading zero (00 to 59)</p></td></tr><tr><td><p>z</p></td><td><p>the milliseconds without leading zeroes (0 to 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>the milliseconds with leading zeroes (000 to 999)</p></td></tr><tr><td><p>AP or A</p></td><td><p>use AM/PM display. <span style=" font-weight:600;">A/AP</span> will be replaced by either &quot;AM&quot; or &quot;PM&quot;.</p></td></tr><tr><td><p>ap or a</p></td><td><p>use am/pm display. <span style=" font-weight:600;">a/ap</span> will be replaced by either &quot;am&quot; or &quot;pm&quot;.</p></td></tr><tr><td><p>t</p></td><td><p>the timezone (for example &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>the offset from UTC</p></td></tr><tr><td><p>TT</p></td><td><p>the timezone IANA id</p></td></tr><tr><td><p>TTT</p></td><td><p>the timezone abbreviation</p></td></tr><tr><td><p>TTTT</p></td><td><p>the timezone short display name</p></td></tr><tr><td><p>TTTTT</p></td><td><p>the timezone long display name</p></td></tr></table><p><br/><span style=" font-weight:600;">Note:</span> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p></body></html> + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Синтаксис своего формата даты/времени</span></p><p>Шаблон даты — это строка символов, где специальные группы символов заменяются при форматировании на дату и время из календаря или используются для генерации даты при синтаксическом разборе.</p><p>Таблица символов полей даты ниже содержит символы, используемые в шаблонах для отображения подходящих форматов установленной локали, такой как yyyy для года. Символы могут быть использованы несколько раз. Например, если использован y для года, 'yy' отобразит '99', тогда как 'yyyy' покажет '1999'. Для большинства числовых полей число символов определяет ширину поля. Например, если h это час, 'h' отобразит '5', но 'hh' отобразит '05'. Для некоторых символов, это число определяет должно ли быть использовано сокращение или полная форма, но могут быть и другие варианты, как написано ниже.</p><p>Две одинарные кавычки отобразят одиночную кавычку, независимо от того внутренние они или внешние. Текст внутри одинарных кавычек никак не интерпретируется (за исключением двух смежных одинарных кавычек). Тогда как все символы ASCII от a до z и A до Z зарезервированы под символы синтаксиса, и требуют заключения в кавычки для отображения их как обычных символов. помимо прочего, некоторые знаки препинания ASCII могут стать переменными в будущем (т.е. &quot;:&quot; быть интерпретированы как разделитель компонентов времени и '/' как разделитель компонентов даты, и заменены при отображении соответствующими символами с учётом локали ).<br /></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Код</span></p></td><td><p align="center"><span style=" font-weight:600;">Обозначения</span></p></td></tr><tr><td><p>d</p></td><td><p>день как число без первого нуля (от 1 до 31)</p></td></tr><tr><td><p>dd</p></td><td><p>день как число с первым нулём (от 01 до 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>сокращённое локализованное название дня (т.е. от 'Пн' до 'Вс').</p></td></tr><tr><td><p>dddd</p></td><td><p>длинное локализованное название дня (т.е. от 'Понедельник' до 'Воскресенье'</p></td></tr><tr><td><p>M</p></td><td><p>месяц как число без первого нуля (1-12)</p></td></tr><tr><td><p>MM</td><td><p>месяц как число с первым нулём (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>сокращённое локализованное название месяца (т.е. от 'Янв' до 'Дек').</p></td></tr><tr><td><p>MMMM</p></td><td><p>длинное локализованное название месяца (т.е. от 'Январь' до 'Декабрь').</p></td></tr><tr><td><p>yy</p></td><td><p>год как двухразрядное число (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>год как четырёхразрядное число</p></td></tr><tr><td><p>h</p></td><td><p>час без нуля впереди (от 0 до 23 или 1 до 12, если отображается AM/PM)</p></td></tr><tr><td><p>hh</p></td><td><p>час с нулём впереди (от 00 до 23 или 01 до 12, если отображается AM/PM)</p></td></tr><tr><td><p>H</p></td><td><p>час без нуля впереди (от 00 до 23, даже с отображением AM/PM)</p></td></tr><tr><td><p>HH</p></td><td><p>час с нулём впереди (от 00 до 23, даже с отображением AM/PM)</p></td></tr><tr><td>m</p></td><td><p>минута без нуля впереди (от 0 до 59)</p></td></tr><tr><td><p>mm</p></td><td><p>минута с нулём впереди (от 00 до 59)</p></td></tr><tr><td><p>s</td><td><p>секунда без нуля впереди (от 0 до 59)</p></td></tr><tr><td><p>ss</p></td><td><p>секунда с нулём впереди (от 00 до 59)</p></td></tr><tr><td><p>z</p></td><td><p>миллисекунда без нуля впереди (от 0 до 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>миллисекунда с нулём впереди (от 000 до 999)</p></td></tr><tr><td><p>AP или A</p></td><td><p>использовать отображение AM/PM. <span style=" font-weight:600;">A/AP</span> будет замещено или &quot;AM&quot; или &quot;PM&quot;.</p></td></tr><tr><td><p>ap или a</p></td><td><p>использовать отображение am/pm. <span style=" font-weight:600;">a/ap</span> будет замещено или &quot;am&quot; или &quot;pm&quot;</p></td></tr><tr><td><p>t</p></td><td><p>часовой пояс (например &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>сдвиг времени от UTC</p></td></tr><tr><td>TT</p></td><td><p>id часового пояса IANA</p></td></tr><tr><td><p>TTT</p></td><td><p>аббревиатура часового пояса</p></td></tr><tr><td><p>TTTT</p></td><td><p>короткое имя часового пояса</p></td></tr><tr><td><p>TTTTT</p></td><td><p>длинное имя часового пояса</p></td></tr></table><p><br/><span style=" font-weight:600;">Замечание:</span> Любой символ в шаблоне не из диапазона ['a'..'z'] и ['A'..'Z'] будет обработан как цитируемый текст. Например, символы как ':', '.', ' ', '#' и '@' появятся в тексте со временем, даже если они не помещены в одинарные кавычки. Одинарные кавычки используются для управляющих символ. Две одинарные кавычки подряд, независимо от того внутри или снаружи цитируемой последовательности, представляет 'реальные' одинарные кавычки.</p></body></html> + + + + Time &zones + Часовые &пояса + + + + &Add ... + &Добавить… + + + + &Remove + &Удалить + + + + Set as &default + Установить &по-умолчанию + + + + Move &up + &Выше + + + + Move do&wn + &Ниже + + + + Display &format + Формат &отображения + + + + &Time + &Время + + + + F&ormat: + Ф&ормат: + + + + + + Short + Короткий + + + + + + Long + Длинный + + + + + Custom + Свой + + + + Sho&w seconds + П&оказывать секунды + + + + Pad &hour with zero + Дополнить &час нулём + + + + T&ime zone + Ч&асовой пояс + + + + &Position: + &Расположение: + + + + For&mat: + Ф&ормат: + + + + + Below + Ниже + + + + + Above + Выше + + + + + Before + До + + + + + After + После + + + + Offset from UTC + Сдвиг относительно UTC + + + + Abbreviation + Сокращение + + + + IANA id + + + + + + + Custom name + Своё имя + + + + &Use 12-hour format + &Использовать 12 часовой формат + + + + Location identifier + Идентификатор местоположения + + + + &Date + &Дата + + + + Po&sition: + &Расположение: + + + + Fo&rmat: + Ф&ормат: + + + + ISO 8601 + + + + + Show &year + П&оказывать год + + + + Show day of wee&k + Показывать день &недели + + + + Pad d&ay with zero + Дополнить &день нулём + + + + &Long month and day of week names + &Длинные названия месяцев и дней недели + + + + Ad&vanced manual format + &Продвинутый ручной формат + + + + &Customise ... + &Настроить ... + + + + &Edit custom name ... + &Изменить своё имя ... + + + + &General + &Общие + + + + Auto&rotate when the panel is vertical + Авто&поворот для вертикальной панели + + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + Input custom time zone name + Введите своё имя для часового пояса + + + + LxQtWorldClockConfigurationManualFormat + + + World Clock Time Zones + Часовые пояса мирового времени + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + <h1>Синтаксис своего формата даты/времени</h1> +<p>Шаблон даты — это строка символов, где специальные группы символов заменяются при форматировании на дату и время из календаря или используются для генерации даты при синтаксическом разборе.</p> +<p>Таблица символов полей даты ниже содержит символы, используемые в шаблонах для отображения подходящих форматов установленной локали, такой как yyyy для года. Символы могут быть использованы несколько раз. Например, если использован y для года, 'yy' отобразит '99', тогда как 'yyyy' покажет '1999'. Для большинства числовых полей число символов определяет ширину поля. Например, если h это час, 'h' отобразит '5', но 'hh' отобразит '05'. Для некоторых символов, это число определяет должно ли быть использовано сокращение или полная форма, но могут быть и другие варианты, как написано ниже.</p> +<p>Две одинарные кавычки отобразят одиночную кавычку, независимо от того внутренние они или внешние. Текст внутри одинарных кавычек никак не интерпретируется (за исключением двух смежных одинарных кавычек). Тогда как все символы ASCII от a до z и A до Z зарезервированы под символы синтаксиса, и требуют заключения в кавычки для отображения их как обычных символов. помимо прочего, некоторые знаки препинания ASCII могут стать переменными в будущем (т.е. &quot;:&quot; быть интерпретированы как разделитель компонентов времени и '/' как разделитель компонентов даты, и заменены при отображении соответствующими символами с учётом локали).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Код</th><th>Обозначения</th></tr> +<tr><td>d</td></td><td>день как число без первого нуля (от 1 до 31)</td></tr> +<tr><td>dd</td><td>день как число с первым нулём (от 01 до 31)</td></tr> +<tr><td>ddd</p></td><td>сокращённое локализованное название дня (т.е. от 'Пн' до 'Вс').</td></tr> +<tr><td>dddd</td><td>длинное локализованное название дня (т.е. от 'Понедельник' до 'Воскресенье'</td></tr> +<tr><td>M</td><td>месяц как число без первого нуля (1-12)</td></tr> +<tr><td>MM</td><td>месяц как число с первым нулём (01-12)</td></tr> +<tr><td>MMM</td><td>сокращённое локализованное название месяца (т.е. от 'Янв' до 'Дек').</td></tr> +<tr><td>MMMM</td><td>длинное локализованное название месяца (т.е. от 'Январь' до 'Декабрь').</td></tr> +<tr><td>yy</td><td><p>год как двухразрядное число (00-99</td></tr> +<tr><td>yyyy</td><td>год как четырёхразрядное число</td></tr> +<tr><td>h</td><td>час без нуля впереди (от 0 до 23 или 1 до 12, если отображается AM/PM)</td></tr> +<tr><td>hh</td><td>час с нулём впереди (от 00 до 23 или 01 до 12, если отображается AM/PM)</td></tr> +<tr><td>H</td><td>час без нуля впереди (от 00 до 23, даже с отображением AM/PM)</td></tr> +<tr><td>HH</td><td>час с нулём впереди (от 00 до 23, даже с отображением AM/PM)</td></tr> +<tr><td>m</td><td>минута без нуля впереди (от 0 до 59)</td></tr> +<tr><td>mm</td><td>минута с нулём впереди (от 00 до 59)</td></tr> +<tr><td>s</td><td>секунда без нуля впереди (от 0 до 59)</td></tr> +<tr><td>ss</td><td>секунда с нулём впереди (от 00 до 59)</td></tr> +<tr><td>z</td><td>миллисекунда без нуля впереди (от 0 до 999)</td></tr> +<tr><td>zzz</td><td>миллисекунда с нулём впереди (от 000 до 999)</td></tr> +<tr><td>AP <i>или</i> A</td><td>использовать отображение AM/PM. <b>A/AP</b> будет замещено на "AM" или "PM".<</td></tr> +<tr><td>ap <i>или</i> a</td><td>использовать отображение am/pm. <b>a/ap</b> будет замещено на "am" или "pm".<</td></tr> +<tr><td>t</td><td>часовой пояс (например "CEST")</td></tr> +<tr><td>T</td><td>сдвиг времени относительно UTC</td></tr> +<tr><td>TT</td><td>id часового пояса IANA</td></tr> +<tr><td>TTT</td><td>аббревиатура часового пояса</td></tr> +<tr><td>TTTT</td><td>короткое имя часового пояса</td></tr> +<tr><td>TTTTT</p></td><td><p>длинное имя часового пояса</td></tr> +<tr><td>TTTTTT</td><td>своё имя часового пояса. Вы можете изменить его во вкладке «Часовые пояса» окна настройки</td></tr></table> +<p><br /><b>Замечание:</b> Любые символы в шаблоне не из диапазона ['a'..'z'] и ['A'..'Z'] будут обработаны как цитируемый текст. Например, символы как ':', '.', ' ', '#' и '@' появятся в тексте со временем, даже если они не помещены в одинарные кавычки. Одинарные кавычки используются для управляющих символ. Две одинарные кавычки подряд, независимо от того внутри или снаружи цитируемой последовательности, представляет 'реальные' одинарные кавычки.</p> + + + + LxQtWorldClockConfigurationTimeZones + + + World Clock Time Zones + Часовые пояса мирового времени + + + + Time zone + Часовой пояс + + + + Name + Название + + + + Comment + Коментарий + + + + Country + Страна + + + + UTC + UTC + + + + Other + Другое + + + diff --git a/plugin-worldclock/translations/worldclock_ru_RU.desktop b/plugin-worldclock/translations/worldclock_ru_RU.desktop new file mode 100644 index 0000000..75090eb --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ru_RU.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +ServiceTypes=LxQtPanel/Plugin +Name[ru_RU]=Мировое время +Comment[ru_RU]=Плагин мирового времени. + +#TRANSLATIONS_DIR=../translations diff --git a/plugin-worldclock/translations/worldclock_ru_RU.ts b/plugin-worldclock/translations/worldclock_ru_RU.ts new file mode 100644 index 0000000..2e12214 --- /dev/null +++ b/plugin-worldclock/translations/worldclock_ru_RU.ts @@ -0,0 +1,387 @@ + + + + + LxQtWorldClock + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + LxQtWorldClockConfiguration + + + World Clock Settings + Настройки мирового времени + + + &Short, time only + &Короткий, только время + + + &Long, time only + &Длинный, только время + + + S&hort, date && time + К&ороткий, дата и время + + + L&ong, date && time + Д&линный, дата и время + + + &Custom + &Свой + + + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Custom Date/Time Format Syntax</span></p><p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p><p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p><p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg &quot;:&quot; being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br/></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Code</span></p></td><td><p align="center"><span style=" font-weight:600;">Meaning</span></p></td></tr><tr><td><p>d</p></td><td><p>the day as number without a leading zero (1 to 31)</p></td></tr><tr><td><p>dd</p></td><td><p>the day as number with a leading zero (01 to 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</p></td></tr><tr><td><p>dddd</p></td><td><p>the long localized day name (e.g. 'Monday' to 'Sunday</p></td></tr><tr><td><p>M</p></td><td><p>the month as number without a leading zero (1-12)</p></td></tr><tr><td><p>MM</p></td><td><p>the month as number with a leading zero (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</p></td></tr><tr><td><p>MMMM</p></td><td><p>the long localized month name (e.g. 'January' to 'December').</p></td></tr><tr><td><p>yy</p></td><td><p>the year as two digit number (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>the year as four digit number</p></td></tr><tr><td><p>h</p></td><td><p>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</p></td></tr><tr><td><p>hh</p></td><td><p>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</p></td></tr><tr><td><p>H</p></td><td><p>the hour without a leading zero (0 to 23, even with AM/PM display)</p></td></tr><tr><td><p>HH</p></td><td><p>the hour with a leading zero (00 to 23, even with AM/PM display)</p></td></tr><tr><td><p>m</p></td><td><p>the minute without a leading zero (0 to 59)</p></td></tr><tr><td><p>mm</p></td><td><p>the minute with a leading zero (00 to 59)</p></td></tr><tr><td><p>s</p></td><td><p>the second without a leading zero (0 to 59)</p></td></tr><tr><td><p>ss</p></td><td><p>the second with a leading zero (00 to 59)</p></td></tr><tr><td><p>z</p></td><td><p>the milliseconds without leading zeroes (0 to 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>the milliseconds with leading zeroes (000 to 999)</p></td></tr><tr><td><p>AP or A</p></td><td><p>use AM/PM display. <span style=" font-weight:600;">A/AP</span> will be replaced by either &quot;AM&quot; or &quot;PM&quot;.</p></td></tr><tr><td><p>ap or a</p></td><td><p>use am/pm display. <span style=" font-weight:600;">a/ap</span> will be replaced by either &quot;am&quot; or &quot;pm&quot;.</p></td></tr><tr><td><p>t</p></td><td><p>the timezone (for example &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>the offset from UTC</p></td></tr><tr><td><p>TT</p></td><td><p>the timezone IANA id</p></td></tr><tr><td><p>TTT</p></td><td><p>the timezone abbreviation</p></td></tr><tr><td><p>TTTT</p></td><td><p>the timezone short display name</p></td></tr><tr><td><p>TTTTT</p></td><td><p>the timezone long display name</p></td></tr></table><p><br/><span style=" font-weight:600;">Note:</span> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p></body></html> + <html><head/><body><p><span style=" font-size:x-large; font-weight:600;">Синтаксис своего формата даты/времени</span></p><p>Шаблон даты — это строка символов, где специальные группы символов заменяются при форматировании на дату и время из календаря или используются для генерации даты при синтаксическом разборе.</p><p>Таблица символов полей даты ниже содержит символы, используемые в шаблонах для отображения подходящих форматов установленной локали, такой как yyyy для года. Символы могут быть использованы несколько раз. Например, если использован y для года, 'yy' отобразит '99', тогда как 'yyyy' покажет '1999'. Для большинства числовых полей число символов определяет ширину поля. Например, если h это час, 'h' отобразит '5', но 'hh' отобразит '05'. Для некоторых символов, это число определяет должно ли быть использовано сокращение или полная форма, но могут быть и другие варианты, как написано ниже.</p><p>Две одинарные кавычки отобразят одиночную кавычку, независимо от того внутренние они или внешние. Текст внутри одинарных кавычек никак не интерпретируется (за исключением двух смежных одинарных кавычек). Тогда как все символы ASCII от a до z и A до Z зарезервированы под символы синтаксиса, и требуют заключения в кавычки для отображения их как обычных символов. помимо прочего, некоторые знаки препинания ASCII могут стать переменными в будущем (т.е. &quot;:&quot; быть интерпретированы как разделитель компонентов времени и '/' как разделитель компонентов даты, и заменены при отображении соответствующими символами с учётом локали ).<br /></p><table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="4"><tr><td width="20%"><p align="center"><span style=" font-weight:600;">Код</span></p></td><td><p align="center"><span style=" font-weight:600;">Обозначения</span></p></td></tr><tr><td><p>d</p></td><td><p>день как число без первого нуля (от 1 до 31)</p></td></tr><tr><td><p>dd</p></td><td><p>день как число с первым нулём (от 01 до 31)</p></td></tr><tr><td><p>ddd</p></td><td><p>сокращённое локализованное название дня (т.е. от 'Пн' до 'Вс').</p></td></tr><tr><td><p>dddd</p></td><td><p>длинное локализованное название дня (т.е. от 'Понедельник' до 'Воскресенье'</p></td></tr><tr><td><p>M</p></td><td><p>месяц как число без первого нуля (1-12)</p></td></tr><tr><td><p>MM</td><td><p>месяц как число с первым нулём (01-12)</p></td></tr><tr><td><p>MMM</p></td><td><p>сокращённое локализованное название месяца (т.е. от 'Янв' до 'Дек').</p></td></tr><tr><td><p>MMMM</p></td><td><p>длинное локализованное название месяца (т.е. от 'Январь' до 'Декабрь').</p></td></tr><tr><td><p>yy</p></td><td><p>год как двухразрядное число (00-99)</p></td></tr><tr><td><p>yyyy</p></td><td><p>год как четырёхразрядное число</p></td></tr><tr><td><p>h</p></td><td><p>час без нуля впереди (от 0 до 23 или 1 до 12, если отображается AM/PM)</p></td></tr><tr><td><p>hh</p></td><td><p>час с нулём впереди (от 00 до 23 или 01 до 12, если отображается AM/PM)</p></td></tr><tr><td><p>H</p></td><td><p>час без нуля впереди (от 00 до 23, даже с отображением AM/PM)</p></td></tr><tr><td><p>HH</p></td><td><p>час с нулём впереди (от 00 до 23, даже с отображением AM/PM)</p></td></tr><tr><td>m</p></td><td><p>минута без нуля впереди (от 0 до 59)</p></td></tr><tr><td><p>mm</p></td><td><p>минута с нулём впереди (от 00 до 59)</p></td></tr><tr><td><p>s</td><td><p>секунда без нуля впереди (от 0 до 59)</p></td></tr><tr><td><p>ss</p></td><td><p>секунда с нулём впереди (от 00 до 59)</p></td></tr><tr><td><p>z</p></td><td><p>миллисекунда без нуля впереди (от 0 до 999)</p></td></tr><tr><td><p>zzz</p></td><td><p>миллисекунда с нулём впереди (от 000 до 999)</p></td></tr><tr><td><p>AP или A</p></td><td><p>использовать отображение AM/PM. <span style=" font-weight:600;">A/AP</span> будет замещено или &quot;AM&quot; или &quot;PM&quot;.</p></td></tr><tr><td><p>ap или a</p></td><td><p>использовать отображение am/pm. <span style=" font-weight:600;">a/ap</span> будет замещено или &quot;am&quot; или &quot;pm&quot;</p></td></tr><tr><td><p>t</p></td><td><p>часовой пояс (например &quot;CEST&quot;)</p></td></tr><tr><td><p>T</p></td><td><p>сдвиг времени от UTC</p></td></tr><tr><td>TT</p></td><td><p>id часового пояса IANA</p></td></tr><tr><td><p>TTT</p></td><td><p>аббревиатура часового пояса</p></td></tr><tr><td><p>TTTT</p></td><td><p>короткое имя часового пояса</p></td></tr><tr><td><p>TTTTT</p></td><td><p>длинное имя часового пояса</p></td></tr></table><p><br/><span style=" font-weight:600;">Замечание:</span> Любой символ в шаблоне не из диапазона ['a'..'z'] и ['A'..'Z'] будет обработан как цитируемый текст. Например, символы как ':', '.', ' ', '#' и '@' появятся в тексте со временем, даже если они не помещены в одинарные кавычки. Одинарные кавычки используются для управляющих символ. Две одинарные кавычки подряд, независимо от того внутри или снаружи цитируемой последовательности, представляет 'реальные' одинарные кавычки.</p></body></html> + + + + Time &zones + Часовые &пояса + + + + &Add ... + &Добавить… + + + + &Remove + &Удалить + + + + Set as &default + Установить &по-умолчанию + + + + Move &up + &Выше + + + + Move do&wn + &Ниже + + + + Display &format + Формат &отображения + + + + &Time + &Время + + + + F&ormat: + Ф&ормат: + + + + + + Short + Короткий + + + + + + Long + Длинный + + + + + Custom + Свой + + + + Sho&w seconds + П&оказывать секунды + + + + Pad &hour with zero + Дополнить &час нулём + + + + T&ime zone + Ч&асовой пояс + + + + &Position: + &Расположение: + + + + For&mat: + Ф&ормат: + + + + + Below + Ниже + + + + + Above + Выше + + + + + Before + До + + + + + After + После + + + + Offset from UTC + Сдвиг относительно UTC + + + + Abbreviation + Сокращение + + + + IANA id + + + + + + + Custom name + Своё имя + + + + &Use 12-hour format + &Использовать 12 часовой формат + + + + Location identifier + Идентификатор местоположения + + + + &Date + &Дата + + + + Po&sition: + &Расположение: + + + + Fo&rmat: + Ф&ормат: + + + + ISO 8601 + + + + + Show &year + П&оказывать год + + + + Show day of wee&k + Показывать день &недели + + + + Pad d&ay with zero + Дополнить &день нулём + + + + &Long month and day of week names + &Длинные названия месяцев и дней недели + + + + Ad&vanced manual format + &Продвинутый ручной формат + + + + &Customise ... + &Настроить ... + + + + &Edit custom name ... + &Изменить своё имя ... + + + + &General + &Общие + + + + Auto&rotate when the panel is vertical + Авто&поворот для вертикальной панели + + + + '<b>'HH:mm:ss'</b><br/><font size="-2">'ddd, d MMM yyyy'<br/>'TT'</font>' + + + + + Input custom time zone name + Введите своё имя для часового пояса + + + + LxQtWorldClockConfigurationManualFormat + + + World Clock Time Zones + Часовые пояса мирового времени + + + + <h1>Custom Date/Time Format Syntax</h1> +<p>A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing.</p> +<p>The Date Field Symbol Table below contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below.</p> +<p>Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Code</th><th>Meaning</th></tr> +<tr><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr> +<tr><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr> +<tr><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun').</td></tr> +<tr><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday</td></tr> +<tr><td>M</td><td>the month as number without a leading zero (1-12)</td></tr> +<tr><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr> +<tr><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec').</td></tr> +<tr><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December').</td></tr> +<tr><td>yy</td><td>the year as two digit number (00-99)</td></tr> +<tr><td>yyyy</td><td>the year as four digit number</td></tr> +<tr><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr> +<tr><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr> +<tr><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr> +<tr><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr> +<tr><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr> +<tr><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr> +<tr><td>s</td><td>the second without a leading zero (0 to 59)</td></tr> +<tr><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr> +<tr><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr> +<tr><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr> +<tr><td>AP <i>or</i> A</td><td>use AM/PM display. <b>A/AP</b> will be replaced by either "AM" or "PM".<</td></tr> +<tr><td>ap <i>or</i> a</td><td>use am/pm display. <b>a/ap</b> will be replaced by either "am" or "pm".<</td></tr> +<tr><td>t</td><td>the timezone (for example "CEST")</td></tr> +<tr><td>T</td><td>the offset from UTC</td></tr> +<tr><td>TT</td><td>the timezone IANA id</td></tr> +<tr><td>TTT</td><td>the timezone abbreviation</td></tr> +<tr><td>TTTT</td><td>the timezone short display name</td></tr> +<tr><td>TTTTT</td><td>the timezone long display name</td></tr> +<tr><td>TTTTTT</td><td>the timezone custom name. You can change it the 'Time zones' tab of the configuration window</td></tr></table> +<p><br /><b>Note:</b> Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not enclosed within single quotes.The single quote is used to 'escape' letters. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.</p> + + <h1>Синтаксис своего формата даты/времени</h1> +<p>Шаблон даты — это строка символов, где специальные группы символов заменяются при форматировании на дату и время из календаря или используются для генерации даты при синтаксическом разборе.</p> +<p>Таблица символов полей даты ниже содержит символы, используемые в шаблонах для отображения подходящих форматов установленной локали, такой как yyyy для года. Символы могут быть использованы несколько раз. Например, если использован y для года, 'yy' отобразит '99', тогда как 'yyyy' покажет '1999'. Для большинства числовых полей число символов определяет ширину поля. Например, если h это час, 'h' отобразит '5', но 'hh' отобразит '05'. Для некоторых символов, это число определяет должно ли быть использовано сокращение или полная форма, но могут быть и другие варианты, как написано ниже.</p> +<p>Две одинарные кавычки отобразят одиночную кавычку, независимо от того внутренние они или внешние. Текст внутри одинарных кавычек никак не интерпретируется (за исключением двух смежных одинарных кавычек). Тогда как все символы ASCII от a до z и A до Z зарезервированы под символы синтаксиса, и требуют заключения в кавычки для отображения их как обычных символов. помимо прочего, некоторые знаки препинания ASCII могут стать переменными в будущем (т.е. &quot;:&quot; быть интерпретированы как разделитель компонентов времени и '/' как разделитель компонентов даты, и заменены при отображении соответствующими символами с учётом локали).<br /></p> +<table border="1" width="100%" cellpadding="4" cellspacing="0"> +<tr><th width="20%">Код</th><th>Обозначения</th></tr> +<tr><td>d</td></td><td>день как число без первого нуля (от 1 до 31)</td></tr> +<tr><td>dd</td><td>день как число с первым нулём (от 01 до 31)</td></tr> +<tr><td>ddd</p></td><td>сокращённое локализованное название дня (т.е. от 'Пн' до 'Вс').</td></tr> +<tr><td>dddd</td><td>длинное локализованное название дня (т.е. от 'Понедельник' до 'Воскресенье'</td></tr> +<tr><td>M</td><td>месяц как число без первого нуля (1-12)</td></tr> +<tr><td>MM</td><td>месяц как число с первым нулём (01-12)</td></tr> +<tr><td>MMM</td><td>сокращённое локализованное название месяца (т.е. от 'Янв' до 'Дек').</td></tr> +<tr><td>MMMM</td><td>длинное локализованное название месяца (т.е. от 'Январь' до 'Декабрь').</td></tr> +<tr><td>yy</td><td><p>год как двухразрядное число (00-99</td></tr> +<tr><td>yyyy</td><td>год как четырёхразрядное число</td></tr> +<tr><td>h</td><td>час без нуля впереди (от 0 до 23 или 1 до 12, если отображается AM/PM)</td></tr> +<tr><td>hh</td><td>час с нулём впереди (от 00 до 23 или 01 до 12, если отображается AM/PM)</td></tr> +<tr><td>H</td><td>час без нуля впереди (от 00 до 23, даже с отображением AM/PM)</td></tr> +<tr><td>HH</td><td>час с нулём впереди (от 00 до 23, даже с отображением AM/PM)</td></tr> +<tr><td>m</td><td>минута без нуля впереди (от 0 до 59)</td></tr> +<tr><td>mm</td><td>минута с нулём впереди (от 00 до 59)</td></tr> +<tr><td>s</td><td>секунда без нуля впереди (от 0 до 59)</td></tr> +<tr><td>ss</td><td>секунда с нулём впереди (от 00 до 59)</td></tr> +<tr><td>z</td><td>миллисекунда без нуля впереди (от 0 до 999)</td></tr> +<tr><td>zzz</td><td>миллисекунда с нулём впереди (от 000 до 999)</td></tr> +<tr><td>AP <i>или</i> A</td><td>использовать отображение AM/PM. <b>A/AP</b> будет замещено на "AM" или "PM".<</td></tr> +<tr><td>ap <i>или</i> a</td><td>использовать отображение am/pm. <b>a/ap</b> будет замещено на "am" или "pm".<</td></tr> +<tr><td>t</td><td>часовой пояс (например "CEST")</td></tr> +<tr><td>T</td><td>сдвиг времени относительно UTC</td></tr> +<tr><td>TT</td><td>id часового пояса IANA</td></tr> +<tr><td>TTT</td><td>аббревиатура часового пояса</td></tr> +<tr><td>TTTT</td><td>короткое имя часового пояса</td></tr> +<tr><td>TTTTT</p></td><td><p>длинное имя часового пояса</td></tr> +<tr><td>TTTTTT</td><td>своё имя часового пояса. Вы можете изменить его во вкладке «Часовые пояса» окна настройки</td></tr></table> +<p><br /><b>Замечание:</b> Любые символы в шаблоне не из диапазона ['a'..'z'] и ['A'..'Z'] будут обработаны как цитируемый текст. Например, символы как ':', '.', ' ', '#' и '@' появятся в тексте со временем, даже если они не помещены в одинарные кавычки. Одинарные кавычки используются для управляющих символ. Две одинарные кавычки подряд, независимо от того внутри или снаружи цитируемой последовательности, представляет 'реальные' одинарные кавычки.</p> + + + + LxQtWorldClockConfigurationTimeZones + + + World Clock Time Zones + Часовые пояса мирового времени + + + + Time zone + Часовой пояс + + + + Name + Название + + + + Comment + Коментарий + + + + Country + Страна + + + + UTC + UTC + + + + Other + Другое + + +