commit a303d02dcaf105fe42982c8dc75b885ae2e7752c Author: Andrew Lee (李健秋) Date: Wed Aug 12 05:25:46 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..384cad1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build +nbproject 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..0e55887 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,169 @@ +cmake_minimum_required(VERSION 2.8.11) + +project(lxqt-runner) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_AUTOMOC ON) + +option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) + +find_package(KF5WindowSystem REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5Xml REQUIRED) +find_package(Qt5Script REQUIRED) +find_package(Qt5LinguistTools REQUIRED QUIET) +find_package(lxqt REQUIRED) +find_package(Qt5Xdg REQUIRED) +find_package(lxqt-globalkeys REQUIRED) +find_package(lxqt-globalkeys-ui REQUIRED) +message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}") +set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Script) + +include(${LXQT_USE_FILE}) +include(${QTXDG_USE_FILE}) +include(${LXQT_GLOBALKEYS_USE_FILE}) +include(${LXQT_GLOBALKEYS_UI_USE_FILE}) + +# optionally use libmenu-cache from lxde to generate the application menu +find_package(PkgConfig) + +if (NOT WITHOUT_MENU_CACHE) + pkg_check_modules(MENU_CACHE + libmenu-cache>=0.3.3 + ) +endif(NOT WITHOUT_MENU_CACHE) + +# if libmenu-cache is available +if (MENU_CACHE_FOUND) + include_directories(${MENU_CACHE_INCLUDE_DIRS}) + add_definitions(-DHAVE_MENU_CACHE=1) +endif() + + +set(lxqt-runner_H_FILES + dialog.h + commanditemmodel.h + widgets.h + providers.h + yamlparser.h + configuredialog/configuredialog.h +) + +set(lxqt-runner_CPP_FILES + main.cpp + dialog.cpp + commanditemmodel.cpp + widgets.cpp + providers.cpp + yamlparser.cpp + configuredialog/configuredialog.cpp +) + +set(lxqt-runner_UI_FILES + dialog.ui + configuredialog/configuredialog.ui +) + +set(QRC_FILES + +) + +set(lxqt-runner_LIBRARIES + ${LXQT_LIBRARIES} + ${LXQT_GLOBALKEYS_LIBRARIES} + ${LXQT_GLOBALKEYS_UI_LIBRARIES} + ${QTXDG_LIBRARIES} + ${MENU_CACHE_LIBRARIES} + ${QTX_LIBRARIES} +) + + + +include(LXQtTranslate) + +lxqt_translate_ts(lxqt-runner_QM_FILES + UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS} + SOURCES + ${lxqt-runner_H_FILES} + ${lxqt-runner_CPP_FILES} + ${lxqt-runner_UI_FILES} + INSTALL_DIR + "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}" +) + +lxqt_app_translation_loader(lxqt-runner_QM_LOADER ${PROJECT_NAME}) + +#************************************************ + +include_directories( + ${LXQT_INCLUDE_DIRS} + ${LXQT_GLOBALKEYS_INCLUDE_DIRS} + ${LXQT_GLOBALKEYS_UI_INCLUDE_DIRS} + ${QTXDG_INCLUDE_DIRS} +) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +add_definitions(-Wall) + +set(LXQT_SHARE_DIR "${CMAKE_INSTALL_PREFIX}/share/lxqt") +set(APP_SHARE_DIR "${LXQT_SHARE_DIR}/${PROJECT_NAME}") + +#************************************************ + +if(NOT DEFINED RUNNER_MATH) + set(RUNNER_MATH Yes) +endif() + +if(RUNNER_MATH) + add_definitions(-DMATH_ENABLED) +endif(RUNNER_MATH) + +# ******************************************************************* +# Optional: start VBOX machines in headless mode, +# instead of default window + +if(NOT DEFINED RUNNER_VBOX) + set(RUNNER_VBOX Yes) +endif() + +if(VBOXRUNNER_HEADLESS) + add_definitions(-DVBOXRUNNER_HEADLESS) +endif() + +if (RUNNER_VBOX) + set(QRC_FILES + ${QRC_FILES} + virtualbox-icons.qrc + ) + add_definitions(-DVBOX_ENABLED) +endif() + +qt5_wrap_ui(lxqt-runner_UI_HEADERS ${lxqt-runner_UI_FILES}) +qt5_add_resources(lxqt-runner_QRC_SOURCES ${QRC_FILES}) + +add_executable(${PROJECT_NAME} + ${lxqt-runner_CPP_FILES} + ${lxqt-runner_UI_FILES} + ${lxqt-runner_QRC_SOURCES} + ${lxqt-runner_QM_FILES} + ${lxqt-runner_QM_LOADER} +) + +target_link_libraries(${PROJECT_NAME} ${lxqt-runner_LIBRARIES} KF5::WindowSystem) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) +install(FILES ${CONFIG_FILES} DESTINATION ${APP_SHARE_DIR}) + +# 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/commanditemmodel.cpp b/commanditemmodel.cpp new file mode 100644 index 0000000..5418929 --- /dev/null +++ b/commanditemmodel.cpp @@ -0,0 +1,396 @@ +/* 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 "commanditemmodel.h" +#include +#include +#include +#include +#include +#include + + +/************************************************ + + ************************************************/ +CommandItemModel::CommandItemModel(QObject *parent) : + QSortFilterProxyModel(parent), + mSourceModel(new CommandSourceItemModel(this)), + mOnlyHistory(false) +{ + setDynamicSortFilter(false); // required in Qt5 + setSourceModel(mSourceModel); +} + + +/************************************************ + + ************************************************/ +CommandItemModel::~CommandItemModel() +{ +} + + +/************************************************ + + ************************************************/ +bool CommandItemModel::isOutDated() const +{ + return mSourceModel->isOutDated(); +} + + +/************************************************ + + ************************************************/ +const CommandProviderItem *CommandItemModel::command(const QModelIndex &index) const +{ + if (!index.isValid()) + return 0; + + QModelIndex ind = mapToSource(index); + + return mSourceModel->command(ind); +} + + +/************************************************ + + ************************************************/ +void CommandItemModel::addHistoryCommand(const QString &command) +{ + mSourceModel->addHistoryCommand(command); +} + +void CommandItemModel::clearHistory() +{ + mSourceModel->clearHistory(); +} + + +/************************************************ + + ************************************************/ +bool CommandItemModel::filterAcceptsRow(int sourceRow, const QModelIndex &/*sourceParent*/) const +{ + QRegExp re(filterRegExp()); + + if (re.isEmpty() && !mOnlyHistory) + return false; + + const CommandProviderItem *item = mSourceModel->command(sourceRow); + + if (!item) + return false; + + return item->compare(re); +} + + +/************************************************ + + ************************************************/ +bool CommandItemModel::lessThan(const QModelIndex &left, const QModelIndex &right) const +{ + if (left == mSourceModel->customCommandIndex()) + return true; + + if (right == mSourceModel->customCommandIndex()) + return false; + + if (mOnlyHistory) + return left.row() < right.row(); + else + return QSortFilterProxyModel::lessThan(left, right); +} + + +/************************************************ + + ************************************************/ +int CommandItemModel::itemType(const QModelIndex &index) const +{ + if (index.row() == mSourceModel->customCommandIndex().row()) + return 1; + else if (index.row() < mSourceModel->externalProviderStartIndex().row()) + return 2; + else + return 3; +} + + +/************************************************ + + ************************************************/ +QModelIndex CommandItemModel::appropriateItem(const QString &pattern) const +{ + QModelIndex res; + unsigned int rank = 0; + + int cnt = rowCount(); + + for (int i=0; icustomCommandIndex()) + return ind; + + const CommandProviderItem *item = mSourceModel->command(srcIndex); + if (!item) + continue; + + unsigned int r = item->rank(pattern); + if (r > rank) + { + res = ind; + rank = r; + } + + if (rank >= MAX_RANK) + break; + } + + if (!res.isValid()) + res = index(0, 0); + + return res; +} + + +/************************************************ + + ************************************************/ +void CommandItemModel::rebuild() +{ + mSourceModel->rebuild(); +} + + +/************************************************ + + ************************************************/ +CommandSourceItemModel::CommandSourceItemModel(QObject *parent) : + QAbstractListModel(parent) +{ + mCustomCommandProvider = new CustomCommandProvider; + mProviders.append(mCustomCommandProvider); + rebuild(); + mCustomCommandIndex = index(0, 0); + + mHistoryProvider = new HistoryProvider(); + mProviders.append(mHistoryProvider); + mCustomCommandProvider->setHistoryProvider(mHistoryProvider); + + mProviders.append(new AppLinkProvider()); +#ifdef MATH_ENABLED + mProviders.append(new MathProvider()); +#endif +#ifdef VBOX_ENABLED + mProviders.append(new VirtualBoxProvider()); +#endif + + mProviders.append(new PowerProvider()); + + rebuild(); + mExternalProviderStartIndex = index(rowCount(), 0); + + LxQt::Settings settings("lxqt-runner"); + int numExternalProviders = settings.beginReadArray("external providers"); + for (int i = 0; i < numExternalProviders; i++) + { + settings.setArrayIndex(i); + qDebug() << "Adding external provider:" << settings.value("name") << settings.value("executable"); + ExternalProvider* externalProvider = new ExternalProvider(settings.value("name").toString(), + settings.value("executable").toString()); + mProviders.append(externalProvider); + mExternalProviders.append(externalProvider); + } + settings.endArray(); + + foreach(CommandProvider* provider, mProviders) + { + connect(provider, SIGNAL(changed()), this, SIGNAL(layoutChanged())); + connect(provider, SIGNAL(aboutToBeChanged()), this, SIGNAL(layoutAboutToBeChanged())); + } + + rebuild(); +} + + +/************************************************ + + ************************************************/ +CommandSourceItemModel::~CommandSourceItemModel() +{ + qDeleteAll(mProviders); + mHistoryProvider = 0; +} + + +/************************************************ + + ************************************************/ +int CommandSourceItemModel::rowCount(const QModelIndex& /*parent*/) const +{ + int ret=0; + foreach(CommandProvider* provider, mProviders) + ret += provider->count(); + + return ret; +} + + +/************************************************ + + ************************************************/ +QVariant CommandSourceItemModel::data(const QModelIndex &index, int role) const +{ + if (!index.isValid()) + return QVariant(); + + if (index.row() >= rowCount()) + return QVariant(); + + const CommandProviderItem *item = command(index); + if (!item) + return QVariant(); + + switch (role) + { + case Qt::DisplayRole: + return QString("%1
\n%2\n").arg(item->title(), item->comment()); + + case Qt::DecorationRole: + return item->icon(); + + case Qt::ToolTipRole: + return item->toolTip(); + + } + + return QVariant(); +} + + +/************************************************ + + ************************************************/ +bool CommandSourceItemModel::isOutDated() const +{ + QListIterator i(mProviders); + while (i.hasNext()) + { + if (i.next()->isOutDated()) + return true; + } + + return false; +} + + +/************************************************ + + ************************************************/ +void CommandSourceItemModel::rebuild() +{ + emit layoutAboutToBeChanged(); + // FIXME: is this implementation correct? + QListIterator i(mProviders); + while (i.hasNext()) + { + CommandProvider *p = i.next(); + if (p->isOutDated()) + p->rebuild(); + } + emit layoutChanged(); +} + + +/************************************************ + + ************************************************/ +void CommandSourceItemModel::clearHistory() +{ + beginResetModel(); + mHistoryProvider->clearHistory(); + endResetModel(); +} + + +/************************************************ + + ************************************************/ +const CommandProviderItem *CommandSourceItemModel::command(int row) const +{ + int n = row; + QListIterator i(mProviders); + while (i.hasNext()) + { + CommandProvider *p = i.next(); + if (n < p->count()) + return p->at(n); + else + n -=p->count(); + } + + return 0; +} + + +/************************************************ + + ************************************************/ +const CommandProviderItem *CommandSourceItemModel::command(const QModelIndex &index) const +{ + if (!index.isValid()) + return 0; + + return command(index.row()); +} + + +/************************************************ + + ************************************************/ +void CommandSourceItemModel::addHistoryCommand(const QString &command) +{ + mHistoryProvider->AddCommand(command); +} + + +/*********************************************** + + ***********************************************/ +void CommandSourceItemModel::setCommand(const QString& command) +{ + mCustomCommandProvider->setCommand(command); + foreach (ExternalProvider* externalProvider, mExternalProviders) + { + externalProvider->setSearchTerm(command); + } +} diff --git a/commanditemmodel.h b/commanditemmodel.h new file mode 100644 index 0000000..c65dd05 --- /dev/null +++ b/commanditemmodel.h @@ -0,0 +1,106 @@ +/* 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 COMMANDITEMMODEL_H +#define COMMANDITEMMODEL_H + +#include +#include +#include +#include + + +class CommandSourceItemModel: public QAbstractListModel +{ + Q_OBJECT +public: + explicit CommandSourceItemModel(QObject *parent = 0); + virtual ~CommandSourceItemModel(); + + int rowCount(const QModelIndex &parent=QModelIndex()) const; + QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const; + + bool isOutDated() const; + const CommandProviderItem *command(const QModelIndex &index) const; + const CommandProviderItem *command(int row) const; + + void addHistoryCommand(const QString &command); + + QString command() const { return mCustomCommandProvider->command(); } + void setCommand(const QString &command); + + QPersistentModelIndex customCommandIndex() const { return mCustomCommandIndex; } + QPersistentModelIndex externalProviderStartIndex() const { return mExternalProviderStartIndex; } +public slots: + void rebuild(); + void clearHistory(); + +private: + QList mProviders; + HistoryProvider *mHistoryProvider; + CustomCommandProvider *mCustomCommandProvider; + QPersistentModelIndex mCustomCommandIndex; + QList mExternalProviders; + QPersistentModelIndex mExternalProviderStartIndex; +}; + + +class CommandItemModel: public QSortFilterProxyModel +{ + Q_OBJECT +public: + explicit CommandItemModel(QObject *parent = 0); + virtual ~CommandItemModel(); + + bool isOutDated() const; + const CommandProviderItem *command(const QModelIndex &index) const; + + void addHistoryCommand(const QString &command); + + QModelIndex appropriateItem(const QString &pattern) const; + + bool isShowOnlyHistory() const { return mOnlyHistory; } + void showOnlyHistory(bool onlyHistory) { mOnlyHistory = onlyHistory; } + + QString command() const { return mSourceModel->command(); } + void setCommand(const QString &command) { mSourceModel->setCommand(command); } + +public slots: + void rebuild(); + void clearHistory(); + +protected: + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + +private: + int itemType(const QModelIndex &index) const; + CommandSourceItemModel *mSourceModel; + bool mOnlyHistory; +}; + +#endif // COMMANDITEMMODEL_H diff --git a/configuredialog/configuredialog.cpp b/configuredialog/configuredialog.cpp new file mode 100644 index 0000000..8a3cfc2 --- /dev/null +++ b/configuredialog/configuredialog.cpp @@ -0,0 +1,156 @@ +/* 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 "configuredialog.h" +#include "ui_configuredialog.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + + +/************************************************ + + ************************************************/ +ConfigureDialog::ConfigureDialog(QSettings *settings, const QString &defaultShortcut, QWidget *parent) : + QDialog(parent), + ui(new Ui::ConfigureDialog), + mSettings(settings), + mOldSettings(new LxQt::SettingsCache(settings)), + mDefaultShortcut(defaultShortcut) +{ + ui->setupUi(this); + + connect(ui->buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()), this, SLOT(resetSettings())); + + // Position ................................. + ui->positionCbx->addItem(tr("Top edge of the screen"), QVariant(ConfigureDialog::PositionTop)); + ui->positionCbx->addItem(tr("Center of the screen"), QVariant(ConfigureDialog::PositionCenter)); + connect(ui->positionCbx, SIGNAL(currentIndexChanged(int)), this, SLOT(positionCbxChanged(int))); + + // Monitor .................................. + QDesktopWidget *desktop = qApp->desktop(); + + ui->monitorCbx->addItem(tr("Focused screen"), QVariant(-1)); + + int monCnt = desktop->screenCount(); + for (int i = 0; i < monCnt; ++i) + ui->monitorCbx->addItem(tr("Always on screen %1").arg(i + 1), QVariant(i)); + + ui->monitorCbx->setEnabled(monCnt > 1); + connect(ui->monitorCbx, SIGNAL(currentIndexChanged(int)), this, SLOT(monitorCbxChanged(int))); + + + // Shortcut ................................. + connect(ui->shortcutEd, SIGNAL(shortcutGrabbed(QString)), this, SLOT(shortcutChanged(QString))); + + connect(ui->shortcutEd->addMenuAction(tr("Reset")), SIGNAL(triggered()), this, SLOT(shortcutReset())); + + settingsChanged(); +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::settingsChanged() +{ + if (mSettings->value("dialog/show_on_top", true).toBool()) + ui->positionCbx->setCurrentIndex(0); + else + ui->positionCbx->setCurrentIndex(1); + + ui->monitorCbx->setCurrentIndex(mSettings->value("dialog/monitor", -1).toInt() + 1); + ui->shortcutEd->setText(mSettings->value("dialog/shortcut", "Alt+F2").toString()); +} + + +/************************************************ + + ************************************************/ +ConfigureDialog::~ConfigureDialog() +{ + delete mOldSettings; + delete ui; +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::shortcutChanged(const QString &text) +{ + ui->shortcutEd->setText(text); + mSettings->setValue("dialog/shortcut", text); +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::shortcutReset() +{ + shortcutChanged(mDefaultShortcut); +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::positionCbxChanged(int index) +{ + mSettings->setValue("dialog/show_on_top", index == 0); +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::monitorCbxChanged(int index) +{ + mSettings->setValue("dialog/monitor", index - 1); +} + + +/************************************************ + + ************************************************/ +void ConfigureDialog::resetSettings() +{ + mOldSettings->loadToSettings(); + ui->shortcutEd->clear(); + settingsChanged(); +} diff --git a/configuredialog/configuredialog.h b/configuredialog/configuredialog.h new file mode 100644 index 0000000..1959b42 --- /dev/null +++ b/configuredialog/configuredialog.h @@ -0,0 +1,76 @@ +/* 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 CONFIGUREDIALOG_H +#define CONFIGUREDIALOG_H + +#include + +namespace Ui { + class ConfigureDialog; +} + +class QSettings; + +namespace LxQt { + class SettingsCache; +} + +class ConfigureDialog : public QDialog +{ + Q_OBJECT + +public: + enum Position { + PositionTop, + PositionCenter + }; + + + explicit ConfigureDialog(QSettings *settings, const QString &defaultShortcut, QWidget *parent = 0); + ~ConfigureDialog(); + +protected: + // void closeEvent(QCloseEvent *event); + +private: + Ui::ConfigureDialog *ui; + QSettings *mSettings; + LxQt::SettingsCache *mOldSettings; + QString mDefaultShortcut; + +private slots: + void shortcutChanged(const QString &text); + void shortcutReset(); + void settingsChanged(); + void positionCbxChanged(int index); + void monitorCbxChanged(int index); + void resetSettings(); +}; + +#endif // CONFIGUREDIALOG_H diff --git a/configuredialog/configuredialog.ui b/configuredialog/configuredialog.ui new file mode 100644 index 0000000..1296f1d --- /dev/null +++ b/configuredialog/configuredialog.ui @@ -0,0 +1,157 @@ + + + ConfigureDialog + + + + 0 + 0 + 312 + 222 + + + + Runner Settings + + + + + + Appearance + + + + + + Positioning: + + + + + + + + + + Show on: + + + + + + + + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + Shortcut: + + + + + + + + 81 + 0 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 38 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Reset + + + + + + + + ShortcutSelector + QToolButton +
LXQtGlobalKeysUi/ShortcutSelector
+
+
+ + + + buttonBox + accepted() + ConfigureDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ConfigureDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + +
diff --git a/dialog.cpp b/dialog.cpp new file mode 100644 index 0000000..a3f7ef9 --- /dev/null +++ b/dialog.cpp @@ -0,0 +1,445 @@ +/* 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 + * 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 "dialog.h" +#include "ui_dialog.h" +#include "widgets.h" +#include "commanditemmodel.h" +#include "configuredialog/configuredialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define DEFAULT_SHORTCUT "Alt+F2" + +/************************************************ + + ************************************************/ +Dialog::Dialog(QWidget *parent) : + QDialog(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint), + ui(new Ui::Dialog), + mSettings(new LxQt::Settings("lxqt-runner", this)), + mGlobalShortcut(0), + mLockCascadeChanges(false), + mConfigureDialog(0) +{ + ui->setupUi(this); + setWindowTitle("LXQt Runner"); + setAttribute(Qt::WA_TranslucentBackground); + + connect(LxQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(update())); + connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); + connect(mSettings, SIGNAL(settingsChanged()), this, SLOT(applySettings())); + + ui->commandEd->installEventFilter(this); + + connect(ui->commandEd, SIGNAL(textChanged(QString)), this, SLOT(setFilter(QString))); + connect(ui->commandEd, SIGNAL(returnPressed()), this, SLOT(runCommand())); + + mCommandItemModel = new CommandItemModel(this); + ui->commandList->installEventFilter(this); + ui->commandList->setModel(mCommandItemModel); + ui->commandList->setEditTriggers(QAbstractItemView::NoEditTriggers); + connect(ui->commandList, SIGNAL(clicked(QModelIndex)), this, SLOT(runCommand())); + setFilter(""); + dataChanged(); + + ui->commandList->setItemDelegate(new LxQt::HtmlDelegate(QSize(32, 32), ui->commandList)); + + // Popup menu ............................... + QAction *a = new QAction(XdgIcon::fromTheme("configure"), tr("Configure"), this); + connect(a, SIGNAL(triggered()), this, SLOT(showConfigDialog())); + addAction(a); + + a = new QAction(XdgIcon::fromTheme("edit-clear-history"), tr("Clear History"), this); + connect(a, SIGNAL(triggered()), mCommandItemModel, SLOT(clearHistory())); + addAction(a); + + mPowerManager = new LxQt::PowerManager(this); + addActions(mPowerManager->availableActions()); + mScreenSaver = new LxQt::ScreenSaver(this); + addActions(mScreenSaver->availableActions()); + + setContextMenuPolicy(Qt::ActionsContextMenu); + + QMenu *menu = new QMenu(this); + menu->addActions(actions()); + ui->actionButton->setMenu(menu); + ui->actionButton->setIcon(XdgIcon::fromTheme("configure")); + // End of popup menu ........................ + + applySettings(); + + connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), SLOT(realign())); + connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(realign())); + connect(mGlobalShortcut, SIGNAL(activated()), this, SLOT(showHide())); + connect(mGlobalShortcut, SIGNAL(shortcutChanged(QString,QString)), this, SLOT(shortcutChanged(QString,QString))); + + resize(mSettings->value("dialog/width", 400).toInt(), size().height()); + + // TEST + connect(mCommandItemModel, SIGNAL(layoutChanged()), this, SLOT(dataChanged())); +} + + +/************************************************ + + ************************************************/ +Dialog::~Dialog() +{ + delete ui; +} + + +/************************************************ + + ************************************************/ +void Dialog::closeEvent(QCloseEvent *event) +{ + hide(); + event->ignore(); +} + + +/************************************************ + + ************************************************/ +QSize Dialog::sizeHint() const +{ + QSize size = QDialog::sizeHint(); + size.setWidth(this->size().width()); + return size; +} + + +/************************************************ + + ************************************************/ +void Dialog::resizeEvent(QResizeEvent *event) +{ + mSettings->setValue("dialog/width", size().width()); +} + + +/************************************************ + + ************************************************/ +bool Dialog::eventFilter(QObject *object, QEvent *event) +{ + if (event->type() == QEvent::KeyPress) + { + QKeyEvent *keyEvent = static_cast(event); + + if (object == ui->commandEd) + return editKeyPressEvent(keyEvent); + + if (object == ui->commandList) + return listKeyPressEvent(keyEvent); + } + else if (event->type() == QEvent::FocusOut) + { + hide(); + return true; + } + + return QDialog::eventFilter(object, event); +} + + +/************************************************ + eventFilter for ui->commandEd + ************************************************/ +bool Dialog::editKeyPressEvent(QKeyEvent *event) +{ + switch (event->key()) + { + case Qt::Key_N: + if (event->modifiers().testFlag(Qt::ControlModifier)) + { + QKeyEvent ev(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier); + editKeyPressEvent(&ev); + return true; + } + return false; + + case Qt::Key_P: + if (event->modifiers().testFlag(Qt::ControlModifier)) + { + QKeyEvent ev(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier); + editKeyPressEvent(&ev); + return true; + } + return false; + + case Qt::Key_Up: + case Qt::Key_PageUp: + if (ui->commandEd->text().isEmpty() && + ui->commandList->isVisible() && + ui->commandList->currentIndex().row() == 0 + ) + { + setFilter("", false); + return true; + } + qApp->sendEvent(ui->commandList, event); + return true; + + case Qt::Key_Down: + case Qt::Key_PageDown: + if (ui->commandEd->text().isEmpty() && + ui->commandList->isHidden() + ) + { + setFilter("", true); + return true; + } + + qApp->sendEvent(ui->commandList, event); + return true; + + case Qt::Key_Tab: + const CommandProviderItem *command = mCommandItemModel->command(ui->commandList->currentIndex()); + if (command) + ui->commandEd->setText(command->title()); + return true; + } + + return QDialog::eventFilter(ui->commandList, event); +} + + +/************************************************ + eventFilter for ui->commandList + ************************************************/ +bool Dialog::listKeyPressEvent(QKeyEvent *event) +{ + switch (event->key()) + { + case Qt::Key_Up: + case Qt::Key_PageUp: + if (ui->commandList->currentIndex().row() == 0) + { + ui->commandEd->setFocus(); + return true; + } + break; + + case Qt::Key_Left: + case Qt::Key_Right: + ui->commandEd->setFocus(); + qApp->sendEvent(ui->commandEd, event); + return true; + + default: + // Alphabetical or number key ........... + if (!event->text().isEmpty()) + { + ui->commandEd->setFocus(); + qApp->sendEvent(ui->commandEd, event); + return true; + } + } + + return QDialog::eventFilter(ui->commandEd, event); +} + + +/************************************************ + + ************************************************/ +void Dialog::showHide() +{ + if (isVisible() && isActiveWindow()) + { + hide(); + } + else + { + realign(); + show(); + KWindowSystem::forceActiveWindow(windowHandle()->winId()); + ui->commandEd->setFocus(); + } +} + + +/************************************************ + + ************************************************/ +void Dialog::realign() +{ + QRect desktop; + + int screen = mMonitor; + if (mMonitor < 0 || mMonitor > QApplication::desktop()->screenCount() - 1) + screen = QApplication::desktop()->screenNumber(QCursor::pos()); + + desktop = QApplication::desktop()->availableGeometry(screen).intersected(KWindowSystem::workArea(screen)); + + QRect rect = this->geometry(); + rect.moveCenter(desktop.center()); + + if (mShowOnTop) + rect.moveTop(desktop.top()); + else + rect.moveTop(desktop.center().y() - ui->panel->sizeHint().height()); + + setGeometry(rect); +} + + +/************************************************ + + ************************************************/ +void Dialog::applySettings() +{ + if (mLockCascadeChanges) + return; + + // Shortcut ................................. + QString shortcut = mSettings->value("dialog/shortcut", DEFAULT_SHORTCUT).toString(); + if (shortcut.isEmpty()) + shortcut = DEFAULT_SHORTCUT; + + if (!mGlobalShortcut) + mGlobalShortcut = GlobalKeyShortcut::Client::instance()->addAction(shortcut, "/runner/show_hide_dialog", tr("Show/hide runner dialog"), this); + else if (mGlobalShortcut->shortcut() != shortcut) + mGlobalShortcut->changeShortcut(shortcut); + + mShowOnTop = mSettings->value("dialog/show_on_top", true).toBool(); + + mMonitor = mSettings->value("dialog/monitor", -1).toInt(); + + realign(); + mSettings->sync(); +} + + +/************************************************ + + ************************************************/ +void Dialog::shortcutChanged(const QString &/*oldShortcut*/, const QString &newShortcut) +{ + if (!newShortcut.isEmpty()) + { + mLockCascadeChanges = true; + + mSettings->setValue("dialog/shortcut", newShortcut); + mSettings->sync(); + + mLockCascadeChanges = false; + } +} + + +/************************************************ + + ************************************************/ +void Dialog::setFilter(const QString &text, bool onlyHistory) +{ + qDebug() << "Ind i setFilter..."; + if (mCommandItemModel->isOutDated()) + mCommandItemModel->rebuild(); + + QString trimmedText = text.simplified(); + mCommandItemModel->setCommand(trimmedText); + mCommandItemModel->showOnlyHistory(onlyHistory); + mCommandItemModel->setFilterWildcard(trimmedText); + mCommandItemModel->sort(0); +} + +/************************************************ + + ************************************************/ +void Dialog::dataChanged() +{ + if (mCommandItemModel->rowCount()) + { + ui->commandList->setCurrentIndex(mCommandItemModel->appropriateItem(mCommandItemModel->command())); + ui->commandList->scrollTo(ui->commandList->currentIndex()); + ui->commandList->show(); + } + else + { + ui->commandList->hide(); + } + + adjustSize(); + +} + + +/************************************************ + + ************************************************/ +void Dialog::runCommand() +{ + bool res =false; + const CommandProviderItem *command = mCommandItemModel->command(ui->commandList->currentIndex()); + + if (command) + res = command->run(); + + if (res) + { + hide(); + ui->commandEd->clear(); + } + +} + + +/************************************************ + + ************************************************/ +void Dialog::showConfigDialog() +{ + if (!mConfigureDialog) + mConfigureDialog = new ConfigureDialog(mSettings, DEFAULT_SHORTCUT, this); + mConfigureDialog->exec(); +} + +#undef DEFAULT_SHORTCUT diff --git a/dialog.h b/dialog.h new file mode 100644 index 0000000..9a7de61 --- /dev/null +++ b/dialog.h @@ -0,0 +1,99 @@ +/* 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 DIALOG_H +#define DIALOG_H + +#include + +namespace Ui { + class Dialog; +} + +namespace LxQt { + class Settings; + class PowerManager; + class ScreenSaver; +} + +class CommandListView; +class CommandItemModel; +class ConfigureDialog; + +namespace GlobalKeyShortcut +{ +class Action; +} + + +class Dialog : public QDialog +{ + Q_OBJECT + +public: + explicit Dialog(QWidget *parent = 0); + ~Dialog(); + + QSize sizeHint() const; + +protected: + void closeEvent(QCloseEvent *event); + void resizeEvent(QResizeEvent *event); + bool eventFilter(QObject *object, QEvent *event); + bool editKeyPressEvent(QKeyEvent *event); + bool listKeyPressEvent(QKeyEvent *event); + +private: + Ui::Dialog *ui; + LxQt::Settings *mSettings; + GlobalKeyShortcut::Action *mGlobalShortcut; + CommandItemModel *mCommandItemModel; + bool mShowOnTop; + int mMonitor; + LxQt::PowerManager *mPowerManager; + LxQt::ScreenSaver *mScreenSaver; + + bool mLockCascadeChanges; + + ConfigureDialog *mConfigureDialog; + + //! \brief handle various additional behaviours (math only for now) + bool editEnterPressed(); + +private slots: + void realign(); + void applySettings(); + void showHide(); + void setFilter(const QString &text, bool onlyHistory=false); + void dataChanged(); + void runCommand(); + void showConfigDialog(); + void shortcutChanged(const QString &oldShortcut, const QString &newShortcut); +}; + +#endif // DIALOG_H + diff --git a/dialog.ui b/dialog.ui new file mode 100644 index 0000000..a215d2d --- /dev/null +++ b/dialog.ui @@ -0,0 +1,170 @@ + + + Dialog + + + + 0 + 0 + 342 + 236 + + + + + 0 + 0 + + + + + 300 + 0 + + + + Application launcher + + + false + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + -1 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 3 + 0 + + + + + 3 + 16777215 + + + + SizeHorCursor + + + + + + + + + + + + + QToolButton::InstantPopup + + + true + + + Qt::NoArrow + + + + + + + X + + + true + + + + + + + + 0 + 0 + + + + + 3 + 0 + + + + + 3 + 16777215 + + + + SizeHorCursor + + + + + + + + + + + + + + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + HorizSizeGrip + QWidget +
widgets.h
+ 1 +
+
+ + closeButton + + + +
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..b290df0 --- /dev/null +++ b/main.cpp @@ -0,0 +1,44 @@ +/* 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 "dialog.h" + + +int main(int argc, char *argv[]) +{ + LxQt::Application a(argc, argv); + a.setQuitOnLastWindowClosed(false); + + QWidget *hiddenPreviewParent = new QWidget(0, Qt::Tool); + Dialog d(hiddenPreviewParent); + //d.show(); + + return a.exec(); + +} diff --git a/man/lxqt-runner.1 b/man/lxqt-runner.1 new file mode 100644 index 0000000..4606d47 --- /dev/null +++ b/man/lxqt-runner.1 @@ -0,0 +1,49 @@ +.TH lxqt-runner "1" "September 2012" "LXQt\ 0.7.0" "LXQt\ Module" +.SH NAME +lxqt-runner \- Application runner module of \fBLXQt\fR, the Lightweight Desktop Environment +.SH SYNOPSIS +.B lxqt-runner +.br +.SH DESCRIPTION +This module will allow you to launch an application by typing Alt+F2 its pressed on the keyboard. +.P +The \fBLXQt modules\fR are desktop independent tools, +and operate as daemons for the local user for desktop specific operations. +.P +\fBLXQt\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 + * Desktop + * Application launcher \fI(this)\fR + * Settings center + * Session handler + * Polkit handler + * Display manager handler +.P +These components perform similar actions to those available in other desktop +environments, and their names are self-descriptive. They are usually not launched +by hand but automatically, when choosing a \fBLxQt\-qt\fR session in the Display +Manager. +.SH BEHAVIOR +As you type, suggestions will appear. Once you see the application you wish to run you can navigate +to it using the mouse or arrow keys on your keyboard. Pressing enter or clicking it will launch +the application. The activation key can be changed using the window manager or shortcut daemon +such as \fBlxqt-globalkeyshortcuts\fR. +.SH AUTOSTART +This module only shows at \fBLXQt\fR desktop environment, but you can use in others desktops, by +setting an configuring into session startup. +.SH "REPORTING BUGS" +Report bugs to https://github.com/lxde/lxde-qt/issues +.SH "SEE ALSO" +\fBLXQt\fR it has been tailored for users who value simplicity, speed, and +an intuitive interface, also intended for less powerful machines. See also: +.\" any module must refers to session app, for more info on start it +.P +\fBlxqt-session.1\fR LXQt for manage LXQt complete environment +.P +\fBlxqt-config-session.1\fR LXQt application for config modules on desktop +.P +.SH AUTHOR +This manual page was created by \fBPICCORO Lenz McKAY\fR \fI\fR +for \fBLXQt\fR project and VENENUX GNU/Linux but can be used by others. diff --git a/providers.cpp b/providers.cpp new file mode 100644 index 0000000..b9fd929 --- /dev/null +++ b/providers.cpp @@ -0,0 +1,973 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2010-2013 Razor team + * Authors: + * Alexander Sokoloff + * Aaron Lewis + * Petr Vanek + * 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 "providers.h" +#include "yamlparser.h" +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "providers.h" +#include +#include +#include + +#define MAX_HISTORY 100 + + +/************************************************ + + ************************************************/ +QString expandCommand(const QString &command, QStringList *arguments=0) +{ + QString program; + wordexp_t words; + + if (wordexp(command.toLocal8Bit().data(), &words, 0) != 0) + return ""; + + char **w; + w = words.we_wordv; + program = QString::fromLocal8Bit(w[0]); + + if (arguments) + { + for (size_t i = 1; i < words.we_wordc; i++) + *arguments << QString::fromLocal8Bit(w[i]); + } + + wordfree(&words); + return program; +} + + +/************************************************ + + ************************************************/ +bool startProcess(QString command) +{ + QStringList args; + QString program = expandCommand(command, &args); + if (program.isEmpty()) + return false; + + return QProcess::startDetached(program, args); +} + + +/************************************************ + + ************************************************/ +unsigned int CommandProviderItem::stringRank(const QString str, const QString pattern) const +{ + int n = str.indexOf(pattern, 0, Qt::CaseInsensitive); + if (n<0) + return 0; + + return MAX_RANK - ((str.length() - pattern.length()) + n * 5); +} + + +/************************************************ + + ************************************************/ +CommandProvider::CommandProvider(): + QObject(), + QList() +{ +} + + +/************************************************ + + ************************************************/ +CommandProvider::~CommandProvider() +{ +// qDebug() << "*****************************************"; +// qDebug() << hex << this; +// qDebug() << "DESTROY"; + qDeleteAll(*this); +// qDebug() << "*****************************************"; +} + + +/************************************************ + + ************************************************/ +AppLinkItem::AppLinkItem(const QDomElement &element): + CommandProviderItem() +{ + mIconName = element.attribute("icon"); + mTitle = element.attribute("title"); + mComment = element.attribute("genericName"); + mToolTip = element.attribute("comment"); + mCommand = element.attribute("exec"); + mProgram = QFileInfo(element.attribute("exec")).baseName().section(" ", 0, 0); + mDesktopFile = element.attribute("desktopFile"); + QMetaObject::invokeMethod(this, "updateIcon", Qt::QueuedConnection); +} + +#ifdef HAVE_MENU_CACHE +AppLinkItem::AppLinkItem(MenuCacheApp* app): + CommandProviderItem() +{ + MenuCacheItem* item = MENU_CACHE_ITEM(app); + mIconName = QString::fromUtf8(menu_cache_item_get_icon(item)); + mTitle = QString::fromUtf8(menu_cache_item_get_name(item)); + mComment = QString::fromUtf8(menu_cache_item_get_comment(item)); + mToolTip = mComment; + mCommand = menu_cache_app_get_exec(app); + mProgram = QFileInfo(mCommand).baseName().section(" ", 0, 0); + char* path = menu_cache_item_get_file_path(MENU_CACHE_ITEM(app)); + mDesktopFile = QString::fromLocal8Bit(path); + g_free(path); + QMetaObject::invokeMethod(this, "updateIcon", Qt::QueuedConnection); + // qDebug() << "FOUND: " << mIconName << ", " << mCommand; +} +#endif + +/************************************************ + + ************************************************/ +void AppLinkItem::updateIcon() +{ +// qDebug() << "*****************************************"; +// qDebug() << hex << this; +// qDebug() << Q_FUNC_INFO; + if (mIcon.isNull()) + mIcon = XdgIcon::fromTheme(mIconName); +// qDebug() << "*****************************************"; +} + + +/************************************************ + + ************************************************/ +void AppLinkItem::operator=(const AppLinkItem &other) +{ + mTitle = other.title(); + mComment = other.comment(); + mToolTip = other.toolTip(); + + mCommand = other.mCommand; + mProgram = other.mProgram; + mDesktopFile = other.mDesktopFile; + + mIconName = other.mIconName; + mIcon = other.icon(); +} + + +/************************************************ + + ************************************************/ +unsigned int AppLinkItem::rank(const QString &pattern) const +{ + unsigned int result = qMax(stringRank(mProgram, pattern), + stringRank(mTitle, pattern) + ); + return result; +} + + +/************************************************ + + ************************************************/ +bool AppLinkItem::run() const +{ + XdgDesktopFile desktop; + if (desktop.load(mDesktopFile)) + return desktop.startDetached(); + else + return false; +} + + +/************************************************ + + ************************************************/ +bool AppLinkItem::compare(const QRegExp ®Exp) const +{ + if (regExp.isEmpty()) + return false; + + QRegExp re(regExp); + + re.setCaseSensitivity(Qt::CaseInsensitive); + return mProgram.contains(re) || + mTitle.contains(re) ; +} + + + + +/************************************************ + + ************************************************/ +AppLinkProvider::AppLinkProvider(): + CommandProvider() +{ +#ifdef HAVE_MENU_CACHE + menu_cache_init(0); + mMenuCache = menu_cache_lookup(XdgMenu::getMenuFileName().toLocal8Bit()); + if(mMenuCache) + mMenuCacheNotify = menu_cache_add_reload_notify(mMenuCache, (MenuCacheReloadNotify)menuCacheReloadNotify, this); + else + mMenuCacheNotify = 0; +#else + mXdgMenu = new XdgMenu(); + mXdgMenu->setEnvironments(QStringList() << "X-LXQT" << "LxQt"); + connect(mXdgMenu, SIGNAL(changed()), this, SLOT(update())); + mXdgMenu->read(XdgMenu::getMenuFileName()); + update(); +#endif +} + + +/************************************************ + + ************************************************/ +AppLinkProvider::~AppLinkProvider() +{ +#ifdef HAVE_MENU_CACHE + if(mMenuCache) + { + menu_cache_remove_reload_notify(mMenuCache, mMenuCacheNotify); + menu_cache_unref(mMenuCache); + } +#else + delete mXdgMenu; +#endif +} + + +/************************************************ + + ************************************************/ + #ifdef HAVE_MENU_CACHE + +void AppLinkProvider::menuCacheReloadNotify(MenuCache* cache, gpointer user_data) +{ + // qDebug() << Q_FUNC_INFO; + reinterpret_cast(user_data)->update(); +} + + #else // without menu-cache, use libqtxdg + + void doUpdate(const QDomElement &xml, QHash &items) +{ + DomElementIterator it(xml, ""); + while (it.hasNext()) + { + QDomElement e = it.next(); + + // Build submenu ........................ + if (e.tagName() == "Menu") + doUpdate(e, items); + + //Build application link ................ + else if (e.tagName() == "AppLink") + { + AppLinkItem *item = new AppLinkItem(e); + delete items[item->command()]; // delete previous item; + items.insert(item->command(), item); + } + } +} +#endif + +/************************************************ + + ************************************************/ +void AppLinkProvider::update() +{ + emit aboutToBeChanged(); + QHash newItems; + +#ifdef HAVE_MENU_CACHE + // libmenu-cache is available, use it to get cached app list + GSList* apps = menu_cache_list_all_apps(mMenuCache); + for(GSList* l = apps; l; l = l->next) + { + MenuCacheApp* app = MENU_CACHE_APP(l->data); + AppLinkItem *item = new AppLinkItem(app); + AppLinkItem *prevItem = newItems[item->command()]; + if(prevItem) + delete prevItem; // delete previous item; + newItems.insert(item->command(), item); + menu_cache_item_unref(MENU_CACHE_ITEM(app)); + } + g_slist_free(apps); +#else + // use libqtxdg XdgMenu to get installed apps + doUpdate(mXdgMenu->xml().documentElement(), newItems); +#endif + { + QMutableListIterator i(*this); + while (i.hasNext()) { + AppLinkItem *item = static_cast(i.next()); + AppLinkItem *newItem = newItems.take(item->command()); + if (newItem) + { + *(item) = *newItem; // Copy by value, not pointer! + // After the item is copied, the original "updateIcon" call queued + // on the newItem object is never called since the object iss going to + // be deleted. Hence we need to call it on the copied item manually. + // Otherwise the copied item will have no icon. + // FIXME: this is a dirty hack and it should be made cleaner later. + if(item->icon().isNull()) + QMetaObject::invokeMethod(item, "updateIcon", Qt::QueuedConnection); + delete newItem; + } + else + { + i.remove(); + delete item; + } + } + } + + { + QHashIterator i(newItems); + while (i.hasNext()) + { + append(i.next().value()); + } + } + + emit changed(); +} + + + + +/************************************************ + + ************************************************/ +HistoryItem::HistoryItem(const QString &command): + CommandProviderItem() +{ + mIcon = XdgIcon::defaultApplicationIcon(); + mTitle = command; + mComment = QObject::tr("History"); + mCommand = command; +} + + +/************************************************ + + ************************************************/ +bool HistoryItem::run() const +{ + return startProcess(mCommand); +} + + +/************************************************ + + ************************************************/ +bool HistoryItem::compare(const QRegExp ®Exp) const +{ + QRegExp re(regExp); + + re.setCaseSensitivity(Qt::CaseSensitive); + return mCommand.contains(re); +} + + +/************************************************ + + ************************************************/ +unsigned int HistoryItem::rank(const QString &pattern) const +{ + return stringRank(mCommand, pattern); +} + + +/************************************************ + + ************************************************/ +HistoryProvider::HistoryProvider(): + CommandProvider() +{ + QString fileName = (XdgDirs::cacheHome() + "/lxqt-runner.history"); + mHistoryFile = new QSettings(fileName, QSettings::IniFormat); + mHistoryFile->beginGroup("commands"); + for (uint i=0; icontains(key)) + { + HistoryItem *item = new HistoryItem(mHistoryFile->value(key).toString()); + append(item); + } + } +} + + +/************************************************ + + ************************************************/ +HistoryProvider::~HistoryProvider() +{ + delete mHistoryFile; +} + + +/************************************************ + + ************************************************/ +void HistoryProvider::AddCommand(const QString &command) +{ + bool commandExists = false; + for (int i=0; !commandExists && i(at(i))->command()) + { + move(i, 0); + commandExists = true; + } + } + + if (!commandExists) + { + HistoryItem *item = new HistoryItem(command); + insert(0, item); + } + + mHistoryFile->clear(); + for (int i=0; isetValue(key, static_cast(at(i))->command()); + } +} + +void HistoryProvider::clearHistory() +{ + clear(); + mHistoryFile->clear(); +} + +/************************************************ + + ************************************************/ +CustomCommandItem::CustomCommandItem(CustomCommandProvider *provider): + CommandProviderItem(), + mProvider(provider) +{ + mIcon = XdgIcon::fromTheme("utilities-terminal"); +} + + +/************************************************ + + ************************************************/ +QString which(const QString &progName) +{ + if (progName.isEmpty()) + return ""; + + if (progName.startsWith(QDir::separator())) + { + QFileInfo fileInfo(progName); + if (fileInfo.isExecutable() && fileInfo.isFile()) + return fileInfo.absoluteFilePath(); + } + + QStringList dirs = QString(getenv("PATH")).split(":"); + + foreach (QString dir, dirs) + { + QFileInfo fileInfo(QDir(dir), progName); + if (fileInfo.isExecutable() && fileInfo.isFile()) + return fileInfo.absoluteFilePath(); + } + + return ""; +} + + +/************************************************ + + ************************************************/ +void CustomCommandItem::setCommand(const QString &command) +{ + mCommand = command; + mTitle = mCommand; + + QString program = which(expandCommand(command)); + + if (!program.isEmpty()) + mComment = QString("%1 %2").arg(program, command.section(' ', 1)); + else + mComment = ""; + +} + + +/************************************************ + + ************************************************/ +bool CustomCommandItem::run() const +{ + bool ret = startProcess(mCommand); + if (ret && mProvider->historyProvider()) + mProvider->historyProvider()->AddCommand(mCommand); + + return ret; +} + + +/************************************************ + + ************************************************/ +bool CustomCommandItem::compare(const QRegExp ®Exp) const +{ + return !mComment.isEmpty(); +} + + +/************************************************ + + ************************************************/ +unsigned int CustomCommandItem::rank(const QString &pattern) const +{ + return 0; +} + + +/************************************************ + + ************************************************/ +CustomCommandProvider::CustomCommandProvider(): + CommandProvider(), + mHistoryProvider(0) +{ + mItem = new CustomCommandItem(this); + append(mItem); +} + +#ifdef VBOX_ENABLED +VirtualBoxItem::VirtualBoxItem(const QString & MachineName , const QIcon & Icon): + CommandProviderItem() +{ + mTitle = MachineName; + mIcon = Icon; +} + +void VirtualBoxItem::setRDEPort(const QString & portNum) +{ + m_rdePortNum = portNum; +} + +bool VirtualBoxItem::run() const +{ + QStringList arguments; +#ifdef VBOXRUNNER_HEADLESS + arguments << "-startvm" << title(); + return QProcess::startDetached ("VBoxHeadless" , arguments); +#else + arguments << "startvm" << title(); + return QProcess::startDetached ("VBoxManage" , arguments); +#endif + +} + +bool VirtualBoxItem::compare(const QRegExp ®Exp) const +{ + QRegExp re(regExp); + re.setCaseSensitivity(Qt::CaseInsensitive); + return (! regExp.isEmpty() && -1 != re.indexIn (title ())); +} + +unsigned int VirtualBoxItem::rank(const QString &pattern) const +{ + return stringRank(mTitle, pattern); +} + +inline QString homeDir() { + return QStandardPaths::writableLocation(QStandardPaths::HomeLocation); +} + +/////// +VirtualBoxProvider::VirtualBoxProvider(): + virtualBoxConfig ( homeDir() + "/.VirtualBox/VirtualBox.xml") +{ + fp.setFileName (virtualBoxConfig); + + static const char *kOSTypeIcons [][2] = + { + {"Other", ":/vbox-icons/os_other.png"}, + {"DOS", ":/vbox-icons/os_dos.png"}, + {"Netware", ":/vbox-icons/os_netware.png"}, + {"L4", ":/vbox-icons/os_l4.png"}, + {"Windows31", ":/vbox-icons/os_win31.png"}, + {"Windows95", ":/vbox-icons/os_win95.png"}, + {"Windows98", ":/vbox-icons/os_win98.png"}, + {"WindowsMe", ":/vbox-icons/os_winme.png"}, + {"WindowsNT4", ":/vbox-icons/os_winnt4.png"}, + {"Windows2000", ":/vbox-icons/os_win2k.png"}, + {"WindowsXP", ":/vbox-icons/os_winxp.png"}, + {"WindowsXP_64", ":/vbox-icons/os_winxp_64.png"}, + {"Windows2003", ":/vbox-icons/os_win2k3.png"}, + {"Windows2003_64", ":/vbox-icons/os_win2k3_64.png"}, + {"WindowsVista", ":/vbox-icons/os_winvista.png"}, + {"WindowsVista_64", ":/vbox-icons/os_winvista_64.png"}, + {"Windows2008", ":/vbox-icons/os_win2k8.png"}, + {"Windows2008_64", ":/vbox-icons/os_win2k8_64.png"}, + {"Windows7", ":/vbox-icons/os_win7.png"}, + {"Windows7_64", ":/vbox-icons/os_win7_64.png"}, + {"WindowsNT", ":/vbox-icons/os_win_other.png"}, + {"OS2Warp3", ":/vbox-icons/os_os2warp3.png"}, + {"OS2Warp4", ":/vbox-icons/os_os2warp4.png"}, + {"OS2Warp45", ":/vbox-icons/os_os2warp45.png"}, + {"OS2eCS", ":/vbox-icons/os_os2ecs.png"}, + {"OS2", ":/vbox-icons/os_os2_other.png"}, + {"Linux22", ":/vbox-icons/os_linux22.png"}, + {"Linux24", ":/vbox-icons/os_linux24.png"}, + {"Linux24_64", ":/vbox-icons/os_linux24_64.png"}, + {"Linux26", ":/vbox-icons/os_linux26.png"}, + {"Linux26_64", ":/vbox-icons/os_linux26_64.png"}, + {"ArchLinux", ":/vbox-icons/os_archlinux.png"}, + {"ArchLinux_64", ":/vbox-icons/os_archlinux_64.png"}, + {"Debian", ":/vbox-icons/os_debian.png"}, + {"Debian_64", ":/vbox-icons/os_debian_64.png"}, + {"OpenSUSE", ":/vbox-icons/os_opensuse.png"}, + {"OpenSUSE_64", ":/vbox-icons/os_opensuse_64.png"}, + {"Fedora", ":/vbox-icons/os_fedora.png"}, + {"Fedora_64", ":/vbox-icons/os_fedora_64.png"}, + {"Gentoo", ":/vbox-icons/os_gentoo.png"}, + {"Gentoo_64", ":/vbox-icons/os_gentoo_64.png"}, + {"Mandriva", ":/vbox-icons/os_mandriva.png"}, + {"Mandriva_64", ":/vbox-icons/os_mandriva_64.png"}, + {"RedHat", ":/vbox-icons/os_redhat.png"}, + {"RedHat_64", ":/vbox-icons/os_redhat_64.png"}, + {"Ubuntu", ":/vbox-icons/os_ubuntu.png"}, + {"Ubuntu_64", ":/vbox-icons/os_ubuntu_64.png"}, + {"Xandros", ":/vbox-icons/os_xandros.png"}, + {"Xandros_64", ":/vbox-icons/os_xandros_64.png"}, + {"Linux", ":/vbox-icons/os_linux_other.png"}, + {"FreeBSD", ":/vbox-icons/os_freebsd.png"}, + {"FreeBSD_64", ":/vbox-icons/os_freebsd_64.png"}, + {"OpenBSD", ":/vbox-icons/os_openbsd.png"}, + {"OpenBSD_64", ":/vbox-icons/os_openbsd_64.png"}, + {"NetBSD", ":/vbox-icons/os_netbsd.png"}, + {"NetBSD_64", ":/vbox-icons/os_netbsd_64.png"}, + {"Solaris", ":/vbox-icons/os_solaris.png"}, + {"Solaris_64", ":/vbox-icons/os_solaris_64.png"}, + {"OpenSolaris", ":/vbox-icons/os_opensolaris.png"}, + {"OpenSolaris_64", ":/vbox-icons/os_opensolaris_64.png"}, + {"QNX", ":/vbox-icons/os_qnx.png"}, + }; + + for (size_t n = 0; n < sizeof (kOSTypeIcons) / sizeof(kOSTypeIcons[0]); ++ n) + { + osIcons.insert (kOSTypeIcons [n][0], (kOSTypeIcons [n][1])); + } +} + +void VirtualBoxProvider::rebuild() +{ + QDomDocument d; + if ( !d.setContent( &fp ) ) + { + qDebug() << "Unable to parse: " << fp.fileName(); + return; + } + + QDomNodeList _dnlist = d.elementsByTagName( "MachineEntry" ); + for ( int i = 0; i < _dnlist.count(); i++ ) + { + const QDomNode & node = _dnlist.at( i ); + const QString & ref = node.toElement().attribute( "src" ); + if ( ref.isEmpty() ) + { + qDebug() << "MachineEntry with no src attribute"; + continue; + } + + QFile m( ref ); + + QDomDocument mspec; + if ( !mspec.setContent( &m ) ) + { + qDebug() << "Could not parse machine file " << m.fileName(); + continue; + } + + QDomNodeList _mlist = mspec.elementsByTagName( "Machine" ); + for ( int j = 0; j < _mlist.count(); j++ ) + { + QDomNode mnode = _mlist.at( j ); + + QString type = mnode.toElement().attribute( "OSType" ); + VirtualBoxItem *virtualBoxItem = new VirtualBoxItem + ( + mnode.toElement().attribute( "name" ) , + QIcon ( osIcons.value (type , ":/vbox-icons/os_other.png") ) + ); + + const QDomNodeList & rdeportConfig = mnode.toElement().elementsByTagName("VRDEProperties"); + if ( ! rdeportConfig.isEmpty() ) + { + QDomNode portNode = rdeportConfig.at(0).firstChild(); + virtualBoxItem->setRDEPort( portNode.toElement().attribute("value") ); + } + + append ( virtualBoxItem ); + } + } + + timeStamp = QDateTime::currentDateTime(); + +} + +bool VirtualBoxProvider::isOutDated() const +{ + return fp.exists() && ( timeStamp < QFileInfo ( virtualBoxConfig ).lastModified () ); +} +#endif + + +#ifdef MATH_ENABLED +#include +#include + +/************************************************ + + ************************************************/ +MathItem::MathItem(): + CommandProviderItem() +{ + mToolTip =QObject::tr("Mathematics"); + mIcon = XdgIcon::fromTheme("accessories-calculator"); +} + + +/************************************************ + + ************************************************/ +bool MathItem::run() const +{ + return false; +} + + +/************************************************ + + ************************************************/ +bool MathItem::compare(const QRegExp ®Exp) const +{ + QString s = regExp.pattern().trimmed(); + + if (s.endsWith("=")) + { + s.chop(1); + QScriptEngine myEngine; + QScriptValue res = myEngine.evaluate(s); + if (res.isNumber()) + { + MathItem *self=const_cast(this); + self->mTitle = s + " = " + res.toString(); + return true; + } + } + + return false; +} + +/************************************************ + + ************************************************/ +unsigned int MathItem::rank(const QString &pattern) const +{ + return stringRank(mTitle, pattern); +} + + +/************************************************ + + ************************************************/ +MathProvider::MathProvider() +{ + append(new MathItem()); +} + + +PowerProviderItem::PowerProviderItem(QAction *action) + : CommandProviderItem(), + m_action(action) +{ + mIcon = action->icon(); + mTitle = action->text(); + mComment = QObject::tr("Power Management"); + mToolTip = mComment; +} + +bool PowerProviderItem::run() const +{ + m_action->activate(QAction::Trigger); + return true; +} + +bool PowerProviderItem::compare(const QRegExp ®Exp) const +{ + if (regExp.isEmpty()) + return false; + + QRegExp re(regExp); + + re.setCaseSensitivity(Qt::CaseInsensitive); + return mTitle.contains(re) ; +} + +unsigned int PowerProviderItem::rank(const QString &pattern) const +{ + return stringRank(mTitle, pattern); +} + +PowerProvider::PowerProvider() : CommandProvider() +{ + m_power = new LxQt::PowerManager(this); + foreach (QAction *a, m_power->availableActions()) + { + append(new PowerProviderItem(a)); + } + + m_screensaver = new LxQt::ScreenSaver(this); + foreach (QAction *a, m_screensaver->availableActions()) + { + append(new PowerProviderItem(a)); + } +} + +ExternalProviderItem::ExternalProviderItem() +{ +} + +bool ExternalProviderItem::setData(QMap & data) +{ + if (! (data.contains("title") && data.contains("command"))) + { + return false; + } + + mTitle = data["title"]; + mComment = data["comment"]; + mToolTip = data["tooltip"]; + mCommand = data["command"]; + if (data.contains("icon")) + mIcon = XdgIcon::fromTheme(data["icon"]); + + return true; +} + + + +bool ExternalProviderItem::run() const +{ + return startProcess(mCommand); +} + +unsigned int ExternalProviderItem::rank(const QString& pattern) const +{ + return stringRank(title(), pattern); +} + +ExternalProvider::ExternalProvider(const QString name, const QString externalProgram) : +CommandProvider(), mName(name) +{ + mExternalProcess = new QProcess(this); + mYamlParser = new YamlParser(); + connect(mYamlParser, SIGNAL(newListOfMaps(QList >)), + this, SLOT(newListOfMaps(QList >))); + + connect(mExternalProcess, SIGNAL(readyRead()), this, SLOT(readFromProcess())); + mExternalProcess->start(externalProgram); +} + +void ExternalProvider::setSearchTerm(const QString searchTerm) +{ + mExternalProcess->write(searchTerm.toUtf8()); + mExternalProcess->write(QString("\n").toUtf8()); +} + +void ExternalProvider::newListOfMaps(QList > maps) +{ + emit aboutToBeChanged(); + + qDeleteAll(*this); + clear(); + + QMap map; + foreach(map, maps) + { + ExternalProviderItem *item = new ExternalProviderItem(); + if (item->setData(map)) + this->append(item); + else + delete item; + } + + emit changed(); +} + +void ExternalProvider::readFromProcess() +{ + char ch; + while (mExternalProcess->getChar(&ch)) + { + if (ch == '\n') + { + QString textLine = QString::fromLocal8Bit(mBuffer); + mYamlParser->consumeLine(textLine); + mBuffer.clear(); + } + else + { + mBuffer.append(ch); + } + } +} + +#endif diff --git a/providers.h b/providers.h new file mode 100644 index 0000000..14f7cf6 --- /dev/null +++ b/providers.h @@ -0,0 +1,374 @@ +/* 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 + * 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 PROVIDERS_H +#define PROVIDERS_H + +#include +#include +#include +#include +#include + +#ifdef HAVE_MENU_CACHE +#include +#endif + +#define MAX_RANK 0xFFFF + +/*! The CommandProviderItem class provides an item for use with CommandProvider. + Items usually contain title, comment, toolTip and icon. + */ +class CommandProviderItem: public QObject +{ + Q_OBJECT +public: + CommandProviderItem(): QObject() {} + virtual ~CommandProviderItem() {} + + virtual bool run() const = 0; + virtual bool compare(const QRegExp ®Exp) const = 0; + + /// Returns the item's icon. + QIcon icon() const { return mIcon; } + + /// Returns the item's title. + QString title() const { return mTitle; } + + /// Returns the item's comment. + QString comment() const { return mComment; } + + /// Returns the item's tooltip. + QString toolTip() const { return mToolTip; } + + /*! The result of this function is used when searching for a apropriate item. + The item with the highest rank will be highlighted. + 0 - not suitable. + MAX_RANK - an exact match. + In the most cases you can yse something like: + return stringRank(mTitle, pattern); + */ + virtual unsigned int rank(const QString &pattern) const = 0; + +protected: + /// Helper function for the CommandProviderItem::rank + unsigned int stringRank(const QString str, const QString pattern) const; + QIcon mIcon; + QString mTitle; + QString mComment; + QString mToolTip; +}; + + +/*! The CommandProvider class provides task for the lxqt-runner. + */ +class CommandProvider: public QObject, public QList +{ + Q_OBJECT +public: + CommandProvider(); + virtual ~CommandProvider(); + + virtual void rebuild() {} + virtual bool isOutDated() const { return false; } + +signals: + void aboutToBeChanged(); + void changed(); +}; + + +/************************************************ + * Application desktop files + ************************************************/ + +class AppLinkItem: public CommandProviderItem +{ + Q_OBJECT +public: + AppLinkItem(const QDomElement &element); + +#ifdef HAVE_MENU_CACHE + AppLinkItem(MenuCacheApp* app); +#endif + + bool run() const; + bool compare(const QRegExp ®Exp) const; + QString command() const { return mCommand; } + + void operator=(const AppLinkItem &other); + + virtual unsigned int rank(const QString &pattern) const; +private slots: + void updateIcon(); +private: + QString mDesktopFile; + QString mIconName; + QString mCommand; + QString mProgram; +}; + + +class XdgMenu; +class AppLinkProvider: public CommandProvider +{ + Q_OBJECT +public: + AppLinkProvider(); + virtual ~AppLinkProvider(); + +private slots: + void update(); + +private: +#ifdef HAVE_MENU_CACHE + MenuCache* mMenuCache; + MenuCacheNotifyId mMenuCacheNotify; + static void menuCacheReloadNotify(MenuCache* cache, gpointer user_data); +#else + XdgMenu *mXdgMenu; +#endif +}; + + +/************************************************ + * History + ************************************************/ + +class HistoryItem: public CommandProviderItem +{ +public: + HistoryItem(const QString &command); + + bool run() const; + bool compare(const QRegExp ®Exp) const; + + QString command() const { return mCommand; } + virtual unsigned int rank(const QString &pattern) const; + +private: + QString mCommand; +}; + + + +class QSettings; +class HistoryProvider: public CommandProvider +{ +public: + HistoryProvider(); + virtual ~HistoryProvider(); + + void AddCommand(const QString &command); + void clearHistory(); + +private: + QSettings *mHistoryFile; +}; + + + +/************************************************ + * Custom command + ************************************************/ +class CustomCommandProvider; + +class CustomCommandItem: public CommandProviderItem +{ +public: + CustomCommandItem(CustomCommandProvider *provider); + + bool run() const; + bool compare(const QRegExp ®Exp) const; + + QString command() const { return mCommand; } + void setCommand(const QString &command); + + virtual unsigned int rank(const QString &pattern) const; +private: + QString mCommand; + CustomCommandProvider *mProvider; +}; + + + +class QSettings; +class CustomCommandProvider: public CommandProvider +{ +public: + CustomCommandProvider(); + + QString command() const { return mItem->command(); } + void setCommand(const QString &command) { mItem->setCommand(command); } + + HistoryProvider* historyProvider() const { return mHistoryProvider; } + void setHistoryProvider(HistoryProvider *historyProvider) { mHistoryProvider = historyProvider; } + +private: + CustomCommandItem *mItem; + HistoryProvider *mHistoryProvider; +}; + + + +/************************************************ + * Mathematics + ************************************************/ +class MathItem: public CommandProviderItem +{ +public: + MathItem(); + + bool run() const; + bool compare(const QRegExp ®Exp) const; + virtual unsigned int rank(const QString &pattern) const; +}; + + + +class MathProvider: public CommandProvider +{ +public: + MathProvider(); + //virtual ~MathProvider(); +}; + +#ifdef VBOX_ENABLED +#include +#include +#include +#include + +class VirtualBoxItem: public CommandProviderItem +{ +public: + VirtualBoxItem(const QString & MachineName , const QIcon & Icon); + + void setRDEPort (const QString & portNum); + bool run() const; + bool compare(const QRegExp ®Exp) const; + virtual unsigned int rank(const QString &pattern) const; +private: + QString m_rdePortNum; +}; + +class VirtualBoxProvider: public CommandProvider +{ +public: + VirtualBoxProvider (); + void rebuild(); + bool isOutDated() const; + +private: + QFile fp; + QMap osIcons; + QString virtualBoxConfig; + QDateTime timeStamp; +}; +#endif + + +class QAction; +/*! Power management built in into runner + */ +class PowerProviderItem : public CommandProviderItem +{ +public: + PowerProviderItem(QAction *action); + + bool run() const; + bool compare(const QRegExp ®Exp) const; + unsigned int rank(const QString &pattern) const; +private: + QAction *m_action; +}; + +namespace LxQt { + class PowerManager; + class ScreenSaver; +} + +/*! Power management built in into runner + */ +class PowerProvider: public CommandProvider +{ + Q_OBJECT +public: + PowerProvider(); + +private: + LxQt::PowerManager *m_power; + LxQt::ScreenSaver *m_screensaver; +}; + +class ExternalProviderItem: public CommandProviderItem +{ + Q_OBJECT + +public: + ExternalProviderItem(); + + bool setData(QMap & data); + + bool run() const; + bool compare(const QRegExp ®Exp) const {return true;} // We leave the decision to the external process + unsigned int rank(const QString &pattern) const; + + QString mCommand; +}; + +class QProcess; +class YamlParser; +class ExternalProvider: public CommandProvider +{ + Q_OBJECT + +public: + ExternalProvider(const QString name, const QString externalProgram); + + void setSearchTerm(const QString searchTerm); + +signals: + void dataChanged(); + +private slots: + void readFromProcess(); + void newListOfMaps(QList > maps); + +private: + QString mName; + QProcess *mExternalProcess; + QTextStream *mDataToProcess; + YamlParser *mYamlParser; + + QByteArray mBuffer; +}; + + +#endif // PROVIDERS_H diff --git a/translations/lxqt-runner.ts b/translations/lxqt-runner.ts new file mode 100644 index 0000000..c59a439 --- /dev/null +++ b/translations/lxqt-runner.ts @@ -0,0 +1,98 @@ + + + + + ConfigureDialog + + + Runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of the screen + + + + + Center of the screen + + + + + Focused screen + + + + + Always on screen %1 + + + + + Reset + + + + + Dialog + + + Application launcher + + + + + Configure + + + + + Clear History + + + + + Show/hide runner dialog + + + + + QObject + + + History + + + + + Mathematics + + + + + Power Management + + + + diff --git a/translations/lxqt-runner_ar.ts b/translations/lxqt-runner_ar.ts new file mode 100644 index 0000000..4aa9c42 --- /dev/null +++ b/translations/lxqt-runner_ar.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + إعدادات مُطلق ريزر + + + Appearance + المظهر + + + Positioning: + تحديد الموضع: + + + Show on: + إظهارٌ على: + + + Shortcut: + رابطٌ مختصر: + + + Top edge of screen + الحافَّة العليا للشَّاشة + + + Center of screen + مركز الشَّاشة + + + Monitor where the mouse + المراقبة عند مؤشر الفأرة + + + Always on %1 monitor + دوماً في شاشة العرض %1 + + + + Dialog + + Application launcher + بادئ التطبيقات + + + Configure lxqt-runner + تهيئة مُطلق نظام ريزر + + + Clear lxqt-runner History + مسح ذاكرة مُنفِّذ برامج ريزر + + + Press "%1" to see dialog. + اضغط "%1" لمشاهدة لوحة الحوار. + + + + QObject + + History + سجلُّ السوابق + + + Mathematics + الرِّياضيَّات + + + LxQt Power Management + إدارة الطاقة لبيئة ريزر + + + \ No newline at end of file diff --git a/translations/lxqt-runner_cs.ts b/translations/lxqt-runner_cs.ts new file mode 100644 index 0000000..ba9a7da --- /dev/null +++ b/translations/lxqt-runner_cs.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Nastavení spouštěče programů + + + Appearance + Vzhled + + + Positioning: + Umístění: + + + Show on: + Ukázat na: + + + Shortcut: + Klávesová zkratka: + + + Top edge of screen + Horní okraj obrazovky + + + Center of screen + Střed obrazovky + + + Monitor where the mouse + Tam, kde je myš + + + Always on %1 monitor + Vždy na %1 obrazovce + + + + Dialog + + Application launcher + Spouštěč programů + + + Configure lxqt-runner + Nastavit spouštěč programů + + + Clear lxqt-runner History + Smazat historii spouštěče programů + + + Press "%1" to see dialog. + Stiskněte "%1" pro zobrazení dialogu. + + + + QObject + + History + Historie + + + Mathematics + Matematika + + + LxQt Power Management + Správa energie + + + \ No newline at end of file diff --git a/translations/lxqt-runner_cs_CZ.ts b/translations/lxqt-runner_cs_CZ.ts new file mode 100644 index 0000000..55e3624 --- /dev/null +++ b/translations/lxqt-runner_cs_CZ.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Nastavení spouštěče programů + + + Appearance + Vzhled + + + Positioning: + Umístění: + + + Show on: + Ukázat na: + + + Shortcut: + Klávesová zkratka: + + + Top edge of screen + Horní okraj obrazovky + + + Center of screen + Střed obrazovky + + + Monitor where the mouse + Tam, kde je myš + + + Always on %1 monitor + Vždy na %1 obrazovce + + + + Dialog + + Application launcher + Spouštěč programů + + + Configure lxqt-runner + Nastavit spouštěč programů + + + Clear lxqt-runner History + Smazat historii spouštěče programů + + + Press "%1" to see dialog. + Stiskněte "%1" pro zobrazení dialogu. + + + + QObject + + History + Historie + + + Mathematics + Matematika + + + LxQt Power Management + Správa energie + + + \ No newline at end of file diff --git a/translations/lxqt-runner_da.ts b/translations/lxqt-runner_da.ts new file mode 100644 index 0000000..2eff5d9 --- /dev/null +++ b/translations/lxqt-runner_da.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_da_DK.ts b/translations/lxqt-runner_da_DK.ts new file mode 100644 index 0000000..2be790c --- /dev/null +++ b/translations/lxqt-runner_da_DK.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Programstarter Indstillinger + + + Appearance + Udseende + + + Positioning: + Position: + + + Show on: + Vis på: + + + Shortcut: + Genvej: + + + Top edge of screen + Skærmens topkant + + + Center of screen + Skærmens midte + + + Monitor where the mouse + Skærmen, hvor musen + + + Always on %1 monitor + Altid på skærm %1 + + + + Dialog + + Application launcher + Programstarter + + + Configure lxqt-runner + Indstil LxQt programstarter + + + Clear lxqt-runner History + Nulstil lxqt programstarter historik + + + Press "%1" to see dialog. + Tryk "%1" for at se dialog. + + + + QObject + + History + Historie + + + Mathematics + Matematik + + + LxQt Power Management + LxQt Strømstyring + + + \ No newline at end of file diff --git a/translations/lxqt-runner_de.ts b/translations/lxqt-runner_de.ts new file mode 100644 index 0000000..332ca61 --- /dev/null +++ b/translations/lxqt-runner_de.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_de_DE.ts b/translations/lxqt-runner_de_DE.ts new file mode 100644 index 0000000..f12f6c7 --- /dev/null +++ b/translations/lxqt-runner_de_DE.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt-runner-Einstellungen + + + Appearance + Aussehen + + + Positioning: + Positionierung: + + + Show on: + Anzeigen auf: + + + Shortcut: + Tastenkürzel: + + + Top edge of screen + Bildschirmoberkante + + + Center of screen + Bildschirmmitte + + + Monitor where the mouse + Anzeigen, wo die Maus ist + + + Always on %1 monitor + Immer auf Monitor %1 + + + + Dialog + + Application launcher + Anwendungsstarter + + + Configure lxqt-runner + Konfiguriere lxqt-runner + + + Clear lxqt-runner History + LxQt-runner Verlauf löschen + + + Press "%1" to see dialog. + Klicke "%1" für Dialogsansicht. + + + + QObject + + History + Verlauf + + + Mathematics + Mathematik + + + LxQt Power Management + LxQt Energieverwaltung + + + \ No newline at end of file diff --git a/translations/lxqt-runner_el_GR.ts b/translations/lxqt-runner_el_GR.ts new file mode 100644 index 0000000..e408886 --- /dev/null +++ b/translations/lxqt-runner_el_GR.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Ρυθμίσεις εκτελεστή LxQt + + + Appearance + Εμφάνιση + + + Positioning: + Θέση: + + + Show on: + Εμφάνιση σε: + + + Shortcut: + Συντόμευση: + + + Top edge of screen + Επάνω άκρη της οθόνης + + + Center of screen + Κέντρο της οθόνης + + + Monitor where the mouse + Οθόνη όπου βρίσκεται το ποντίκι + + + Always on %1 monitor + Πάντα στην οθόνη %1 + + + + Dialog + + Application launcher + Εκκινητής εφαρμογής + + + Configure lxqt-runner + Διαμόρφωση εκτελεστή lxqt + + + Clear lxqt-runner History + Εκκαθάριση ιστορικού εκτελεστή lxqt + + + Press "%1" to see dialog. + Πιέστε "%1" για εμφάνιση διαλόγου. + + + + QObject + + History + Ιστορία + + + Mathematics + Μαθηματικά + + + LxQt Power Management + Διαχείριση ενέργειας LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_eo.ts b/translations/lxqt-runner_eo.ts new file mode 100644 index 0000000..7b47ba6 --- /dev/null +++ b/translations/lxqt-runner_eo.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Agordoj de lxqt-runner + + + Appearance + Apero + + + Positioning: + Loko: + + + Show on: + Montri en: + + + Shortcut: + Klavkombino: + + + Top edge of screen + Supra bordo de la ekrano + + + Center of screen + Centro de la ekrano + + + Monitor where the mouse + + + + Always on %1 monitor + Ĉiam en %1 monitoro + + + + Dialog + + Application launcher + Lanĉilo de aplikaĵoj + + + Configure lxqt-runner + Agordi lxqt-runner + + + Clear lxqt-runner History + Vakigi kronologion de lxqt-runner + + + Press "%1" to see dialog. + Alkalku "%1" por montri dialogon. + + + + QObject + + History + Historio + + + Mathematics + Matematiko + + + LxQt Power Management + Kurentmastrumilo de LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_es.ts b/translations/lxqt-runner_es.ts new file mode 100644 index 0000000..041b48b --- /dev/null +++ b/translations/lxqt-runner_es.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Configuración de LxQt-runner + + + Appearance + Apariencia + + + Positioning: + Posición: + + + Show on: + Mostrar en: + + + Shortcut: + Acceso directo + + + Top edge of screen + Extremo superior de la pantalla + + + Center of screen + Centro de la pantalla + + + Monitor where the mouse + Monitor donde esté el ratón + + + Always on %1 monitor + Siempre en el monitor %1 + + + + Dialog + + Application launcher + Lanzador de aplicaciones + + + Configure lxqt-runner + Configurar lxqt-runner + + + Clear lxqt-runner History + Limpiar historial de LxQt-Runner + + + Press "%1" to see dialog. + Presione "%1" para ver la pantalla. + + + + QObject + + History + Historial + + + Mathematics + Matemáticas + + + LxQt Power Management + Administrador de energía de LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_es_VE.ts b/translations/lxqt-runner_es_VE.ts new file mode 100644 index 0000000..e1f4033 --- /dev/null +++ b/translations/lxqt-runner_es_VE.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Configuraciones de LxQt-Ejecutor + + + Appearance + Apariencia + + + Positioning: + Posicionamiento: + + + Show on: + Mostrar en: + + + Shortcut: + Acceso de tecla: + + + Top edge of screen + En el tope de pantalla + + + Center of screen + Centrar en la pantalla + + + Monitor where the mouse + Pantalla donde este el raton + + + Always on %1 monitor + Siempre en la pantalla %1 + + + + Dialog + + Application launcher + Lanzador de palicaciones + + + Configure lxqt-runner + Configurar lanzador de LxQt + + + Clear lxqt-runner History + Limpiar historial de lxqt-runner + + + Press "%1" to see dialog. + Presiona %1 para ver el dialogo + + + + QObject + + History + Historial + + + Mathematics + Matematicas + + + LxQt Power Management + Manejador de energia de LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_eu.ts b/translations/lxqt-runner_eu.ts new file mode 100644 index 0000000..335c41a --- /dev/null +++ b/translations/lxqt-runner_eu.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt-runner ezarpenak + + + Appearance + Itxura + + + Positioning: + Posizioa: + + + Show on: + Erakutsi hemen: + + + Shortcut: + Lasterbidea: + + + Top edge of screen + Pantailaren goiko ertza + + + Center of screen + Pantailaren erdia + + + Monitor where the mouse + Monitorea sagua dagoen lekuan + + + Always on %1 monitor + Beti %1 monitorean + + + + Dialog + + Application launcher + Aplikazio-abiarazlea + + + Configure lxqt-runner + Konfiguratu lxqt-runner + + + Clear lxqt-runner History + Garbitu lxqt-runner historia + + + Press "%1" to see dialog. + Sakatu "%1" elkarrizketa-koadroa ikusteko. + + + + QObject + + History + Historia + + + Mathematics + Matematikak + + + LxQt Power Management + LxQt energia-kudeaketa + + + \ No newline at end of file diff --git a/translations/lxqt-runner_fi.ts b/translations/lxqt-runner_fi.ts new file mode 100644 index 0000000..4bfb6dd --- /dev/null +++ b/translations/lxqt-runner_fi.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQtin käynnistimen asetukset + + + Appearance + Ulkoasu + + + Positioning: + Sijainti: + + + Show on: + Näytä: + + + Shortcut: + Pikanäppäin: + + + Top edge of screen + Näytön ylälaidassa + + + Center of screen + Keskellä näyttöä + + + Monitor where the mouse + Näytöllä, jossa hiiren osoitin on + + + Always on %1 monitor + Aina näytöllä %1 + + + + Dialog + + Application launcher + Sovelluskäynnistin + + + Configure lxqt-runner + Hallitse LxQtin käynnistintä + + + Clear lxqt-runner History + Tyhjennä LxQt-käynnistimen historia + + + Press "%1" to see dialog. + Paina "%1" nähdäksesi ikkunan. + + + + QObject + + History + Historia + + + Mathematics + Matematiikka + + + LxQt Power Management + LxQtin virranhallinta + + + \ No newline at end of file diff --git a/translations/lxqt-runner_fr_FR.ts b/translations/lxqt-runner_fr_FR.ts new file mode 100644 index 0000000..255b202 --- /dev/null +++ b/translations/lxqt-runner_fr_FR.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Paramètres du lanceur de commandes + + + Appearance + Apparence + + + Positioning: + Position : + + + Show on: + Montrer au : + + + Shortcut: + Raccourci : + + + Top edge of screen + Bord supérieur de l'écran + + + Center of screen + Centre de l'écran + + + Monitor where the mouse + Moniteur où se trouve la souris + + + Always on %1 monitor + Toujours sur le moniteur %1 + + + + Dialog + + Application launcher + Lanceur d'application + + + Configure lxqt-runner + Configurer le lanceur de commandes + + + Clear lxqt-runner History + Effacer l'historique du lanceur de commandes + + + Press "%1" to see dialog. + Appuyer sur "%1" pour voir le dialogue + + + + QObject + + History + Histoire + + + Mathematics + Mathématiques + + + LxQt Power Management + Gestion de l'énergie + + + \ No newline at end of file diff --git a/translations/lxqt-runner_hu.ts b/translations/lxqt-runner_hu.ts new file mode 100644 index 0000000..b568296 --- /dev/null +++ b/translations/lxqt-runner_hu.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_ia.ts b/translations/lxqt-runner_ia.ts new file mode 100644 index 0000000..613b71e --- /dev/null +++ b/translations/lxqt-runner_ia.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_id_ID.ts b/translations/lxqt-runner_id_ID.ts new file mode 100644 index 0000000..d442441 --- /dev/null +++ b/translations/lxqt-runner_id_ID.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_it_IT.ts b/translations/lxqt-runner_it_IT.ts new file mode 100644 index 0000000..7c03390 --- /dev/null +++ b/translations/lxqt-runner_it_IT.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Impostazioni di LxQt-runner + + + Appearance + Aspetto + + + Positioning: + Posizione: + + + Show on: + Mostra su: + + + Shortcut: + Scorciatoia: + + + Top edge of screen + Bordo superiore dello schermo + + + Center of screen + Centro dello schermo + + + Monitor where the mouse + Vedi dove è il mouse + + + Always on %1 monitor + Sempre sul monitor %1 + + + + Dialog + + Application launcher + Lanciatore di applicazioni + + + Configure lxqt-runner + Configura LxQt-runner + + + Clear lxqt-runner History + Cancella la cronologia di lxqt-runner + + + Press "%1" to see dialog. + Premi "%1" per vedere la finestra di dialogo. + + + + QObject + + History + Cronologia + + + Mathematics + Matematica + + + LxQt Power Management + Gestione energetica di LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_ja.ts b/translations/lxqt-runner_ja.ts new file mode 100644 index 0000000..08bf568 --- /dev/null +++ b/translations/lxqt-runner_ja.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt-runnerの設定 + + + Appearance + 外観 + + + Positioning: + 配置: + + + Show on: + 表示: + + + Shortcut: + ショートカット: + + + Top edge of screen + スクリーンの上辺 + + + Center of screen + スクリーンの中央 + + + Monitor where the mouse + マウスの位置を観察 + + + Always on %1 monitor + 常に%1モニタに + + + + Dialog + + Application launcher + アプリケーションランチャ + + + Configure lxqt-runner + lxqt-runnerを設定 + + + Clear lxqt-runner History + LxQt-runnerの履歴を消去 + + + Press "%1" to see dialog. + ダイアログを見るには"%1"を押してください。 + + + + QObject + + History + 履歴 + + + Mathematics + 計算 + + + LxQt Power Management + LxQt電源管理 + + + \ No newline at end of file diff --git a/translations/lxqt-runner_ko.ts b/translations/lxqt-runner_ko.ts new file mode 100644 index 0000000..1d3a135 --- /dev/null +++ b/translations/lxqt-runner_ko.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_lt.ts b/translations/lxqt-runner_lt.ts new file mode 100644 index 0000000..e77d88d --- /dev/null +++ b/translations/lxqt-runner_lt.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt paleidiklio nuostatos + + + Appearance + Išvaizda + + + Positioning: + Padėtis: + + + Show on: + Rodyti: + + + Shortcut: + Nuoroda: + + + Top edge of screen + Viršutiniame ekrano krašte + + + Center of screen + Ekrano centre + + + Monitor where the mouse + Ties pele + + + Always on %1 monitor + Visada „%1“ vaizduoklyje + + + + Dialog + + Application launcher + Programų paleidiklis + + + Configure lxqt-runner + Konfigūruoti lxqt paleidiklį + + + Clear lxqt-runner History + Išvalyti lxqt paleidiklio istoriją + + + Press "%1" to see dialog. + Norėdami matyti dialogą, spauskite „%1“ + + + + QObject + + History + Istorija + + + Mathematics + Matematika + + + LxQt Power Management + LxQt energijos valdymas + + + \ No newline at end of file diff --git a/translations/lxqt-runner_nl.ts b/translations/lxqt-runner_nl.ts new file mode 100644 index 0000000..e55c363 --- /dev/null +++ b/translations/lxqt-runner_nl.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt-uitvoeren Instellingen + + + Appearance + Uiterlijk + + + Positioning: + Positionering: + + + Show on: + Toon op: + + + Shortcut: + Snelkoppeling: + + + Top edge of screen + Bovenkant van het scherm + + + Center of screen + Midden van het scherm + + + Monitor where the mouse + Check positie van de muis + + + Always on %1 monitor + Altijd op %1 monitor + + + + Dialog + + Application launcher + Programma starter + + + Configure lxqt-runner + Configureer LxQt-uitvoeren + + + Clear lxqt-runner History + Wis lxqt-runner Geschiedenis + + + Press "%1" to see dialog. + Toets "%1" om dialoog te zien. + + + + QObject + + History + Geschiedenis + + + Mathematics + Wiskundig + + + LxQt Power Management + LxQt Energiebeheer + + + \ No newline at end of file diff --git a/translations/lxqt-runner_pl_PL.ts b/translations/lxqt-runner_pl_PL.ts new file mode 100644 index 0000000..de03b5e --- /dev/null +++ b/translations/lxqt-runner_pl_PL.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Ustawienia LxQt-runner + + + Appearance + Wygląd + + + Positioning: + Pozycja: + + + Show on: + Pokaż na: + + + Shortcut: + Skrót: + + + Top edge of screen + Góra ekranu + + + Center of screen + Środek ekranu + + + Monitor where the mouse + Tam, gdzie mysz + + + Always on %1 monitor + Zawsze na %1 ekranie + + + + Dialog + + Application launcher + Wyzwalacz programu + + + Configure lxqt-runner + Konfiguruj lxqt-runner + + + Clear lxqt-runner History + Wyczyść historię lxqt-runnera + + + Press "%1" to see dialog. + Naciśnij "%1", aby zobaczyć okno. + + + + QObject + + History + Historia + + + Mathematics + Matematyka + + + LxQt Power Management + Zarządzanie zasilaniem LxQt + + + diff --git a/translations/lxqt-runner_pt.ts b/translations/lxqt-runner_pt.ts new file mode 100644 index 0000000..170a8d0 --- /dev/null +++ b/translations/lxqt-runner_pt.ts @@ -0,0 +1,77 @@ + + + + + ConfigureDialog + + LxQt-runner Settings + Definições do LxQt-runner + + + Appearance + Aparência + + + Positioning: + Posição: + + + Show on: + Mostrar: + + + Shortcut: + Atalho: + + + Top edge of screen + Margem superior do ecrã + + + Center of screen + Centro do ecrã + + + Monitor where the mouse + Monitor em que está o rato + + + Always on %1 monitor + Sempre no monitor %1 + + + + Dialog + + Application launcher + Lançador de aplicações + + + Configure lxqt-runner + Configurar lxqt-runner + + + Clear lxqt-runner History + Limpar histórico do lxqt-runner + + + Press "%1" to see dialog. + Prima "%1" para abrir a caixa de diálogo. + + + + QObject + + History + Histórico + + + Mathematics + Matemática + + + LxQt Power Management + Gestão de energia do LxQt + + + diff --git a/translations/lxqt-runner_pt_BR.ts b/translations/lxqt-runner_pt_BR.ts new file mode 100644 index 0000000..a63d2e3 --- /dev/null +++ b/translations/lxqt-runner_pt_BR.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Configurações do executor do LxQt + + + Appearance + Aparência + + + Positioning: + Posicionamento: + + + Show on: + Exibir em: + + + Shortcut: + Atalho: + + + Top edge of screen + Borda superior da tela + + + Center of screen + Centro da tela + + + Monitor where the mouse + Onde o mouse estiver no monitor + + + Always on %1 monitor + Sempre no monitor %1 + + + + Dialog + + Application launcher + Lançador de aplicativo + + + Configure lxqt-runner + Configurar o executor do LxQt + + + Clear lxqt-runner History + Limpar o histórico do executor do LxQt + + + Press "%1" to see dialog. + Pressione "%1" para ver o diálogo. + + + + QObject + + History + Histórico + + + Mathematics + Matemática + + + LxQt Power Management + Gerenciamento de energia do LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_ro_RO.ts b/translations/lxqt-runner_ro_RO.ts new file mode 100644 index 0000000..e401d04 --- /dev/null +++ b/translations/lxqt-runner_ro_RO.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Setări lxqt-runner + + + Appearance + Aspect + + + Positioning: + Poziție: + + + Show on: + Afișează pe: + + + Shortcut: + Scurtătură: + + + Top edge of screen + Marginea superioară a ecranului + + + Center of screen + Centrul ecranului + + + Monitor where the mouse + Monitorizează unde este mausul + + + Always on %1 monitor + Întotdeauna pe monitorul %1 + + + + Dialog + + Application launcher + Lansator de aplicații + + + Configure lxqt-runner + Configurare lxqt-runner + + + Clear lxqt-runner History + Curăță istoricul lxqt-runner + + + Press "%1" to see dialog. + Apăsați "%1" pentru a afișa dialogul. + + + + QObject + + History + Istoric + + + Mathematics + Matematică + + + LxQt Power Management + Gestiune alimentare LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_ru.ts b/translations/lxqt-runner_ru.ts new file mode 100644 index 0000000..d1d93cd --- /dev/null +++ b/translations/lxqt-runner_ru.ts @@ -0,0 +1,98 @@ + + + + + ConfigureDialog + + + Runner Settings + Настройки ускорителя запуска + + + + Appearance + Внешний вид + + + + Positioning: + Позиция: + + + + Show on: + Показывать на: + + + + Shortcut: + Сочетание клавиш: + + + + Top edge of the screen + Верхней границе экрана + + + + Center of the screen + В центре экрана + + + + Focused screen + Активном экране + + + + Always on screen %1 + Всегда на %1 экране + + + + Reset + Сброс + + + + Dialog + + + Application launcher + Ускоритель запуска программ + + + + Configure + Настроить + + + + Clear History + Очистить историю + + + + Show/hide runner dialog + Показать/скрыть окно ускорителя + + + + QObject + + + History + Из истории + + + + Mathematics + Математика + + + + Power Management + Управление энергопотреблением + + + diff --git a/translations/lxqt-runner_ru_RU.ts b/translations/lxqt-runner_ru_RU.ts new file mode 100644 index 0000000..d003239 --- /dev/null +++ b/translations/lxqt-runner_ru_RU.ts @@ -0,0 +1,98 @@ + + + + + ConfigureDialog + + + Runner Settings + Настройки ускорителя запуска + + + + Appearance + Внешний вид + + + + Positioning: + Позиция: + + + + Show on: + Показывать на: + + + + Shortcut: + Сочетание клавиш: + + + + Top edge of the screen + Верхней границе экрана + + + + Center of the screen + В центре экрана + + + + Focused screen + Активном экране + + + + Always on screen %1 + Всегда на %1 экране + + + + Reset + Сброс + + + + Dialog + + + Application launcher + Ускоритель запуска программ + + + + Configure + Настроить + + + + Clear History + Очистить историю + + + + Show/hide runner dialog + Показать/скрыть окно ускорителя + + + + QObject + + + History + Из истории + + + + Mathematics + Математика + + + + Power Management + Управление энергопотреблением + + + diff --git a/translations/lxqt-runner_sk_SK.ts b/translations/lxqt-runner_sk_SK.ts new file mode 100644 index 0000000..78f9e5b --- /dev/null +++ b/translations/lxqt-runner_sk_SK.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Nastavenia Spúšťača LxQt + + + Appearance + Vzhľad + + + Positioning: + Pozícia: + + + Show on: + Kde zobrazovať: + + + Shortcut: + Skratka: + + + Top edge of screen + Horný okraj obrazovky + + + Center of screen + Stred obrazovky + + + Monitor where the mouse + Monitor, kde je myš + + + Always on %1 monitor + Vždy na monitore %1 + + + + Dialog + + Application launcher + Spúšťač aplikácií + + + Configure lxqt-runner + Nastaviť Spúšťač LxQt + + + Clear lxqt-runner History + + + + Press "%1" to see dialog. + Stlačením „%1“ zobrazte dialóg. + + + + QObject + + History + História + + + Mathematics + Matematika + + + LxQt Power Management + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_sl.ts b/translations/lxqt-runner_sl.ts new file mode 100644 index 0000000..baa79d1 --- /dev/null +++ b/translations/lxqt-runner_sl.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Nastavitve za LxQt-runner + + + Appearance + Videz + + + Positioning: + Položaj: + + + Show on: + Pokaži na: + + + Shortcut: + Bližnjica: + + + Top edge of screen + Vrhnjem robu zaslona + + + Center of screen + Sredini zaslona + + + Monitor where the mouse + Zaslonu, kjer je miška + + + Always on %1 monitor + Vedno na zaslonu %1 + + + + Dialog + + Application launcher + Zaganjalnik programov + + + Configure lxqt-runner + Nastavitve za LxQt-runner + + + Clear lxqt-runner History + Počisti zgodovino za LxQt-runner + + + Press "%1" to see dialog. + Za prikaz pogovornega okna pritisnite »%1«. + + + + QObject + + History + Zgodovina + + + Mathematics + Matematika + + + LxQt Power Management + Upravljanje z energijo + + + \ No newline at end of file diff --git a/translations/lxqt-runner_sr@latin.ts b/translations/lxqt-runner_sr@latin.ts new file mode 100644 index 0000000..d6818f6 --- /dev/null +++ b/translations/lxqt-runner_sr@latin.ts @@ -0,0 +1,81 @@ + + + ConfigureDialog + + + LxQt-runner Settings + + + + + Appearance + + + + + Positioning: + + + + + Show on: + + + + + Shortcut: + + + + + Top edge of screen + + + + + Center of screen + + + + + Monitor where the mouse + + + + + Always on %1 monitor + + + + + Dialog + + + Application launcher + + + + + Configure lxqt-runner + + + + + Press "%1" to see dialog. + + + + + QObject + + + History + + + + + Mathematics + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_sr_BA.ts b/translations/lxqt-runner_sr_BA.ts new file mode 100644 index 0000000..d0b4527 --- /dev/null +++ b/translations/lxqt-runner_sr_BA.ts @@ -0,0 +1,69 @@ + + + + + ConfigureDialog + + LxQt-runner Settings + Подешавања Рејзор-покретача + + + Appearance + Изглед + + + Positioning: + Позиција: + + + Show on: + Прикажи на: + + + Shortcut: + Пречица: + + + Top edge of screen + горња ивица екрана + + + Center of screen + центар екрана + + + Monitor where the mouse + екрану на ком је миш + + + Always on %1 monitor + увијек на екрану %1 + + + + Dialog + + Application launcher + Покретач програма + + + Configure lxqt-runner + Подеси Рејзор-покретача + + + Press "%1" to see dialog. + Притисните „%1“ да бисте видјели дијалог. + + + + QObject + + History + Историјат + + + Mathematics + Математика + + + diff --git a/translations/lxqt-runner_sr_RS.ts b/translations/lxqt-runner_sr_RS.ts new file mode 100644 index 0000000..3a58130 --- /dev/null +++ b/translations/lxqt-runner_sr_RS.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Подешавања Рејзор-покретача + + + Appearance + Изглед + + + Positioning: + Позиција: + + + Show on: + Прикажи на: + + + Shortcut: + Пречица: + + + Top edge of screen + горња ивица екрана + + + Center of screen + центар екрана + + + Monitor where the mouse + екрану на ком је миш + + + Always on %1 monitor + увек на екрану %1 + + + + Dialog + + Application launcher + Покретач програма + + + Configure lxqt-runner + Подеси Рејзор-покретача + + + Clear lxqt-runner History + + + + Press "%1" to see dialog. + Притисните „%1“ да бисте видели дијалог. + + + + QObject + + History + Историјат + + + Mathematics + Математика + + + LxQt Power Management + + + + \ No newline at end of file diff --git a/translations/lxqt-runner_th_TH.ts b/translations/lxqt-runner_th_TH.ts new file mode 100644 index 0000000..b43a455 --- /dev/null +++ b/translations/lxqt-runner_th_TH.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + ค่าตั้งกล่องป้อนคำสั่ง-lxqt + + + Appearance + รูปลักษณ์ + + + Positioning: + ตำแหน่ง: + + + Show on: + แสดงบน: + + + Shortcut: + ปุ่มลัด: + + + Top edge of screen + บริเวณขอบบนของจอภาพ + + + Center of screen + บริเวณส่วนกลางของจอภาพ + + + Monitor where the mouse + จอภาพที่เมาส์อยู่ + + + Always on %1 monitor + ประจำอยู่ที่จอภาพ %1 เสมอ + + + + Dialog + + Application launcher + ปุ่มเรียกใช้งานโปรแกรม + + + Configure lxqt-runner + ปรับแต่งกล่องป้อนคำสั่ง-lxqt + + + Clear lxqt-runner History + ล้างประวัติกล่องป้อนคำสั่ง-lxqt + + + Press "%1" to see dialog. + กด "%1" เพื่อดูกล่องโต้ตอบ + + + + QObject + + History + ประวัติ + + + Mathematics + การคำนวณเลข + + + LxQt Power Management + การจัดการพลังงานของ LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_tr.ts b/translations/lxqt-runner_tr.ts new file mode 100644 index 0000000..6f4957c --- /dev/null +++ b/translations/lxqt-runner_tr.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt-çalıştırıcı Ayarları + + + Appearance + Görünüm + + + Positioning: + Konumlandırma: + + + Show on: + Şunda Göster: + + + Shortcut: + Kısayol: + + + Top edge of screen + Ekranın üst köşesi + + + Center of screen + Ekranın merkezi + + + Monitor where the mouse + Fare konumunda görüntüle + + + Always on %1 monitor + Her zaman %1 ekranında + + + + Dialog + + Application launcher + Uygulama başlatıcı + + + Configure lxqt-runner + LxQt-çalıştırıcıyı yapılandır + + + Clear lxqt-runner History + LxQt-çalıştırıcı geçmişini temizle + + + Press "%1" to see dialog. + Diyaloğu görmek için "%1" üzerine basın + + + + QObject + + History + Geçmiş + + + Mathematics + İşlemler + + + LxQt Power Management + LxQt Güç Yönetimi + + + \ No newline at end of file diff --git a/translations/lxqt-runner_uk.ts b/translations/lxqt-runner_uk.ts new file mode 100644 index 0000000..6b7de33 --- /dev/null +++ b/translations/lxqt-runner_uk.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + Налаштування запускача програм LxQt + + + Appearance + Вигляд + + + Positioning: + Розташування: + + + Show on: + Монітор: + + + Shortcut: + Клавіатурне скорочення: + + + Top edge of screen + Зверху екрану + + + Center of screen + Посередині екрану + + + Monitor where the mouse + Де курсор миші + + + Always on %1 monitor + Завжди №%1 + + + + Dialog + + Application launcher + Запускач програм + + + Configure lxqt-runner + Налаштувати запускач програм LxQt + + + Clear lxqt-runner History + Стерти історію lxqt-runner + + + Press "%1" to see dialog. + Натисніть "%1" для відкриття діалогу. + + + + QObject + + History + Історія + + + Mathematics + Математика + + + LxQt Power Management + Керування живленням LxQt + + + \ No newline at end of file diff --git a/translations/lxqt-runner_zh_CN.ts b/translations/lxqt-runner_zh_CN.ts new file mode 100644 index 0000000..4cf0084 --- /dev/null +++ b/translations/lxqt-runner_zh_CN.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt启动器设置 + + + Appearance + 外观 + + + Positioning: + 位置: + + + Show on: + 显示在: + + + Shortcut: + 快捷键: + + + Top edge of screen + 屏幕顶部 + + + Center of screen + 屏幕中部 + + + Monitor where the mouse + 鼠标所在的显示器 + + + Always on %1 monitor + 总是在 %1 显示器 + + + + Dialog + + Application launcher + 应用程序启动器 + + + Configure lxqt-runner + 配置LxQt启动器 + + + Clear lxqt-runner History + 清空 lxqt-runner 历史 + + + Press "%1" to see dialog. + 按下 "%1" 以查看对话框。 + + + + QObject + + History + 历史 + + + Mathematics + 数学 + + + LxQt Power Management + LxQt 电源管理 + + + \ No newline at end of file diff --git a/translations/lxqt-runner_zh_TW.ts b/translations/lxqt-runner_zh_TW.ts new file mode 100644 index 0000000..2f46360 --- /dev/null +++ b/translations/lxqt-runner_zh_TW.ts @@ -0,0 +1,75 @@ + + + ConfigureDialog + + LxQt-runner Settings + LxQt快速執行設定 + + + Appearance + 外觀 + + + Positioning: + 位於: + + + Show on: + 顯示在: + + + Shortcut: + 快捷鍵: + + + Top edge of screen + 螢幕頂端 + + + Center of screen + 螢幕中間 + + + Monitor where the mouse + 在滑鼠所在的顯示器 + + + Always on %1 monitor + 總是在%1顯示器 + + + + Dialog + + Application launcher + 應用程式啟動器 + + + Configure lxqt-runner + 設定LxQt快速執行 + + + Clear lxqt-runner History + 清除LxQt快速執行的歷史紀錄 + + + Press "%1" to see dialog. + 按下"%1"檢視對話。 + + + + QObject + + History + 歷史記錄 + + + Mathematics + 數學 + + + LxQt Power Management + LxQt電源管理 + + + \ No newline at end of file diff --git a/vbox-icons/os_archlinux.png b/vbox-icons/os_archlinux.png new file mode 100644 index 0000000..01e1708 Binary files /dev/null and b/vbox-icons/os_archlinux.png differ diff --git a/vbox-icons/os_archlinux_64.png b/vbox-icons/os_archlinux_64.png new file mode 100644 index 0000000..93da7eb Binary files /dev/null and b/vbox-icons/os_archlinux_64.png differ diff --git a/vbox-icons/os_debian.png b/vbox-icons/os_debian.png new file mode 100644 index 0000000..4ca21f3 Binary files /dev/null and b/vbox-icons/os_debian.png differ diff --git a/vbox-icons/os_debian_64.png b/vbox-icons/os_debian_64.png new file mode 100644 index 0000000..73f4667 Binary files /dev/null and b/vbox-icons/os_debian_64.png differ diff --git a/vbox-icons/os_dos.png b/vbox-icons/os_dos.png new file mode 100644 index 0000000..a4cd90c Binary files /dev/null and b/vbox-icons/os_dos.png differ diff --git a/vbox-icons/os_fedora.png b/vbox-icons/os_fedora.png new file mode 100644 index 0000000..69037e0 Binary files /dev/null and b/vbox-icons/os_fedora.png differ diff --git a/vbox-icons/os_fedora_64.png b/vbox-icons/os_fedora_64.png new file mode 100644 index 0000000..058bcd0 Binary files /dev/null and b/vbox-icons/os_fedora_64.png differ diff --git a/vbox-icons/os_freebsd.png b/vbox-icons/os_freebsd.png new file mode 100644 index 0000000..b9e07fc Binary files /dev/null and b/vbox-icons/os_freebsd.png differ diff --git a/vbox-icons/os_freebsd_64.png b/vbox-icons/os_freebsd_64.png new file mode 100644 index 0000000..a0bbe1a Binary files /dev/null and b/vbox-icons/os_freebsd_64.png differ diff --git a/vbox-icons/os_gentoo.png b/vbox-icons/os_gentoo.png new file mode 100644 index 0000000..1f8e8d8 Binary files /dev/null and b/vbox-icons/os_gentoo.png differ diff --git a/vbox-icons/os_gentoo_64.png b/vbox-icons/os_gentoo_64.png new file mode 100644 index 0000000..14eb242 Binary files /dev/null and b/vbox-icons/os_gentoo_64.png differ diff --git a/vbox-icons/os_l4.png b/vbox-icons/os_l4.png new file mode 100644 index 0000000..e51f905 Binary files /dev/null and b/vbox-icons/os_l4.png differ diff --git a/vbox-icons/os_linux.png b/vbox-icons/os_linux.png new file mode 100644 index 0000000..dc4de91 Binary files /dev/null and b/vbox-icons/os_linux.png differ diff --git a/vbox-icons/os_linux22.png b/vbox-icons/os_linux22.png new file mode 100644 index 0000000..d63493f Binary files /dev/null and b/vbox-icons/os_linux22.png differ diff --git a/vbox-icons/os_linux24.png b/vbox-icons/os_linux24.png new file mode 100644 index 0000000..c403ba7 Binary files /dev/null and b/vbox-icons/os_linux24.png differ diff --git a/vbox-icons/os_linux24_64.png b/vbox-icons/os_linux24_64.png new file mode 100644 index 0000000..ce98c40 Binary files /dev/null and b/vbox-icons/os_linux24_64.png differ diff --git a/vbox-icons/os_linux26.png b/vbox-icons/os_linux26.png new file mode 100644 index 0000000..4643b30 Binary files /dev/null and b/vbox-icons/os_linux26.png differ diff --git a/vbox-icons/os_linux26_64.png b/vbox-icons/os_linux26_64.png new file mode 100644 index 0000000..ebff89c Binary files /dev/null and b/vbox-icons/os_linux26_64.png differ diff --git a/vbox-icons/os_linux_other.png b/vbox-icons/os_linux_other.png new file mode 100644 index 0000000..f770ed6 Binary files /dev/null and b/vbox-icons/os_linux_other.png differ diff --git a/vbox-icons/os_mandriva.png b/vbox-icons/os_mandriva.png new file mode 100644 index 0000000..8af984c Binary files /dev/null and b/vbox-icons/os_mandriva.png differ diff --git a/vbox-icons/os_mandriva_64.png b/vbox-icons/os_mandriva_64.png new file mode 100644 index 0000000..04b6142 Binary files /dev/null and b/vbox-icons/os_mandriva_64.png differ diff --git a/vbox-icons/os_netbsd.png b/vbox-icons/os_netbsd.png new file mode 100644 index 0000000..bf68038 Binary files /dev/null and b/vbox-icons/os_netbsd.png differ diff --git a/vbox-icons/os_netbsd_64.png b/vbox-icons/os_netbsd_64.png new file mode 100644 index 0000000..83b9932 Binary files /dev/null and b/vbox-icons/os_netbsd_64.png differ diff --git a/vbox-icons/os_netware.png b/vbox-icons/os_netware.png new file mode 100644 index 0000000..5475ea4 Binary files /dev/null and b/vbox-icons/os_netware.png differ diff --git a/vbox-icons/os_openbsd.png b/vbox-icons/os_openbsd.png new file mode 100644 index 0000000..bd12412 Binary files /dev/null and b/vbox-icons/os_openbsd.png differ diff --git a/vbox-icons/os_openbsd_64.png b/vbox-icons/os_openbsd_64.png new file mode 100644 index 0000000..2e8c5d9 Binary files /dev/null and b/vbox-icons/os_openbsd_64.png differ diff --git a/vbox-icons/os_opensolaris.png b/vbox-icons/os_opensolaris.png new file mode 100644 index 0000000..fd7af77 Binary files /dev/null and b/vbox-icons/os_opensolaris.png differ diff --git a/vbox-icons/os_opensolaris_64.png b/vbox-icons/os_opensolaris_64.png new file mode 100644 index 0000000..057581d Binary files /dev/null and b/vbox-icons/os_opensolaris_64.png differ diff --git a/vbox-icons/os_opensuse.png b/vbox-icons/os_opensuse.png new file mode 100644 index 0000000..3f8519c Binary files /dev/null and b/vbox-icons/os_opensuse.png differ diff --git a/vbox-icons/os_opensuse_64.png b/vbox-icons/os_opensuse_64.png new file mode 100644 index 0000000..2c0b270 Binary files /dev/null and b/vbox-icons/os_opensuse_64.png differ diff --git a/vbox-icons/os_os2_other.png b/vbox-icons/os_os2_other.png new file mode 100644 index 0000000..386fe22 Binary files /dev/null and b/vbox-icons/os_os2_other.png differ diff --git a/vbox-icons/os_os2ecs.png b/vbox-icons/os_os2ecs.png new file mode 100644 index 0000000..756719a Binary files /dev/null and b/vbox-icons/os_os2ecs.png differ diff --git a/vbox-icons/os_os2warp3.png b/vbox-icons/os_os2warp3.png new file mode 100644 index 0000000..386fe22 Binary files /dev/null and b/vbox-icons/os_os2warp3.png differ diff --git a/vbox-icons/os_os2warp4.png b/vbox-icons/os_os2warp4.png new file mode 100644 index 0000000..273e991 Binary files /dev/null and b/vbox-icons/os_os2warp4.png differ diff --git a/vbox-icons/os_os2warp45.png b/vbox-icons/os_os2warp45.png new file mode 100644 index 0000000..931b95e Binary files /dev/null and b/vbox-icons/os_os2warp45.png differ diff --git a/vbox-icons/os_other.png b/vbox-icons/os_other.png new file mode 100644 index 0000000..84c0822 Binary files /dev/null and b/vbox-icons/os_other.png differ diff --git a/vbox-icons/os_qnx.png b/vbox-icons/os_qnx.png new file mode 100644 index 0000000..3434bb2 Binary files /dev/null and b/vbox-icons/os_qnx.png differ diff --git a/vbox-icons/os_redhat.png b/vbox-icons/os_redhat.png new file mode 100644 index 0000000..699436a Binary files /dev/null and b/vbox-icons/os_redhat.png differ diff --git a/vbox-icons/os_redhat_64.png b/vbox-icons/os_redhat_64.png new file mode 100644 index 0000000..050fccb Binary files /dev/null and b/vbox-icons/os_redhat_64.png differ diff --git a/vbox-icons/os_solaris.png b/vbox-icons/os_solaris.png new file mode 100644 index 0000000..9819fce Binary files /dev/null and b/vbox-icons/os_solaris.png differ diff --git a/vbox-icons/os_solaris_64.png b/vbox-icons/os_solaris_64.png new file mode 100644 index 0000000..2eda933 Binary files /dev/null and b/vbox-icons/os_solaris_64.png differ diff --git a/vbox-icons/os_ubuntu.png b/vbox-icons/os_ubuntu.png new file mode 100644 index 0000000..1e4ab75 Binary files /dev/null and b/vbox-icons/os_ubuntu.png differ diff --git a/vbox-icons/os_ubuntu_64.png b/vbox-icons/os_ubuntu_64.png new file mode 100644 index 0000000..e706aee Binary files /dev/null and b/vbox-icons/os_ubuntu_64.png differ diff --git a/vbox-icons/os_win2k.png b/vbox-icons/os_win2k.png new file mode 100644 index 0000000..d32a186 Binary files /dev/null and b/vbox-icons/os_win2k.png differ diff --git a/vbox-icons/os_win2k3.png b/vbox-icons/os_win2k3.png new file mode 100644 index 0000000..075fd09 Binary files /dev/null and b/vbox-icons/os_win2k3.png differ diff --git a/vbox-icons/os_win2k3_64.png b/vbox-icons/os_win2k3_64.png new file mode 100644 index 0000000..27c904d Binary files /dev/null and b/vbox-icons/os_win2k3_64.png differ diff --git a/vbox-icons/os_win2k8.png b/vbox-icons/os_win2k8.png new file mode 100644 index 0000000..964cad8 Binary files /dev/null and b/vbox-icons/os_win2k8.png differ diff --git a/vbox-icons/os_win2k8_64.png b/vbox-icons/os_win2k8_64.png new file mode 100644 index 0000000..ec44def Binary files /dev/null and b/vbox-icons/os_win2k8_64.png differ diff --git a/vbox-icons/os_win31.png b/vbox-icons/os_win31.png new file mode 100644 index 0000000..f229623 Binary files /dev/null and b/vbox-icons/os_win31.png differ diff --git a/vbox-icons/os_win7.png b/vbox-icons/os_win7.png new file mode 100644 index 0000000..2515304 Binary files /dev/null and b/vbox-icons/os_win7.png differ diff --git a/vbox-icons/os_win7_64.png b/vbox-icons/os_win7_64.png new file mode 100644 index 0000000..e5e4822 Binary files /dev/null and b/vbox-icons/os_win7_64.png differ diff --git a/vbox-icons/os_win95.png b/vbox-icons/os_win95.png new file mode 100644 index 0000000..ffbc5a0 Binary files /dev/null and b/vbox-icons/os_win95.png differ diff --git a/vbox-icons/os_win98.png b/vbox-icons/os_win98.png new file mode 100644 index 0000000..356d024 Binary files /dev/null and b/vbox-icons/os_win98.png differ diff --git a/vbox-icons/os_win_other.png b/vbox-icons/os_win_other.png new file mode 100644 index 0000000..fa503c8 Binary files /dev/null and b/vbox-icons/os_win_other.png differ diff --git a/vbox-icons/os_winme.png b/vbox-icons/os_winme.png new file mode 100644 index 0000000..df80c2d Binary files /dev/null and b/vbox-icons/os_winme.png differ diff --git a/vbox-icons/os_winnt4.png b/vbox-icons/os_winnt4.png new file mode 100644 index 0000000..cd81805 Binary files /dev/null and b/vbox-icons/os_winnt4.png differ diff --git a/vbox-icons/os_winvista.png b/vbox-icons/os_winvista.png new file mode 100644 index 0000000..daec590 Binary files /dev/null and b/vbox-icons/os_winvista.png differ diff --git a/vbox-icons/os_winvista_64.png b/vbox-icons/os_winvista_64.png new file mode 100644 index 0000000..cf9b582 Binary files /dev/null and b/vbox-icons/os_winvista_64.png differ diff --git a/vbox-icons/os_winxp.png b/vbox-icons/os_winxp.png new file mode 100644 index 0000000..3d90b38 Binary files /dev/null and b/vbox-icons/os_winxp.png differ diff --git a/vbox-icons/os_winxp_64.png b/vbox-icons/os_winxp_64.png new file mode 100644 index 0000000..1951045 Binary files /dev/null and b/vbox-icons/os_winxp_64.png differ diff --git a/vbox-icons/os_xandros.png b/vbox-icons/os_xandros.png new file mode 100644 index 0000000..076223e Binary files /dev/null and b/vbox-icons/os_xandros.png differ diff --git a/vbox-icons/os_xandros_64.png b/vbox-icons/os_xandros_64.png new file mode 100644 index 0000000..184147e Binary files /dev/null and b/vbox-icons/os_xandros_64.png differ diff --git a/vbox-icons/state_running_16px.png b/vbox-icons/state_running_16px.png new file mode 100644 index 0000000..dd95f9c Binary files /dev/null and b/vbox-icons/state_running_16px.png differ diff --git a/vbox-icons/vrdp_16px.png b/vbox-icons/vrdp_16px.png new file mode 100644 index 0000000..29e859c Binary files /dev/null and b/vbox-icons/vrdp_16px.png differ diff --git a/virtualbox-icons.qrc b/virtualbox-icons.qrc new file mode 100644 index 0000000..6da056a --- /dev/null +++ b/virtualbox-icons.qrc @@ -0,0 +1,68 @@ + + + vbox-icons/os_archlinux_64.png + vbox-icons/os_archlinux.png + vbox-icons/os_debian_64.png + vbox-icons/os_debian.png + vbox-icons/os_dos.png + vbox-icons/os_fedora_64.png + vbox-icons/os_fedora.png + vbox-icons/os_freebsd_64.png + vbox-icons/os_freebsd.png + vbox-icons/os_gentoo_64.png + vbox-icons/os_gentoo.png + vbox-icons/os_l4.png + vbox-icons/os_linux22.png + vbox-icons/os_linux24_64.png + vbox-icons/os_linux24.png + vbox-icons/os_linux26_64.png + vbox-icons/os_linux26.png + vbox-icons/os_linux_other.png + vbox-icons/os_linux.png + vbox-icons/os_mandriva_64.png + vbox-icons/os_mandriva.png + vbox-icons/os_netbsd_64.png + vbox-icons/os_netbsd.png + vbox-icons/os_netware.png + vbox-icons/os_openbsd_64.png + vbox-icons/os_openbsd.png + vbox-icons/os_opensolaris_64.png + vbox-icons/os_opensolaris.png + vbox-icons/os_opensuse_64.png + vbox-icons/os_opensuse.png + vbox-icons/os_os2ecs.png + vbox-icons/os_os2_other.png + vbox-icons/os_os2warp3.png + vbox-icons/os_os2warp45.png + vbox-icons/os_os2warp4.png + vbox-icons/os_other.png + vbox-icons/os_qnx.png + vbox-icons/os_redhat_64.png + vbox-icons/os_redhat.png + vbox-icons/os_solaris_64.png + vbox-icons/os_solaris.png + vbox-icons/os_ubuntu_64.png + vbox-icons/os_ubuntu.png + vbox-icons/os_win2k3_64.png + vbox-icons/os_win2k3.png + vbox-icons/os_win2k8_64.png + vbox-icons/os_win2k8.png + vbox-icons/os_win2k.png + vbox-icons/os_win31.png + vbox-icons/os_win7_64.png + vbox-icons/os_win7.png + vbox-icons/os_win95.png + vbox-icons/os_win98.png + vbox-icons/os_winme.png + vbox-icons/os_winnt4.png + vbox-icons/os_win_other.png + vbox-icons/os_winvista_64.png + vbox-icons/os_winvista.png + vbox-icons/os_winxp_64.png + vbox-icons/os_winxp.png + vbox-icons/os_xandros_64.png + vbox-icons/os_xandros.png + vbox-icons/state_running_16px.png + vbox-icons/vrdp_16px.png + + diff --git a/widgets.cpp b/widgets.cpp new file mode 100644 index 0000000..1583472 --- /dev/null +++ b/widgets.cpp @@ -0,0 +1,102 @@ +/* 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 "widgets.h" + +#include +#include + + +#include +#include +#include + + +/************************************************ + + ************************************************/ +HorizSizeGrip::HorizSizeGrip(QWidget *parent): + QWidget(parent) +{ +} + + +/************************************************ + + ************************************************/ +void HorizSizeGrip::mouseMoveEvent(QMouseEvent *event) +{ + if (!parentWidget()) + return; + + QWidget *parent = parentWidget(); + while (parent->parentWidget() && !parent->isWindow()) + { + parent = parent->parentWidget(); + } + + QRect rect = parent->geometry(); + int delta = event->globalPos().x() - rect.center().x(); + + bool isLeft = pos().x() < parent->size().width() - geometry().right(); + if (isLeft) + { + rect.setLeft(event->globalPos().x()); + rect.setRight(parent->geometry().center().x() - delta); + } + else + { + rect.setLeft(parent->geometry().center().x() - delta); + rect.setRight(event->globalPos().x()); + } + + if (rect.width() < parent->minimumWidth() || + rect.width() > parent->maximumWidth()) + return; + + parent->setGeometry(rect); +} + + +/************************************************ + + ************************************************/ +CommandComboBox::CommandComboBox(QWidget *parent) : + QComboBox(parent) +{ + +} + + +/************************************************ + + ************************************************/ +CommandListView::CommandListView(QWidget *parent) : + QListView(parent) +{ + +} diff --git a/widgets.h b/widgets.h new file mode 100644 index 0000000..8eb071c --- /dev/null +++ b/widgets.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 WIDGETS_H +#define WIDGETS_H + + +#include +#include +#include +#include + +class QEvent; + +class HorizSizeGrip: public QWidget +{ + Q_OBJECT +public: + HorizSizeGrip(QWidget *parent = 0); + +protected: + void mouseMoveEvent(QMouseEvent *event); + +}; + + +class CommandComboBox : public QComboBox +{ + Q_OBJECT +public: + explicit CommandComboBox(QWidget *parent = 0); +}; + + +class CommandListView : public QListView +{ + Q_OBJECT +public: + explicit CommandListView(QWidget *parent = 0); + +signals: + +public slots: + +}; + + +#endif // WIDGETS_H diff --git a/yamlparser.cpp b/yamlparser.cpp new file mode 100644 index 0000000..0cc0053 --- /dev/null +++ b/yamlparser.cpp @@ -0,0 +1,80 @@ +/* + * File: YamlParser.cpp + * Author: christian + * + * Created on 9. maj 2013, 13:13 + */ + +#include +#include +#include + +#include "yamlparser.h" + +YamlParser::YamlParser() +{ + state = start; +} + +YamlParser::~YamlParser() +{ +} + +void YamlParser::consumeLine(QString line) +{ + static QRegExp documentStart("---\\s*(\\[\\]\\s*)?"); + static QRegExp mapStart("(-\\s*)(\\w*)\\s*:(.*)$"); + static QRegExp mapEntry("(\\s*)(\\w*)\\s*:(.*)"); + static QRegExp continuation("(\\s*)(.*)"); + static QRegExp documentEnd("...\\s*"); + static QRegExp emptyLine("\\s*(#.*)?"); + + qDebug() << line; + + if (documentStart.exactMatch(line)) + { + m_ListOfMaps.clear(); + state = atdocumentstart; + m_CurrentIndent = -1; + } + else if (state == error) + { + // Skip + } + else if (emptyLine.exactMatch(line)) + { + // Skip + } + else if ((state == atdocumentstart || state == inlist) && mapStart.exactMatch(line)) + { + m_ListOfMaps << QMap(); + addEntryToCurrentMap(mapStart.cap(2), mapStart.cap(3)); + m_CurrentIndent = mapStart.cap(1).size(); + state = inlist; + } + else if (state == inlist && mapEntry.exactMatch(line) && mapEntry.cap(1).size() == m_CurrentIndent) + { + addEntryToCurrentMap(mapEntry.cap(2), mapEntry.cap(3)); + } + else if (state == inlist && continuation.exactMatch(line) && continuation.cap(1).size() > m_CurrentIndent) + { + m_ListOfMaps.last()[m_LastKey].append(continuation.cap(2)); + } + else if ((state == atdocumentstart || state == inlist) && documentEnd.exactMatch(line)) + { + qDebug() << "emitting:" << m_ListOfMaps; + emit newListOfMaps(m_ListOfMaps); + state = documentdone; + } + else + { + qWarning() << "Yaml parser could not read:" << line; + state = error; + } +} + +void YamlParser::addEntryToCurrentMap(QString key, QString value) +{ + m_ListOfMaps.last()[key.trimmed()] = value.trimmed(); + m_LastKey = key.trimmed(); +} diff --git a/yamlparser.h b/yamlparser.h new file mode 100644 index 0000000..9962f27 --- /dev/null +++ b/yamlparser.h @@ -0,0 +1,49 @@ +/* + * File: YamlParser.h + * Author: christian + * + * Created on 9. maj 2013, 13:13 + */ + +#ifndef YAMLPARSER_H +#define YAMLPARSER_H + +#include +#include +#include +#include + +class QIODevice; + +class YamlParser : public QObject +{ + Q_OBJECT +public: + YamlParser(); + virtual ~YamlParser(); + + void consumeLine(QString line); + +signals: + void newListOfMaps(QList > maps); + +private: + + QList > m_ListOfMaps; + + enum + { + start, + atdocumentstart, + inlist, + documentdone, + error + } state; + + int m_CurrentIndent; + QString m_LastKey; + + void addEntryToCurrentMap(QString key, QString value); +}; + +#endif /* YAMLPARSER_H */